FEAT: opt-in browser session approvals and prompts - #53
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Secret questions with fixed options currently expose their selected answer in an unmasked control.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds opt-in browser session approvals and prompts while preserving read-only default web mode and existing security boundaries.
Changes:
- Adds
--web-controland secured prepare/commit endpoints. - Adds session action UI with confirmation, expiry, and draft isolation.
- Expands automated tests, documentation, and production assets.
File summaries
| File | Description |
|---|---|
main.go |
Wires the control-mode flag and demo approval. |
main_web_test.go |
Tests explicit control opt-in. |
internal/web/control.go |
Implements secured action offers and commits. |
internal/web/control_test.go |
Covers validation, freshness, replay, and security. |
internal/web/server.go |
Conditionally registers control routes. |
internal/web/server_test.go |
Updates server invocation tests. |
internal/web/state.go |
Projects control state and retains private capabilities. |
web/src/SessionActions.svelte |
Adds browser action controls. |
web/src/Sessions.svelte |
Integrates controls into session detail. |
web/src/state.svelte.ts |
Adds authenticated control requests. |
web/src/App.svelte |
Displays active control mode. |
web/src/style.css |
Refines session-detail layout. |
web/tests/browser.spec.ts |
Adds browser control-flow tests. |
README.md |
Documents setup, operation, and risks. |
SECURITY.md |
Defines control-mode security invariants. |
intro-post.md |
Announces the optional functionality. |
internal/web/dist/index.html |
References rebuilt assets. |
internal/web/dist/assets/index-CUbf51Nc.js |
Adds rebuilt application bundle. |
internal/web/dist/assets/index-DDwYKqoi.js |
Removes superseded bundle. |
internal/web/dist/assets/index-DCwkqPue.css |
Adds rebuilt stylesheet. |
internal/web/dist/assets/index-CYAA_qS7.css |
Removes superseded stylesheet. |
Review details
- Files reviewed: 16/21 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The local browser dashboard can already identify sessions needing attention, but users must return to Codex or the TUI to respond. This adds a deliberately opt-in session command centre while keeping ordinary
--webread-only and preserving the terminal launch path.What changes
--web-control(requires--web), with explicit launch/header/footer indicators. The flag is never persisted and cannot be enabled through the browser.Security boundaries
Try it locally
The simulated approval exercises the real browser endpoints without running any command. For real actions omit
--demoand connect CLI sessions through the documented shared app-server setup.Verification
go test -race -cover ./...— all packages pass; web coverage 94.9%, terminal UI coverage 91.2%.go vet ./...andgit diff --checkpass.make web-test— Svelte/type/format checks, production asset build, local binary build and 25 Playwright tests pass.