fix(agents): bind reads to route and session lifetimes - #3338
Chris0Jeky wants to merge 9 commits into
Conversation
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cff0fda917
ℹ️ 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: c483461289
ℹ️ 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".
| watch( | ||
| () => session.token, | ||
| invalidateReads, | ||
| { flush: 'sync' }, |
There was a problem hiding this comment.
Retry initial reads after token rotation
When Extend Session completes while an Agent route's initial read is still pending, this watcher removes that request's ownership and turns off loading; its eventual result is then ignored, but AgentsView, AgentRunsView, and AgentRunDetailView do not issue another read until mount or a route-parameter change, so the unchanged route displays a false empty/blank state. Fresh evidence in the corrected head is that the new refresh regression seeds every surface with existing data before rotating the token, leaving the first-load-empty case uncovered. Preserve same-user in-flight reads or restart them under the new token.
AGENTS.md reference: frontend/AGENTS.md:L6-L7
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Confirmed and corrected. Test-only head 11ab874 adds a deferred real-Pinia schedule that starts empty profile, run-list, and run-detail reads, rotates the token for the same user, and requires all three lanes to restart under the new token while old settlements remain suppressed.
A bounded runner transpiled and executed the actual production module: before correction each API was called once and loading dropped false after rotation; current source retries each empty active lane, preserves exact run/detail parameters, suppresses old settlement, and installs fresh-token results. Exact final head is a2c9b57; hosted Self-Test, Extended, Required CI, and repeat review are still pending, so the PR remains draft and this thread remains open.
Closes #3337. Related residual: #3352.
Summary
Binds agent profiles, run lists and run detail to independent read owners and explicit session lifetimes:
Test-first evidence
Initial test-only head
ae52930c6eb5d5b80a2f6a7347242f4ad60a0036reached canonical Ubuntu/Windows frontend qualification and produced only the intended ownership failures. Review-regression head7b6e137d9625ee6b2ba6ad747a4fdecc5fabe172isolated loaded-data preservation. Corrected headc48346128982366c0abdf4f1f766246f5cc351dcthen passed Smart CI, Extended and the complete Required CI matrix.Repeat Codex review found that an empty first-load route could still be stranded. Test-only head
11ab87461ed4773b99af8e35a6625873a52e2425adds one deferred real-Pinia case spanning profiles, runs and detail.A dependency-free runner transpiled and executed the actual production module:
This supplemental runner does not replace hosted project qualification.
Current head and remaining gates
Exact final head:
a2c9b57f46c72e1d22512f33563d77dfd4eb4dcfKeep draft until this exact head passes Smart CI, Extended and the complete Required CI matrix on Ubuntu and Windows, then receives repeat independent review. The open Codex first-load thread remains unresolved until that evidence exists.
No API, DTO, route, schema, dependency, workflow or backend change. This is client-state integrity, not transport cancellation or a server-authorization claim.