Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Win-CodexBar is the Windows port of CodexBar: a tray app that shows AI-provider
- **Settings.** `%APPDATA%\CodexBar\settings.json` is read and written by `Settings::load` / `save` through `secure_file`, which wraps it with DPAPI on Windows. The frontend sends an `updateSettings` patch; the shell saves it and the UI reloads on `codexbar:settings-updated` and the float-bar config events.
- **Tray.** `tray_bridge` and `tray_menu` own the icon and the menu. The icon pixels come from the shared `codexbar::tray::{render_bar_icon_rgba, render_percent_icon_rgba}`.
- **Float bar.** `floatbar/` owns the always-on-top window. Its builder must pin `.theme(Some(tauri::Theme::Dark))`. WebView2 resolves `prefers-color-scheme` on a process profile shared by all windows, so an unpinned float bar flips the other windows when the theme is `auto`. Call this failure the **theme flip**.
- **Proof harness.** `CODEXBAR_PROOF_MODE` (for example `settings:menu`) opens one surface and turns off blur-dismiss for automation. `CODEXBAR_SEED_USAGE_JSON=<abs-path>` seeds synthetic bridge-shaped `ProviderUsageSnapshot` data into the provider cache at launch and into the tray icon and tooltip. Seeds are pinned per provider: a normal refresh fetches only the unseeded enabled providers, and a forced refresh replaces them. A malformed seed file logs a warning and is skipped. In proof mode, `CODEXBAR_PROOF_WINDOW_ORIGIN=<x>,<y>` (physical pixels) opens the flyout, Settings and float bar at that point on the monitor that contains it. See [docs/WINDOWS_PROOF.md](docs/WINDOWS_PROOF.md#proof-mode).
- **Proof harness.** `CODEXBAR_PROOF_MODE` (for example `settings:menu`) opens one surface and turns off blur-dismiss for automation. `CODEXBAR_SEED_USAGE_JSON=<abs-path>` seeds synthetic bridge-shaped `ProviderUsageSnapshot` data into the provider cache at launch and into the tray icon and tooltip. Seeds are pinned per provider: a normal refresh fetches only the unseeded enabled providers, and a forced refresh replaces them. A malformed seed file logs a warning and is skipped. In proof mode, `CODEXBAR_PROOF_WINDOW_ORIGIN=<x>,<y>` (physical pixels) opens the flyout, Settings and float bar at that point on the monitor that contains it. `CODEXBAR_PROOF_TRAY_MENU_DUMP=<abs-path>` writes the live tray menu as JSON. See [docs/WINDOWS_PROOF.md](docs/WINDOWS_PROOF.md#proof-mode).

## Key directories

Expand Down
2 changes: 2 additions & 0 deletions apps/desktop-tauri/src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ mod geometry_store;
mod http_server;
mod powertoys;
mod proof_harness;
mod proof_tray_menu;
mod shell;
mod shortcut_bridge;
mod state;
Expand Down Expand Up @@ -353,6 +354,7 @@ fn main() {
commands::set_ui_language,
commands::open_path,
tray_visibility::tray_visibility_status,
tray_bridge::proof_activate_tray_item,
floatbar::resize_float_bar,
])
.setup(move |app| {
Expand Down
Loading