Skip to content

Fix: restore worktree sidebar threads and delete flows - #16

Open
xIGBClutchIx wants to merge 1 commit into
davej:mainfrom
xIGBClutchIx:fix/worktree-sidebar-routing
Open

Fix: restore worktree sidebar threads and delete flows#16
xIGBClutchIx wants to merge 1 commit into
davej:mainfrom
xIGBClutchIx:fix/worktree-sidebar-routing

Conversation

@xIGBClutchIx

Copy link
Copy Markdown
Contributor

Summary

This restores missing local worktree threads in the sidebar and fixes settings-triggered worktree deletion so Pocodex once again shows and manages Codex worktrees the way the current desktop bundle expects.

What changed

  • route local codex-worktrees, resolve-worktree-for-thread, and delete-worktree requests through Pocodex instead of relying on unsupported direct bundle worker paths
  • add vscode://codex/worktree-delete handling in the app-server bridge and normalize settings-targeted deletes before forwarding them to the git worker
  • discover worktrees across local Codex-home candidates and resolve thread-owned worktrees locally in the desktop git worker, including non-hex worktree directory names
  • report a browser-facing Codex-home path that keeps WSL worktree threads visible to the current sidebar relevance filter
  • add regression coverage for host data, request-id routing, worktree deletion, Codex-home selection, and local git-worker worktree resolution

Root cause

  • the current Codex bundle filters sidebar visibility for local threads against a single codexHome path, which caused valid /root/.codex/worktrees/... threads to disappear when Pocodex surfaced a Windows-side Codex home in WSL
  • the settings UI deletes worktrees through vscode://codex/worktree-delete, but Pocodex did not implement that host fetch route
  • the bundle also expected local worktree worker methods to round-trip through the browser/host bridge, while Pocodex only supported the older direct paths

Impact

  • missing worktree conversations show up in the Threads sidebar again
  • settings-based worktree deletion succeeds instead of failing with Failed to delete worktree
  • local worktree listing and per-thread worktree resolution are covered by focused regressions, including mixed Codex-home WSL setups

Validation

  • pnpm run check:commit
  • pnpm vitest run test/app-server-bridge-worktree-delete.test.ts test/codex-home.test.ts test/app-server-bridge-host-data.test.ts test/codex-desktop-git-worker.test.ts test/request-id.test.ts --maxWorkers=1
  • live local verification on fresh Pocodex dev servers confirmed /settings/worktrees showed the previously missing worktrees, settings delete removed a worktree without the failure toast, and http://127.0.0.1:8806/local/019d9486-c2e6-7eb2-9f38-892730afdb09 showed the missing summary worktree thread in the left sidebar

- route local worktree requests through pocodex

- discover codex-home worktrees and keep wsl sidebar threads visible
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