Skip to content

feat: add a default-off visual refresh feature preview flag - #32377

Open
bolichen97 wants to merge 1 commit into
mainfrom
fix/24595-visual-refresh-flag
Open

bolichen97 wants to merge 1 commit into
mainfrom
fix/24595-visual-refresh-flag

Conversation

@bolichen97

@bolichen97 bolichen97 commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Let the dashboard visual refresh land on main in pieces behind a default-off Feature Previews switch, so nobody sees it until it is ready.

A visual refresh of the dashboard is starting. Without a gate, every piece that merges changes what every user sees, before the new look is finished or agreed.

Why it matters

The refresh can be built and reviewed on main in small PRs instead of a long-lived branch, while the dashboard everyone uses stays exactly as it is.

Not a goal

  • Any restyle itself. Nothing reads the flag yet; the issue asks for the switch first, and the card says so.
  • Shipping the refresh to everyone. Retiring the flag changes what every reader sees by default and needs its own recorded decision.
  • A "See what it looks like" capture for the card. There is nothing to show yet.

What changed (motivation → approach → change)

Settings > Developer > Feature Previews gets a Visual refresh switch, in the Chats and Dashboards group. It is off by default and changes nothing in this build: its one-line summary reads "A new look for the dashboard. Nothing changes yet.", and its info tip says pieces appear as they land.

It reuses the existing preview flag mechanism, the same shape as the other switches on that page: PREVIEW_VISUAL_REFRESH (mc-preview-visual-refresh) in website/src/utils/previewFlags.ts, read with usePreviewFlag. Like every switch, it is kept on the gateway under dashboard.feature_previews.visual_refresh, so the name joins PREVIEW_FLAGS and the gateway's FEATURE_PREVIEW_FLAGS (config/sections_dashboard.py, pinned equal by test_feature_previews_config.py), and src/kiro_crew/docs/configuration.md lists it. An absent or unknown value reads as off.

Like the other preview rows, an LTS build does not draw it, and Settings search there does not offer it: its id is in PREVIEW_FLAG_SETTING_IDS (commandPalette/settingsSearchCore.ts).

The row is toggle-only in FeaturePreviewsSection.tsx. Its label, summary and info-tip text are in all twelve catalogs, with translator context in en.context.json; en-XA, config-baseline.json, the settings registry (settings-registry.generated.json, commandPalette/settingsRegistry.gen.ts) and the UI index (ui-index.generated.json) are regenerated.

Backwards compatibility

Compatible: a new, unset switch reads as off on the gateway and in the browser cache, so every existing install renders the dashboard unchanged.

Removes nothing: the diff only adds a flag, a settings row, its strings, the gateway's name for it and its LTS search entry.

Tests

  • website/src/test/previewSurfaces.test.tsx: a new test pins that Visual refresh starts off, turns on when clicked, and writes only mc-preview-visual-refresh among preview keys. The section's row table (FEATURE_PREVIEW_ROWS) gains a Visual refresh row with an info tip, so the drawn-rows check and the computed info-tip total cover it.
  • website/src/test/ltsFeaturePreviewsOff.test.tsx: a new test pins that Settings search on an LTS build does not offer the Visual refresh row. It fails without the PREVIEW_FLAG_SETTING_IDS entry (expected true to be false).

The Feature Previews tests (-t "Feature Previews") and the LTS test file each passed 5 times in shuffled order (--sequence.shuffle). test_feature_previews_config.py keeps the two flag lists pinned equal; the i18n suite (npm run i18n:check with I18N_BASE_REF at the merge base), tsc -p tsconfig.app.json and the settings-registry and UI-index tests pass.

Manual verification

On Linux (Ubuntu 24.04), built the dashboard (npm run build) and served it with website/scripts/lib/serve-dist.mjs and stub-dashboard-api.mjs in Playwright at /settings/developer/feature-previews: the row renders in both themes, reads off by default, flips on when clicked, and the click writes mc-preview-visual-refresh.

Screenshots / video

Settings > Developer > Feature Previews with this change, real built SPA with a stubbed API. The Visual refresh row is the last row of the Chats and Dashboards group, after Send pending approvals to chat apps.

Off (default), light:

Feature Previews section, light theme, Visual refresh switch off

Off (default), dark:

Feature Previews section, dark theme, Visual refresh switch off

On after a click, light:

Feature Previews section, light theme, Visual refresh switch on

Related Issues

Closes #24595

Builds on #24618 by @dodgeblaster.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 7, 2026 14:13
@bolichen97
bolichen97 enabled auto-merge (squash) November 7, 2026 14:13
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of dd89308642a177ae465b98ce7504735daaa0f9b5 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks. The change only adds things: a default-off flag built on the existing preview-flag mechanism, with screenshots of the new row attached.

Notes

  • Right now the switch does nothing. Users who turn it on see no change, as the card's summary admits. Each later refresh PR should read usePreviewFlag(PREVIEW_VISUAL_REFRESH) directly, rather than every piece adding its own gate.

[DESIGN-REVIEWED] dd89308

Description read

[DESCRIPTION-READ] b771f030fc4cc0336061dc72472b5eb05a112ffdb1e20e2f4760ed0a94f004b8

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — 🔴 BLOCK

Premise-level review of dd89308642a177ae465b98ce7504735daaa0f9b5 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: BLOCK

The Visual refresh switch has no reader. Nothing in the dashboard changes when it is flipped, so shipping nothing loses nobody anything. The flag should land with the first restyle piece that reads it.

What this change ships

Inventory (5 items) — 2 justified

Intent: let the dashboard refresh merge in pieces behind a default-off preview switch. ADDITION.

  1. A "Visual refresh" toggle in Settings > Developer > Feature Previews that changes nothing — zero consumers
  2. A new gateway config name dashboard.feature_previews.visual_refresh, persisted and documented — zero consumers
  3. The new row's label, summary and tip in all twelve catalogs, plus regenerated registry and UI index — zero consumers
  4. The row is hidden on LTS builds and in LTS Settings search — justified
  5. Default off, so no existing user sees a change — justified

Blockers

Item 1–3 — a preview switch with no reader (zero consumers)
Trigger: I grepped PREVIEW_VISUAL_REFRESH|visual_refresh|visual-refresh outside the test files and found 0 readers of the flag's value. The only uses are the toggle's own usePreviewFlag and setPreviewFlag in FeaturePreviewsSection.tsx, plus the definition lists. The doc comment in previewFlags.ts says "Nothing reads it yet", and the description says "Nothing reads the flag yet".
Outcome: Every user sees a switch that does nothing. Twelve catalogs, the config schema, configuration.md and two generated indexes now carry a name with no behaviour behind it. The goal is met just as well by adding the flag in the first PR that restyles something.
Subtraction: delete PREVIEW_VISUAL_REFRESH, the row, its strings, the FEATURE_PREVIEW_FLAGS and PREVIEW_FLAG_SETTING_IDS entries and the regenerated rows. Add them in the first PR that reads the flag.
Clears when: the same diff includes at least one component that renders differently when usePreviewFlag(PREVIEW_VISUAL_REFRESH) is true, or a maintainer records /ai-review override first-principles dd89308642a177ae465b98ce7504735daaa0f9b5 zero-consumers: <decision>.

[FIRST-PRINCIPLES-REVIEWED] dd89308

Description read

[DESCRIPTION-READ] 368fad2202c390d93966b5eea60f69a984c42510bbb39c88b49208aa55976bb0

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed dd89308642a177ae465b98ce7504735daaa0f9b5 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] dd89308

Verdict parsed from the review's SHA-scoped output markers for commit dd89308642a177ae465b98ce7504735daaa0f9b5.

False positive or not applicable? A repository writer can comment:
/ai-review override fable dd89308642a177ae465b98ce7504735daaa0f9b5 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of dd89308642a177ae465b98ce7504735daaa0f9b5 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing blocks. The blind reader understood the one new control, the Visual refresh switch, and would use it. All three screenshots show it, off in both themes and on.

Notes

  • The reader asked "why I'd turn on something that changes nothing, or when it will start doing something." Change visual_refresh_desc_summary from "Nothing changes yet." to say why someone would turn it on now, e.g. "A new look for the dashboard, shown piece by piece as it's built."
  • The reader asked whether "the dashboard" here means the whole app or the "Dashboard fields" screen. The other rows in the same Chats and Dashboards group use "Dashboard" for a specific screen. Say "the whole app" (or whichever scope is meant) in the summary.

[UX-REVIEWED] dd89308

Description read

[DESCRIPTION-READ] 0d25621c5d8f66183866c4b976347b29454402073d8f2598f28cb94b32934c76

That sha256 names everything this verdict read: the PR description, plus the 6 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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of dd89308642a177ae465b98ce7504735daaa0f9b5 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] dd89308

False positive or not applicable? A repository writer can comment:
/ai-review override gpt dd89308642a177ae465b98ce7504735daaa0f9b5 false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: checking Automated validation is still running labels Nov 7, 2026
@bolichen97
bolichen97 force-pushed the fix/24595-visual-refresh-flag branch from ae83e8b to 1f62e59 Compare November 7, 2026 19:08
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 7, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] Rebased onto main 21597a3 at 1f62e59 to clear the merge conflict in src/kiro_crew/docs/ui-index.generated.json (took main's copy and regenerated it with npm --prefix website run gen:ui; --check reports up to date).

The Frontend Tests (1) red on ae83e8b was this PR's own French string: src/i18n/style/frStyle.test.ts flagged pages.developer.featurePreviewsTab.visual_refresh_desc for a plain space before :. Fixed by using U+202F there, as style/fr.md §1 asks. frStyle.test.ts and all of src/i18n pass locally with I18N_BASE_REF set (77 files, 1248 tests). Local GPT and Opus reviews at 1f62e59: PASS, no findings.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Nov 7, 2026
@bolichen97
bolichen97 force-pushed the fix/24595-visual-refresh-flag branch from 1f62e59 to c43bc15 Compare November 7, 2026 20:30
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] Rebased again onto main 95695ba at c43bc15: main moved in src/kiro_crew/docs/ui-index.generated.json while the last CI ran, so the PR showed a conflict. Took main's copy and regenerated it (gen:ui --check up to date). The hand-written diff is byte-identical to 1f62e59. Local GPT and Opus reviews at c43bc15: PASS.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Nov 7, 2026
@bolichen97
bolichen97 force-pushed the fix/24595-visual-refresh-flag branch from c43bc15 to ba19cca Compare November 7, 2026 23:30
@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@bolichen97 recorded a owner-decision release (class owner-decision) for the first-principles AI finding on cb709acc9eccbad4668982bad8e9370e67f72658.

agent: the default-off flag lands first and the restyle PRs read it later, per the maintainer decision #32377 (comment); #24595 asks for exactly this flag, and the switch says nothing changes yet.

This decision applies only to this commit. A new push requires a new judgment.

@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded, but the following reviewer lane(s) could not be re-run automatically: First Principles Review. Re-run the lane's latest workflow run for cb709acc9eccbad4668982bad8e9370e67f72658 manually from the Actions tab.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 13, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

Re-sync budget reset: this PR is inside its 48-hour keep-green watch, and main conflicted with it again in the generated UI index, so it needs one more re-sync to stay mergeable.

[operator: bolichen97]

@bolichen97
bolichen97 force-pushed the fix/24595-visual-refresh-flag branch from cb709ac to 79f5b59 Compare November 13, 2026 09:21
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in config-baseline.json, src/kiro_crew/docs/configuration.md, website/src/pages/settings/FeaturePreviewsSection.tsx, website/src/utils/previewFlags.ts, website/src/components/commandPalette/settingsSearchCore.ts, the settings registries, the locale catalogs and the generated UI index since this head went green (27e9359 -> 9c31bcd); CI re-running.

The PR was conflicting with main again, in the generated UI index only. Main relabeled the crew_oauth preview as MCP sign-in and added the tunnel.relay_viewer_oidc_scope_prefix setting in the same files; the rebased branch keeps both, and adds no change of its own beyond the regenerated UI index. No preview switch landed on main, so the section's switch and info-tip counts are unchanged. The screenshots in the description were re-captured from this head.

[operator: bolichen97]

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Nov 13, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

self-added: no

  • Flag with nothing behind it span=e3f49035a2ae

Rebutted: same class as spans 5e23f547b64a and 290a7832c9b4 on the two previous heads, re-raised unchanged on this rebased head. A flag with no reader yet is the deliverable of #24595, which asks for a default-off switch that the refresh work reads, landed before any restyle; the restyle is listed under Not a goal.
A maintainer ruled on this exact point: land the default-off flag first, on its own; the restyle PRs read it later (#32377 (comment)).
The clearing condition (a non-test reader that changes what renders) is the first restyle PR's scope; adding one here widens the PR past the issue, and removing the flag removes the gate the issue asks for.
No user is misled: the switch is off by default and its summary reads "A new look for the dashboard. Nothing changes yet."
[operator: bolichen97]

@KiroCrewCaptain

KiroCrewCaptain commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: Approve

Why: the decider estimates an 8% chance that this change introduces a defect, within the 12% limit for approving on its own, and every check passes.

The PR adds a default-off Visual refresh feature-preview flag using the existing mechanism. The browser key mc-preview-visual-refresh maps to the gateway name visual_refresh in FEATURE_PREVIEW_FLAGS, and test_feature_previews_config.py keeps the two lists equal. Code that loops over every flag (loader, LTS locks, config schema, change-card catalog) picks up the new name, and the change-card catalog files every preview flag as safe because it only decides what the dashboard shows. Absent or unknown values read as off. LTS builds hide the row and leave it out of Settings search. The new tests cover the default-off state, the toggle writing only its own key, and the LTS search exclusion. Frontend tests, the i18n check and the regenerated files pass in CI; the remaining non-bot failures are infrastructure problems. The First Principles bot's 'zero consumers' block is a scope disagreement with the PR's stated, maintainer-endorsed goal of landing the gate first, not a code defect.

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 bdef1b03e8 · 146 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 13, 2026
@bolichen97
bolichen97 force-pushed the fix/24595-visual-refresh-flag branch from 79f5b59 to bdef1b0 Compare November 13, 2026 11:45
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in config-baseline.json and the locale catalogs since this head went green (9c31bcd -> c22557c); CI re-running.

The last run went red only in Fast Gate's docs lint, on docs/request-for-change/rfc-app-agent-tools-third-party-grant.md missing from its index. Main had the same red and fixed it in #36504, so this rebase onto a main that carries the fix lets CI test the PR again. The rebase had no conflicts and leaves the PR's own change exactly as it was; the generated files needed no update. The screenshots in the description were re-captured from this head.

[operator: bolichen97]

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 13, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

self-added: no
resolution: narrowed -- no code change answers this premise verdict; one conflict rebase, then the head lands on a recorded maintainer override

  • Preview switch with no reader — zero consumers span=e823f568107e

Rebutted: same class as spans 5e23f547b64a, 290a7832c9b4 and e3f49035a2ae on the three previous heads, re-raised unchanged. A flag with no reader yet is the deliverable of #24595: a default-off switch that lands before any restyle; the restyle is listed under Not a goal.
A maintainer ruled on this exact point: land the default-off flag first, on its own; the restyle PRs read it later (#32377 (comment)).
The subtraction (remove the flag until a reader exists) removes the gate the issue asks for, and adding a reader here widens the PR into the restyle.
No user is misled: the switch is off by default and its summary reads "A new look for the dashboard. Nothing changes yet."

[operator: bolichen97]

@bolichen97

Copy link
Copy Markdown
Contributor Author

/ai-review override first-principles bdef1b0 owner-decision: agent: the default-off flag lands first and the restyle PRs read it later, per the maintainer decision #32377 (comment)

[operator: bolichen97]

@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@bolichen97 recorded a owner-decision release (class owner-decision) for the first-principles AI finding on bdef1b03e854e2ab914e0600d1a54b9d5e177228.

agent: the default-off flag lands first and the restyle PRs read it later, per the maintainer decision #32377 (comment)

This decision applies only to this commit. A new push requires a new judgment.

Adds a Visual refresh switch to Settings > Developer > Feature
Previews (mc-preview-visual-refresh, kept on the gateway as
dashboard.feature_previews.visual_refresh), so the dashboard restyle
can land on main in pieces without changing what anyone sees. Off is
the dashboard as it is today; nothing reads the flag yet.

Closes #24595
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] Rebased onto current main to resolve the merge conflict in src/kiro_crew/docs/configuration.md, website/src/pages/settings/FeaturePreviewsSection.tsx, website/src/i18n/en.context.json, the locale catalogs under website/src/i18n/locales/, and the generated settings registry and UI index (settings-registry.generated.json, settingsRegistry.gen.ts, ui-index.generated.json). Each file keeps main's side plus only this change's visual_refresh additions.

@bolichen97
bolichen97 force-pushed the fix/24595-visual-refresh-flag branch from bdef1b0 to dd89308 Compare November 17, 2026 10:59
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 17, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

self-added: no
resolution: narrowed -- no code change answers this premise verdict; the head is replaced only by the rebase that clears main's conflict

  • Preview switch with no reader — zero consumers span=0b004a9e0d55

Rebutted: same class as spans 5e23f547b64a, 290a7832c9b4, e3f49035a2ae and e823f568107e on the four previous heads, re-raised unchanged. A flag with no reader yet is the deliverable of #24595: a default-off switch that lands before any restyle; the restyle is listed under Not a goal.
A maintainer ruled on this exact point: land the default-off flag first, on its own; the restyle PRs read it later (#32377 (comment)).
The subtraction (remove the flag until a reader exists) removes the gate the issue asks for, and adding a reader here widens the PR into the restyle.
No user is misled: the switch is off by default and its summary reads "A new look for the dashboard. Nothing changes yet."

[operator: bolichen97]

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: action required A blocking check or review needs attention

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a default-off Visual refresh feature preview flag

2 participants