Repository navigation
ci: gate kiro-light against borderless card surfaces with a computed-style sweep - #25595
Conversation
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks: both visible changes are only a border added to an existing control, and the before and after screenshots in both themes show them. The blind reader read both correctly. Notes
[UX-REVIEWED] cf3c5fd Description read[DESCRIPTION-READ] 1460e9e84a73adeab3eda2680eecb2a64ae6c168aaec1733b80177854ce51554 That sha256 names everything this verdict read: the PR description, plus the 11 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the gate checks rendered output for a rule only rendered output can answer, the two card fixes have screenshots, and the patch takes nothing away. Notes
[DESIGN-REVIEWED] cf3c5fd Description read[DESCRIPTION-READ] deea28dd079424fc4c0b204c914663fe7185925394e75280684f595d72921382 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. The gate enforces a documented rule ( Notes
What this change shipsInventory (8 items) — 5 justifiedIntent: catch, in CI, any dashboard surface that disappears in kiro-light because it has no edge of its own. This is an ADDITION (a gate) plus two fixes the gate found.
[FIRST-PRINCIPLES-REVIEWED] cf3c5fd Description read[DESCRIPTION-READ] d3505d59e17797f5abc4a3b1b9071c4a1b315de8e9cf3f2c9d04f0fcf7d5fd86 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
3b8d801 to
4393ee4
Compare
iamwhatever
left a comment
There was a problem hiding this comment.
REQUEST_CHANGES at 4393ee47a661bd03c489c5203039ba254b66ac0c (issue needed, no code defect found).
The gate looks sound. It renders ten routes in kiro-light, compares each painted surface against light and kiro-dark in the same DOM, and plants must-report and must-not-report canaries on every route so a blind probe fails (check-kiro-light-cards.mjs#L95-L100). The CI step reuses the e2e job's build, adds no permissions or secrets, and passed on this head.
Blocker: untracked deferral. "Not a goal" leaves built-in app pages "for a later route addition", and the theming contract now says pages outside the list are only caught in review (theming-contract.md#L72-L74). #8751 named those app pages, and Fixes #8751 will close it on merge, so nothing would track the gap. Please open one issue for app-page coverage (per-app fixtures) and link it in the description, or switch to Part of #8751.
AI findings judged non-blocking
- First Principles: unused
--jsonreport, emptyEXEMPTmachinery, doc repeats the script header. These are subtraction suggestions with no user-visible harm. - Design: Chromium style serialisation drift could fail the gate. Canaries are checked first on every route, so drift fails loudly as a canary miss (#L327-L332).
— crew-pr-reviewer (r134)
|
Thanks. Took the second option: the description now says On the non-blocking notes: agreed they are subtraction suggestions; leaving the |
|
@iamwhatever thanks for the review. App-page coverage is now in this PR, on head 5943a83, so nothing is deferred.
The description is back to |
…style sweep Render ten dashboard routes of the built SPA in kiro-light over loopback with fixture API answers and fail when a surface is a card in the light or kiro-dark theme but has no border, ring, shadow or outline in kiro-light, where --card equals --bg. Planted bare and bordered controls on each route keep the probe from passing vacuously. Fixes #8751
Add the 23 built-in app pages from builtinRegistry.ts to the gate's route list, each with ready text that only its real content shows. The pages that crash or stop at a backend-error notice against the generic stub answers (AWS Control, File Explorer, PPTX Maker, Mission Control, Notes, Mochi) get per-app fixtures with one populated row each. The sweep found two bare cards on those pages, and both now carry a border: the File Explorer breadcrumb field and the Notes rendered/raw switch. Fixes #8751
5943a83 to
cf3c5fd
Compare
iamwhatever
left a comment
There was a problem hiding this comment.
Approving cf3c5fd.
Our r134 blocker (untracked app-page coverage) is resolved: the gate now renders all 23 built-in app pages plus the 10 core routes (ROUTES), with planted canaries on every route so a probe that matches nothing fails (L429-L449). The CI step adds no permissions or secrets, serves only on 127.0.0.1, and ran green in the E2E job on this head. The two card fixes are one border each, with screenshots. All lanes pass and every check is green.
AI findings judged non-blocking
- Design: ROUTES is hand-listed, so a future app can be missed. Every page that exists today is covered, and the theming contract tells authors to add new pages. A registry cross-check would be a nice later addition.
- UX: no screenshot of the breadcrumb hover state. The hover rule only darkens an existing border. This is evidence polish.
- First Principles 6-8: the unused --json report, the empty EXEMPT list and the docs page are extra surface with no user harm. The author chose to keep them.
— crew-pr-reviewer (r135)
Problem / Motivation
Goal: CI fails when a dashboard surface has no edge of its own in
kiro-light, where--cardand--bgare the same#ffffff.A
bg-card(orbg-bg-elevated) box on the page with no border, ring or shadow paints nothing in kiro-light and shows as a card in every other theme.website/docs/theming-contract.mdstates the rule ("A card must carry its own edge"), but no check enforced it. A new borderless card was only caught if a reviewer remembered that paragraph. The one-time computed-style sweep that verified PR #8711 answered the question once. This makes it a repeatable gate, as the Design and First Principles lanes asked on #8711.Why it matters
The failure is invisible in every theme a reviewer is likely to look at, and the card vanishes only for kiro-light users. A class grep cannot stand in for the check: on #8711 three of six grep hits carried their edge in an inline
style, and two were opaque covers, not cards. The app-page sweep in this PR found two more such cards that had shipped: the File Explorer breadcrumb field and the Notes rendered/raw switch.Not a goal
website/src/apps/builtinRegistry.ts. A page added later is covered once it is added toROUTES(the docs say so).Intended? / Repro
Intended? The gap is not intended.
website/docs/theming-contract.md:67-73on main states the rule and says a borderless card ships invisible "with no gate failing".website/src/styles/theme-palettes.css:577-578([data-theme="kiro-light"]) sets--bg:#ffffffand--card:#ffffff, so the condition the issue describes still holds. No script underwebsite/scripts/or step in.github/workflows/ci.ymlchecks it.Repro: on main, removing
border border-borderfrom the shared search input (website/src/components/ui.tsx:178) and rebuilding leaves CI green. With this branch, the same mutation makesnode scripts/check-kiro-light-cards.mjsexit 1 with six hits (settings-overview, settings-chat, settings-display-theme, artifacts, knowledge, apps-library), for example:The app pages on main reproduce the defect without any mutation. Before the two card fixes, the gate reported:
That is
website/src/apps/file-explorer/styles.ts:30(border:1px solid transparenton avar(--card)field) and the rendered/raw switch inwebsite/src/apps/md-notebook/MdNotebookPage.tsx:713-720(avar(--card)track with no border).What changed (motivation → approach → change)
Motivation: the rule asks whether a surface is visible, which only the rendered page can answer. Approach: render each route in kiro-light and compare computed colours with a reference theme in the same DOM. Change:
website/scripts/check-kiro-light-cards.mjs(new). Serveswebsite/diston127.0.0.1with the shared/api/**boot fixtures (scripts/lib/boot-api.mjs) and one chat slot. For each route it asserts the page rendered itsreadytext anddata-theme="kiro-light", turns off transitions and animations, and checks every painted element of at least 16x16 px. The element's background is composited over its painted ancestors. An element is reported when it matches its backdrop in kiro-light (every channel within 3), has no border side,box-shadowlayer (which coversring-*) or outline whose colour differs from the backdrop, AND differs from its backdrop after switchingdata-themein place tolightorkiro-dark. Fills that equal their parent in every theme (opaque covers) are not reported. A shadow layer counts as an edge only if its colour shows against the backdrop and it has a non-zero offset, blur or spread, becauseshadow-noneandring-0compute to transparent zero-size layers, notnone./worlds,/channels,/auto-improvement,/auto-research,/aws-control,/file-explorer,/code-review-sage,/workflows,/dev-fleet,/issue-radar,/meetings,/papyrus,/pptx-maker,/ops-mission-control,/design-critique,/crew-companion,/projects,/md-notebook,/mochi,/spec-builder,/personal-shopper,/design-tweak,/project-scaffolder.APP_FIXTURES, keyed by pathname, for the six app pages that crash or stop at a backend-error notice against the generic[]/{}answers: AWS Control (accounts, profiles, consent, costs, drive, shares), File Explorer (health, tree, git-status), PPTX Maker (engine, deps, decks, deck, styles, templates), Mission Control (state, incidents, ledger), Notes (health, vaults, settings, notes, changes) and Mochi (pet-state, stats, settings, watchlist, pinned, plan, activity, manifest). Each carries one populated row where the page has a list, and that row is the route'sreadytext, so the gate checks the page with content on it.var(--card)box and one with a transparent zero-size shadow must be reported. The same box with a border or a 1px ring must not be. A probe that matched nothing fails instead of passing green.EXEMPT(empty) takes reasoned selectors, and a stale exemption fails the gate.1px solid var(--border)(hover darkens it tovar(--muted)), matching the path input it turns into on click. The Notes rendered/raw switch track gets1px solid var(--border)..github/workflows/ci.yml: a new step in thee2ejob, after the MCP-App rows harness. It reuses that job's build and Chromium install, has a 10 minute cap (33 routes run in about 70 to 130 seconds locally), and needs no gateway.docs/ci/kiro-light-card-gate.md(new) plus its row indocs/ci/README.md.website/docs/theming-contract.mdnow names the gate and its route coverage in place of "with no gate failing".Backwards compatibility
Two visible style changes (a border on the two cards above). No API or theme value changes. The gate passes on this branch.
Tests
The gate is itself the check. I ran it locally against a fresh
npm run buildof this branch: 33/33 routes clean (10 core routes, 23 app pages), every app page rendered its ready text with no error boundary, and all four planted controls behaved as expected on every route. Before the two card fixes it failed onapp-file-explorerandapp-md-notebookwith the hits quoted above. Against a mutated build with the shared search input's border removed it exits 1 with six hits. These are harness runs, not the test suite.Proof: not provable -- other: this host runs no local tests; CI runs them
Manual verification
Gate runs as above. Static gates: eslint on the changed files,
tsc --noEmit,scripts/check_file_line_cap.py,scripts/check_comment_history.py, YAML parse ofci.yml.Screenshots
Captured from the built SPA with the gate's own fixtures, at 2x, before and after the two fixes.
File Explorer breadcrumb field, kiro-light. Before: the field has no outline.
After: the field carries its own border.
Same field in the
lighttheme, before and after (the field was already visible here; it now has a resting border too):Notes rendered/raw switch, kiro-light. Before: the track is invisible and the two buttons float.
After: the track has its own border.
Same switch in the
lighttheme, before and after:Related Issues
Fixes #8751
Sibling sweep
Swept: git ls-tree --name-only origin/main website/scripts/ | grep -E '^website/scripts/(check|capture|probe)-' ; git grep -n "kiro-light" origin/main -- website/src/test ; the gate itself over all 23 entries of website/src/apps/builtinRegistry.ts
Sibling: website/src/test/kiroLightShellHooks.test.ts -- not affected (pins the deliberate kiro-light hooks by source; this gate covers the borderless surfaces it cannot see)
Sibling: website/scripts/check-theme-colors.mjs -- not affected (checks colour literals in source, not rendered edges)
Sibling: website/src/apps/file-explorer/styles.ts -- changed here (breadcrumb field border)
Sibling: website/src/apps/md-notebook/MdNotebookPage.tsx -- changed here (rendered/raw switch border)
Pattern harvest
Reusable: the in-place
data-themeswitch with transitions off gives a two-theme comparison from one DOM, with no element matching across loads. The planted must-report / must-not-report controls are what keep a computed-style gate from passing vacuously. Per-routereadytext taken from a fixture row keeps an app page from passing at its empty or error state.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributed under the project's Apache-2.0 license.