cmux NEXT: Ask a Side Question… in the palette behind Side sessions (/btw)

Closed
TE
11d ago
+890-552

Summary

This PR brings back Ask a Side Question… in the cmux NEXT palette, behind Debug Settings' Side sessions (/btw). It was split out of #20826 because its action exports, plans/cmux-next/actions.md and plans/cmux-next/action-surfaces.json, are frozen.

Waits on: the release of FREEZE tokens ac869c8838cd and 0e7a8e0e3b9c, and on #20826 landing first. The branch is cut from #20826's head (ea171ca1ef87). Until #20826 merges, this diff includes its commits, so review only the two commits on top: the red test and the action.

  • The action. agentPane.sideQuestion, palette only, no default key. The definition is restored from 161e75f4e999e.
    • It requires agentPaneFocused and a new ActionContext.sideSessions fact. ActionRegistry.publishSideSessions() keeps that fact in step with AgentPaneTunables.sideSessions. It observes the tunable store, with no polling, so the action is hidden while the toggle is off and comes back when it turns on, without reopening anything.
    • The bit is named in KeyContext and RegistryControlBridge, so the control bridge's reachability check knows it.
  • The handler. It sends the focused chat's page sideQuestion, which focuses the composer with /btw (#20812's web side; it does nothing while the toggle is off). It shares one handler loop with Switch Model… and Search Files…, so CmuxNextApp doesn't grow.
  • How to turn it on (DEV or NIGHTLY): open the Debug window (palette: Open Debug Settings), go to Pages and switch on Side sessions (/btw). In Release and RC the tunable store is inert, so it stays off.

Testing

  • AgentPaneSideQuestionPaletteTests is committed red first (0befd399c564), then the action makes it pass (e04cdc1d062f). It checks four things:
    • With the toggle off, the palette has no Ask a Side Question….
    • With it on, the action is offered in a focused agent chat and not outside one.
    • Turning the toggle off hides it again.
    • Running it sends the page sideQuestion.
  • The action exports in plans/cmux-next/ are the ones regenerated for #20826 by export-action-surfaces.sh on fleet light steps. They add one palette action (agents 61) against base 8314c83ade52.
  • Pre-push checks: check-concurrency.sh ok, crash_ratchet.py ok, check-system-blue.py ok.
  • Fleet suites (cmux-ci run --class light --script scripts/ci/run-swift-testing-suites.sh --arg Packages/macOS/CmuxNext):
    • Red at 0befd399c564 (--red, step 1e4c05500f8bfbd8f281414f): the test doesn't compile without the action. The errors are ActionRegistry has no member publishSideSessions, and AgentPaneView has no member askSideQuestion.
    • Green at e04cdc1d062f (step ba615cac2a87ee9c6044dec9): 370 suites passed and 5 failed. AgentPaneSideQuestionPaletteTests, ActionSurfaceParityTests (exports fresh) and RegistryReachabilityTests passed.
    • None of the 5 failures touch this PR's code. ClassicShortcutsUpgradeTests, SettingsSchemaExportTests and SidebarInsertWhileDisplayAsleepTests are known base reds. NewTabHoverPreviewTests and RestoreWindowFieldsDebugTests are timing failures that change from run to run.
  • The branch has since merged #20826's head 21bf5f7b820d (the latest base) cleanly, without touching the action exports.
  • Not verified: there's no live DEV-build run.

Localization: the action title action.agentPane.sideQuestion and its two refusal strings, handlers.misc.failed.sideQuestionNeedsFocus and sideQuestionNeedsAgentChat, are in 21 locales.

Changelog

Added: Ask a Side Question… in the palette while Debug Settings' Side sessions (/btw) is on

🤖 Generated with Claude Code