perf: streamline chat startup metadata#88825
Conversation
|
Codex review: needs changes before merge. Reviewed May 31, 2026, 9:13 PM ET / 01:13 UTC. Summary PR surface: Source -32, Tests +121. Total +89 across 11 files. Reproducibility: yes. source-reproducible: the new test enqueues a disconnected global send with no Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge
Security Review findings
Review detailsBest possible solution: Merge the shared session-key/startup direction only after queued global-send replay fills a missing Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: the new test enqueues a disconnected global send with no Is this the best way to solve the issue? No, not yet: centralizing session-key/default-agent handling is the right direction, but the current patch does not implement the delayed agent selection its new test expects. The narrow fix is to recompute only missing queued Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 5b0c4c04917f. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source -32, Tests +121. Total +89 across 11 files. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
ceb2305 to
256f8c8
Compare
f65fbed to
2794970
Compare
2794970 to
6e086cc
Compare
5503939 to
17f3e13
Compare
💡 Codex Reviewopenclaw/ui/src/ui/app-chat.test.ts Line 1876 in 17f3e13 In this new scenario the queued item is created while disconnected with ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
17f3e13 to
5c8396f
Compare
|
Land-ready maintainer proof for Local proof run:
Manual review notes:
CI state at merge attempt:
|
* perf: streamline chat startup metadata * fix: defer global queued agent selection * style: format gateway startup refresh
* perf: streamline chat startup metadata * fix: defer global queued agent selection * style: format gateway startup refresh
* perf: streamline chat startup metadata * fix: defer global queued agent selection * style: format gateway startup refresh
Summary
chat.historyreturn enough persisted and synthetic session metadata for startup hydration so the web UI can skip the startupsessions.listfollow-up./new,/reset, chat send, run lifecycle, and gateway hydration share the same selected-agent rules.maintoo early.Verification
pnpm exec oxfmt --check ui/src/ui/session-key.ts ui/src/ui/app-chat.ts ui/src/ui/app-chat.test.ts src/routing/session-key.ts src/routing/session-key.test.ts src/tui/tui-session-actions.ts src/gateway/server.chat.gateway-server-chat-b.test.tspnpm tsgo:test:uinode scripts/run-vitest.mjs ui/src/ui/app-chat.test.ts src/routing/session-key.test.ts src/tui/tui-session-actions.test.ts src/gateway/server.chat.gateway-server-chat-b.test.ts/Users/steipete/Projects/agent-scripts/skills/autoreview/scripts/autoreview --mode branch --base origin/main-> clean, no accepted/actionable findingsReal behavior proof
Behavior addressed: startup and reset/new command latency from redundant session discovery and duplicate UI-side session-key logic.
Real environment tested: local gateway plus authenticated Control UI and TUI tmux sessions.
Exact steps or command run after this patch: opened
http://127.0.0.1:18789/chat?session=main, inspected startup RPC traffic, then exercised/newand/resetin the TUI under tmux.Evidence after fix: web startup used
chat.history,models.list,commands.list, and deferredmodels.authStatus; it did not issue the startupsessions.listfollow-up. TUI/newswitched locally without a gateway RPC, and/resetissued onlysessions.resetwithout follow-upchat.historyorsessions.list.Observed result after fix:
chat.historycarried enough session metadata for startup hydration; the TUI command path stayed single-RPC or local-only where expected.What was not tested: full cross-platform release checks; PR CI remains the broad gate.