Fix session-link reload dropping Control UI token#43240
Fix session-link reload dropping Control UI token#43240lynnzc wants to merge 3 commits intoopenclaw:mainfrom
Conversation
Greptile SummaryThis PR fixes a session-link navigation bug where clicking session keys in the Sessions table triggered a full-page reload, dropping the in-memory Control UI auth token and disconnecting the gateway. The fix intercepts plain left-clicks on session anchor tags, prevents the default navigation, and performs an in-app state transition instead — preserving the token while correctly switching to the Chat tab with the selected session key and updating the browser URL via Key changes:
Confidence Score: 5/5
Last reviewed commit: 6d8d518 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6d8d5188f8
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Addressed the P1 review item about queued state leakage on session-link open. What changed:
What I intentionally did not change:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f0974c59f2
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Addressed latest review feedback with a minimal follow-up:
Validation:
|
|
Thanks for the careful follow-up work on this. I reviewed it against #40892, now merged to The merged fix restores current-tab Control UI token continuity through Closing as superseded by #40892. If we want SPA-only session-link behavior later for UX reasons independent of auth, that can come back as a narrower follow-up. |
Summary
cmd/ctrl/shift/altor non-left clicks) as normal link behaviorRoot cause
Session rows used plain anchor navigation (
/chat?session=...). That triggers a page reload, and Control UI tokens are intentionally in-memory only, so the reload dropped auth and disconnected the gateway.Validation
pnpm --dir ui exec vitest run --config vitest.config.ts src/ui/views/sessions.test.ts src/ui/navigation.browser.test.ts✅ (2 files, 15 tests passed)pnpm exec oxfmt --check ui/src/ui/views/sessions.ts ui/src/ui/app-render.ts ui/src/ui/views/sessions.test.ts ui/src/ui/navigation.browser.test.ts✅Closes #43186