Skip to content

Fix shutdown clearing active worktree/tab from wrong layer - #44

Merged
AmethystLiang merged 1 commit into
mainfrom
AmethystLiang/shutdown-delete-issue
Mar 23, 2026
Merged

AmethystLiang merged 1 commit into
mainfrom
AmethystLiang/shutdown-delete-issue

Conversation

@AmethystLiang

Copy link
Copy Markdown
Contributor

Summary

  • Move activeWorktreeId/activeTabId clearing out of shutdownWorktreeTerminals (a terminal-focused store action) into the UI component (WorktreeContextMenu) that triggers shutdown
  • The delete flow already handles clearing active state independently in worktrees.ts, so the store action was doing double duty incorrectly
  • Remove unused tabIds variable from shutdownWorktreeTerminals
  • Fix pre-existing lint issues in both files (interface→type, curly braces, prefer-ternary, prefer-at)
  • Extract terminal helper functions to terminal-helpers.ts to stay under max-lines limit

Test plan

  • Shutdown a worktree via context menu → verify active worktree is cleared
  • Shutdown a non-active worktree → verify active worktree is unchanged
  • Delete a worktree → verify active state is still cleared correctly
  • Verify no regressions in terminal tab management

🤖 Generated with Claude Code

Move activeWorktreeId/activeTabId clearing out of shutdownWorktreeTerminals
(a terminal-focused store action) and into the UI component that triggers
shutdown. The delete flow already handles this independently in worktrees.ts.

Also fix pre-existing lint issues and extract terminal helpers to separate file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@AmethystLiang
AmethystLiang merged commit 415ae35 into main Mar 23, 2026
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…blyai#44)

Move activeWorktreeId/activeTabId clearing out of shutdownWorktreeTerminals
(a terminal-focused store action) and into the UI component that triggers
shutdown. The delete flow already handles this independently in worktrees.ts.

Also fix pre-existing lint issues and extract terminal helpers to separate file.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
nwparker added a commit that referenced this pull request Oct 19, 2026
…l-create callers off the deprecated owner resolver

Agent launch, AI-vault resume and reveal, note target and send, wake and creation seeds, native chat
owner, the shell menu and active-workspace terminal creation (#22, #31-#42, #44) read the owner
through runtimeEnvironmentIdWithLegacyFallbackUnlessTwin. Paste uploads images to the server its
PTY id names before falling back to the workspace owner. The folder and floating branch of the
terminal spawn route (#53) reads resolveOwnerWithLegacyFallback: spawn refuses a folder twin
instead of following the focused server, and teardown keeps tearing raw ids down locally.
Deprecated importers 31 -> 16.
nwparker added a commit that referenced this pull request Oct 19, 2026
…f the deprecated owner resolver; spawn refuses folder twins (#30497)

* refactor(renderer): fold launch, resume, note-send, paste and terminal-create callers off the deprecated owner resolver

Agent launch, AI-vault resume and reveal, note target and send, wake and creation seeds, native chat
owner, the shell menu and active-workspace terminal creation (#22, #31-#42, #44) read the owner
through runtimeEnvironmentIdWithLegacyFallbackUnlessTwin. Paste uploads images to the server its
PTY id names before falling back to the workspace owner. The folder and floating branch of the
terminal spawn route (#53) reads resolveOwnerWithLegacyFallback: spawn refuses a folder twin
instead of following the focused server, and teardown keeps tearing raw ids down locally.
Deprecated importers 31 -> 16.

* test: give the paste-listener and tab-bar probes the fields the folded callers read

* test: note why the folder-twin route fixture is cast

* test: type the paste-owner twin fixture
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant