oracle icon indicating copy to clipboard operation
oracle copied to clipboard

oracle tui ignores browser.manualLogin and browser.chromePath from config

Open OmerFarukOruc opened this issue 1 month ago • 2 comments

In 0.22.2, oracle tui ignores browser.manualLogin and browser.chromePath from ~/.oracle/config.json, while the CLI honors them. The TUI's buildBrowserConfig call in dist/src/cli/tui/index.js passes only the answers to its own prompts (Chrome profile, cookie path, hide window, keep browser) and the model.

Steps, with this ~/.oracle/config.json and a signed-in manual-login profile:

{
  "engine": "browser",
  "model": "gpt-6-pro",
  "browser": {
    "manualLogin": true,
    "chromePath": "/etc/profiles/per-user/oruc/bin/brave-origin"
  }
}

oracle -p "hello" runs in the manual-login profile with Brave and gets an answer. oracle tui, then "ask oracle" with engine Browser, asks for a Chrome profile to copy cookies from, launches Chrome instead of Brave, and fails signed out. The session's meta.json shows "chromePath": null and "chromeProfile": "Default".

Should the TUI apply the config's browser settings the way the CLI does?

OmerFarukOruc avatar Nov 03 '26 16:11 OmerFarukOruc

Codex review: this still needs some work.

Summary Keep this issue open: current main and v0.22.2 omit configured browser settings from the TUI run, while the CLI applies them.

Reproducibility: Current source proves that the reported configuration cannot reach the TUI browser runner, and the same omission exists in v0.22.2; no tests or browser runs were executed during this read-only review.

Next step Establish a failing TUI browser regression, then apply shared browser defaults while preserving configured login profiles and explicit wizard overrides.

Review details

Best possible solution:

Apply the existing browser-default resolution in the TUI while preserving deliberate wizard overrides and the configured manual-login profile.

Do we have a high-confidence way to reproduce the issue?

Current source proves that the reported configuration cannot reach the TUI browser runner, and the same omission exists in v0.22.2; no tests or browser runs were executed during this read-only review.

Is this the best way to solve the issue?

Reusing applyBrowserDefaultsFromConfig is a focused repair to existing behavior; wizard defaults and override precedence must be handled together so hardcoded answers do not replace configured values.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against b4017d263c73.

Label changes

Label changes:

  • add P2: Browser consultations fail through the TUI for affected configurations, while the ordinary CLI provides a working path.
  • add impact:auth-provider: Ignoring manual-login settings selects the wrong browser authentication profile and can leave the TUI session signed out.
  • add issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.
  • add clawsweeper:source-repro: Current issue advisory state selects this label.
  • add clawsweeper:queueable-fix: Current issue advisory state selects this label.
  • add clawsweeper:fix-shape-clear: Current issue advisory state selects this label.

Label justifications:

  • P2: Browser consultations fail through the TUI for affected configurations, while the ordinary CLI provides a working path.
  • impact:auth-provider: Ignoring manual-login settings selects the wrong browser authentication profile and can leave the TUI session signed out.
Evidence reviewed

Acceptance criteria:

  • pnpm exec vitest run tests/cli/tui/index.test.ts tests/cli/browserDefaults.test.ts tests/cli/browserConfig.test.ts
  • pnpm run typecheck
  • With the reported browser config and an authenticated manual-login profile, run oracle tui, choose Ask Oracle and Browser, submit hello, and verify the configured executable and persistent profile reach execution and saved session metadata.
  • Repeat with empty browser config and explicit manualLogin:false; verify existing defaults and intentional wizard overrides remain effective.

What I checked:

  • Current TUI drops browser defaults: launchTui loads user configuration, but askOracleFlow supplies only wizard browser answers and model information to buildBrowserConfig; userConfig.browser is absent. (src/cli/tui/index.ts:506, b4017d263c73)
  • CLI already applies the shared defaults: The CLI invokes applyBrowserDefaultsFromConfig before building browser configuration; the helper maps chromePath, manualLogin, and manualLoginProfileDir into existing browser options. (src/cli/browserDefaults.ts:96, b4017d263c73)
  • Missing values reach browser execution: buildBrowserConfig produces chromePath:null and manualLogin:undefined when these options are omitted; browser normalization defaults manual-login mode to false on Linux. (src/cli/browserConfig.ts:274, b4017d263c73)
  • Affected release confirmed: The v0.22.2 TUI contains the same browser configuration call without configured executable or manual-login settings. (src/cli/tui/index.ts:506, b49ae76a1e57)
  • Existing contract and coverage gap: Configuration documentation supports browser.manualLogin and browser.manualLoginProfileDir; shared-default tests cover them, but inspected TUI ask-flow tests exercise cancellation and API runs rather than browser config propagation. (tests/cli/tui/index.test.ts:79, b4017d263c73)
  • Discussion and related-item boundary: The reporter provides a working CLI comparison and session metadata. Searches found no open fix PR; https://github.com/steipete/oracle/issues/26 concerns an earlier CLI defaulting defect, https://github.com/steipete/oracle/issues/68 concerns MCP configuration, and https://github.com/steipete/oracle/issues/616 concerns Brave process cleanup after successful execution.
How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge; those execution lanes are retired.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

Reviewed November 3, 2026, 11:38 AM ET / 16:38 UTC.

clawsweeper[bot] avatar Nov 03 '26 16:11 clawsweeper[bot]

Fixed in #620 (06dda10e). The TUI now uses the CLI's shared browser-default logic, so saved manual-login settings and the browser executable reach the run. Explicit wizard answers still take precedence, and saved manual-login sessions skip cookie-source prompts. The regression fails on the old code and passes with the fix; all cross-platform CI checks passed.

steipete avatar Nov 05 '26 05:11 steipete