Skip to content

docs(studio): plan public status and popup auth - #1860

Merged
samuv merged 7 commits into
mainfrom
plan/studio-public-status-popup-auth
Sep 24, 2026
Merged

samuv merged 7 commits into
mainfrom
plan/studio-public-status-popup-auth

Conversation

@samuv

@samuv samuv commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Tracking: #1845

Stage

Plan / Interface. This Architectural Split PR targets main independently and contains no implementation. The proposed contract is in docs/acceptance/studio-public-status-popup-auth.md; ADR 0361 records the security and public API decision. PR #1871 is stacked above it for review. A human merge of this plan remains the approval checkpoint.

Contract

  • Anonymous GET /api/v1/status returns only connection and signInRequired. A daemon authentication rejection proves reachability; transport failure takes outage priority. Detailed /api/v1/runtime and feature routes remain authenticated. Public status has a separate limit of 120 requests per 60 seconds per client address and replica. Its no-store 429 response has Retry-After; the browser treats it as unconfirmed status.
  • Popup login keeps the existing sealed transaction and callback URL. COOP remains same-origin for APIs and assets, becomes same-origin-allow-popups only for served SPA HTML, and becomes unsafe-none only for callback HTML. The opener checks origin, source, and active attempt, then refetches the BFF session.
  • A blocked or closed popup leaves the route and mounted draft intact. Retry opens another popup; the manual new-tab link uses noopener noreferrer and ordinary return_to redirect flow to the current route. The original tab checks the session on focus.
  • Expired sessions keep the route and draft. Reads refetch after same-account reauthentication; mutations and streams require explicit retry. Account changes or an accountless authenticated response clear account-scoped browser state.
  • Optional email comes only from an existing verified ID-token claim. The opaque account key remains; the raw subject stays server-side. ADR 0351's published SDK, one-origin, sealed-cookie, PKCE, CSRF, Host, and origin boundaries remain in force.

The initial anonymous card is the sole status and sign-in surface. A mounted workspace uses the banner. #1844 owns banner placement; #1845 owns the status and auth input and actions; #1846 owns detailed-runtime/settings projections. The focused offline Playwright journeys overlap with #1776's broader harness.

Rebase and verification

Rebased onto origin/main at f3a9bb234, which includes #1879's HarnessContext ADR repair, #1869's workspace shell, and #1859/#1867's settings routes and About. The proposed Studio ADR is 0361 because open work also claims 0360. The plan checker and fixture suite pass. Documentation validation on the rebased stack found zero broken links, anchors, or orphan documents; git diff --check passes. Current-head PR CI passed, including Doc validation, docs-only tests, lint, domain-model checks, and the user-docs gate. The live-provider jobs were skipped by their normal label gate.

@samuv samuv self-assigned this Sep 24, 2026
@samuv samuv changed the title [Plan / Interface] Studio public status and popup auth (#1845) docs(studio): plan public status and popup auth Sep 24, 2026
@samuv
samuv force-pushed the plan/studio-public-status-popup-auth branch from 00fbbb2 to fd8f90b Compare September 24, 2026 10:55
@samuv
samuv added this pull request to stack #1872 September 24, 2026 11:24
@samuv
samuv force-pushed the plan/studio-public-status-popup-auth branch from 35ad6a3 to b4b15a6 Compare September 24, 2026 13:34
@peppescg

Copy link
Copy Markdown
Contributor

Quick review (plan PR). Blocking on process, not content:

  1. ADR number collision — 0360 is claimed three times. docs/adr/0360-studio-anonymous-status-and-popup-login.md collides with open plan: consolidate provider-scoped model discovery #1805 (0360-provider-scoped-model-discovery.md) and docs: plan contextual investigative guardrails #1455 (0360-run-id-addressed-prompt-free-controls.md). Whichever merges second recreates the duplicate-number problem docs: resolve duplicate ADR 0357 #1879 is fixing for 0357 — please renumber.
  2. Stale against main — needs a rebase. The 0357-harness-context-source-authority.md → 0359-… rename is already on main, and [Plan / Interface] Narrow HarnessContext binding for remote execution #1878 also edits 0359. (The harness-context.md changes are link renumbering only, and 0359 is still Proposed, so no accepted-ADR text is being edited.)
  3. Record the COOP change in ADR 0360. The implementation (feat(studio): add public status and popup sign-in recovery #1871) loosens the global Cross-Origin-Opener-Policy from same-origin to same-origin-allow-popups on every response, and sets unsafe-none on the callback paths. Neither ADR 0360 nor the plan's security/authority section mentions it — it's a security-relevant decision and should be written down (ideally with the scope narrowed to the routes that need it).

@samuv
samuv force-pushed the plan/studio-public-status-popup-auth branch 2 times, most recently from e0a69fa to b03e68b Compare September 24, 2026 15:00
@samuv

samuv commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review. I addressed all three points and rebased this plan onto current origin/main (b0a96d2fd, including the HarnessContext ADR repair and the merged workspace shell):

  1. Renumbered the proposed Studio ADR from 0360 to 0361 and updated its references.
  2. Recorded the COOP decision in ADR 0361 and the acceptance plan. The intended scope is same-origin by default, same-origin-allow-popups only for served SPA HTML, and unsafe-none only for the OIDC callback HTML.
  3. Rebased the stacked implementation in feat(studio): add public status and popup sign-in recovery #1871 onto this plan and narrowed its COOP behavior to match that contract. It also integrates the merged shell's banner slot and removes the duplicate initial banner.

The rebased plan is mergeable, and its local documentation and plan checks pass. Current-head PR CI is running.

samuv and others added 7 commits September 24, 2026 17:20
Co-Authored-By: mecatl <[email protected]>

Signed-off-by: Samuele Verzi <[email protected]>
Refine the proposed plan and ADR after local preview showed a duplicate sign-in banner above the public shell card. Keep outage precedence in the card and reserve the banner for a mounted workspace.

Signed-off-by: Samuele Verzi <[email protected]>
Co-Authored-By: Codex <[email protected]>
Renumber the merged harness-context ADR to 0359 and the proposed Studio status ADR to 0360 so documentation validation sees one record per number.

Co-Authored-By: OpenAI Codex <[email protected]>

Signed-off-by: Samuele Verzi <[email protected]>
Rebase on main’s ADR repair, assign Studio ADR 0361, and record the HTML-only COOP exception, redirect-based manual new-tab recovery, and a separate bounded anonymous status budget.

Co-Authored-By: OpenAI Codex <[email protected]>

Signed-off-by: Samuele Verzi <[email protected]>
@samuv
samuv force-pushed the plan/studio-public-status-popup-auth branch from b03e68b to 0769542 Compare September 24, 2026 15:20
@samuv
samuv merged commit cdd1323 into main Sep 24, 2026
31 checks passed
@samuv
samuv deleted the plan/studio-public-status-popup-auth branch September 24, 2026 15:49
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Sep 25, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants