Repository navigation
feat(native): reuse previous worktrees from the composer - #205
Merged
Merged
Conversation
1 of 6 tasks
rynfar
force-pushed
the
nw/180-previous-worktree
branch
from
November 4, 2026 12:32
0333ca4 to
1735e75
Compare
rynfar
force-pushed
the
nw/180-previous-worktree
branch
from
November 4, 2026 13:04
1735e75 to
3f1149b
Compare
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.
Drafts can reuse the newest eligible worktree in their selected environment/project from the workspace menu or
composer.previousWorktree. The picker excludes archived/current worktrees, shows the branch label, persists the destination-scoped choice, and launches through the existingexisting_worktreestrategy.Composer searches and provider workspace snapshots now resolve against that same checkout. Changing workspace/environment clears stale menu results and guards delayed search completion. Failed preparation or launch restores the captured original draft, including attachments/context, even after navigation; a newer edit in that target takes precedence. Workspace popup arrows, Enter and Escape own their actions before the prompt, with a bounded highlighted selection. The direct previous-worktree shortcut remains available. Workspace visibility and shortcut/key eligibility share one predicate: non-repository projects cannot open an invisible popup, error/retry remains visible during refresh, and losing availability closes an open menu and releases prompt keys.
Partial follow-up for #180 / GT-BRANCH. Cleanup is wholly deferred. All 130 other capability rows retain identical cell values against
fork/native, including AP-NOTIFY/#12; formatting realigns only table padding.Validation:
/private/tmp/native-205-r3-red.logfails with “non-repository shortcut opened an invisible workspace popup”. The green fixture/private/tmp/native-205-r3-green.logpasses through actual open/key/Enter handlers: hidden shortcuts/keys are refused, empty Enter reaches an intercepted submit, visible error/retry remains accessible while refreshing, and availability loss releases keys. No launch RPC or actual non-repository project mutation. Reproduce with--new-thread --workspace-availability-fixtureon the offscreen snapshot binary and copied smoke home. Local capture:/private/tmp/native-205-r3-green.png./repoversus expected/wt/featurein/private/tmp/native-205-r2-cwd-red.log. The extended existing core case checks file/skill request params and environment/root fallback./private/tmp/native-205-r2-recovery-red.logfails with “failed send lost original draft”. The same real begin-send/switch-draft/completion path now passes destination-change and RPC-failure recovery, attachment/context ownership, persisted data, concurrent original-target edits, and unchanged selected-target text:/private/tmp/native-205-r2-recovery-green.log./private/tmp/native-205-r2-keys-red.json. Green audit records zero submissions, unchanged prompt andmenuCwd=/fixture/worktrees/previous:/private/tmp/native-205-r2-keys-green.json. Up/wrap, Escape and the direct shortcut also pass:/private/tmp/native-205-r2-navigation.jsonandnative-205-r2-keys-green-assert.log.72033f6926a77957819bb0e6e91e365cab73ae6b:cargo clippy --workspace --all-targets -- -D warnings,cargo test --workspace(1,354 tests),cargo build -p t3-native, theme check, parity sync (42 tests), conformance drift check, andvp run check:changed fork/native. Raw logs:/private/tmp/native-205-r3-{clippy,tests,build,theme,parity,conformance,check-changed}.log./private/tmp/native-180-before.png; keyboard before/private/tmp/native-205-r2-keys-red.png; after/private/tmp/native-205-r2-keys-green.png; navigation/highlight/private/tmp/native-205-r2-navigation.png. All captures use the offscreen renderer and copied smoke14658 state. No new server, provider turn, checkout mutation, clipboard use, or real window.Remaining in #180:
Live launch/removal mutations, multi-environment UI switching and real missing-root/permission-denied server responses remain unverified end to end. Failure completion and request parameters are exercised without server/provider mutation. Worktree retained for review; #180 remains open and partial.
Built with GPT-6.1 Sol in Codex