Skip to content

fix(sidebar): keep folder workspaces on execution host - #15685

Closed
Jinwoo-H wants to merge 6 commits into
mainfrom
sta-4964-folder-execution-host
Closed

Jinwoo-H wants to merge 6 commits into
mainfrom
sta-4964-folder-execution-host

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • keep runtime-owned folder workspaces grouped and routed by executionHostId
  • preserve legacy direct-SSH connectionId fallback and use the focused/default host only when neither owner exists
  • share one resolver across sidebar filtering, grouping, catalog hydration, card/reveal/path-status routing, and host-qualified virtual row keys

Root cause

PR #15404 introduced a folder-host resolver that checked only connectionId, then fell back to the focused/default host. Runtime catalog records already carry an optional executionHostId, so changing focus could move a runtime-owned folder to the wrong host. Filtering had separately learned about executionHostId, leaving ownership rules inconsistent.

Proof

Falsifiable invariant: workspace executionHostId, then group executionHostId, then legacy connectionId, then default host controls folder grouping/routing regardless of focus.

  • exact affected merge 12724068b7: 7 failed / 3 passed
  • latest origin/main 012e9f410c: 7 failed / 3 passed
  • candidate truth table: 10 passed / 0 failed
  • candidate with execution-host precedence disabled: 7 failed / 3 passed
  • focused ownership/sidebar/store suite: 209 passed across 21 files

The truth table covers workspace/group execution identity, legacy SSH identity, both fields, neither field, focus changes, disconnect/reconnect, and identical folder IDs across hosts.

Paired Electron evidence

A genuinely headful paired-desktop test creates local and runtime folders/groups through their real catalogs, injects only the claimed same-ID collision (including the group ID), focuses local, performs a real disconnect with a failed runtime status refresh, reconnects and rehydrates, then proves both copies render exactly once under their own host headers. Clicking each row must also set the matching activeWorkspaceExecutionHostId in every mode:

  • Project
  • Status
  • PR
  • None

Project mode additionally proves each folder sits beneath the matching local/runtime group header. Result: 1 passed in 17.5s. Eight fresh full-page screenshots cover all four modes before and after reconnect.

Compatibility

No RPC, stream, persistence, or wire schema changes. executionHostId remains optional for mixed versions; legacy connectionId records keep routing to SSH; only records with neither identity use the default host. No Git, provider, path, shell, or platform behavior changes.

Validation

  • pnpm install --frozen-lockfile
  • pnpm run typecheck
  • focused Oxlint and format checks
  • pnpm exec electron-vite build --mode e2e
  • changed-code quality gate (Oxlint, type-aware checks, React Doctor)
  • 209 focused Vitest assertions across 21 files
  • headed paired-runtime Playwright/CDP proof

Three independent gpt-5.6-luna review passes challenged ownership, regressions/compatibility, and proof quality. The first round found virtual-key, card identity, reveal, hydration, and path-status gaps; those were reproduced and fixed. A final fresh round is recorded in the PR comments/status before review.

Full pnpm run typecheck:e2e remains red from unrelated pre-existing E2E errors.

@Jinwoo-H

Jinwoo-H commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Attachments

STA-4964 paired-runtime sidebar proof: disconnected and reconnected across all Group by modes

sta-4964-disconnected-repo.png sta-4964-disconnected-workspace-status.png
sta-4964-disconnected-repo.png sta-4964-disconnected-workspace-status.png
sta-4964-disconnected-pr-status.png sta-4964-disconnected-none.png
sta-4964-disconnected-pr-status.png sta-4964-disconnected-none.png
sta-4964-reconnected-repo.png sta-4964-reconnected-workspace-status.png
sta-4964-reconnected-repo.png sta-4964-reconnected-workspace-status.png
sta-4964-reconnected-pr-status.png sta-4964-reconnected-none.png
sta-4964-reconnected-pr-status.png sta-4964-reconnected-none.png

STA-4964 strengthened headful paired-runtime proof (real catalogs, disconnect/reconnect, activation identity)

sta-4964-disconnected-repo.png sta-4964-disconnected-workspace-status.png
sta-4964-disconnected-repo.png sta-4964-disconnected-workspace-status.png
sta-4964-disconnected-pr-status.png sta-4964-disconnected-none.png
sta-4964-disconnected-pr-status.png sta-4964-disconnected-none.png
sta-4964-reconnected-repo.png sta-4964-reconnected-workspace-status.png
sta-4964-reconnected-repo.png sta-4964-reconnected-workspace-status.png
sta-4964-reconnected-pr-status.png sta-4964-reconnected-none.png
sta-4964-reconnected-pr-status.png sta-4964-reconnected-none.png

STA-4964 final paired-runtime proof (group headers + execution identity)

sta-4964-disconnected-repo.png sta-4964-disconnected-workspace-status.png
sta-4964-disconnected-repo.png sta-4964-disconnected-workspace-status.png
sta-4964-disconnected-pr-status.png sta-4964-disconnected-none.png
sta-4964-disconnected-pr-status.png sta-4964-disconnected-none.png
sta-4964-reconnected-repo.png sta-4964-reconnected-workspace-status.png
sta-4964-reconnected-repo.png sta-4964-reconnected-workspace-status.png
sta-4964-reconnected-pr-status.png sta-4964-reconnected-none.png
sta-4964-reconnected-pr-status.png sta-4964-reconnected-none.png

@nwparker

nwparker commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Superseded by #26535, which routes folder workspaces by executionHostId before connectionId. Closing.

@nwparker nwparker closed this Nov 1, 2026
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.

2 participants