Repository navigation
feat(browser): allow isolated dashboards for session writers - #156371
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
|
Codex review: blocked before merge. Reviewed September 23, 2026, 11:52 AM ET / 15:52 UTC (Revision 11). ClawSweeper reviewWhat this changesAdds isolated Browser dashboards for session writers, shared Gateway session authorization, and Control UI routing while preserving administrator browser access. Merge readiness⛔ Blocked before merge - 2 items remain This maintainer-sponsored capability remains useful and absent from main. The prior authority findings and compatibility follow-up are resolved; no actionable defect remains in the reviewed patch. Priority: P2 Review scores
Verification
How this fits togetherBrowser dashboards turn saved conversation widgets into interactive browser previews. Gateway admission checks the caller’s session access and tool policy before the Browser plugin creates or controls an isolated Chromium context. flowchart LR
A[Session writer or agent] --> B[Gateway session admission]
C[Membership and tool policy] --> B
B --> D[Browser dashboard owner]
D --> E[Isolated Chromium context]
E --> F[Interactive dashboard preview]
G[Revocation and session lifecycle] --> B
G --> D
Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep session admission in Gateway and isolated context ownership in Browser, preserving existing administrator access and current authorization at every effect. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug reproduction: this adds a capability, and current main still requires global administration for Browser dashboards. Is this the best way to solve the issue? Yes. Generic Gateway admission and plugin-owned isolated contexts extend the existing owners without replacing administrator behavior or introducing a parallel preview service. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b28166ffb99c. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (10 earlier review cycles; latest 8 shown)
|
bbb6bb3 to
5a10103
Compare
104cc0e to
35dbc0e
Compare
|
@clawsweeper re-review Please review exact head a5d58857125ed227fb3616b67028564a3a008920. The final-effect race in the prior review is repaired through the private navigation and interaction chain. Eight ordered regressions fail on the predecessor and pass on the fix; 79 focused tests and the real authenticated Gateway/Chromium existing-page navigation test pass. Membership removal during route preparation prevents the destination request. Final compiler/lint proof and review evidence are in the updated PR body. |
|
🦞👀 Re-review progress:
|
|
🦞👀 Re-review progress:
|
9896dbb to
a2274bc
Compare
|
@clawsweeper re-review Exact head |
|
🦞👀 Re-review progress:
|
a2274bc to
1e6ef16
Compare
|
@clawsweeper re-review Exact head |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…w#156371) * feat(browser): allow isolated dashboards for session writers * test(browser): complete scoped dashboard validation * fix(browser): extract dashboard resource type contracts * fix(browser): preserve scoped authority through preview startup * test(gateway): prove authenticated session browser access * fix(browser): publish scoped replies without yielding authority * fix(browser): preserve session authority through final dispatch * fix(gateway): preserve operator authority through session admission * test(gateway): align browser fixture catalog expectation * test(browser): preserve scoped ownership with Lightpanda profiles * test(gateway): provide placement fixture policy config
Related: #156328
What Problem This Solves
Session collaborators cannot interact with Browser dashboard previews without global browser administration.
User Impact
Adds an isolated session browser for existing session writers. Broad writers retain existing sharing rules;
operator.sessions.writeapplies only to the caller's own session. Effective browser tool policy still applies.The new dashboard route and the agent's dashboard selector share an empty browser context. Administrator dashboards keep their managed profile. General browser-tool permissions and Team/Guest role defaults are unchanged.
The scoped mode excludes arbitrary profile/node selection, transfers, cookie administration, sandbox-required sessions, and locked model selection. Dashboard isolation is not a sandbox for the whole agent.
Why This Change Was Made
Core owns generic session-resource admission; the Browser plugin owns its isolated context and cleanup. Tool policy is a synchronous evaluation of the authority's prepared session facts, removing duplicate preparation and parallel retirement state.
The router composes current request lifetime and selected-profile authority once. Its invocation check also reads the canonical operator guard bound after profile hydration; the original request lifetime stays captured. Final admission denials release any already-prepared session authority. Browser preserves synchronous resident authority through its private navigation and interaction chain, checking after asynchronous preparation and immediately before Playwright dispatch. Truly asynchronous guards remain awaited; resize also rechecks after clearing prior device metrics. Startup checks include receipt expiry that has no abort signal. Revocation during context/page allocation also closes the newly allocated resource.
Actor and resource lifetimes stay separate: normal turn completion and viewer disconnection preserve shared page state; revoking one collaborator stops that person's work without destroying another collaborator's context. Session reset/deletion, widget replacement, profile retirement, or Gateway shutdown retires the resource. Configuration refresh temporarily fences operations while canonical membership is prepared.
Compatibility review of the complete 87-file diff: no configuration keys/defaults, database tables/schema versions, migrations, or persisted record formats change. Existing session and Board rows are read through their current owners; new isolated contexts and lifetime handles are process-local. The
sessionAccessregistration option is optional, andreadGatewayToolOperatorScopesis an additive export; existing plugin registrations and administrator Browser routes retain their contracts. The review'sunknown-truncated-pull-filesdata-model warning therefore does not require a migration or upgrade fixture.No role/default changes, protocol-version bump, deployment, or DNS/Cloudflare change. Prepared ownership for locked/native-imported sessions remains a follow-up.
Evidence
Final mechanical rebase at
1e6ef16c9d3onto frozen main359a8a35: all ten feature commits are patch-identical, and all 40 Browser-owned implementation/fixture files retain their qualified bytes. Corrected one inherited lifecycle-test fixture to supply the requiredpolicyConfigfield. 26 lifecycle/session-authority tests, targeted formatting, and the Gateway-root compiler pass on the exact candidate. Production delta for this correction is zero; tests +5/-1. Required hosted CI is evaluated on the pushed head.Final composition at
a2274bcf8a7on frozen mainb7eb012f: preserves main's opt-in global Lightpanda engine, single-page refusal, exact connection cleanup and no-reconnect behavior. Existing canonical managed-profile admission excludes Lightpanda from isolated dashboards. 106 focused Browser tests plus one real authenticated Gateway/Chromium fixture passed; the fixture proves allowed and revoked startup/existing-page navigation against the HTTP destination (14.305 seconds). Three new cases cover global Lightpanda cleanup, occupied-page preservation and scoped dashboard refusal. The final named-mock-only lint correction passed all 12 ownership tests again; these are a subset of the 107, not additional cases. Formatting, targeted type-aware lint and the native Browser package compiler pass. Scoped Codex autoreview and independent actual-composition review found no actionable P0–P2 findings. No added policy, configuration or SDK surface in this conflict resolution.Test-only catalog correction at
9896dbb08d9: the expected Gateway fixture list now includes the registered authenticated Browser fixture. 104 catalog tests and targeted formatting pass on the exact candidate. Production and authenticated Browser proof bytes are unchanged. The earlier head's plugin shard was still in runner setup; it is not claimed as passing, and the replacement head requires its own hosted CI.Final router composition at
2120c7fb78don frozen main282fc78e: 100 tests across four Gateway suites passed, covering profile hydration, identity/scope revocation, final-admission cleanup, and upstream narrow session reads/mutations. The repair and unchanged authorization-function extraction add 14 production lines (including ten import lines) and 100 test lines. The extraction keeps the router under its existing line budget without changing authorization logic. Formatting, targeted type-aware lint, and both Gateway-root/Gateway-server compiler graphs pass. Scoped Codex autoreview and independent owner review found no actionable P0–P2 issue. Browser implementation and authenticated Chromium fixture bytes are unchanged froma5d58857125, preserving the final-effect proof below.Final effect-boundary repair at
a5d58857125: eight ordered regressions fail on the predecessor and pass on the repair. 79 focused Browser tests plus one real authenticated Gateway/Chromium test pass. Coverage includes the dispatcher adapter, click/type/fill/executable wait/resize, focus, asynchronous authority rejection, and resize revocation after metrics clearing. The real fixture also proves allowed navigation on an existing dashboard reaches its HTTP destination, while membership removal during route preparation prevents the revoked request. Final fixture: 5.966 seconds. Fresh scoped Codex autoreview and independent private-chain review report no actionable P0–P2 findings. ClawSweeper review confirms the prior authority finding is resolved, finds no remaining code/security defect, and accepts the authenticated proof; its compatibility/data-model checklist is addressed above. Final targeted lint, formatting, Browser package compiler, root-test compiler, and plugin-test compiler all pass. The final 14 changed files match the tested runner bytes.Owner-boundary rebase onto
b6b45244preserves its handshake-attested owner ingress checks alongside prepared profile authority. Exact head104cc0e3: 61 tests passed across three suites, covering the upstream owner positive/negative cases, prepared model-policy refresh without profile-store reads, and session admission/lifetime behavior. Formatting and independent conflict-composition review passed. The subsequent mechanical rebase onto frozen main5a15cf46removes only the redundant UI scope-union edit: main now provides the canonicalOperatorScopetype and retains the Browser method's explicit session-write scope. Independent review and range-diff confirm no Browser behavior change; the remaining five feature commits are patch-identical. This is the parent of the final effect-boundary repair.Pre-rebase combined Browser/Portal qualification at
5a101032: 124 unique runtime tests passed, including prepared operator model-policy refresh, session authority/tool policy, Browser route races, and authenticated Browser and Portal fixtures. Repeated fixture runs are excluded from this count.Browser proof uses a real signed device handshake, trusted-proxy authentication, person-profile mapping, persisted session membership, public plugin registration, SQLite Board data, real Chromium, and an HTTP destination. An authorized writer succeeds; a nonmember is denied; revocation during context allocation prevents the destination request. Final fixture: 8.164 seconds.
Ordered tabs, snapshot, and screenshot tests prove that the final resident access check and response publication occur in the same turn. Startup tests also cover connection/context/page/target discovery, unsignalled receipt expiry, and selected-profile changes. Existing Chromium isolation coverage checks cookies/storage and popup/context cleanup.
Core production, root-test, Gateway-root, Gateway-server, and the native Browser package compiler passed. Targeted core/plugin type-aware lint and formatting passed. The prepared session-accessor source guard passed without changing its baseline.
Fresh full feature autoreview found one response-publication race; the fix and three regressions passed a focused follow-up review with no remaining actionable P0–P2 findings. Independent owner review also cleared the authenticated fixture and prepared model-policy boundary.
Earlier unchanged-surface qualification includes plugin test types, import boundaries, zero import cycles, unused-export/file scans, test catalog coverage, and the Browser build.
Whole PR versus frozen base
359a8a35: runtime production +1,851/-240 (net +1,611), tooling +4/-2, tests/support +3,056/-435, docs +82/-4. Production growth implements generic admission/lifetime ownership and the isolated Browser capability; added tests cover authenticated access and revocation ordering.UI is unchanged by the landing repairs. Earlier UI qualification: 66 tests, desktop/mobile viewport and hit-testing checks, no browser errors or horizontal overflow. Startup JS 371,311 B gzip stays within the unchanged 371,332 B limit; CSS is 51,144 B.
Captures below use synthetic content and an
operator.writeconnection against a mock Gateway; baseline is4adc92dfd7740288840ee031eed032353a057075. Candidate UI calls the scoped Browser RPC.Remaining evidence gap: authenticated Team-server verification has not been run. The new authenticated end-to-end proof runs against an isolated Gateway and Chromium on the remote test runner; UI captures use a mock Gateway. This is source qualification, separate from hosted CI on the pushed commit. No Team deployment or policy change was performed.