Repository navigation
feat!: record-only setup and Context HUD off by default (3.0.0) - #696
Conversation
Plain `ccxray setup` now installs the Claude shell wrapper and local recording settings only: the owned block carries LOG_RETENTION_DAYS and CCXRAY_IMPORT_DISABLE=1, and setup writes no export settings, enrollment or cursor, skips the account/ADC preflight, and never reads gcloud credentials. `--export --bucket B --domains D` keeps the 2.x behaviour; the export-only flags are refused without --export. An install whose owned block already exports keeps exporting when setup is re-run without --export, with a one-line notice naming `ccxray setup --remove` as the way to stop. `setup --check` reports the ADC check as skipped when export is not configured. The record-only block parses as owned, so re-runs stay byte-identical rewrites. BREAKING CHANGE: `ccxray setup` no longer enables GCS export. Fresh installs that want export must pass --export together with --bucket and --domains; --bucket/--domains/--prefix/--cwd-allowlist without --export exit 2. Existing export installs are unaffected. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The HUD footer can truncate subagent returns, so a missing `statusLine` setting now means off (settings.js DEFAULTS and the forward.js module default). An explicit `"statusLine": true` in settings.json is kept. New `ccxray hud on|off|status` early-exit subcommand writes the same <CCXRAY_HOME>/settings.json the dashboard toggle uses: synchronously and atomically, changing only `statusLine`, and refusing a file that is not a JSON object. No argument or --help prints usage; an unknown argument exits 1. readSettings() no longer prints the HUD line on first load. The line is printed only by standalone proxy startup, the standalone agent launch banner, and `hud status`, instead of depending on a per-subcommand quiet list. BREAKING CHANGE: the Context HUD is no longer appended unless settings.json has `"statusLine": true` (set by `ccxray hud on` or the dashboard toggle). Homes where the dashboard already persisted `statusLine: true` keep the HUD on. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0f672d6129
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| try { fs.unlinkSync(tmp); } catch {} | ||
| throw error; | ||
| } | ||
| _cache = null; |
There was a problem hiding this comment.
Prevent the running server from reverting CLI HUD changes
When ccxray hud on|off runs while a server is active, resetting _cache here affects only the short-lived CLI process; the server retains its old cached statusLine. If the user then stars a session/project or performs another settings write before restarting, server/routes/api.js reads that stale cache and writeSettings() replaces the file, undoing the CLI change, so even the promised restart will use the old value. The CLI update must be merged or otherwise protected from subsequent writes by a running process.
Useful? React with 👍 / 👎.
A re-run of `ccxray setup` without --export used to switch the whole run into export mode when any shell already had an owned export block: it read gcloud ADC and rewrote export-enrollment.json without --export, and with mixed targets it either rewrote a record-only shell as an export block or failed with "--export needs --bucket". Export is now decided per target. Plain setup rewrites record-only blocks, leaves export blocks byte-for-byte unchanged (no credential check, no enrollment or cursor write) and prints a note per kept shell naming `ccxray setup --export` and `ccxray setup --remove`. Values resolve only from the blocks being rewritten; --export takes bucket and domains from the existing export block. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- writeSettings re-reads settings.json and patches only the keys the caller changed, then refreshes the cache, so a dashboard write after `ccxray hud on|off` no longer reverts statusLine. - Writes resolve a symlinked settings.json and create the tmp file next to the real target (owner-only, random suffix), so the link survives and a stale tmp never blocks a write. - `ccxray hud status` on a settings.json that is not a JSON object reports it and exits 1, like `hud on|off`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # CHANGELOG.md
Summary — 3.0.0 breaking defaults
#691
feat(setup)!: record-only by default, cloud export opt-inccxray setupinstalls the Claude shell wrapper with local recording only: the owned rc block holds the wrapper,LOG_RETENTION_DAYSandCCXRAY_IMPORT_DISABLE=1. No enrollment, cursor or export variables are written, and the account/ADC/enrollment preflight is skipped, so gcloud and credentials are never touched.ccxray setup --export --bucket <b> --domains <d>is the existing 2.x path, unchanged.--bucket/--domains/--prefix/--cwd-allowlistwithout--exportexit 2.setupkeeps it and prints one line explaining how to stop (setup --remove, thensetup). No new disable path added.setup --checkreports ADC as skipped when no export is configured.setup --help, global help, README (en/zh-TW/ja), export onboarding doc, CLAUDE.md and CHANGELOG ("Breaking (3.0.0)") updated.#692
feat(hud)!: Context HUD off by default,ccxray hud on|off|statusstatusLinedefaults tofalse; an explicittruein<CCXRAY_HOME>/settings.jsonis kept.ccxray hud on|off|statuswrites the same settings file the dashboard toggle uses (synchronous, atomic, onlystatusLinechanges, refuses a non-object file). No arg /--helpprints usage; unknown args exit 1. A running hub/server keeps its in-memory value until restart (the CLI says so; the dashboard toggle stays live).hud status— not on every subcommand.Verification
test/hud.test.js(9) and 5 newtest/setup.test.jscases (record-only with credential/spawn spies and a planted gcloud marker, dry run, flags without--export, upgrade keeps export, record-only →--export); all fail onmain. Existing tests updated for the new defaults (--exportadded where export flags are passed; print-HUD e2e now opts in explicitly).Context HUD: disabled, dashboard configstatusLine:false; afterccxray hud onand restart,enabled/statusLine:true;ccxray statusprints no HUD line;setup --dry-runwrites a record-only block.Release notes
Breaking for 3.0.0: export needs
--export; HUD is off unless enabled. Homes where an older dashboard persistedstatusLine: truewhile saving stars keep the HUD on (indistinguishable from an explicit choice).Closes #691
Closes #692