Repository navigation
Conversation
There was a problem hiding this comment.
I verified the fix. I ran the reproduction script from #63920 against opencode serve from source. On the base branch, an idle session's time_updated moved forward on browser attach and again on detach, and the session list showed the detach time as its last update. With this PR, time_updated stays the same through both, and the browser permission rules are still granted and then revoked. The new test fails on the base branch and passes here. The related core tests pass, and tsc -b passes for packages/core.
Public API: no endpoint, schema or event changes. The only behaviour change is that a session.update({ permissions }) call no longer bumps the session's updated time. In this repo the browser plugin is the only caller that updates permissions, so this has no other in-repo effect. Keeping recency here matches how the other bookkeeping writes already work (Viewed, and claim/release in store.ts).
No blocking concerns.
3d172e3 to
9a6e372
Compare
Issue for this PR
Closes #63920
Type of change
What does this PR do?
Browser attach and detach persist permission changes. Stamping
time_updatedduring that write moves idle sessions to the top of Recent. Explicitly keep the stored timestamp so Drizzle's$onUpdateleaves recency alone while the grant or revoke is saved.How did you verify your code works?
The browser attach regression fails on unmodified
devand passes with the fix. It checks the grant and revoke, timestamps, list order, and message count. On macOS, 56 targeted tests passed, as did ten randomized runs of the browser attach file (30 tests),bun run check, and the core TypeScript check. Windows desktop validation is pending.Screenshots / recordings
The regression asserts the session order returned by the core list.
Checklist
AI-assisted implementation and validation.