Repository navigation
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 |
CUA UI proof (local, fresh build) - partial
Assertions
Local artifacts (not committed; contain no personal data)
|
|
Reviewed by Codex gpt-6-luna (xhigh); verified and validated by Claude Thermo-nuclear review of PR #659 (5 findings, 4 fixed, 1 left):
|
|
Fixes pushed at c3ee700: 4 of 5 findings fixed; 1 left (Node-hosted Pi/OMP detection, needs command lines which are deliberately not harvested). Validated with cargo +1.98.0 fmt --all; clippy --workspace --all-targets -D warnings (clean, one Codex must_use lint corrected by Claude); cargo test -p codexbar (power_assertion, agent_sessions, locale: 87 passed); cargo test -p codexbar-desktop-tauri (stay_awake, tray: 101 passed); vitest TrayPanel.test.tsx and src/i18n (29 passed); pnpm lint (pre-existing warnings only). UI changed (flyout Stay Awake status line); CUA proof not re-run. |
CUA proof (rerun)
Not verified: Screenshots (local, not committed; |
Adversarial validation (lane-B review)Head validated: Verdict: no blocking defects. Spec conformance verified in source at head:
Validation re-run at head (pinned 1.98.0, E-cores): UI proof: waived per user 2026-10-02 directive (fast-track); tray-menu indicator and toggle are covered by the new tests. (The full E2E sleep-prevention behavior is OS-observable only; the assertion lifecycle is unit-tested in |
UI proof (browser-use)Combined build of
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 |
… agent sessions Conflicts: the release builds the shell from a pre-generated context (`let context = tauri::generate_context!()`, used for the single-instance foreground hand-off), so the PR's build/run-with-exit-hook switch now calls `.build(context)` instead of generating the context twice. Command list keeps the release get_currency_rates next to get_stay_awake_status; tray_bridge keeps the release tray_presentation import next to MenuState; lib.rs and tauri.ts keep both additions.
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
New opt-in setting
stay_awake_enabled(default off), toggle in Settings -> Advanced -> Agent Sessions. While on, the desktop shell runs a local-only agent-process scan every 30 s (independent ofagent_sessions_enabled, no SSH/Tailscale discovery, no transcript files) and holds exactly one system idle-sleep prevention while at least one live local Codex, Claude, or Pi/OMP agent process exists. Idle processes waiting for a prompt count; file-only Codex rollouts and remote sessions never do.RunEvent::Exit).SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED)to hold andSetThreadExecutionState(ES_CONTINUOUS)to clear (the flag is per thread, so it is not called from a tokio worker). No display-required flag; lid close and explicit sleep still sleep the PC.WindowsProcessOutputParser::record, extracted fromparse, behavior unchanged).Approved dependency change: added the
Win32_System_Powerfeature to the existingwindows = "0.58"inrust/Cargo.toml. No new crate, noCargo.lockchange.Upstream reference
Sources/CodexBar/AgentSessionPowerAssertion.swift,AgentSessionsStore.swift(updatePowerAssertion,localMonitoringEnabled),docs/agent-sessions-design.md"Stay Awake"; testsStayAwakeTests.swift.port-audit/0.67.0.mdPR 6.Ported / Deferred
Ported: setting, scheduler, native scan, power assertion policy + Windows impl, tray status row, Settings toggle, en-US locale keys.
Deferred:
stay_awake_enabledmust stay out of the consent-free set when it lands.Validation
Toolchain
cargo +1.98.0, E-core wrappers, slot-2 target dir.cargo +1.98.0 fmt --all: cleancargo +1.98.0 clippy --workspace --all-targets -- -D warnings: passcargo +1.98.0 test -p codexbar -- --test-threads=4: 2173 passed, 0 failed, 1 ignored (includes 9power_assertiontests: acquire/release counts for session appears, idle, disappears, toggle off, stale scan after disable, shutdown, acquire failure retry; a realSetThreadExecutionStateacquire/release test; 4native_processestests including a live snapshot)cargo +1.98.0 test -p codexbar-desktop-tauri -- --test-threads=4: 462 passed, 1 failed. The failure iscommands::tests::bootstrap_payload_exposes_every_provider_variant(catalog 79 vs 78), unrelated to this change; it reads the machine's real settings (a deprecated provider enabled locally) and no provider code is touched here. Newstay_awake_row_appears_only_while_heldpasses.pnpm exec vitest run src/surfaces/settings/tabs/AdvancedTab.test.tsx src/i18n: 6 passedpnpm run lint: no findings in touched files (existing warnings elsewhere);pnpm run build: passNot run: native check with
powercfg /requests(needs the desktop app; coordinator).Size notes:
settings.rs(+5) andtray_bridge.rs(+4) were already over 1000 lines; no file crossed the limit.Affected areas
agent_sessions, newpower_assertion)UI proof
Pending: coordinator will capture CUA proof on a fresh build (Settings toggle, tray status row,
powercfg /requestsshowing the system request while a Codex/Claude process runs and cleared after toggle off).