Repository navigation
fix(server,client-runtime,web,mobile): settle startup handoff races, editor deltas, PR fallback, and reactive palette thread actions - #910
Merged
Conversation
…ot sequence ThreadHandoff.start_ previously settled pending/departing moves from a shell snapshot and only then subscribed to live domain events from the current tail, missing terminal run.updated events that landed during the startup settle loop. Capture the snapshot's atomic snapshotSequence and stream unbounded stored run.updated events after it.
…r fallback A plain or scratch folder project without repositoryIdentity or trackedFolders no longer lends itself as a PR fallback project, so PR links fall back to the browser instead of opening an unloadable panel.
…eam editorsUpdated deltas Warm ExternalLauncher editor discovery on server startup and send late editor discovery as an opt-in editorsUpdated stream delta instead of a second full ServerConfig snapshot, keeping older clients wire-compatible.
Remove unused useEarlyLoad/awaitEarlyLoad pre-socket HTTP preload plumbing that only served the removed relay path, keeping the HTTP shell fallback for older or non-pipelined servers.
…d permissions Subscribe useCommandPaletteThreadActions to the thread shell, project, server config capabilities, operate/triage scopes, and move availability instead of calling imperative readMenu() at render time, and pass the route thread ref immediately so older settled threads populate palette actions as soon as their family read lands.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up batch Group 1 (5 root-cause fixes across server orchestration, contracts, client-runtime, web, and mobile):
Startup handoff settle vs.
run.updatedstream race (93a23546987)ThreadHandoff.start_previously settled pending/departing moves from a shell snapshot and only then subscribed to live domain events at the current tail, missing terminalrun.updatedevents that arrived while startup settles were still running.bounded?: boolean(defaulttrue) toOrchestrator.streamStoredEventsFrom, captured the atomicsnapshotSequencealongsidethreadsfromprojections.getShellSnapshot(), signalledsnapshotReadybefore settling (awaited whenServerActivationis absent in tests), and streamed unbounded storedrun.updatedevents aftersnapshotSequence.apps/server/src/peer/handoff/ThreadHandoff.test.ts(timed out before fix; 14/14 pass).PR link folder fallback requires tracked folders (
14438539bbd)packages/client-runtime/src/changeRequestLinks.tspreviously lent any project withoutrepositoryIdentityas a fallback, sending plain/scratch folder PR links to an unloadable side panel instead of the browser.trackedFolderstoChangeRequestProjectand required(candidate.trackedFolders?.length ?? 0) > 0for the folder fallback, matchingPullRequestService.ts; forwarded"trackedFolders"inapps/mobile/src/lib/pullRequestNavigation.ts.packages/client-runtime/src/changeRequestLinks.test.ts(13/13),apps/mobile/src/features/pull-requests/pullRequestNavigation.test.ts(7/7), andapps/web/src/lib/openPullRequestLink.browser.test.tsx(10/10).Startup editor discovery warm-up & opt-in
editorsUpdateddelta (a30627afaa1)apps/server/src/server.tsnow warmsExternalLauncher.resolveAvailableEditors()(andresolveFileManagerRevealKind()when"file-manager"is present) on startup into its existing SWR cache viaServerActivation.forkParked.ServerConfigEditorsUpdatedPayload,ServerConfigStreamEditorsUpdatedEvent(type: "editorsUpdated"), and optionaleditorUpdates?: booleanonWsSubscribeServerConfigRpc(wire-compatible in both directions with older mobile/server builds).apps/server/src/ws.ts(withLateConfigDiscovery) emitseditorsUpdatedinstead of a second fullsnapshotwhen opted in while updating its accumulated snapshot state;packages/client-runtime,apps/web, andapps/mobilehandleeditorsUpdatedwithreuseUnchangedand opt in consistently.packages/client-runtime/src/state/serverConfigProjection.test.ts(6/6),packages/client-runtime/src/rpc/session.test.ts(26/26), andapps/server/src/ws.test.ts(45/45).Remove dead relay-only early HTTP shell load (
d80927a6275)EarlyShellLoad/useEarlyLoad/awaitEarlyLoadpre-socket HTTP preload plumbing frompackages/client-runtime/src/state/shell.tswhile keepingloadOverHttpfor older or non-pipelined servers.packages/client-runtime/src/state/shell-sync.test.ts(28/28 remaining sync/fallback/pipelining tests pass).Reactive command palette thread actions (
08a03bffee9)useCommandPaletteThreadActionspreviously called imperativereadMenu()during render without subscribing, leaving actions empty/stale for older settled threads before their family read landed or when shell/config/permissions changed.canTurnThreadShellIntoProjectinapps/web/src/hooks/useThreadActions.ts, added optional reactiveThreadActionMenuSnapshottouseThreadActionMenu.readMenu(snapshot?)(keeping 0-argreadMenu()zero-subscription forChatHeader), subscribeduseCommandPaletteThreadActionstouseQuietThreadShell,useProject,useServerConfig, operate/triage scopes, andcanMoveThreadsAtom(mounted only when the palette is open), and passedpaletteRouteTarget.threadRefimmediately inCommandPalette.tsx.apps/web/src/components/ChatView.browser.test.tsxverifying bothuseCommandPaletteThreadActionsand the open<CommandPalette>update whengetThreadFamilylands.Council review
Two independent read-only Council Round 1 reviews on
08a03bffee9:council-verifier): CLEAN (0 blocking findings). Verified[T-3]snapshot/sequence transaction atomicity and unbounded replay,[T-4]parity withPullRequestService.tsand siblingissueLinks.ts,[T-6]bidirectional wire compatibility,Stream.mapAccumserialization, and subscription sharing across web & mobile,[T-7]intactloadOverHttpfallback,[T-16]zero closed-palette subscriptions and React Compiler purity, plus both rejected triage items. Noted 4 non-blocking nits (Orchestrator.tsexactOptionalPropertyTypesdefault, extra wire-input assertion insession.test.ts, harmlessresumablebranch inloadOverHttp, and remotesettingsUpdatedsnoozePresetsrefresh).opus-council, fully independent): CLEAN (0 blocking findings). Independently verified all 5 commits, tests, wire compatibility, React Compiler purity, and sibling surfaces (ThreadSettlement,RemoteDelegation). Noted 3 non-blocking follow-up nits:remoteOpenTargetsResolvedanddirectEndpointsResolvedinwithLateConfigDiscoverystill send a secondsnapshot(directEndpointsis also read from snapshots bysupervisor.ts:368),EnvironmentSupervisor.openingSessioncan eventually be made required once test fakes provide it, and a stale null storedrepositoryIdentitynow opens in the browser instead of the panel.Rejected / already-resolved triage items
AntigravitySkills.tsELOOP symlink loop: already fixed onmainin408fc78f92c(AntigravitySkills.ts:111-125+ regression test inAntigravitySkills.test.ts:424-438).#883: verified green inv0.32.0(84d21845b14, Actions run46561057231, includes#883and#901; all 10 platform/release jobs succeeded).Verification
vp run check:changed origin/main --concurrency 2 --timeout 1800:format: pass (0.2s)lint: pass (1.6s, 0 errors)knip: pass (2.8s)graphql (apps/server): pass (0.4s)typecheck (39 packages): pass (8.2s)test (25 files, 458 tests): pass (56.1s)react compiler (9 files, web + mobile): pass (7.9s)SUCCESS/SKIPPEDDone with Gemini 4 Neon (XHigh) in Antigravity, reviewed by Gemini 4 Neon (XHigh) and Claude Opus 5.5 (High).