fix(startup): keep Git panels from blocking conversation restoration - #747
Conversation
…ation Preserve project-tab record identity through metadata refreshes and sibling restoration so Solid does not remount existing shells or discard commit drafts. Reactive payload getters continue to expose refreshed instance and sidecar data. Run Git display reads only for the visible panel, cancel queued reads and fence late results on deactivation or disposal, and share the two-request secondary HTTP budget with visible-panel priority ahead of bulk scans. Keep foreground conversation reads independent and retain coalesced filesystem refreshes. Move status and diff process creation off the Windows HTTP/SSE thread using the existing Git worker. Preserve exact UTF-8 content, trailing newlines, large blobs and accepted nonzero numstat exit codes without retaining completed snapshots. Cover 200-message restoration with Git open on both host adapters, stable shell and draft lifetime, cancelled queued/disposed reads, admission priority, and real Git content. Verified with browser regressions, server Git tests, queue tests, UI typecheck/build, server compilation and installed native startup captures.
Address all three independent gatekeeper findings. Propagate cancellation to the optional SDK status transport and apply its deadline at dispatch so abandoned requests cannot occupy the shared secondary slots indefinitely. Fence explicit refresh and mutation continuations by panel generation and worktree identity. Preserve a draft edited during commit, another worktree's draft and the last successful status snapshot on failure. Late mutations still invalidate filesystem display data without resetting the new panel context. Bound untracked-file statistics submission to two operations and prioritize worktree ownership/inventory Git commands over pending display commands. The existing worker remains off the HTTP thread and retains its two-process budget. Add real browser transport-abort and stale-continuation regressions, and a real Git trace regression for authorization admission ahead of a display batch. Twenty-one browser scenarios, Git regressions, UI build and server compilation pass. Second independent gatekeeper review reports zero findings, including nine isolated source-level checks of cancellation, drafts and worker admission.
Independent gatekeeper reviewReviewed source head: Round 1 found three concrete issues:
All three were corrected. Round 2 independently reviewed the resulting source and reported ZERO FINDINGS. Nine isolated checks exercised real Solid reactivity, queues and worker scheduling, including an old-worktree commit completing after navigation to a valid new worktree and a 1,000-file untracked batch. Validation
CI qualificationRuntime-contract CI passes on minimum/latest. Compatibility migration CI currently fails on the unchanged historical credential assertion in |
…l scans The first selection of another-worktree conversation could be delayed until all historical session pages and queued secondary Git/permission reads completed. Promote the selected project's location and worktree membership dependencies with reactive selection, keeping hidden projects within the two-read budget. Publish the first verified project page additively beside the initial directory page. Keep historical cursor traversal in the background and retain complete inventory reconciliation as the authority for removing absent rows. Preserve request-generation, cancellation, runtime-state and deletion fences; saved transcripts continue to request 200 messages independently. Exercise both desktop adapters with both secondary slots held indefinitely: recent linked-worktree rows publish, foreign roots are excluded, historical cursors stay queued, and selecting another project promotes its dependencies. Correct a pre-existing SDK queue regression test that awaited the secondary model catalogue before releasing the very slots it needs. Validate with the 23 browser restoration/Git scenarios, 10 SDK/queue checks, UI typecheck and production build, and native installed-profile captures.
…tion Adopt newly inserted partial-page rows into this request's reconciliation baseline. Otherwise a worktree removed before historical pagination finishes leaves its sessions misclassified as concurrent local creations and retained after the complete membership filter excludes them. Only adopt rows absent from the live session map before this request inserts them. Preserve genuine concurrent local/SSE additions and newer runtime state. Extend both desktop browser regressions with a worktree disappearing between partial publication and final reconciliation while historical reads are blocked. The regression passes on Electron and Tauri. Independent gatekeeper verification reports zero findings after testing removal from list/store, concurrent rename, local creation and deletion without resurrection. UI typecheck/build and nine startup/reconnect store tests pass. Installed-profile verification displays PR726 in 2.04s and completes its first 200-message read 6.08s after selection without HTTP or renderer errors.
…ture The isolated tab chrome fixture mounts RightPanel directly and must provide its new required isActive accessor, just like both production shell mounts. Without it the fixture throws before rendering tabs, so four scrollbar, keyboard, drag and touch regressions time out rather than testing the intended UI behavior. Keep the fixture explicitly visible and retain all existing gesture and geometry assertions. This changes no production behavior.
Final gatekeeper and CI dispositionFinal reviewed head: Independent gatekeeper verdict: ZERO FINDINGS after correcting all findings, including partial-page reconciliation. The final isolated tab fixture now provides the required visible-panel accessor; all four tab chrome browser regressions pass locally (zoom/DPI/RTL, wheel/keyboard/resize, pointer reorder and touch). The optional Electron fixture was skipped in that invocation. The full CI run
Change-specific validation: 23 restoration/Git browser scenarios, 4 tab-chrome scenarios, 10 SDK/queue checks, 9 startup/reconnect store checks, server Git regressions, UI typecheck/build and server compilation. Final native first-switch capture: PR726 available in 2.04s, first 200-message response complete 6.08s after selection, no HTTP/renderer error. Actual project tabs and model menu verified in the usual installed profile. Proceeding with the user-requested administrator merge with these explicit CI exceptions. This is not a claim that the entire repository test suite passes. |
Integrate upstream PR NeuralNomadsAI#747 so the plugin-controls branch remains based on the current dev head before final qualification. Preserve the independent V2 plugin controls, visibility gating, worktree-scoped cache, native Windows path handling, and separate Global and Project indicators while incorporating upstream Git-panel startup restoration changes. Upstream PR NeuralNomadsAI#747 documents the same current CI baseline failures: two system-message browser timeouts and the additive OpenCode latest credential method field in migration compatibility. # Conflicts: # packages/ui/tests/browser/fixtures/tab-chrome.tsx
Summary
Restore saved conversations promptly with the Git panel open. Preserve Solid project-shell identity during metadata and sibling-project restoration, defer inactive Git readers, and keep foreground message requests independent of secondary HTTP fan-out.
Publish the visible project's recent worktree conversations from its first verified page, before historical pagination completes. Promote project/location and worktree membership dependencies on selection; keep historical cursors and hidden projects within the secondary budget. Partial rows join their request's reconciliation baseline so removed worktrees cannot leave ghost conversations.
Run status/diff process creation in the existing Windows Git worker. Bound untracked-file stat submission and prioritize worktree authority commands over pending display work. Preserve UTF-8 content, final newlines and large blobs.
Lifecycle and refresh semantics
Gatekeeper
Independent review round 1 reported three findings: dispatched SDK cancellation, late explicit/mutation continuations, and worker admission behind untracked-file batches. All corrected.
Round 2: ZERO FINDINGS, with nine independent isolated source-level checks.
The visible-list extension received additional independent reviews. One finding about partial rows being mistaken for concurrent creations during worktree removal was fixed and regression-tested. Final review: ZERO FINDINGS, including isolated checks for membership removal, concurrent rename/local creation and deletion without resurrection.
Validation
CI qualification
Compatibility migration CI fails on the unchanged historical credential assertion at
scripts/test-opencode-history-migration.mjs:191: the latest upstream response addsmethod: "key". Runtime-contract qualification passes at minimum/latest; this failure is separate from the changed session/Git behavior and is not represented as a green check.Existing large source files touched:
packages/ui/src/components/instance/instance-shell2.tsx(~1308 lines),packages/ui/src/lib/api-client.ts(~597 lines),useGitChanges.ts(~519 lines),packages/ui/src/stores/instances.ts(~2197 lines), andpackages/ui/src/stores/session-api.ts(~1898 lines).