Skip to content

Let terminal users review folder trust when starting a session - #123

Merged
merefield merged 3 commits into
mainfrom
fix/new-session-folder-trust
Nov 29, 2026
Merged

merefield merged 3 commits into
mainfrom
fix/new-session-folder-trust

Conversation

@merefield

Copy link
Copy Markdown
Owner

Why

Starting a terminal session in a new folder previously required leaving Codexometer and trusting it via Codex CLI first.

Changes

  • Make the New Session working directory visibly editable with the composer background. Clicking the field or its label focuses it; Tab still switches fields.
  • Offer Trust & send for undecided folders, with the full canonical path and a warning about folder settings and hooks. Esc preserves the draft. Trust requires explicit confirmation in every mode.
  • Save through the shared app-server against the active user config revision and verify effective trust before creating the session or sending the prompt. Do not override an explicit untrusted decision or grant trust to a broader path. The browser cannot grant trust.

Validation

  • Full Go suite during implementation, including synthetic app-server tests.
  • Focused regression tests for the final trust and field changes, including keyboard/mouse consent, cancelled drafts, stale revisions and profiles, failed writes, and field styling across all themes.
  • Local binary rebuilt.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Defer because security-sensitive folder-trust config writes depend on app-server layer ordering, revision/profile and batch-write semantics, disabled-reason wording, and authorization behavior that require human or runtime validation beyond synthetic fixtures.

No open issues 🎉

What changed in this PR

Adds a terminal-only folder-trust review flow to New Session, allowing users to explicitly trust undecided working directories before starting a session while preserving the browser’s read-only trust behavior.

Changes:

  • Adds an editable working-directory field, canonical-path review, explicit Trust & send confirmation, and draft-preserving cancellation.
  • Adds revision- and profile-checked configuration writes with effective-trust verification and fail-closed handling.
  • Updates error handling, documentation, tests, security guidance, and localized strings.
File Description
SECURITY.md Documents mandatory folder-trust confirmation and safeguards for server-side trust configuration writes.
README.md Describes terminal folder-trust review and related confirmation-policy behavior.
main.go Updates confirmation-policy command-line help text.
internal/​web/​session_mutation.go Maps trust-related session failures to appropriate HTTP responses.
internal/​web/​session_mutation_test.go Tests HTTP handling for trust-related session errors.
internal/​ui/​session_start.go Integrates trust-review state, editable directory handling, rendering, and session submission flow.
internal/​ui/​session_start_trust.go Implements the terminal folder-trust review screen and consent actions.
internal/​ui/​session_start_test.go Tests directory editing, focus, styling, draft preservation, consent, and responsive rendering.
internal/​i18n/​locales/​zh-Hans.json Adds Simplified Chinese translations for the trust-review interface.
internal/​i18n/​locales/​tr.json Adds Turkish translations for the trust-review interface.
internal/​i18n/​locales/​sv.json Adds Swedish translations for the trust-review interface.
internal/​i18n/​locales/​ru.json Adds Russian translations for the trust-review interface.
internal/​i18n/​locales/​pt-PT.json Adds European Portuguese translations for the trust-review interface.
internal/​i18n/​locales/​pt-BR.json Adds Brazilian Portuguese translations for the trust-review interface.
internal/​i18n/​locales/​nl.json Adds Dutch translations for the trust-review interface.
internal/​i18n/​locales/​nb.json Adds Norwegian Bokmål translations for the trust-review interface.
internal/​i18n/​locales/​ja.json Adds Japanese translations for the trust-review interface.
internal/​i18n/​locales/​it.json Adds Italian translations for the trust-review interface.
internal/​i18n/​locales/​fr.json Adds French translations for the trust-review interface.
internal/​i18n/​locales/​fi.json Adds Finnish translations for the trust-review interface.
internal/​i18n/​locales/​et.json Adds Estonian translations for the trust-review interface.
internal/​i18n/​locales/​es.json Adds Spanish translations for the trust-review interface.
internal/​i18n/​locales/​en-GB.json Adds English trust-review strings.
internal/​i18n/​locales/​de.json Adds German translations for the trust-review interface.
internal/​i18n/​locales/​da.json Adds Danish translations for the trust-review interface.
internal/​codex/​session_start.go Adds the trust-capable session-start interface, validation, and error handling.
internal/​codex/​session_start_unix.go Reads effective trust, performs revision-checked configuration writes, and verifies trust before session creation.
internal/​codex/​session_start_unix_test.go Tests canonical paths, trust discovery and writes, stale revisions, profiles, restrictions, and failed verification.
internal/​codex/​session_settings_unix_test.go Extends the app-server fixture to support trust-configuration write testing.
docs/​slash-command-support.md Documents terminal folder-trust review during new-session startup.

Review effort: Lite

@merefield
merefield merged commit 9525f12 into main Nov 29, 2026
8 checks passed
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