Repository navigation
Phase 32 slice D: select boundaries, tree-row bars, stress counts - #258
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 32 slice D (
docs/specs/PHASE-32-SPEC.md, FR-D1 to FR-D4, with the contracts pinned in the spec's Q1 to Q8 block and both verify rounds recorded after it).The problem
Three desktop-app checks skipped things they should measure. A
selectdrew its border in$border, which is 1.46:1 on white under a generated system, anddesktop-app-boundarydid not look at it, socanvas_evaluatesaid READY. An activetree-rowshowed where you are only by a tint and a heavier label, sodesktop-app-state-contrasthad nothing to measure on it.canvas_stressnever touched anav-item's or a tab'scount, so a sidebar badge growing from42to999+was never tried. Phase 31 recorded the first two as scope decisions (its R4 and R7); this slice reverses them.What changed
selectstroke takes$border-strongwhen the design system defines it, on every type, as text inputs and unchecked controls already do. Without the token it keeps$border, so a preset or unthemed canvas renders unchanged.desktop-app-boundarymeasures aselectthe way it measures atext-input: its border against what is behind it, passing when its own fill already stands out by 3:1. A border that draws nothing counts as invisible. The finding's suggestion now says to define$border-strongfirst when the canvas has none.nav-itembar: 2px, iniconColor($accentby default), at the row's left edge at every depth.desktop-app-state-contrastmeasures it at rest and with the hover layer, like a nav-item's. Only an active row getsposition: relative(the bar's anchor), so inactive rows render byte-identical to before.big-numberswidens anav-item'scountand a tab'scount, numbers included, to999+. Nothing else touches them:long-textandi18nleave a count alone, and a word count such asNewis untouched. A number on any other stress path (a numeric button label) is now a slot too.Decisions the spec text did not settle
long-textstretch a count such asNew. A count badge never truncates, so the stretched badge clipped andcanvas_stresswent FRAGILE with nothing the author could fix. Counts are touched bybig-numbersonly.999+, never a long figure. Counts went through the same widening as stat figures, which turns1.2Kinto1,520,847.33. Four tabs at 432px with K counts then went FRAGILE, and a tablist has no fluid-width fix. A text node reading1.2Kstill takes the long figure.position: relative. Giving every rowrelativemoved an inactive row that setxandywithoutposition. An active row withxandybut nopositionshifts, as an activenav-itemalready does.Verdicts that moved
test/unit/test-state-checks.ts$borderwarns at 1.46:1, a fill that stands out passes, disabled and web are skipped, an unset stroke is measured as invisible).test/e2e/test-viewer-rebuild.tsbig-numbersto find nothing to widen.The desktop and web pattern gates are unchanged and pass. A desktop-app realisation stamped after
apply_presetgains onedesktop-app-boundarywarning for its select, beside the text inputs and toggles that already warned there, so no stamp that was READY stops being READY.Not fixed here
$border-strongonly on a canvas with no$border, so a realisation stamped after a preset has no$border-strongand its controls warn until it is defined. The docs and the finding's suggestion say so.$border-strongis generated to clear 3:1 againstbg-primaryandbg-surfaceonly, so a control on an*-tintbackdrop warns. A select now joins the text inputs and controls that already did.Tests
test/unit/test-state-checks.ts,test/unit/test-desktop-primitives.ts(the select default, the bar's markup, the realisations' seeding) andtest/unit/test-stress.ts(counts, numbers, word counts,1.2K,NaN).test/browser/test-state-model-render.ts: the tree-row bar and fill at rest and in hover, and the select border, against the rendered pixels in three themes.test/browser/test-desktop-primitives-render.ts: the bar at x = 0 at depth 0, 1 and 2, no bar on an inactive row, and the bar inside a positioned row.test/e2e/test-stress-counts.ts:canvas_stressthrough the MCP server reportstouchedCount2 forbig-numberson the FR-D4 canvas, and nothing for word counts.Docs
The
canvas_evaluate,canvas_stressandapply_structuredocstrings, the input-control and desktop-app primitive docs (tabs,tree-row), the INSTRUCTIONS and init gotchas, GUIDELINES (both rules,tabs,tree-row, the controls line, the stress list), README (the two rule rows, thetabsandtree-rowrows, the input-control defaults, thebig-numbersrow) and VISION (slice D ticked, plus the two follow-ups it closes).