Offer explicit one-workspace Context consent

SI
3d ago
+687-38

Adds an explicit “Choose one workspace for Context tools” option to full-scope agent consent. The account must choose an authorized personal or organization workspace and review a fresh server-bound ticket before approval. Changing selection invalidates the prior ticket; failed previews retain a path back to fresh consent. Existing default consent and account/session guards remain intact.

Connected Agents identifies selected Context connections separately from full tool access. Workspace or capability changes require a new approval.

Depends on recoupable/api#1284; deploy API support first. Existing connections are not changed. This is the membership-only Context slice; graded-role loss and the broad tool catalog remain open in recoupable/mono#208 and recoupable/mono#212. No production flags/configuration or real provider/account operation changed.

Validation: Final App full suite 2,974 passing; focused OAuth 49 passing; general and dedicated OAuth TypeScript checks; lint (warnings only); 38 synthetic Chromium checks with mobile/desktop screenshots inspected. An earlier CI failure identified an unsupported screenshot option, which was removed. A preceding full run had five failures in an unchanged Intelligent UI test file; its isolated 28-test recheck and the final full run passed. Final source rejects unsolicited selected tickets and persistently invalidates old tickets on every workspace change, including A → B → A, while preserving keyboard focus. Both cases have reproduced regression tests. Selected connections show only Context access badges, Back remains available during pending previews, and organization UUID comparisons use canonical casing. Two independent exact-head reviews passed at 96e2ced10. Synthetic fixtures are not live-client acceptance. Coordinator owns merge.

Summary by CodeRabbit

  • New Features
    • OAuth consent now lets you choose a workspace for Context tools, limiting access to that workspace. You can review the requested permissions or return to them from the workspace selection.
    • Connection details identify the selected workspace as personal or show its organization ID.
    • Consent notices clarify that changing the workspace or adding tools requires new approval, and labels distinguish one-workspace access from full tool access.