Skip to content

fix(git): forward-port linked worktrees to RC8 - #285

Merged
Menghuan1918 merged 3 commits into
omdsh-dev:mainfrom
xxxg0001:fix/rc8-worktree-forward-port
Aug 23, 2026
Merged

fix(git): forward-port linked worktrees to RC8#285
Menghuan1918 merged 3 commits into
omdsh-dev:mainfrom
xxxg0001:fix/rc8-worktree-forward-port

Conversation

@xxxg0001

Copy link
Copy Markdown
Contributor

Summary

  • forward-port linked-worktree change discovery and per-worktree Git operations onto the RC8-compatible sidebar baseline
  • keep status, branches, and history transactionally bound to the selected checkout, including delayed pagination responses
  • reject stale/prunable worktree command targets and degrade individual inventory status failures safely
  • make the terminal repair-command fixture platform-aware

Validation

  • tsc --noEmit
  • targeted worktree + artifact suites: 28/28 passing after build
  • full Vitest suite: 673 passed, 9 skipped; Windows ConPTY emitted 3 post-test unhandled native errors (spawn UNKNOWN, write EAGAIN, unsupported signal) despite all test assertions passing
  • host/client/editor/terminal/mermaid artifacts rebuilt successfully

dsh-better-sidebar-fix added 3 commits August 21, 2026 00:45
The Git panel only ran git status against the session's own worktree,
so when DSH (or any coding agent) created a linked worktree via
'git worktree add' and modified files there, the sidebar's Git panel
stayed empty - no changed files, no diff, nothing to commit.

Enumerate all linked checkouts of the session repository and let the
user select which one the panel targets. Auto-select the dirty linked
worktree when the primary checkout is clean and exactly one linked
worktree has changes (the common DSH agent pattern). Poll status every
2s while the panel is visible so model-authored edits appear without
a manual refresh.

Security: resolveWorktree validates the client-supplied worktree path
against 'git worktree list' before using it as a git -C cwd. Uses -z
porcelain framing, which disables core.quotePath C-style quoting so
non-ASCII checkout paths round-trip losslessly.
@HuanLinOTO HuanLinOTO added bug Something isn't working P2 中:一般功能/优化 area/git Git panel: status, branches, commit, worktree, multi-repo labels Aug 23, 2026
HuanLinOTO added a commit to HuanLinOTO/DSH-better-sidebar that referenced this pull request Aug 23, 2026
…mdsh-dev#285)

PR omdsh-dev#285 added the zh/en 'worktree' key but the 19 third-language dicts
(de/fr/pt/ko/ar/hi/id/tr/vi/th/ru/it/nl/sv/pl/zhHK/zhTW/zhMO) were missing
it — only ja was patched in the prior commit. The dicts are typed
Record<keyof typeof zh, string> via an unchecked 'as' cast, so tsc did
not catch the gap.

This commit:
- adds the worktree translation to all 19 dicts
- strengthens tests/locales.spec.ts to assert key-set equality for EVERY
  shipped dictionary (not just zh/en/ja), preventing future regressions
@Menghuan1918
Menghuan1918 merged commit 5c88279 into omdsh-dev:main Aug 23, 2026
Menghuan1918 added a commit that referenced this pull request Aug 24, 2026
- README / README_EN: add v0.16.0 changelog (free windows #354, model-driven
  sidebar opens #353, Markdown inline HTML + TOC #360, 19-language overlays
  #339, multi-repo git + linked worktrees #326/#285, browser loopback
  allowlist, Vue + 28 legacy languages #202, preview refresh trio #215/#228,
  local Markdown images #292, ego-browser catalog #340; fixes: market/cordis
  #338, ctx.get() reads #357, workspace boundary #345, panel-host layering
  #330/#278, layout-push hardening #310/#130/#180, width sharing #36, terminal
  cleanup #130, fs-search noise dirs #342, mermaid #341, Nerd Font #190,
  UTF-8 HTML #193, trust-fence #182, reveal-in-explorer #94, PowerShell #47,
  GET probe fallback #69, unrun devDep #336) and move v0.15.2 into history
- feature tour: free windows + Markdown inline HTML/TOC (EN), feature list
- plugin ecosystem: add ego-browser (24 tab plugins), install pin ^0.16.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/git Git panel: status, branches, commit, worktree, multi-repo bug Something isn't working P2 中:一般功能/优化

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants