Repository navigation
fix(native): composer review follow-ups: ordered sends, worktree launches, provider icons - #28
Merged
Merged
Conversation
… and run workflows to core Pure ports the composer review needed: - workspace: the project's new-thread env mode (project override, environment default, `t3.json`, name-only projects stay local), start-from-origin, the default base branch, and the `worktree` launch strategy. - providers: exhausted usage windows per provider pool and the `fallbackModelSelection` swap for a spent default; accent colors and instance badges. - traits: `getComposerProviderState` options: Fast mode dispatched off for Cursor, uncatalogued OpenCode options preserved, the plan agent hidden while plan mode is off. - workflows: provider handoff from the attached session (and detached native threads), the `/compact` gate, and the Stop target for servers without `thread.stop`. - lists: `listOutdentForTab`. requests: a cheap key so pending requests re-derive only when something they read changed. composer: Enter repeats and IME composition never send.
`ProviderInstanceIcon`: the Codex, Claude and Antigravity marks from `Icons.tsx` and each provider package's icon, vendored by `vendor-icons.ts --providers` with light and dark fills baked in (`--check` now also catches drift). Instances without a mark show their initials, and a badge tells two instances of one driver apart or carries a configured accent.
… and key guards Answers the independent review of the composer: - Send runs its prerequisites one at a time: approval declines, then permission and mode changes, each after the previous one committed, and aborts on the first failure before the message goes out (`dispatch_in_order`). RPC futures now start when first polled. - A draft's first send resolves the project's env mode and launches into a new worktree off the default branch when it asks for one. - Turns carry `getComposerProviderState` options; a send behind a running `/compact` queues. - Provider switching reads the attached session's capabilities, and detached native threads. - Exhausted default models fall back to the configured fallback model. - Shift+Tab outdents a nested list item before toggling plan mode. - Enter during IME composition or an OS key repeat does not send. - The question auto-advance timer is cancelled on any question change and checks it is still on the question it was set for. - Pending requests re-derive only when what they read changed; the hidden model picker no longer rebuilds on every config change. - Stop on servers without `thread.stop` interrupts the live run or the run left with background work. - `composer/send.rs` takes the send paths out of `composer/mod.rs`. The probe gains `--worktree`, `--dry-run`, ordered `--compose`, and prints the workflow decisions.
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.
What
Fixes the independent review's findings on the merged composer PR (#20). Refs #4, #5, #6.
ClientHandle::dispatch_in_order: approval declines, then permission and mode changes, each after the one before it committed. The first failure aborts the send before the message goes out.AppState::rpcfutures now start when first polled, so futures built together run in the order they are awaited.core/workspace.rsportsresolveProjectSettings/resolveNewThreadEnvMode(project override, environment default,t3.jsonthroughprojects.readFile, name-only projects stay local until their first thread),resolveNewDraftStartFromOrigin, and the default base branch fromvcs.listRefs. A draft's first send launches with{type:"worktree", baseRef, startFromOrigin?}the waystartThreadTurnencodesprepareWorktree.traits::composer_options(getComposerProviderState): Fast mode is sent as off for Cursor unless the user picked it, options for OpenCode models outside the catalog are kept, and the plan agent is hidden while plan mode is off./compactsteeredworkflows::is_compactingsetscan_steer = !compactingfor the send, Enter, and the button tooltip.(request, question), advances only if that is still the active question, and every question change cancels it.workflows::supports_provider_handoff(threadSupportsProviderHandoff): reads the attached session's capabilities and handles detached native threads and v1 imports.providers::exhausted_window(per-provider quota pools for Cursor, Antigravity and OpenCode) pluswith_usage_fallback(resolveNewThreadModelSelection).core/lists.rsportslistOutdentForTab. It runs before the plan-mode toggle.vendor-icons.ts --providersvendors the marks fromIcons.tsxand each provider package's icon, with light and dark fills baked in.--checknow catches drift.provider_icon.rsportsProviderInstanceIcon: Codex is a one-color mask, the others useimg(), initials are the fallback, and a badge shows the instance or its accent. Used by the composer trigger, the picker rail, and model rows.EnterKey { repeat, composing }insubmit_intent. A composer key-down capture recordsis_held, and the textarea's marked range marks composition. A repeat inserts a newline, as on the web. During composition the IME handles Enter.requests::PendingKey(the pending request values, plus the turn-item count only while something is pending) gatespending_requests. The model picker no longer has its own config subscription. The composer refreshes it only while it is open.threadStopworkflows::stop_targetports the run search ininterruptThreadTurn: the live run, else the settled run that left background work (derivePendingBackgroundWork).The send paths moved out of
composer/mod.rs(now 519 lines) intocomposer/send.rs. The duplicate ISO parser the earlier WIP added was removed in favor ofsidebar::time::parse_iso.Verification
a_held_or_composing_enter_never_sends,the_pending_key_changes_only_with_what_pending_requests_read, and the WIP'sordered_dispatch_waits_for_each_command_and_stops_at_a_failure,workspace/*,workflows/*,lists/*,composer_options_*,exhausted_windows_*,a_spent_default_falls_back_*.cargo test --workspace✓,cargo clippy --workspace --all-targets -- -D warnings✓,gen-theme --check✓,parity/sync.test.ts✓, conformance--check✓,vendor-icons --check✓, pre-commit lint ✓.devReplayonly):The worktree launch was a dry run only. The smoke project's root is the orchestrator's own checkout, and a real worktree launch would create a branch there.
Gaps
thread.stopand with no run does not unwatch PR watches as the web does.Done by Claude Opus 5.5 in Claude Code (native factory worker W2b).