Repository navigation
feat(native): drive agents from the composer: new threads, pickers, approvals - #20
Merged
Merged
Conversation
Typed server config with forward-compatible decoding and its stream reducer (serverConfigProjection.ts); provider entries, model options, search ranking and draft defaults (providerInstances.ts, modelSelection.ts, useHandleNewThread.ts); option descriptors and traits (shared/model.ts, modelTraits.ts); pending approvals and questions with answer drafting (threadRequests.ts, pendingUserInput.ts); send rules (composerDispatch.ts, composer-logic.ts, runtimeModeConfig.ts); and the launch, respond, dismiss and thread-setting commands (operations/commands.ts).
The composer now starts threads, picks models and permissions, and answers what the agent waits on, against an unmodified server: - Server config: subscribeServerConfig in the supervisor, decoded off the UI thread, plus ClientHandle::request for any unary RPC. - New thread: Cmd+N, a header button and the project breadcrumb open a draft for the open thread's project (else the first); the draft hero picks the project; the first send launches through orchestration.launchThread and selects the thread once the shell lists it. Cmd+Enter launches and keeps a fresh draft. - Pickers: the model picker (provider rail, search, favorites, effort column, speed and permissions footer), the permissions chip when the mode differs from the default, and the legacy Build/Plan toggle with Shift+Tab. Choices persist as the web persists them: thread.runtime-mode.set and thread.interaction-mode.set before the next turn, the model on the turn. - Approvals and questions: banners above the composer with Approve, Decline and the rest behind More; question options, multi-question progress, custom answers typed in the prompt, dismiss for message-mode requests. A message sent over pending approvals declines them (or sends feedback) and steers. - Send: steer or queue behind a running turn per followUpBehavior, the send shortcut setting, Enter and Cmd+Enter as composerCommandKey.ts resolves them, and thread.stop or run.interrupt per the server's threadStop capability. - Icons: vendored Lucide SVGs (stroke 1.75) served by one AssetSource.
…l asks Reads fullAccessOverride, appName and responseMode from the turn items the transcript work added: the banner shows the app and the reason, a hover explains an ask rule or a provider safety check (fullAccessOverrideExplanation), and message-mode questions can be dismissed even on a live session.
This was referenced Nov 2, 2026
Open
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.
Problem
The native app could read threads but not drive agents: no way to start a thread, pick a model, effort or permissions, or answer the approvals and questions an agent stops on. Issues #4, #5 and #6.
Approach
Logic is ported into
t3-corewith tests; views stay thin.subscribeServerConfigin the supervisor (decoded off the UI thread,workspaceSnapshotsOnDemand), typed forward-compatibly incore/server_config.rswith theserverConfigProjection.tsreducer. Unchanged resends report "no change", so views stay quiet. Keybindings stay raw (ServerConfig.keybindings) for the keymap'sinstall.ClientHandle::request(method: &'static str, payload)uses the same signature and lines as the one in feat(native): right panel with tabs and the diff panel #18.ChatHeader.tsx) open a draft. Its project is the open thread's, else the draft's, else the first one (resolveThreadActionProjectRef). The draft hero reads "What should we build in ‹project›?" and picks the project. Defaults followuseNewThreadHandler: model from project override → environment default → the previous thread → first ready provider; permissions from the project or environment default. The first send callsorchestration.launchThreadexactly asstartThreadTurndoes withbootstrap.createThread(title seed,generateTitle, root workspace), then selects the thread once the shell lists it. Cmd+Enter launches and keeps a fresh draft (composer.sendBackground).modelPickerSearch.ts, favorites (starring writesserver.updateSettingssetModelFavorites), a legacy-model "Show more", an effort column, and a footer with speed and permissions. Hidden models and model order come fromproviderModelPreferences. A started thread without handoff locks other providers with the web's message. The permissions chip shows only while the mode differs from the default (composerControlsOwnership.ts). Build/Plan and Shift+Tab work whenplanModeEnabledis on; like the web, it is off by default. Choices persist as the web persists them:thread.runtime-mode.setandthread.interaction-mode.setbefore the next turn, and the model (with only the options the user chose) onmessage.dispatch.ComposerBanner). Approvals show the kind, detail, app and reason, then "Waiting for approval" with Approve, Decline and the rest behind More (or the provider's own options, with warnings). A hover explains why full access still asks. Questions show options as radio or checkbox with 1–9 keys, multi-question progress, Previous, "Submit answer(s)", custom answers typed in the prompt (the thread draft is set aside and restored; displaced text is carried back), single-select auto-advance after 200ms, and Dismiss for message-mode requests. Everything is sent throughruntime-request.respondandthread.user-input.dismiss. The transcript rows from feat(native): transcript rows and streaming markdown at web fidelity #17 already leave these actions to the composer.followUpBehaviorwith Cmd for the alternate (composerDispatch.ts), steer forced while approvals are pending. A send over pending approvals declines them first, or sends decline feedback when supported. The send shortcut followscomposerSubmissionIntentForKey. Stop usesthread.stop, orrun.interrupt(holding the queue) when the server lacksthreadStop. The web keeps the composer settings (sendShortcut,followUpBehavior,planModeEnabled) per device, so the native app reads them from$T3_NATIVE_HOME/settings.jsonusing the web's keys and defaults.[email protected]) are folded into theicons.rsfrom feat(native): transcript rows and streaming markdown at web fidelity #17, plus four composer glyphs undericons/composer/.Ledger
AP-SERVERCFG, CO-NEWTHREAD, TV-DRAFT, CO-MODEL, CO-TRAITS, CO-MODES, CO-SEND, CO-INPUT, TR-APPROVAL, TR-INPUT and ST-CHAT are now
partial, with Native paths and issues.Verification
cargo test -p t3-core -p t3-client: 71 core tests, including new suites for server config, providers, traits, requests, composer rules and commands.cargo clippy --workspace --all-targets -D warnings,gen-theme --checkandparity/sync.test.tsall pass, and the app builds.devReplayprovider:Gaps
Closes.root). Worktree and branch selection belong to CO-WORKSPACE./planand/default(CO-TRIGGERS). Settings have no UI (ST-CHAT). The placeholder is "Ask anything..." until the @ / $ / / menus exist. Per-thread draft persistence (CO-DRAFTS), queued-run editing (CO-QUEUE), question attachments and markdown in question text are also missing.composer::initandnew_thread::initbind Cmd+N, Cmd+Shift+M/E/A and Shift+Tab directly. feat(native): web-parity sidebar, thread actions, keybindings and command palette #19'saction_forcurrently mapschat.newtoUnimplemented. When both land, mapchat.new→new_thread::NewThread,modelPicker.toggle/composer.effort→composer::ToggleModelPicker, andcomposer.mode→composer::OpenPermissions, then drop my direct bindings.assets.rsoverlaps theicons.rsalready innative. Whichever wins, my entries move with it.