mirror of
https://github.com/backnotprop/plannotator.git
synced 2026-09-14 14:17:26 +08:00
7348ad3f5b
/api/diff/switch answered a same-cwd commit:<sha> switch (the Commits-rail click, where the context recompute is deliberately skipped) with the launch-frozen session gitContext. The client merges gitContext from every switch response, so each rail click reverted the base picker and the commit-baseline list to launch-time data: a commit made mid-session disappeared until the next non-commit switch, and a worktree review repointed at the main repo. The rendered diff was never affected. Regressed in #1497, which added the clientGitContext fallback to carry the jj diffFallback. That fallback is only reachable on the skipped- recompute path, where 0.27.13 emitted nothing. Restore that shape in both runtimes: emit gitContext only when a context was actually recomputed, still attaching diffFallback to it. Dual-runtime regression test: a recomputing switch after a mid-session commit carries the new commit; the following commit:<sha> switch carries no gitContext. Fails on both servers without the fix.