Skip to content

refactor(fe): one queue for authorization-bearing requests - #4269

Open
sea-snake wants to merge 4 commits into
feat/revoke-sessions-from-settingsfrom
fe/authorization-request-queue
Open

refactor(fe): one queue for authorization-bearing requests#4269
sea-snake wants to merge 4 commits into
feat/revoke-sessions-from-settingsfrom
fe/authorization-request-queue

Conversation

@sea-snake

@sea-snake sea-snake commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Design: #4224. Overview: #4230. Groundwork for #4273, which is the second caller.

The delegation handler serialises its own requests so that two consent screens cannot race. The session handler coming in #4273 also authorizes, and it has to share that queue rather than keep one of its own — two queues would let one request paint over the other's screen.

Lifts the queue out of the delegation handler into serialize.ts as serializeAuthorizationRequest. No change to what the delegation handler does with it.

No tests: handleDelegationRequest has no unit coverage today, and the extracted function is a move of the existing queue. Its first test arrives with the second caller in #4273.

@sea-snake sea-snake added the feature:revocable-app-sessions Design: revocable app sessions label Aug 22, 2026
@sea-snake
sea-snake marked this pull request as ready for review August 22, 2026 18:16
@sea-snake
sea-snake requested a review from a team as a code owner August 22, 2026 18:16
@zeropath-ai

zeropath-ai Bot commented Aug 22, 2026

Copy link
Copy Markdown

No security or compliance issues detected. Reviewed everything up to 05580cb.

Security Overview
Detected Code Changes
Change Type Relevant files
Enhancement ► src/frontend/src/lib/stores/channelHandlers/delegation.ts
      Replace inlined delegation serialization with serializeAuthorizationRequest usage
► src/frontend/src/lib/stores/channelHandlers/serialize.ts
      Add new serialize.ts to serialize authorization-bearing requests one at a time

@sea-snake
sea-snake force-pushed the fe/authorization-request-queue branch from 55d30b3 to 0c845ae Compare August 22, 2026 18:45
@sea-snake
sea-snake force-pushed the fe/authorization-request-queue branch from 0c845ae to df54c97 Compare August 22, 2026 19:07
@sea-snake
sea-snake force-pushed the fe/authorization-request-queue branch from df54c97 to 9d2f6d5 Compare August 22, 2026 19:25
The delegation handler serialised its own requests so two consent screens could
not race. A second handler that also authorizes is coming, and it has to share
that queue rather than keep its own: two queues would let one request paint over
the other's screen.

Lifts the queue into `serialize.ts` as `serializeAuthorizationRequest`, with no
change to what the delegation handler does with it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sea-snake
sea-snake force-pushed the fe/authorization-request-queue branch from 9d2f6d5 to d67df85 Compare August 22, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature:revocable-app-sessions Design: revocable app sessions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant