Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Thermo-nuclear reviewHead reviewed: c9fc004. Overall the structure is good: the allowlist/validator table plus a compile-checked Valid findings (fixing in a follow-up commit)
Noted, not changing
|
Thermo-nuclear review follow-upFixes for the findings above landed (commit "Address thermo review"). Reviewed by Codex gpt-6-luna (xhigh); verified and validated by Claude. Fixed:
Left as noted above: shared load/apply/save helper, JSON status output on CLI import, Advanced tab placement, non-atomic export write. Commands run (Rust 1.98.0, slot-1): |
CUA proofBuild commit: Proof-only patches (throwaway, reverted, never committed): workspace Commands:
Note (proof-harness, not a PR defect): with Screenshots (local, not committed), |
Adversarial validation (lane-B review)Head validated: Verdict: no blocking defects. The implementation matches the spec and the PR body's claims. Checks performed (code review at head + local re-run):
Integrator note (merge glue required): the classifier test requires every
|
UI proof (browser-use)Combined build of Follow-up 8f4ed03 classifies the settings added since this PR's base (portable: cost_reporting_period, preferred_currency_code, switcher_shortcuts; excluded: machine-local fields).
Every surface also passed the privacy check (no email-like text, account e-mail nodes or profile paths in the DOM) and theme Validation at |
…rt and import Conflict in rust/src/settings.rs: the release added the optional_details module next to the new preferences_document module; both module declarations and re-exports are kept. The document classifier test needs every Settings field classified; the fields that reached the release after this PR's base are classified in the follow-up commit, together with the import side effects they need.
The preferences document test requires every Settings field to be either portable or excluded. Fields that reached the release after nesszer#654's base: - Portable: cost_reporting_period and preferred_currency_code (nesszer#654 asks for both once they land), switcher_shortcuts (nesszer#700 deferred it to this document; upstream 0.70.0 exports switcherShortcuts). Validators accept only stored forms: canonical periods, AUTO or a supported code, and overrides that pass the switcher shortcut rules. - Excluded: stay_awake_enabled (side-effect toggle, nesszer#659), cost_usage_bucket_time_zone (pinned to the machine zone on first launch, no settings control), and menu_bar_color_pace, the stacked tray provider picks and credential_expiry_notifications_enabled, which upstream 0.70.0 also keeps out of its portable keys. null on a field omitted when empty (switcher_shortcuts) now clears it instead of failing. A desktop import that changes the reporting period resets the local cost cache, as update_settings does.
Summary
Adds portable preferences: export and import of display, refresh, notification, provider and float-bar choices as a versioned JSON document (
{"version": 1, "preferences": {...}}), from Settings > Advanced and from the CLI (codexbar config preferences export|import --file <path>).Settingsfield as allowed or excluded, so a new field defaults to excluded until someone decides.nullrestores a key to its default.update_settings(locale, provider cache, float bar, tray,codexbar:settings-updated, refresh). CLI import writessettings.jsononly; the CLI prints that a running app must be restarted (there is no settings-file watcher).export_preferences/import_preferencesreuse the existing settings-window dialog capabilities (dialog:allow-open/dialog:allow-save); no capability file change was needed.Upstream reference
26dcc073c).Sources/CodexBarCore/Config/PreferencesDocument.swift,CLIConfigPreferences.swift,PreferencesTransferSection.swift,docs/configuration.md("Portable UI preferences").Ported / Deferred
Ported: versioned document, allowlist, validation, CLI
--fileexport/import, Settings > Advanced section with save/open dialogs, en-US locale keys, docs.Deferred or not applicable:
cost_reporting_periodandpreferred_currencykeys: these settings do not exist in this base (they arrive with the reporting-period and currency items). Add them to the allowlist when those land.merge_tray_icons: excluded, nothing in the app reads it.Validation
Run on the pinned 1.98.0 toolchain, E-cores only.
cargo +1.98.0 fmt --all: cleancargo +1.98.0 clippy --workspace --all-targets -- -D warnings: cleancargo +1.98.0 test -p codexbar preferences: 12 passed (11 document tests, 1 CLI parse test)cargo +1.98.0 test -p codexbar(full): 2172 passed, 0 failed, 1 ignoredcargo +1.98.0 test -p codexbar-desktop-tauri: 461 passed, 1 failed. The failure iscommands::tests::bootstrap_payload_exposes_every_provider_variant(catalog 79 vs 78 active providers). It concerns the provider catalog and reads machine settings (a deprecated provider that is already enabled stays in the catalog); this change touches no provider code. Not verified against a clean base.pnpm exec vitest run(full): 68 files, 408 tests passed (6 new inPreferencesTransferSection.test.tsx)pnpm run lint: no new warnings;pnpm run build: okAffected areas
rust/src/settings/preferences_document.rs,rust/src/cli/config.rs,rust/src/locale*)commands/preferences_transfer.rs,main.rs)PreferencesTransferSection.tsx,lib/tauri.ts,i18n/keys.ts)docs/CONFIGURATION.md)No file crosses 1000 lines (
settings.rsgains 2 lines;locale.rswas already over 1000 and gains 6).UI proof
Pending: coordinator will capture CUA proof on a fresh build (Settings > Advanced > Portable preferences: export, then import with a modified file and confirm the toggles and language update live).