Repository navigation
Conversation
46f9334 to
b66797e
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
b66797e to
54a5f43
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 54a5f4383c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
54a5f43 to
7212c9f
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7212c9fa5c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f7ba755584
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…from the live client
…keeps new ones off useAPI().api
…s dialog) use the live client; the gate check reads || conditions
f7ba755 to
c07e65f
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c07e65fa0a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ced336df50
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
This PR is layer 4a of the reconnect stack (base: #6304). Handlers that answer "offline" with a result now check the live client (
useLiveAPI()). Nothing changes today: the live client equalsuseAPI().apiuntil PR 6. After PR 6,useAPI().apikeeps the last client while Xum reconnects. A gate on it would then let the call through, and the call would fail withConnectionLostErrorinstead of the handler's own offline result ({ success: false, error: "API not connected" }, an empty list, or a thrown "not connected" error).Implementation
Each gated handler uses
liveApi(fromuseLiveAPI()) in its gate, its calls and itsuseCallbackdeps. Effects and subscriptions in the same components keepapi: PR 5 changes those.ProjectContextremoveProject,getBranchesForProject,getSecrets,updateSecrets,updateDisplayName,updateColor,updateCustomInstructions,assignWorkspaceToSubProject,getRemovalBlockers,updateCodeWorkspaceSyncPathWorkspaceContextcreateWorkspace, workspace removal,updateWorkspaceTitle,setWorkspacePinned,reorderPinnedWorkspaces,preflightArchiveWorkspace,archiveWorkspace,unarchiveWorkspace,getWorkspaceInfo, and the side-chat discard queue (it already useduseLiveAPI())App.tsxconfirmAndRemoveSubagentnow get the live client, which covers their own!p.apigates.ProjectSidebarandAgentListItemtitle regeneration,ChatPanequeued dispatch mode,UILayoutsContext.saveAll,useComposerAttachmentsstaging,useCreationWorkspacetrust prompt,RightSidebargoal actions,useExperiment,useOpenInEditor,DelegatedCreationInterruptedBannerHandlers with their own offline message (
WorkspaceMenuBar,ProjectCreateModal,ChatInput, settings sections) follow in PR 4b.Validation
WorkspaceContext.test.tsx, new both-mode test (null-gaptoday,kept-gapafter the switch): after a drop, the project and workspace handlers return their offline result and call no server method. Thekept-gapcase fails without this PR.offlineResultGates.test.tsscanssrc/browserwith the TypeScript compiler. It fails on anif (!api)orapi == nullgate that returns{ success: false }or throws, so a new handler cannot gate onuseAPI().api. It listsApp.tsxanduseExperiments.tswhen I revert them.make static-check,make crap-check, andbun teston the touched folders pass.Risks
Low. Before PR 6 the live client and
useAPI().apiare the same object in every render (PR 2 pins this), so every changed handler behaves as before.Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high• Cost:$55.49