Repository navigation
fix(theme): sync browser toolbar colour with the active palette - #37555
Conversation
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. The diff changes only the [UX-REVIEWED] 21290a7 Description read[DESCRIPTION-READ] e9888844ed9ee6696a08e48d7a77edc4b3ebf230a23f509d3f85e036dfb069d1 That sha256 names everything this verdict read: the PR description, plus the 3 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: this is a small, reversible effect on the existing theme hook that reads the target [DESIGN-REVIEWED] 21290a7 Description read[DESCRIPTION-READ] 6e33e55aa93decb00168e4568b80b858155e8ea14bcceb8744fc9200c36ea98b 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 change is one effect on the existing meta tag, tied to linked issue #37542, and the added test fails on base. What this change shipsInventory (5 items) — 5 justifiedIntent: keep the browser toolbar colour the same as the dashboard palette the user picks. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] 21290a7 Description read[DESCRIPTION-READ] effe3f29dd71afc7da3bcd58aaa6f426d1013c47fe4c66d837680adaa25c296c 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: |
Code change approver recommendation: ApproveWhy: the decider estimates a 10% chance that this change introduces a defect, within the 12% limit for approving on its own, and every check passes. The PR adds one effect to The only other writer of the tag is the build-time An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit |
CI repair and before/after evidenceLocal candidate: 99992d50a6eb2db2ad222b4b18b9ef839b236f01 (not yet pushed). The existing EmbeddedDragRegionReporter test passes on base 55b2e4a and fails on the original PR head: the theme effect queued animation frames even without a theme-color tag. The candidate returns before scheduling when the tag is absent. The reporter test was not weakened. All 19 related frontend tests pass; removing the new guard fails the zero-queued-frames assertion. The three backend TestOffOffer failures also reproduce on the untouched base. Main now contains #37545; the candidate includes it, and all three exact tests pass. The screenshots below come from the real built pages, with mocked boot API replies and synthetic chat data. The labels show values read from the DOM, not a simulated browser toolbar:
Before source: 55b2e4a. After source: 99992d50a6eb2db2ad222b4b18b9ef839b236f01. Mode: 412x915, Kiro light. The actual phone toolbar has not been checked; Ray can confirm it on iPhone. This is not performance evidence. The pinned image URL returns 200 image/png and matches the local SHA-256: ee36b95f839213e350abcbea0273a10df4945c64770ce5cb3a45331ee2c517f5. |
8ba0b5e to
21290a7
Compare
|
Rebased: main moved in test/metrics/test_kiro_export_destination.py (55b2e4a -> 2e56b3b), including the fix from #37545. CI is re-running on 21290a7. The missing-meta animation-frame regression is fixed in this head. All 19 related frontend tests pass, and all three exact backend TestOffOffer failures pass after the mainline fix. The existing EmbeddedDragRegionReporter assertion remains unchanged. Removing the new early return makes the no-queued-frame assertion fail. The comparison image in the previous evidence comment was captured from candidate 99992d50a6eb before this final clean rebase. The three PR files are byte-identical between that reviewed candidate and this head; the source labels on the image deliberately retain the actual capture commit. The image is page-only with synthetic chat data, not a browser-toolbar capture. The iPhone check remains with Ray. The description still contains source links pinned to the original head. Current source: https://github.com/kirodotdev/KiroCrew/blob/21290a7c3baee6e005cd1b7d339337438a3fe704/website/src/hooks/useTheme.tsx . No auto-merge or review override was enabled. |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approved. On this head the review read the full diff. The new effect in useTheme.tsx uses the same pattern as the --accent effect beside it: the same deps, a read of the computed --bg token on the next frame, and a cancel on cleanup. Every path that changes the root --bg is covered: mode, palette, the installed-palette fallback and pack detail loads. Writing meta.content opens no injection path. The new tests are deterministic, clean up after themselves, and fail if the fix or any of its guards is removed. The themes.md update ships in the same commit, and nothing like this is already on main.
Done well: the tests drive animation frames by hand and cover each edge case on its own (tag missing, no token, unmount).
Optional:
website/docs/extension-seams.mdcould say that an edition'sbranding.jsonthemeColornow applies only until the theme provider mounts. After that the tag follows the palette's--bg.- One test could pin the
themeVersiondep: refresh an installed palette under the same slug and check that the tag follows the new--bg. useTheme.tsxis now 1,681 lines. Moving the host chrome sync effects into a small sibling hook later would keep it smaller.

Problem / Motivation
Goal: Keep the browser toolbar colour hint in step with the chosen dashboard palette.
The page changes colour, but its theme-color meta tag stays dark.
Why it matters
Browsers that use this hint receive the wrong colour after a palette change.
Not a goal
What changed (motivation → approach → change)
The theme hook reads the chosen background token and updates the existing meta tag. It reads the target colour, not the body's colour mid-transition. The themes spec names this behaviour. Tests cover mode and palette changes, absent CSS, a missing tag, and unmounting.
Backwards compatibility
Compatible: existing theme choices and page styles remain unchanged.
Removes nothing: no setting, palette, or browser fallback is removed.
Tests
Proof: not provable -- frontend test (prove.py runs Python only)
Manual verification
The real production bundle ran in Chromium with mocked boot API responses. After each theme sync event, the root palette and meta value were read from the DOM. Every built-in palette matched its --bg token in both modes; no page errors occurred. This is metadata verification, not a recording of a real model flow.
手机上的顶栏颜色未在真机上看,Ray 可以在 iPhone 上确认。
Screenshots / video
Why no screenshot: This changes a non-rendering meta attribute, not page pixels. A headless page screenshot cannot show browser chrome. The owner approved DOM tests and the value table as evidence.
Related Issues
Closes #37542
Sibling sweep
Swept: git grep -n 'theme-color' -- website/src website/index.html
Siblings: none -- the dashboard has one tag; editionShell tests patch only its boot value. The shared theme provider handles all palettes and resolved modes.
Pattern harvest
Not generalizable: the existing meta tag lacked a theme update; the body transition makes its current colour unsuitable as the target value.
Checklist
Contribution License Agreement
Contributed under the project's Apache-2.0 licence.