Repository navigation
New Tab: wire + capture and Plan/Build to the host - #27049
Open
teamleaderleo wants to merge 14 commits into
Open
teamleaderleo wants to merge 14 commits into
teamleaderleo wants to merge 14 commits into
Conversation
Agent-Session: aid-5b89a1f2e81a1f8a5484
Agent-Session: aid-5b89a1f2e81a1f8a5484
The New Tab + menu's mode row had no host: NewTabScreen hid Plan/Build and the capture rows because App passed neither onPlusMode nor capture. Four cases fail before the wiring (no onPlusMode on the screen actions). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-97c8fe4890b3452e72be
App passes the New Tab screen the chat composer's composer.capture request and an onPlusMode that sends the page's deferred chat.new for the picked harness, folder and model (as the mode chip does), then chat.mode, which the switch holds until that chat starts. A started chat, another machine or no project gets only the mode, since chat.new there would open the chat itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-97c8fe4890b3452e72be
teamleaderleo
temporarily deployed
to
ci-routing-agent
October 28, 2026 21:46 — with
GitHub Actions
Inactive
Review of #27049 (P1): a no-project send is a fresh chat.new {noProject}, which cancels the deferred switch holding the + mode pick, so the prompt ran in Build. Fails at 1d1379d: the Plan row is still offered after Do not work in a project. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-97c8fe4890b3452e72be
A no-project or another machine's send is a fresh chat.new that cancels the deferred switch holding the mode pick, so a Plan picked from + was dropped and the prompt ran in Build (review of #27049, P1). The page now offers Plan/Build only for a chat in a project on this Mac, whose send continues that deferred chat, and onPlusMode refuses the other targets. Red then green: bun test src/agent-session/acpmux/newtab/NewTabScreen.test.tsx -t 'no Plan for a no-project' failed at 47d642d (the Plan row stayed after Do not work in a project) and passes here; NewTabScreen 23, new-tab-plus-mode 4, recent-project 11, started-project 10 pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-97c8fe4890b3452e72be
teamleaderleo
temporarily deployed
to
ci-routing-agent
October 28, 2026 22:00 — with
GitHub Actions
Inactive
teamleaderleo
temporarily deployed
to
ci-routing-agent
October 28, 2026 22:09 — with
GitHub Actions
Inactive
Review of #27049 at bdfd395: a saved local environment picked after another machine kept the + menu bound to that machine (Plan hidden), and a Plan picked before the place changed to another machine or no project was dropped by the send's fresh chat.new, so the prompt ran in Build. All three fail at bdfd395. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-97c8fe4890b3452e72be
Review of #27049 at bdfd395: - The + target is now derived in askChat's order (saved environment, machine, no project, this Mac's folder), so a saved local environment picked after another machine or no project offers Plan for its folder. - A Plan picked before the place changes to another machine or no project is no longer dropped: the page keeps the last mode pick the host took, and a send that starts a fresh chat passes it to onAsk, which sets it on the started chat before the prompt goes (a refused mode sends nothing). Red then green: bun test test/new-tab-saved-environments.test.tsx fails 3/20 at the test commit and passes 20/20 here (4 runs). NewTabScreen 23, new-tab-plus-mode 4, recent-project 11, started-project 10, ask-attachments 4, ask-model 1, create-actions 2 pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-97c8fe4890b3452e72be
teamleaderleo
temporarily deployed
to
ci-routing-agent
October 28, 2026 22:26 — with
GitHub Actions
Inactive
Review of #27049 at 43446b7: a Plan picked before the place changes to another folder or a saved local environment on this Mac was not sent with the new chat, and the page kept one mode pick for all harnesses. Four cases fail at 43446b7. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-97c8fe4890b3452e72be
Review of #27049 at 43446b7: - Every send now names the harness's + mode pick (onAsk mode), on this Mac's folders and saved local environments too. On this Mac chat.new is the harness switch, so chat.mode goes in the same turn, right after it, and the switch holds it until its chat starts (as the mode chip sends it); elsewhere the mode waits for the created chat, as before. - The page keeps one + mode pick per harness, so Plan for one harness survives a pick for another and a switch back. Red then green: the four cases of 183d767 fail there and pass here. All 27 test files that use onAsk pass; saved-environments 22, NewTabScreen 24, new-tab-plus-mode 5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-97c8fe4890b3452e72be
teamleaderleo
force-pushed
the
lane/nx-plus-newtab-capabilities
branch
from
October 28, 2026 22:45
65e16da to
ef18145
Compare
teamleaderleo
temporarily deployed
to
ci-routing-agent
October 28, 2026 22:56 — with
GitHub Actions
Inactive
teamleaderleo
temporarily deployed
to
ci-routing-agent
October 28, 2026 23:09 — with
GitHub Actions
Inactive
|
cmux status (one comment, edited in place; each line is updated by the job that owns it)
Agents: |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Leo: "likewise, the chatgpt desktop app, let's do their + symbol's capabiliities for our composer. we want to be having more command palette related capabilities and stff to be able to to be surfaced".
The New Tab + menu now offers Attach Screenshot…, Attach Window… and the Plan/Build row in the app, not only in the component gallery. #26859 added the rows behind two optional NewTabScreen props,
captureandonPlusMode, and App passed neither, so the app hid them. This PR passes them:captureis the chat composer's existingcomposer.capturerequest (captureScreen). A cancelled pick returns no file and keeps the draft.onPlusMode(pick)(innewtab/screenActions.ts) sends the page's deferredchat.newfor the picked harness, folder and model, the same request the page's mode chip sends first, thenchat.mode. The harness switch holds the mode until that chat starts (harnessSwitch.pickMode), and the page's send continues that chat. If the page's chat has already started, onlychat.modegoes. A refused mode rejects, so the menu stays open with its error.onPlusModerefuses other targets.chat.new, which cancels the deferred switch holding the mode. The page keeps the last mode pick the host took and passes it toonAskasmode.onAsksets it on the started chat (chat.mode) beforechat.send; if the mode is refused, nothing is sent. Both cases were found by the exact-head reviews of1d1379ddandbdfd3956.No native change: both requests already exist in the host.
Stack: #26843 (component) -> #26616 (native catalog) -> #26859 (New Tab Add rows) -> this PR. Base
lane/nx-plus-newtab-capabilitiesat65e16dad1afc844fce09a2a184b755003f884f8e.Reference: ChatGPT desktop's + menu (composer-plus-menu-plugins-apps-sites). Copy: the capability rows in +. Keep: our colours and glass, the existing menu styling. Do not touch: the menu component, the model picker.
Verification
cd webviews && bun test test/new-tab-plus-mode.test.tsfails 4/4 at7b64e082(the test commit: the screen actions have noonPlusMode) and passes 4/4 at the head.bun test src/agent-session/acpmux/newtab/NewTabScreen.test.tsx -t 'no Plan for a no-project'fails at47d642da(the Plan row stays after Do not work in a project).bun test test/new-tab-saved-environments.test.tsxfails 3/20 ate95eccf4. It covers a saved local environment after another machine (Plan offered for its folder) and Plan picked before the place changes to another machine or to no project, where the send must gochat.new,chat.mode,chat.send. It passes 20/20 at the head, across 4 runs.NewTabScreen.test.tsx(23),new-tab-plus-mode(4),plusActions.test.ts(4),new-tab-saved-environments(20),new-tab-recent-project(11),new-tab-started-project(10),new-tab-ask-attachments(4),new-tab-ask-model(1) andnew-tab-create-actions(2) pass.bun run check,scripts/web-lint.sh,python3 scripts/cmux-next/prepush-gate.pyandgit diff --checkpass.agent-pane.new-tab/attachment-menuandagent-pane.newtab-plus-capabilitiesready, planning, files and skill all report layout shift 0 and no anchor movement. The only step problems are frames over 33 ms on a shared Linux host, which the gallery tests exclude as runner timing. One of them is consistent: theskillplay's row click takes about 270 ms in both themes. That code is Composer: share New Tab Add capabilities #26859's and unchanged here. The 0.017892 menu-opening shift Composer: share New Tab Add capabilities #26859 reported is gone. It came from the shared anchor's first-frame sizing, which fix(ui): constrain popup height before first placement #26852 fixed and the rebased stack now includes.Observed / Not run
Run on a Linux host: the tests, checks and gallery plays above. Not run: a native build, or capture in the real app on a fleet Mac. The change is web-only and uses existing host requests.
Before / after
Real gallery captures of the mounted App New Tab page (
agent-pane.new-tab, variantattachment-menu, 900×560, synthetic fixture). Before is #26859 at65e16dad; after is this head. The menu now lists Attach Screenshot… and Attach Window…, which the app wired. Plan/Build appears only once the selected harness advertises a plan mode, which this fixture doesn't; the component gallery'splanningvariant covers it.65e16dad)43446b78)Text under the open menu reads through its glass in these Chromium gallery frames. That is the documented Chromium backdrop behaviour (ui/glass/glass.css), and the same in both columns.
Risk: normal. The change is web-only and wires two existing host requests to rows that already exist. A Plan pick follows the mode chip's own order (deferred
chat.new, thenchat.mode). A send that starts a fresh chat now waits for that chat and its mode before the prompt, as a send to another machine already waited for its chat.Changelog
Added: New Tab's + menu attaches a screenshot or window and switches Plan/Build.
Agent session: agent session