Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Approval controls can appear while critical MCP arguments or terminal-input details remain hidden because rendering and fit checks use truncated review context.
3 open issues
What changed in this PR
This PR expands Sessions approval reviews through the existing Codex connection and improves how users navigate and read session results, while leaving execution and policy enforcement to Codex.
Changes:
- Adds MCP/app-tool, managed-network and terminal-input approval reviews with scoped choices and confirmation handling.
- Introduces three-view Cycle controls, larger selected rows and deliberate-reading timers for unread replies.
- Updates regression tests, all 17 locale catalogues, documentation and embedded browser styling.
| File | Description |
|---|---|
| web/tests/browser.spec.ts | Tests cycling, reading timers and approval controls. |
| web/src/style.css | Increases selected-row text height. |
| web/src/Sessions.svelte | Adds Cycle, reading timers and approval displays. |
| web/src/SessionActions.svelte | Renders specialized approval reviews. |
| web/src/preferences.svelte.ts | Persists and cycles three overview layouts. |
| web/src/MCPApproval.svelte | Displays MCP tool approval details. |
| web/src/contracts.generated.ts | Adds approval review contracts. |
| web/src/ActionApproval.svelte | Displays structured action approval fields. |
| README.md | Documents controls, approvals and read receipts. |
| intro-post.md | Updates the feature introduction. |
| internal/web/state.go | Projects approval details into browser state. |
| internal/web/dist/index.html | References updated embedded assets. |
| internal/web/dist/assets/index-Ck-q96h6.css | Includes rebuilt selected-row styling. |
| internal/web/control.go | Offers specialized approval choices and details. |
| internal/web/control_test.go | Tests approval preparation and request binding. |
| internal/ui/preferences.go | Persists three-view preferences with legacy compatibility. |
| internal/ui/preferences_test.go | Tests layout preference migration. |
| internal/ui/monitor.go | Gives selected terminal rows more height. |
| internal/ui/monitor_read.go | Adds cancellable wide-row reading timers. |
| internal/ui/monitor_read_test.go | Tests receipt timing and cancellation. |
| internal/ui/monitor_prompt_test.go | Updates editor-isolation assertions. |
| internal/ui/monitor_navigation.go | Replaces Hide/Show with Cycle. |
| internal/ui/monitor_detail.go | Renders specialized terminal approval reviews. |
| internal/ui/monitor_detail_activity_test.go | Updates hidden-context animation coverage. |
| internal/ui/monitor_copy_test.go | Updates copy eligibility tests for layout preferences. |
| internal/ui/monitor_context.go | Integrates Cycle labels and input handling. |
| internal/ui/monitor_context_test.go | Tests Cycle persistence and click targets. |
| internal/ui/monitor_context_modes.go | Implements synchronized overview cycling. |
| internal/ui/monitor_context_modes_test.go | Tests cycling, drafts and row allocation. |
| internal/ui/monitor_approval.go | Shares approval labels and stabilizes button spacing. |
| internal/ui/monitor_approval_test.go | Tests approval choices, confirmation and spacing. |
| internal/ui/model.go | Adds layout and reading-timer state. |
| internal/ui/localisation_test.go | Runs approval regressions across locales. |
| internal/i18n/locales/zh-Hans.json | Adds Chinese Cycle and approval labels. |
| internal/i18n/locales/tr.json | Adds Turkish Cycle and approval labels. |
| internal/i18n/locales/sv.json | Adds Swedish Cycle and approval labels. |
| internal/i18n/locales/ru.json | Adds Russian Cycle and approval labels. |
| internal/i18n/locales/pt-PT.json | Adds European Portuguese labels. |
| internal/i18n/locales/pt-BR.json | Adds Brazilian Portuguese labels. |
| internal/i18n/locales/nl.json | Adds Dutch Cycle and approval labels. |
| internal/i18n/locales/nb.json | Adds Norwegian Cycle and approval labels. |
| internal/i18n/locales/ja.json | Adds Japanese Cycle and approval labels. |
| internal/i18n/locales/it.json | Adds Italian Cycle and approval labels. |
| internal/i18n/locales/fr.json | Adds French Cycle and approval labels. |
| internal/i18n/locales/fi.json | Adds Finnish Cycle and approval labels. |
| internal/i18n/locales/et.json | Adds Estonian Cycle and approval labels. |
| internal/i18n/locales/es.json | Adds Spanish Cycle and approval labels. |
| internal/i18n/locales/en-GB.json | Adds English Cycle and approval catalogue entries. |
| internal/i18n/locales/de.json | Adds German Cycle and approval labels. |
| internal/i18n/locales/da.json | Adds Danish Cycle and approval labels. |
| internal/confirmation/policy.go | Classifies new one-time approval actions. |
| internal/confirmation/policy_test.go | Tests confirmation classifications. |
| internal/codex/stdin_approval.go | Parses and validates terminal-input approvals. |
| internal/codex/stdin_approval_test.go | Tests quoting, rejection and callback independence. |
| internal/codex/session_context.go | Carries structured approval details. |
| internal/codex/session_context_daemon.go | Routes newly supported approval requests. |
| internal/codex/session_approval_unix.go | Sends protocol-specific approval responses. |
| internal/codex/session_approval_unix_test.go | Tests response payloads and one-use capabilities. |
| internal/codex/session_approval_test.go | Updates unsupported-request expectations. |
| internal/codex/session_167_test.go | Tests actionable network-request expiry. |
| internal/codex/network_approval.go | Validates destinations and advertised network rules. |
| internal/codex/network_approval_test.go | Tests network scope, replay and expiry. |
| internal/codex/mcp_approval.go | Adapts MCP consent requests and persistence scopes. |
| internal/codex/mcp_approval_test.go | Tests MCP choices, metadata and request resolution. |
| internal/codex/approval_review.go | Builds shared structured approval displays. |
| internal/codex/approval_options.go | Centralizes approval labels and policy classification. |
| assets/screenshots/manifest.json | Updates Sessions screenshot hashes. |
Review effort: Balanced
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.


Managed network requests and terminal-input approvals now have dedicated reviews in the terminal and writable browser. These close two more approval gaps without adding an execution engine or policy manager: Codexometer displays the Codex request, returns the user's decision through the existing connection, and leaves execution and enforcement to Codex.
c3942f1): review host, protocol and justification; offer only advertised one-time/conversation grants and persistent host allow/block rules. Both persistent choices require confirmation by default. Exact advertised rule payloads are retained, with no widening to another host or wildcard.5aa8ed5): review the target terminal, start directory, optional environment and exact input as visible escapes. SEND INPUT ONCE and CANCEL INPUT answer the original callback. No reusable stdin grant or parent-command inference is allowed; changed input, terminal or directory invalidates browser preparation.Extra filesystem/network permission requests, unstable file-root grants, general MCP forms and browser/device authentication still require Codex. Unsupported or incomplete variants stay visible with a handoff. The terminal-input parser follows Codex 0.167's native quoted
write_stdin --session-idpresentation and never evaluates shell syntax.MCP/app tool approval requests were ignored by Sessions, so their four-choice consent dialog never reached the interface. The terminal and writable browser now review the server, supplied tool/app identity, message and arguments, then offer APPROVE ONCE, ALLOW FOR SESSION, ALWAYS ALLOW TOOL and CANCEL TOOL CALL. Session/persistent grants appear only when Codex advertises them and require confirmation by default; the launch confirmation policy applies. Omitted argument metadata is shown as unavailable.
The adapter answers the original request using MCP
action/content/_metaresponses, including the exact advertised persistence scope. Request IDs, fresh one-use capabilities, replay/reconnect protection and prepared browser reviews remain bound to the original approval. Missing turn/item IDs and connector payloads withouttool_nameare supported. General forms, URL authentication and device verification stay visible for handling in Codex. Protocol shape follows the Codex app-server elicitation documentation; tool-consent metadata was checked against the local Codex source.Sessions has a single C(Y)CLE control in the terminal and browser. Mixed rows first match the most detailed listed overview row; a uniform list cycles together through graph only → split detail/graph → wide detail → graph only, without opening full-screen Detail.
The selected terminal row receives roughly twice the height of its neighbours when space permits, preserving the three-line minimum and existing page size. The browser allows twice as much reply-text height in its selected row. Selection changes the allocation; hover does not.
Unread completion indicators reflect deliberate reading on supported shared app-servers:
Changing selection, leaving wide mode, hiding the reply, switching away from Sessions or receiving a newer result cancels the dwell. Timers bind the exact session, turn and read revision; stale callbacks cannot complete a newer timer. Full Detail checks the actual reply lines against the terminal's clamped document slice and the browser's reply element against its scrollport. Task/guidance text, source metadata and trailing notices alone cannot acknowledge a result; older history or a different cached text revision cannot acknowledge the latest reply. A reply arriving in an already-open full Detail page still needs a fresh review gesture. Read-only web never sends receipts.
Other layout behaviour:
yreplaces the Sessionshshortcut. Focused editors, modified browser shortcuts and full Detail retain their controls; reported held-key repeats do not cycle.Validation: Go race suite, all 17 locale surface suites, Go vet, Windows application/UI-test compilation, frontend type/format checks, all 169 browser tests, and all 7 screenshot hashes pass. Deterministic timer tests cover expiry, cancellation, replacement replies, bulk actions and visible reply bounds. Approval-spacing, MCP, network and terminal-input control regressions run across all 17 locales. Synthetic WebSocket tests verify all four MCP response payloads, capability consumption, replay/resolution and rejection of unadvertised grants; changed tool arguments invalidate browser preparation. Network fixtures verify all six decisions and exact allow/deny payloads; stdin fixtures verify quoting, visible control characters, missing-data rejection, one-time responses and independent callbacks on the same parent item. Browser cases cover all three confirmation modes and read-only reviews. Additional regressions cover long inline reviews for all five approval families and full Detail with the reply hidden behind task/guidance or source metadata, including current-turn history and notice-only viewports. The startup-resize test now waits for the asynchronous resized layout instead of reading the old viewport immediately.
The duplication ratchet passes all four scans. Compared with main, normalized 50-token matches fall 142 → 141, duplicated lines fall 1,467 → 1,429 and tokens 10,660 → 10,479. Normalized 100-token matches fall 11 → 10, lines 212 → 192 and tokens 1,928 → 1,828. Both exact scans are unchanged; the baseline is untouched.
Validation uses synthetic Codex/MCP traffic and browser requests; no live connector permission, network rule or terminal input was exercised.