Repository navigation
feat(cmux-next): Labs flags, one registry for opt-in looks and behaviors (hq#1980, no bead) - #20452
teamleaderleo wants to merge 39 commits into
Conversation
…on on/off Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ors (hq#1980) schemas/settings/source/labs.json is the flag registry: each labs.<name> row carries owner, created, expires, cohort (off / nightly-next / default) and its one-line intent (help). gen-settings-sources.py checks the fields, generates the Swift LabsFlag enum and webviews/src/experiments/ labs.generated.ts, and warns (never fails) for a flag past its expiry. - Swift reads a flag with snapshot.lab(.name): cmux.json's value, else the cohort for this build (nightly-next: nightly and dev builds). previewFeatures is the first flag; snapshot.previewFeatures now reads it. - Pages get the on flags as data-labs on <html> (LabsState, updated by the settings controller); web reads labsFlag / useLabsFlag. - Flags are agent-settable from the registry, show in Settings > Experimental > Labs, flip from the palette's settings scope, and Help > Feature Flags opens them. - skills/cmux-architecture/references/labs-flags.md: how to add, promote (one-line cohort PR = the design call), extend or delete one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… (red) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…1980) In nightly and dev builds the New Tab page lists every Labs flag with its one-line intent and a toggle, so the team tries prototypes where they start work; All Labs... opens Settings > Labs. A toggle is newTab.setLab, saved as labs.<flag> through the schema like the style switch's template (one AgentPaneNewTabSetting callback for both). Pages see a team build as data-labs-team on <html>; labsTeamBuild() reads it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CmuxNextApp sees two JSONValue types (Settings and Daemon). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
…call-keys/labs # Conflicts: # Packages/macOS/CmuxNext/Tests/CmuxNextAppTests/NewTabStyleSwitchTests.swift
|
Bead |
Review of #20452: with agent.pageHost off (the default) the agent pane and its New Tab page make their own WKWebView, so data-labs and data-labs-team never reached them and the New Tab Labs section never showed. AgentPaneLabs adds them at document start with the theme bootstrap and follows LabsState. Also: the Labs tests await each save (#20423's fix for the yield wait), the generator rejects a flag key that is not labs.<name> or has no default without a traceback, and labsFlag() says when to use the hook instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
|
all web/size checks green |
|
Not verified: macOS jobs did not run: compile and app tests were skipped on CI passes on Written by |
|
|
gallery-coverage asks every component for an entry: the New Tab page gets a labs variant (data-labs-team set), and the section follows data-labs-team through useLabsTeamBuild so it shows when the attribute does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- vp fmt webviews/src/agent-session/acpmux/modelPickerLayout.ts Autofix-Run: https://github.com/manaflow-ai/cmux/actions/runs/38521627926
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
Gallery203 states changed: gallery.visual-media-board/all-previews, agent-pane.artifact-panel/markdown, agent-pane.transcript/long-code, agent-pane.edited-files/fourteen-files, pages.settings/appearance-group-9, ... · 9 new states · 51 broken states · 107 play checks failed Diff page and renders (the run's 197 more on the diff page. Live preview (follows this branch; start it with
Play checks failed (0 px anchor movement, 0 layout shift, no frame over 33 ms unless the entry gives a reason):
707 nondeterministic states differed from a second render of the same head (a clock or fixture leak) and are not counted as changes. |
…call-keys/labs # Conflicts: # webviews/src/agent-session/acpmux/newtab/NewTabScreen.gallery.ts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On the DEV build it drew as a raised button; it now uses the All Chats link's style. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
Fleet export-action-surfaces.sh at ad062d5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eed no MutationObserver outside a browser Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… white Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Superseded: opt-ins live in Debug settings, per Lawrence. |






Summary
Labs (hq#1980): new looks and behaviors ship behind a flag that a person turns on, not in the defaults. This builds on the existing
labs.previewFeaturesand keeps it as the only mechanism. Its users (#20429's Now Playing card) keep readingsnapshot.previewFeatures.schemas/settings/source/labs.jsonis aLabsFlagwithowner,created,expires(about 14 days),cohort(off/nightly-next/default) and a one-line intent (itshelp).gen-settings-sources.pychecks the fields and generates the SwiftLabsFlagenum andwebviews/src/experiments/labs.generated.ts. It printswarning: labs.<name> ... expiredfor any flag past its expiry, including under--check; the warning never fails the run.nightly-nextflags are on in nightly and dev builds only. Promoting a flag todefaultis a one-line PR, and that PR is the design call.newTab.setLab, saved through the schema. Release and RC builds show nothing. Variant A of three, picked by cg-design-judge (feat(cmux-next): Labs flags, one registry for opt-in looks and behaviors (hq#1980, no bead) #20452 (comment)).snapshot.lab(.name).useLabsFlag("name")/labsFlag("name"), which readdata-labson<html>. EveryPageWebViewpage gets that attribute, kept current.labsTeamBuild()readsdata-labs-team.skills/cmux-architecture/references/labs-flags.mdexplains how to put a change behind Labs.Testing
Swift
LabsFlagTests: the cohort and file decide a flag, a bad value is off with a diagnostic, and every flag is a toggle with its fields.NewTabLabsTests: a page toggle is saved in cmux.json, and a name that is not a flag writes nothing; All Labs… runshelp.featureFlags.run-swift-testing-suites.shat the red commits fails (no member 'lab'; the New Tab red is a compile red, since its API did not exist yet).run-swift-testing-suites.shon the merged head 18a0888: 288 suites passed, 0 failed (the step exits 1 only becauseAcpmuxBundleReplacedTestsskips without a published same-tree cmux-tui for that SHA).exportIsFreshpasses).Web:
bun test test/new-tab-labs.test.tsxwas red at e59433f (no section) and is green now.src/experiments/labs.test.tspasses.Checks:
gen-settings-sources.py --check,gen-strings.mjs --check agentPane, ui-rules, and scopedvp checkpass.bun run check, every step before the final whole-repovp checkpasses. That last lint was killed on big-red (143); CI react-apps-check covers it.Review (subagent): the agent pane's own web view (
agent.pageHostoff, the default) never gotdata-labs; fixed withAgentPaneLabs. The generator now rejects a key that is notlabs.<name>. Known limit: a page's first moments can carry the flag list from when its web view was made;useLabsFlagfollows the live value.Localization: the two new New Tab strings are in all 21 locales. Flag intents show in English on the New Tab page (team builds only); Settings shows them localized.
Redesign (variant A):
test/new-tab-labs.test.tsxwas red first (3a5f675, 3a48dc6) and is green: collapsed by default as "Labs" / "Labs (N on)", rows with intent and switch, New / Expires soon hints, recently toggled first with a storage fallback, remembered open state, row menu.agent-pane-no-capsules,theme-colors,subtle-elevationand ui-rules pass locally. Release compile BUILD SUCCEEDED on d69557f.Changelog
Added: Labs: opt-in flags for new looks and behaviors, listed in Settings > Experimental > Labs, the palette ("Labs…") and, in nightly and dev builds, a quick-toggle line on the New Tab page
Proof
Real cmux NEXT DEV builds from the fleet (
--builder mac), on capture slots; host chip masked. Base: the New Tab page and palette before this PR. Head: this branch. The switch knob in these stills is white; since then it takes the page's theme color (theme-colors/subtle-elevation rules), otherwise unchanged.Open, close, reopen, then turn the flag on and off (head, light):
Full quality: labs-real-toggle-after.mp4
🤖 Generated with Claude Code