Skip to content

fix(settings): keep opt-in-only experiment rows for the whole Settings visit - #49593

Merged
AmethystLiang merged 1 commit into
mainfrom
AmethystLiang/tiamat-2-optin-followup
Nov 26, 2026
Merged

AmethystLiang merged 1 commit into
mainfrom
AmethystLiang/tiamat-2-optin-followup

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Follow-up to #49474. If you switch Agent Dashboard or Terminal attention off, its row now stays until you close Settings. Before, it could disappear mid-visit. The docs no longer tell new users to turn on a switch they can't see.

Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​42 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​42
Prod 9 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​74 $\color{#cf222e}{\Huge{\mathbf{−}}}$​24 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​50

What Changed

Before:

  • After switching one of these experiments off, its row disappeared as soon as the Experimental section stopped showing. That happened when you moved to another Settings section, or typed a search that hid the section.
  • Settings search ignored the Option-click hidden-experiments unlock.
  • The docs said to turn on Settings → Experimental → Agent Dashboard, which new users no longer see.

After:

  • A row that was on at any point during a Settings visit stays, in the pane and in Settings search, until Settings closes. The next visit shows it only if it is still on.
  • The Option-click unlock also makes both rows findable in Settings search during that visit. The Cmd+J palette still follows the live settings.
  • agents-sessions.mdx and settings.mdx say the Agent Dashboard is no longer offered to new users, and that its switch shows only if it is already on.

Mechanism:

  • The latch was useState inside ExperimentalPane. SettingsSection returns null when it isn't the active section, or when a search hides it, so the pane unmounted and the latch reset.
  • New useOptInOnlyExperimentRows is called once in useSettingsStoreModel, which lives exactly as long as the Settings page. It latches any row seen on during the visit, including settings that load late, and adds in the unlock.
  • The model passes the rows to ExperimentalPane (new required prop) and to useSettingsNavigationMetadata (new optional third parameter), so the pane and Settings search always agree.

Why

The row and its search hit should follow the Settings visit, not the Experimental section's mount. Holding the latch in the page model fixes the pane and search together, with no new stored data. Checked against how comparable products handle this.

Linked Issue

Follow-up to #49474.

Visual Proof

N/A. The two Experimental fixtures (newUserHidesOptInOnlyExperiments, optedInKeepsOptInOnlyExperiments) render exactly as in #49474. What changed is how long a row stays during a Settings visit, which a still image can't show. The hook test below covers it.

Testing

  • New use-opt-in-only-experiment-rows.test.ts runs the real hook with no mocks. It covers two invariants:

    • a switched-off row stays for the rest of the visit and is gone the next visit;
    • a row turned on mid-visit stays after the unlock is re-locked.

    On main the hook does not exist, and the latch reset whenever the pane remounted.

  • Ran pnpm lint (49 steps), the renderer (web) typecheck and the new test locally. All pass. The React Compiler compatibility ratchet also passes.

  • Platform: macOS. The change is renderer-only and the same everywhere.

  • Automated tests added/updated, or explained why not below

  • Every added test fails without this change and avoids the test anti-patterns

Performance

None, because this only runs while Settings is open. It adds one useState and two boolean reads per Settings render. The returned object is memoized on two booleans, and the navigation memo still depends on primitives, so nothing recomputes unless one of those two settings or the unlock changes.

Risk

Level: Low.

The worst case is a row staying visible slightly longer than before, until Settings closes. New users still see nothing unless a setting is on or they Option-click. A plain revert restores #49474's behaviour, and no stored data changes.

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

No new strings.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • I stated the risk: what could break, for whom, and how to back it out
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

…s visit

The latch lived in the Experimental pane, which unmounts when the user
leaves the section or types a search that hides it, so a switched-off
row could vanish mid-visit. Settings now holds it for the visit and feeds
both the pane and Settings search, which also lets the Option-click unlock
reach search. Docs say the Agent Dashboard is no longer offered to new
users.
@coderabbitai

coderabbitai Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The settings model now tracks opt-in experiment row visibility during a Settings visit. The Agent Dashboard and Terminal attention rows remain visible for the visit after being enabled, and become hidden on a later visit if disabled. The settings pane and navigation metadata use this visibility. The documentation now describes that new users are not offered the Agent Dashboard and explains when existing users see its setting.

Merge Risk: Minimal · up to 49588

This change keeps the Agent Dashboard and Terminal attention rows visible during a Settings visit once they have been on, and drops them on the next visit if they are off. No concrete merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: opt-in-only experiment rows (Agent Dashboard and Terminal attention) now persist for the whole Settings visit. It uses the conventional fix(settings) prefix and matche…
Description check Passed The description follows the repository template closely. It has ELI5, What Changed (before/after and mechanism), Why, Linked Issue (a follow-up to #49474, not a standalone issue), Visual Proof marked …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: opt-in-only experiment rows (Agent Dashboard and Terminal attention) now persist for the whole Settings visit. It uses the conventional fix(settings) prefix and matches the changeset, which latches row visibility in the Settings page model.

Full details: Description check

Explanation

The description follows the repository template closely. It has ELI5, What Changed (before/after and mechanism), Why, Linked Issue (a follow-up to #49474, not a standalone issue), Visual Proof marked N/A with a reason, Testing with checkboxes, Performance, Risk with level and revert path, AI Disclosure, Review, Notes, and Checklist. The Linked Issue section cites a PR, not an issue, and the template requires an actual issue for outside contributors. The Why section is brief and does not compare the alternatives in detail, though it mentions the rationale. The Testing section lists a Cmd+J and search behavior check that the author did not describe as manually tested. The AI Disclosure section is left unfilled, and the template asks for it only from non-team contributors.

Resolution

Consider linking an actual issue in the Linked Issue section if the author is an outside contributor, since the template says a PR reference alone is not sufficient. Optionally expand the Why section to name the alternatives considered.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 01654669-fb36-4fcf-bbfc-0225d668356f
Commits

Reviewing files that changed from the base of the PR and between cfbaf37 and 4958807.

Files selected for processing: 10

  • docs/site/content/docs/model/agents-sessions.mdx
  • docs/site/content/docs/settings.mdx
  • src/renderer/src/components/settings/advanced/ExperimentalPane.fixture.tsx
  • src/renderer/src/components/settings/advanced/ExperimentalPane.tsx
  • src/renderer/src/components/settings/advanced/use-opt-in-only-experiment-rows.test.ts
  • src/renderer/src/components/settings/advanced/use-opt-in-only-experiment-rows.ts
  • src/renderer/src/components/settings/navigation/use-settings-navigation-model.ts
  • src/renderer/src/components/settings/navigation/useSettingsNavigationMetadata.ts
  • src/renderer/src/components/settings/page/settings-advanced-section-renderers.tsx
  • src/renderer/src/components/settings/page/use-settings-store-model.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant