From ff886363ee9acfa62987ac9ef290598fbf8476cd Mon Sep 17 00:00:00 2001 From: Craig Constable Date: Mon, 23 Nov 2026 14:23:06 +1000 Subject: [PATCH 01/12] fix(deps): update url to 2.5.9 for RUSTSEC-2026-0592 The release dependency checks fail on RUSTSEC-2026-0592 (stack overflow in Url::origin() on nested blob: URLs). url is locked only through the optional cookie_store dependency of ureq and is not compiled, but cargo audit scans the whole lockfile. form_urlencoded 1.2.3 is required by url 2.5.9. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 7 +++++++ Cargo.lock | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8dc30ee..b4dc59db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ Notable changes to Claude Code Usage Monitor are documented here, newest first. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), with changes grouped into Added, Changed, Fixed, and Removed where applicable. +## [Unreleased] + +### Fixed + +- Update the transitive `url` dependency from 2.5.8 to 2.5.9, with `form_urlencoded` from 1.2.2 to 1.2.3, to resolve RUSTSEC-2026-0592 found by the release dependency checks. + ## [2.25.3] - 2026-11-21 ### Changed @@ -1717,3 +1723,4 @@ changes grouped into Added, Changed, Fixed, and Removed where applicable. [2.25.1]: https://github.com/CodeZeno/Claude-Code-Usage-Monitor/compare/v2.25.0...v2.25.1 [2.25.2]: https://github.com/CodeZeno/Claude-Code-Usage-Monitor/compare/v2.25.1...v2.25.2 [2.25.3]: https://github.com/CodeZeno/Claude-Code-Usage-Monitor/compare/v2.25.2...v2.25.3 +[Unreleased]: https://github.com/CodeZeno/Claude-Code-Usage-Monitor/compare/v2.25.3...HEAD diff --git a/Cargo.lock b/Cargo.lock index eab15249..d777ca2f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -773,9 +773,9 @@ checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" [[package]] name = "form_urlencoded" -version = "1.2.2" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +checksum = "afa489199eaffb1211795df1c6236ce1ad0d41a6fa45250add73e3b02420f06e" dependencies = [ "percent-encoding", ] @@ -2632,9 +2632,9 @@ dependencies = [ [[package]] name = "url" -version = "2.5.8" +version = "2.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +checksum = "f00cd2407bb42c0ef17be88d4cf020f5cceffd121665bac9b8b9493a369b3b1a" dependencies = [ "form_urlencoded", "idna", From cbd33a51d0eabd67f5e23662a95f8ab4666d16db Mon Sep 17 00:00:00 2001 From: Craig Constable Date: Wed, 25 Nov 2026 10:08:57 +1000 Subject: [PATCH 02/12] feat(themes): optional light-mode colours for theme paints A paint can now carry `light_color`, used while Windows is in light mode, so one layer serves both appearances instead of a pair of layers gated on `system.dark`. Paints without it resolve and serialize exactly as before, and contexts without the system binding count as dark. Theme Studio's colour controls gain a sun and moon toggle that expands a colour into separate Dark mode and Light mode rows; collapsing keeps the dark colour. Scene swatches follow the current Windows appearance. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 4 ++ src/localization/locales/de.toml | 5 ++ src/localization/locales/en.toml | 5 ++ src/localization/locales/es.toml | 5 ++ src/localization/locales/fr.toml | 5 ++ src/localization/locales/ja.toml | 5 ++ src/localization/locales/ko.toml | 5 ++ src/localization/locales/nl.toml | 5 ++ src/localization/locales/pl.toml | 5 ++ src/localization/locales/pt-BR.toml | 5 ++ src/localization/locales/ru.toml | 5 ++ src/localization/locales/th.toml | 5 ++ src/localization/locales/tr.toml | 5 ++ src/localization/locales/zh-CN.toml | 5 ++ src/localization/locales/zh-TW.toml | 5 ++ src/studio_app/studio_inspectors.rs | 76 ++++++++++++++++++++++---- src/studio_app/studio_scene_helpers.rs | 19 ++++++- src/theme_engine.rs | 31 ++++++++++- src/theme_engine/tests.rs | 42 ++++++++++++++ 19 files changed, 230 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4dc59db..284db7de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ changes grouped into Added, Changed, Fixed, and Removed where applicable. ## [Unreleased] +### Added + +- Let theme colours set an optional light-mode colour (`light_color`), so one layer can serve both Windows appearances instead of a pair of layers gated on `system.dark`. In Theme Studio, the sun and moon button beside a colour expands it into separate Dark mode and Light mode colours; collapsing keeps the dark mode colour. Colours without `light_color` render and save as before, and themes that keep separate per-mode layers are unaffected. + ### Fixed - Update the transitive `url` dependency from 2.5.8 to 2.5.9, with `form_urlencoded` from 1.2.2 to 1.2.3, to resolve RUSTSEC-2026-0592 found by the release dependency checks. diff --git a/src/localization/locales/de.toml b/src/localization/locales/de.toml index f620266a..087ef30e 100644 --- a/src/localization/locales/de.toml +++ b/src/localization/locales/de.toml @@ -460,3 +460,8 @@ copilot_window_title = "Copilot-Nutzungsmonitor" "Keep the widget docked; never float automatically" = "Keep the widget docked; never float automatically" "Locked" = "Locked" "Updates are managed by Chocolatey. Save your work and quit the monitor and dashboard, then run this command in an administrator terminal:\n\nchoco upgrade claude-code-usage-monitor\n\nStart the monitor again after the upgrade completes." = "Updates werden von Chocolatey verwaltet. Speichern Sie Ihre Arbeit, beenden Sie Monitor und Dashboard und führen Sie dann diesen Befehl in einem Administrator-Terminal aus:\n\nchoco upgrade claude-code-usage-monitor\n\nStarten Sie den Monitor nach Abschluss des Upgrades erneut." +"Dark and light" = "Dunkel und hell" +"Dark mode" = "Dunkler Modus" +"Light mode" = "Heller Modus" +"Use one colour in both modes" = "Eine Farbe für beide Modi verwenden" +"Set separate dark and light mode colours" = "Getrennte Farben für dunklen und hellen Modus festlegen" diff --git a/src/localization/locales/en.toml b/src/localization/locales/en.toml index 16de5dc6..d670b728 100644 --- a/src/localization/locales/en.toml +++ b/src/localization/locales/en.toml @@ -460,3 +460,8 @@ copilot_window_title = "Copilot Usage Monitor" "Keep the widget docked; never float automatically" = "Keep the widget docked; never float automatically" "Locked" = "Locked" "Updates are managed by Chocolatey. Save your work and quit the monitor and dashboard, then run this command in an administrator terminal:\n\nchoco upgrade claude-code-usage-monitor\n\nStart the monitor again after the upgrade completes." = "Updates are managed by Chocolatey. Save your work and quit the monitor and dashboard, then run this command in an administrator terminal:\n\nchoco upgrade claude-code-usage-monitor\n\nStart the monitor again after the upgrade completes." +"Dark and light" = "Dark and light" +"Dark mode" = "Dark mode" +"Light mode" = "Light mode" +"Use one colour in both modes" = "Use one colour in both modes" +"Set separate dark and light mode colours" = "Set separate dark and light mode colours" diff --git a/src/localization/locales/es.toml b/src/localization/locales/es.toml index e440ffa1..d059b477 100644 --- a/src/localization/locales/es.toml +++ b/src/localization/locales/es.toml @@ -460,3 +460,8 @@ copilot_window_title = "Monitor de uso de Copilot" "Keep the widget docked; never float automatically" = "Mantener el widget acoplado; no flotar automáticamente" "Locked" = "Fijado" "Updates are managed by Chocolatey. Save your work and quit the monitor and dashboard, then run this command in an administrator terminal:\n\nchoco upgrade claude-code-usage-monitor\n\nStart the monitor again after the upgrade completes." = "Chocolatey administra las actualizaciones. Guarda tu trabajo, cierra el monitor y el panel, y ejecuta este comando en una terminal de administrador:\n\nchoco upgrade claude-code-usage-monitor\n\nVuelve a iniciar el monitor cuando termine la actualización." +"Dark and light" = "Oscuro y claro" +"Dark mode" = "Modo oscuro" +"Light mode" = "Modo claro" +"Use one colour in both modes" = "Usar un color en ambos modos" +"Set separate dark and light mode colours" = "Definir colores distintos para los modos oscuro y claro" diff --git a/src/localization/locales/fr.toml b/src/localization/locales/fr.toml index 39659641..4b5d2471 100644 --- a/src/localization/locales/fr.toml +++ b/src/localization/locales/fr.toml @@ -460,3 +460,8 @@ copilot_window_title = "Moniteur d'utilisation Copilot" "Keep the widget docked; never float automatically" = "Keep the widget docked; never float automatically" "Locked" = "Locked" "Updates are managed by Chocolatey. Save your work and quit the monitor and dashboard, then run this command in an administrator terminal:\n\nchoco upgrade claude-code-usage-monitor\n\nStart the monitor again after the upgrade completes." = "Les mises à jour sont gérées par Chocolatey. Enregistrez votre travail, quittez le moniteur et le tableau de bord, puis exécutez cette commande dans un terminal administrateur :\n\nchoco upgrade claude-code-usage-monitor\n\nRelancez le moniteur une fois la mise à niveau terminée." +"Dark and light" = "Sombre et clair" +"Dark mode" = "Mode sombre" +"Light mode" = "Mode clair" +"Use one colour in both modes" = "Utiliser une couleur pour les deux modes" +"Set separate dark and light mode colours" = "Définir des couleurs distinctes pour les modes sombre et clair" diff --git a/src/localization/locales/ja.toml b/src/localization/locales/ja.toml index 17d7d3d9..d9b301e2 100644 --- a/src/localization/locales/ja.toml +++ b/src/localization/locales/ja.toml @@ -462,3 +462,8 @@ copilot_window_title = "Copilot 使用量モニター" "Keep the widget docked; never float automatically" = "Keep the widget docked; never float automatically" "Locked" = "Locked" "Updates are managed by Chocolatey. Save your work and quit the monitor and dashboard, then run this command in an administrator terminal:\n\nchoco upgrade claude-code-usage-monitor\n\nStart the monitor again after the upgrade completes." = "更新は Chocolatey によって管理されています。作業内容を保存し、モニターとダッシュボードを終了してから、管理者ターミナルで次のコマンドを実行してください:\n\nchoco upgrade claude-code-usage-monitor\n\nアップグレードが完了したら、モニターを再度起動してください。" +"Dark and light" = "ダークとライト" +"Dark mode" = "ダーク モード" +"Light mode" = "ライト モード" +"Use one colour in both modes" = "両方のモードで同じ色を使う" +"Set separate dark and light mode colours" = "ダーク モードとライト モードで別の色を設定" diff --git a/src/localization/locales/ko.toml b/src/localization/locales/ko.toml index 18a6c698..5ba69e93 100644 --- a/src/localization/locales/ko.toml +++ b/src/localization/locales/ko.toml @@ -462,3 +462,8 @@ copilot_window_title = "Copilot 사용량 모니터" "Keep the widget docked; never float automatically" = "Keep the widget docked; never float automatically" "Locked" = "Locked" "Updates are managed by Chocolatey. Save your work and quit the monitor and dashboard, then run this command in an administrator terminal:\n\nchoco upgrade claude-code-usage-monitor\n\nStart the monitor again after the upgrade completes." = "업데이트는 Chocolatey에서 관리합니다. 작업을 저장하고 모니터와 대시보드를 종료한 다음 관리자 터미널에서 다음 명령을 실행하세요:\n\nchoco upgrade claude-code-usage-monitor\n\n업그레이드가 완료되면 모니터를 다시 시작하세요." +"Dark and light" = "다크 및 라이트" +"Dark mode" = "다크 모드" +"Light mode" = "라이트 모드" +"Use one colour in both modes" = "두 모드에 한 가지 색 사용" +"Set separate dark and light mode colours" = "다크 모드와 라이트 모드 색을 따로 설정" diff --git a/src/localization/locales/nl.toml b/src/localization/locales/nl.toml index 0abc470c..18071635 100644 --- a/src/localization/locales/nl.toml +++ b/src/localization/locales/nl.toml @@ -460,3 +460,8 @@ copilot_window_title = "Copilot-gebruiksmonitor" "Keep the widget docked; never float automatically" = "Keep the widget docked; never float automatically" "Locked" = "Locked" "Updates are managed by Chocolatey. Save your work and quit the monitor and dashboard, then run this command in an administrator terminal:\n\nchoco upgrade claude-code-usage-monitor\n\nStart the monitor again after the upgrade completes." = "Updates worden beheerd door Chocolatey. Sla je werk op, sluit de monitor en het dashboard af en voer daarna deze opdracht uit in een beheerdersterminal:\n\nchoco upgrade claude-code-usage-monitor\n\nStart de monitor opnieuw nadat de upgrade is voltooid." +"Dark and light" = "Donker en licht" +"Dark mode" = "Donkere modus" +"Light mode" = "Lichte modus" +"Use one colour in both modes" = "Eén kleur voor beide modi gebruiken" +"Set separate dark and light mode colours" = "Aparte kleuren instellen voor donkere en lichte modus" diff --git a/src/localization/locales/pl.toml b/src/localization/locales/pl.toml index 17e86f06..3ffba368 100644 --- a/src/localization/locales/pl.toml +++ b/src/localization/locales/pl.toml @@ -460,3 +460,8 @@ copilot_window_title = "Monitor zużycia Copilot" "Keep the widget docked; never float automatically" = "Keep the widget docked; never float automatically" "Locked" = "Locked" "Updates are managed by Chocolatey. Save your work and quit the monitor and dashboard, then run this command in an administrator terminal:\n\nchoco upgrade claude-code-usage-monitor\n\nStart the monitor again after the upgrade completes." = "Aktualizacjami zarządza Chocolatey. Zapisz swoją pracę, zamknij monitor i panel, a następnie uruchom to polecenie w terminalu administratora:\n\nchoco upgrade claude-code-usage-monitor\n\nPo zakończeniu aktualizacji uruchom monitor ponownie." +"Dark and light" = "Ciemny i jasny" +"Dark mode" = "Tryb ciemny" +"Light mode" = "Tryb jasny" +"Use one colour in both modes" = "Użyj jednego koloru w obu trybach" +"Set separate dark and light mode colours" = "Ustaw osobne kolory dla trybu ciemnego i jasnego" diff --git a/src/localization/locales/pt-BR.toml b/src/localization/locales/pt-BR.toml index 83a8682f..d4a0869a 100644 --- a/src/localization/locales/pt-BR.toml +++ b/src/localization/locales/pt-BR.toml @@ -460,3 +460,8 @@ copilot_window_title = "Monitor de uso do Copilot" "Keep the widget docked; never float automatically" = "Keep the widget docked; never float automatically" "Locked" = "Locked" "Updates are managed by Chocolatey. Save your work and quit the monitor and dashboard, then run this command in an administrator terminal:\n\nchoco upgrade claude-code-usage-monitor\n\nStart the monitor again after the upgrade completes." = "As atualizações são gerenciadas pelo Chocolatey. Salve seu trabalho, feche o monitor e o painel e execute este comando em um terminal de administrador:\n\nchoco upgrade claude-code-usage-monitor\n\nInicie o monitor novamente após a conclusão da atualização." +"Dark and light" = "Escuro e claro" +"Dark mode" = "Modo escuro" +"Light mode" = "Modo claro" +"Use one colour in both modes" = "Usar uma cor nos dois modos" +"Set separate dark and light mode colours" = "Definir cores separadas para os modos escuro e claro" diff --git a/src/localization/locales/ru.toml b/src/localization/locales/ru.toml index 20fa6489..bd92ede5 100644 --- a/src/localization/locales/ru.toml +++ b/src/localization/locales/ru.toml @@ -460,3 +460,8 @@ copilot_window_title = "Монитор использования Copilot" "Keep the widget docked; never float automatically" = "Keep the widget docked; never float automatically" "Locked" = "Locked" "Updates are managed by Chocolatey. Save your work and quit the monitor and dashboard, then run this command in an administrator terminal:\n\nchoco upgrade claude-code-usage-monitor\n\nStart the monitor again after the upgrade completes." = "Обновлениями управляет Chocolatey. Сохраните работу, закройте монитор и панель, затем выполните эту команду в терминале администратора:\n\nchoco upgrade claude-code-usage-monitor\n\nПосле завершения обновления снова запустите монитор." +"Dark and light" = "Тёмная и светлая" +"Dark mode" = "Тёмный режим" +"Light mode" = "Светлый режим" +"Use one colour in both modes" = "Использовать один цвет в обоих режимах" +"Set separate dark and light mode colours" = "Задать отдельные цвета для тёмного и светлого режимов" diff --git a/src/localization/locales/th.toml b/src/localization/locales/th.toml index 8616ca8d..53bdff96 100644 --- a/src/localization/locales/th.toml +++ b/src/localization/locales/th.toml @@ -462,3 +462,8 @@ copilot_window_title = "ตัวติดตามการใช้งาน C "Keep the widget docked; never float automatically" = "Keep the widget docked; never float automatically" "Locked" = "Locked" "Updates are managed by Chocolatey. Save your work and quit the monitor and dashboard, then run this command in an administrator terminal:\n\nchoco upgrade claude-code-usage-monitor\n\nStart the monitor again after the upgrade completes." = "Chocolatey เป็นผู้จัดการการอัปเดต บันทึกงานของคุณ ปิดโปรแกรมและแดชบอร์ด แล้วเรียกใช้คำสั่งนี้ในเทอร์มินัลผู้ดูแลระบบ:\n\nchoco upgrade claude-code-usage-monitor\n\nเริ่มโปรแกรมอีกครั้งหลังจากการอัปเกรดเสร็จสมบูรณ์" +"Dark and light" = "มืดและสว่าง" +"Dark mode" = "โหมดมืด" +"Light mode" = "โหมดสว่าง" +"Use one colour in both modes" = "ใช้สีเดียวในทั้งสองโหมด" +"Set separate dark and light mode colours" = "ตั้งสีแยกสำหรับโหมดมืดและโหมดสว่าง" diff --git a/src/localization/locales/tr.toml b/src/localization/locales/tr.toml index dec0cc39..b29e4700 100644 --- a/src/localization/locales/tr.toml +++ b/src/localization/locales/tr.toml @@ -460,3 +460,8 @@ copilot_window_title = "Copilot Kullanım İzleyicisi" "Keep the widget docked; never float automatically" = "Keep the widget docked; never float automatically" "Locked" = "Locked" "Updates are managed by Chocolatey. Save your work and quit the monitor and dashboard, then run this command in an administrator terminal:\n\nchoco upgrade claude-code-usage-monitor\n\nStart the monitor again after the upgrade completes." = "Güncellemeler Chocolatey tarafından yönetilir. Çalışmanızı kaydedin, izleyiciyi ve panoyu kapatın, ardından bu komutu bir yönetici terminalinde çalıştırın:\n\nchoco upgrade claude-code-usage-monitor\n\nYükseltme tamamlandıktan sonra izleyiciyi yeniden başlatın." +"Dark and light" = "Koyu ve açık" +"Dark mode" = "Koyu mod" +"Light mode" = "Açık mod" +"Use one colour in both modes" = "Her iki modda tek renk kullan" +"Set separate dark and light mode colours" = "Koyu ve açık mod için ayrı renkler ayarla" diff --git a/src/localization/locales/zh-CN.toml b/src/localization/locales/zh-CN.toml index 9320faee..ad3dbd90 100644 --- a/src/localization/locales/zh-CN.toml +++ b/src/localization/locales/zh-CN.toml @@ -462,3 +462,8 @@ copilot_window_title = "Copilot 使用量监控" "Keep the widget docked; never float automatically" = "Keep the widget docked; never float automatically" "Locked" = "Locked" "Updates are managed by Chocolatey. Save your work and quit the monitor and dashboard, then run this command in an administrator terminal:\n\nchoco upgrade claude-code-usage-monitor\n\nStart the monitor again after the upgrade completes." = "更新由 Chocolatey 管理。请保存工作,退出监视器和仪表板,然后在管理员终端中运行以下命令:\n\nchoco upgrade claude-code-usage-monitor\n\n升级完成后,请重新启动监视器。" +"Dark and light" = "深色和浅色" +"Dark mode" = "深色模式" +"Light mode" = "浅色模式" +"Use one colour in both modes" = "两种模式使用同一颜色" +"Set separate dark and light mode colours" = "为深色和浅色模式分别设置颜色" diff --git a/src/localization/locales/zh-TW.toml b/src/localization/locales/zh-TW.toml index 2a038508..ead74e59 100644 --- a/src/localization/locales/zh-TW.toml +++ b/src/localization/locales/zh-TW.toml @@ -462,3 +462,8 @@ copilot_window_title = "Copilot 使用量監控" "Keep the widget docked; never float automatically" = "Keep the widget docked; never float automatically" "Locked" = "Locked" "Updates are managed by Chocolatey. Save your work and quit the monitor and dashboard, then run this command in an administrator terminal:\n\nchoco upgrade claude-code-usage-monitor\n\nStart the monitor again after the upgrade completes." = "更新由 Chocolatey 管理。請儲存工作,結束監視器和儀表板,然後在系統管理員終端機中執行下列命令:\n\nchoco upgrade claude-code-usage-monitor\n\n升級完成後,請重新啟動監視器。" +"Dark and light" = "深色與淺色" +"Dark mode" = "深色模式" +"Light mode" = "淺色模式" +"Use one colour in both modes" = "兩種模式使用同一顏色" +"Set separate dark and light mode colours" = "為深色與淺色模式分別設定顏色" diff --git a/src/studio_app/studio_inspectors.rs b/src/studio_app/studio_inspectors.rs index 7d9f6a88..034d7011 100644 --- a/src/studio_app/studio_inspectors.rs +++ b/src/studio_app/studio_inspectors.rs @@ -406,11 +406,60 @@ pub(super) fn segment_count_expression_control( edit_clicked } -pub(super) fn paint_control(ui: &mut egui::Ui, label: &str, paint: &mut Paint) { +/// A colour used in both appearances, which can be expanded into separate +/// dark and light mode colours. Collapsing keeps the dark mode colour. +pub(super) fn paint_control( + ui: &mut egui::Ui, + label: &str, + paint: &mut Paint, + language: LanguageId, +) { + let split = paint.light_color.is_some(); + let mut toggled = false; labeled(ui, label, |ui| { - let width = inspector_control_width(ui); - crate::ui::components::color_picker::color_string_field(ui, &mut paint.color, width); + let field = paint_field_width(ui); + if split { + ui.add_sized( + [field, CONTROL_HEIGHT], + egui::Label::new( + egui::RichText::new(language.text("Dark and light")).color(muted()), + ) + .halign(egui::Align::Min), + ); + } else { + crate::ui::components::color_picker::color_string_field(ui, &mut paint.color, field); + } + let tooltip = if split { + "Use one colour in both modes" + } else { + "Set separate dark and light mode colours" + }; + toggled = ui + .add(lucide_icon_button(LucideIcon::SunMoon).selected(split)) + .on_hover_text(language.text(tooltip)) + .clicked(); }); + if let Some(light) = &mut paint.light_color { + labeled(ui, language.text("Dark mode"), |ui| { + let field = paint_field_width(ui); + crate::ui::components::color_picker::color_string_field(ui, &mut paint.color, field); + }); + labeled(ui, language.text("Light mode"), |ui| { + let field = paint_field_width(ui); + crate::ui::components::color_picker::color_string_field(ui, light, field); + }); + } + if toggled { + paint.light_color = if split { + None + } else { + Some(paint.color.clone()) + }; + } +} + +fn paint_field_width(ui: &egui::Ui) -> f32 { + (inspector_control_width(ui) - CONTROL_HEIGHT - ui.spacing().item_spacing.x).max(64.0) } pub(super) fn asset_grid( @@ -628,10 +677,12 @@ pub(super) fn appearance_inspector( } match &mut object.background { LayerBackground::None => {} - LayerBackground::Colour { colour } => paint_control(ui, language.text("Colour"), colour), + LayerBackground::Colour { colour } => { + paint_control(ui, language.text("Colour"), colour, language) + } LayerBackground::Gradient { start, end, angle } => { - paint_control(ui, language.text("Start"), start); - paint_control(ui, language.text("End"), end); + paint_control(ui, language.text("Start"), start, language); + paint_control(ui, language.text("End"), end, language); if numeric_expression_control( ui, id.with("background-gradient-angle"), @@ -693,7 +744,12 @@ pub(super) fn appearance_inspector( }); } if let Some(border) = &mut object.border { - paint_control(ui, language.text("Border colour"), &mut border.color); + paint_control( + ui, + language.text("Border colour"), + &mut border.color, + language, + ); if numeric_expression_control( ui, id.with("border-width"), @@ -987,7 +1043,7 @@ pub(super) fn content_inspector( } }); }); - paint_control(ui, language.text("Colour"), color); + paint_control(ui, language.text("Colour"), color, language); } SceneContent::Progress { value, @@ -1031,8 +1087,8 @@ pub(super) fn content_inspector( } }); }); - paint_control(ui, language.text("Fill"), fill); - paint_control(ui, language.text("Track"), track); + paint_control(ui, language.text("Fill"), fill, language); + paint_control(ui, language.text("Track"), track, language); if numeric_expression_control( ui, id.with("radius"), diff --git a/src/studio_app/studio_scene_helpers.rs b/src/studio_app/studio_scene_helpers.rs index 29d25469..6b881018 100644 --- a/src/studio_app/studio_scene_helpers.rs +++ b/src/studio_app/studio_scene_helpers.rs @@ -317,7 +317,7 @@ pub(super) fn scene_object_icon_color( } pub(super) fn scene_paint_color(paint: &Paint) -> egui::Color32 { - let Some(color) = theme_engine::parse_color(&paint.color) else { + let Some(color) = theme_engine::parse_color(paint.color_for(studio_is_dark())) else { return egui::Color32::TRANSPARENT; }; let opacity = paint @@ -335,6 +335,23 @@ pub(super) fn scene_paint_color(paint: &Paint) -> egui::Color32 { ) } +/// The Windows appearance for scene swatches. The registry is read at most +/// once a second, since every object's swatch asks on every repaint. +fn studio_is_dark() -> bool { + thread_local! { + static CACHED: std::cell::Cell> = + const { std::cell::Cell::new(None) }; + } + CACHED.with(|cached| match cached.get() { + Some((read, dark)) if read.elapsed() < std::time::Duration::from_secs(1) => dark, + _ => { + let dark = crate::theme::is_dark_mode(); + cached.set(Some((std::time::Instant::now(), dark))); + dark + } + }) +} + pub(super) fn scene_icon_contrast_color(background: egui::Color32) -> egui::Color32 { let alpha = background.a() as f32 / 255.0; let composite = |channel: u8, base: f32| channel as f32 * alpha + base * (1.0 - alpha); diff --git a/src/theme_engine.rs b/src/theme_engine.rs index 2cf14d63..1eb0f941 100644 --- a/src/theme_engine.rs +++ b/src/theme_engine.rs @@ -1250,8 +1250,15 @@ pub struct Stroke { #[derive(Clone, Debug, Serialize, Deserialize)] pub struct Paint { + /// The colour in both appearances, or only in dark mode when + /// `light_color` is set. #[serde(default = "default_paint_color")] pub color: String, + /// An optional replacement used while Windows is in light mode, so one + /// object can serve both appearances instead of a pair of layers gated on + /// `system.dark`. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub light_color: Option, #[serde(default = "default_opacity")] pub opacity: Expression, } @@ -1260,6 +1267,7 @@ impl Default for Paint { fn default() -> Self { Self { color: "#00000000".to_string(), + light_color: None, opacity: Expression::from(1.0), } } @@ -2817,6 +2825,13 @@ fn validate_paint(errors: &mut Vec, context: &DataContext, label: &str, paint.color )); } + if let Some(light) = &paint.light_color { + if parse_color(light).is_none() { + errors.push(format!( + "{label}.light_color: '{light}' is not #RRGGBB or #AARRGGBB" + )); + } + } validate_expression(errors, context, &format!("{label}.opacity"), &paint.opacity); } @@ -2893,11 +2908,25 @@ impl Paint { pub fn new(color: &str) -> Self { Self { color: color.to_string(), + light_color: None, opacity: 1.0.into(), } } + + /// The colour string for an appearance: the light-mode colour when one is + /// set and Windows is light, otherwise the shared colour. + pub fn color_for(&self, dark: bool) -> &str { + match &self.light_color { + Some(light) if !dark => light, + _ => &self.color, + } + } + pub fn resolve(&self, context: &DataContext) -> Rgba { - let mut rgba = parse_color(&self.color).unwrap_or(Rgba { + // Contexts without the system binding (tests, previews) count as dark, + // which keeps the shared colour. + let dark = context.get("system.dark").is_none_or(|dark| dark != 0.0); + let mut rgba = parse_color(self.color_for(dark)).unwrap_or(Rgba { r: 255, g: 0, b: 255, diff --git a/src/theme_engine/tests.rs b/src/theme_engine/tests.rs index 6930c0d9..77acbbf5 100644 --- a/src/theme_engine/tests.rs +++ b/src/theme_engine/tests.rs @@ -1249,6 +1249,48 @@ fn colors_support_rgb_and_rgba() { ); } +#[test] +fn paints_use_their_light_colour_only_in_light_mode() { + let mut context = DataContext::from_usage_with_runtime( + None, + &Canvas::default(), + ThemeRuntime::new(true, true, false), + ); + let opaque = |r, g, b| Rgba { r, g, b, a: 255 }; + + let single = Paint::new("#112233"); + let split = Paint { + light_color: Some("#445566".into()), + ..Paint::new("#112233") + }; + for (dark, expected) in [ + (1.0, opaque(0x11, 0x22, 0x33)), + (0.0, opaque(0x44, 0x55, 0x66)), + ] { + context.insert("system.dark", dark); + assert_eq!(single.resolve(&context), opaque(0x11, 0x22, 0x33)); + assert_eq!(split.resolve(&context), expected); + } + + // One colour serializes as before, so existing themes are unchanged. + let encoded = serde_json::to_value(&single).unwrap(); + assert!(encoded.get("light_color").is_none()); + let decoded: Paint = serde_json::from_value(serde_json::to_value(&split).unwrap()).unwrap(); + assert_eq!(decoded.light_color.as_deref(), Some("#445566")); + + let mut theme = ThemeDocument::starter(); + theme.surfaces[0].background = LayerBackground::Colour { + colour: Paint { + light_color: Some("not a colour".into()), + ..Paint::new("#112233") + }, + }; + assert!(theme + .validate() + .iter() + .any(|error| error.contains("light_color") && error.contains("not a colour"))); +} + #[test] fn theme_schema_does_not_serialize_descriptions() { let source = serde_json::json!({ From f516e4160ebf39973824f2ff75a5b27686021bb5 Mon Sep 17 00:00:00 2001 From: Craig Constable Date: Wed, 25 Nov 2026 10:09:56 +1000 Subject: [PATCH 03/12] feat(themes): add the Stacked Rows theme and provider logo layers Stacked Rows shows each provider's logo beside joined four-section bars, one row per limit the account reports, with a magenta pace marker. Bars follow the Usage direction setting, and hovering a provider opens a flyout with usage, reset times and pace, or its waiting, error and no-usage states. One set of layers serves both appearances through light-mode colours. A new `provider_mark` content type draws a provider's brand mark from the dashboard's Brand Marks font through GDI, tinted and fitted to the layer, and Theme Studio offers it as "Provider logo" with a provider picker. Unknown provider keys fail validation and warn when rendered. The Brand Marks font gains an empty U+0020 glyph: GDI treats a font whose characters all sit in U+F000..U+F0FF as a symbol font and then maps none of its glyphs by codepoint. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 2 + build.rs | 1 + src/icons/brand-marks.ttf | Bin 3000 -> 3024 bytes src/localization/locales/de.toml | 1 + src/localization/locales/en.toml | 1 + src/localization/locales/es.toml | 1 + src/localization/locales/fr.toml | 1 + src/localization/locales/ja.toml | 1 + src/localization/locales/ko.toml | 1 + src/localization/locales/nl.toml | 1 + src/localization/locales/pl.toml | 1 + src/localization/locales/pt-BR.toml | 1 + src/localization/locales/ru.toml | 1 + src/localization/locales/th.toml | 1 + src/localization/locales/tr.toml | 1 + src/localization/locales/zh-CN.toml | 1 + src/localization/locales/zh-TW.toml | 1 + src/studio_app/studio_inspectors.rs | 36 + src/studio_app/studio_scene_helpers.rs | 17 +- src/theme_engine.rs | 32 + src/theme_engine/tests.rs | 431 +- src/theme_engine/theme_rendering.rs | 28 + src/themes/stacked-rows.json | 5184 ++++++++++++++++++++++++ src/ui/theme.rs | 5 + src/widget_font.rs | 18 + 25 files changed, 5763 insertions(+), 5 deletions(-) create mode 100644 src/themes/stacked-rows.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 284db7de..5fd7c09c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ changes grouped into Added, Changed, Fixed, and Removed where applicable. ### Added - Let theme colours set an optional light-mode colour (`light_color`), so one layer can serve both Windows appearances instead of a pair of layers gated on `system.dark`. In Theme Studio, the sun and moon button beside a colour expands it into separate Dark mode and Light mode colours; collapsing keeps the dark mode colour. Colours without `light_color` render and save as before, and themes that keep separate per-mode layers are unaffected. +- Add the Stacked Rows built-in theme: each provider's logo beside joined rows of four-section bars, one row per limit the account reports, with a magenta pace marker. Bars follow the Usage direction setting, and hovering a provider opens a flyout with each limit's usage, reset time and pace, or a waiting, error or no-usage message. +- Add a Provider logo layer type (`provider_mark`) to themes and Theme Studio. It draws a provider's brand mark from the dashboard's icon font, tinted and fitted to the layer, so themes need no image assets to show a provider. ### Fixed diff --git a/build.rs b/build.rs index cac09b1c..ada82f0c 100644 --- a/build.rs +++ b/build.rs @@ -44,6 +44,7 @@ fn build_themes() { "classic-usage-widget.json", "compact-fluent-quad.json", "classic-vertical.json", + "stacked-rows.json", "minecraft-codex.json", ] { let path = Path::new("src/themes").join(name); diff --git a/src/icons/brand-marks.ttf b/src/icons/brand-marks.ttf index f05fc76207b78854a762f063c99fcb7195dbd0c4..fd575fae47076e00638fc57ddacdb46911fce443 100644 GIT binary patch delta 344 zcmdlXenGsRfsuiMfs3Jmftf+UKUm+$<-fZ$0|TQ5P&6SqH?iRU4}rNr{t_VHCOxMz z%{G_uDUknzfq}y$BQ-JQSnQUgK)E$QY?c8OV874&0myy=#3~uNB^8`u44;7NJAizt zoc!cOt|)e(Ud9JNzF2NzMPLDg5W`8J00&S&AulmEHQ6^{7tlpIKrzjN{Nj?IyoI(5 z4BQbw`7*F$feucQIeICc-{va=GxH0eI75x<+yfx`x%MT;i5JY-nIXQK%*PnT!l3Yh zeR2+?V&E?Z2B2zDAQT4Lxs@RR%m!&=0%B$$76Fo=;1FS8VE_dH8<1uM$^uRJ{~yR# n_`vZ0|Nn;qOkhC delta 319 zcmca0zC*m8fsuiMfs3Jmftf+UKUm+$v+n46mH8?X!LA_<_FW&Nul?TzYGlA zAWKTXjs-f{ydlOfp5Nvx12gjrpg2Q~>f8e`dg29hc1Ey5&dGd?Q7j)AKCn&BVN|pi zWe{Z$W)Nc7$`Al#i2~I#0WmWWivUSbFo-a)Fem_N79a%jKd}G*4{}%unIQbr< S 0, SceneContent::Text { .. } => 1, SceneContent::Progress { .. } => 2, + SceneContent::ProviderMark { .. } => 3, }; let previous_kind = kind; labeled(ui, language.text("Content type"), |ui| { @@ -869,6 +871,10 @@ pub(super) fn layer_properties_inspector( segments_expression: None, segment_gap: 2.0.into(), }, + 3 => SceneContent::ProviderMark { + provider: PROVIDER_DESCRIPTORS[0].key.into(), + color: Paint::new("#D97757FF"), + }, _ => SceneContent::None, }; } @@ -1127,6 +1133,36 @@ pub(super) fn content_inspector( )); } } + SceneContent::ProviderMark { provider, color } => { + let selected = PROVIDER_DESCRIPTORS + .iter() + .find(|descriptor| descriptor.key == provider.as_str()) + .map_or_else( + || provider.clone(), + |descriptor| language.text(descriptor.display_name).to_owned(), + ); + labeled(ui, language.text("Provider"), |ui| { + Dropdown::from_id_salt(id.with("provider-mark")) + .width(inspector_control_width(ui)) + .selected_text(selected) + .show_ui(ui, |ui| { + for descriptor in &PROVIDER_DESCRIPTORS { + let mut key = provider.as_str().to_owned(); + if dropdown_selectable_value( + ui, + &mut key, + descriptor.key.to_owned(), + language.text(descriptor.display_name), + ) + .clicked() + { + *provider = descriptor.key.into(); + } + } + }); + }); + paint_control(ui, language.text("Colour"), color, language); + } } requested } diff --git a/src/studio_app/studio_scene_helpers.rs b/src/studio_app/studio_scene_helpers.rs index 6b881018..c2229e59 100644 --- a/src/studio_app/studio_scene_helpers.rs +++ b/src/studio_app/studio_scene_helpers.rs @@ -151,11 +151,19 @@ pub(super) fn scene_object_preview( )); } - let icon = scene_object_icon(object); + // A provider logo previews as the mark itself; it shares the icon family. + let glyph = match &object.content { + SceneContent::ProviderMark { provider, .. } => { + crate::providers::ProviderId::from_key(provider) + .map(provider_mark_glyph) + .unwrap_or_else(|| scene_object_icon(object).unicode()) + } + _ => scene_object_icon(object).unicode(), + }; ui.painter().text( preview_bounds.center(), egui::Align2::CENTER_CENTER, - icon.unicode().to_string(), + glyph.to_string(), egui::FontId::new(16.0, egui::FontFamily::Name("lucide".into())), scene_object_icon_color(object, background), ); @@ -292,6 +300,7 @@ pub(super) fn scene_object_icon(object: &SceneObject) -> LucideIcon { match &object.content { SceneContent::Text { .. } => LucideIcon::Type, SceneContent::Progress { .. } => LucideIcon::Gauge, + SceneContent::ProviderMark { .. } => LucideIcon::Image, SceneContent::None => { if matches!(&object.background, LayerBackground::Image { .. }) { LucideIcon::Image @@ -311,7 +320,9 @@ pub(super) fn scene_object_icon_color( background: egui::Color32, ) -> egui::Color32 { match &object.content { - SceneContent::Text { color, .. } => scene_paint_color(color), + SceneContent::Text { color, .. } | SceneContent::ProviderMark { color, .. } => { + scene_paint_color(color) + } SceneContent::None | SceneContent::Progress { .. } => scene_icon_contrast_color(background), } } diff --git a/src/theme_engine.rs b/src/theme_engine.rs index 1eb0f941..8a295db0 100644 --- a/src/theme_engine.rs +++ b/src/theme_engine.rs @@ -22,6 +22,7 @@ pub const THEME_SCHEMA_VERSION: u32 = 1; pub const CLASSIC_THEME_ID: &str = "classic-usage-widget"; pub const COMPACT_FLUENT_QUAD_THEME_ID: &str = "compact-fluent-quad"; pub const CLASSIC_VERTICAL_THEME_ID: &str = "classic-vertical"; +pub const STACKED_ROWS_THEME_ID: &str = "stacked-rows"; pub const MINECRAFT_THEME_ID: &str = "theme-minecraft"; const BUILTIN_THEME_SOURCES: &[(&str, &str)] = &[ @@ -37,6 +38,10 @@ const BUILTIN_THEME_SOURCES: &[(&str, &str)] = &[ CLASSIC_VERTICAL_THEME_ID, include_str!(concat!(env!("OUT_DIR"), "/classic-vertical.json")), ), + ( + STACKED_ROWS_THEME_ID, + include_str!(concat!(env!("OUT_DIR"), "/stacked-rows.json")), + ), ]; /// Bundled starting points are copied into the managed library only when they @@ -314,6 +319,16 @@ pub enum SceneContent { #[serde(default = "default_segment_gap")] segment_gap: Expression, }, + /// A provider's logo from the brand marks the dashboard draws, tinted + /// with `color` and fitted, centred, into the object. Themes need no image + /// assets of their own to show a provider. + ProviderMark { + /// A provider key, as used by bindings: `claude`, `codex`, ... + #[serde(default = "default_provider_mark")] + provider: String, + #[serde(default = "default_text_paint")] + color: Paint, + }, } impl SceneObject { @@ -2804,6 +2819,20 @@ fn validate_scene_object(errors: &mut Vec, context: &DataContext, object track, ); } + SceneContent::ProviderMark { provider, color } => { + if crate::providers::ProviderId::from_key(provider).is_none() { + errors.push(format!( + "{}.provider: '{provider}' is not a provider key", + object.name + )); + } + validate_paint( + errors, + &object_context, + &format!("{}.color", object.name), + color, + ); + } } } @@ -3003,6 +3032,9 @@ fn default_accent_paint() -> Paint { fn default_track_paint() -> Paint { Paint::new("#FFFFFF24") } +fn default_provider_mark() -> String { + "claude".into() +} fn default_text_paint() -> Paint { Paint::new("#FFFFFFFF") } diff --git a/src/theme_engine/tests.rs b/src/theme_engine/tests.rs index 77acbbf5..f2c70f9c 100644 --- a/src/theme_engine/tests.rs +++ b/src/theme_engine/tests.rs @@ -871,7 +871,11 @@ fn classic_hover_summary_survives_theme_round_trips_and_is_opt_in() { fn built_in_themes_hide_absent_claude_sessions_and_keep_weekly_and_fable_limits() { use crate::models::{UsageData, UsageLimit, UsageSection}; - for (_, source) in BUILTIN_THEME_SOURCES { + for (id, source) in BUILTIN_THEME_SOURCES { + // Stacked Rows names its rows differently; see its own test. + if *id == STACKED_ROWS_THEME_ID { + continue; + } let theme: ThemeDocument = serde_json::from_str(source).unwrap(); for session_available in [false, true] { let usage = AppUsageData::from_iter([( @@ -1291,6 +1295,60 @@ fn paints_use_their_light_colour_only_in_light_mode() { .any(|error| error.contains("light_color") && error.contains("not a colour"))); } +#[test] +fn provider_marks_draw_the_brand_glyph_and_reject_unknown_providers() { + let mut theme = ThemeDocument::starter(); + theme.surfaces[0].children = vec![serde_json::from_value(serde_json::json!({ + "id": "logo", + "name": "Logo", + "width": "24", + "height": "24", + "content": { + "type": "provider_mark", + "provider": "codex", + "color": { "color": "#FFFFFFFF", "light_color": "#1A1A1AFF" } + } + })) + .unwrap()]; + assert!(theme.validate().is_empty(), "{:?}", theme.validate()); + let set_provider = |theme: &mut ThemeDocument, key: &str| { + let SceneContent::ProviderMark { provider, .. } = + &mut theme.surfaces[0].children[0].content + else { + unreachable!(); + }; + *provider = key.into(); + }; + // GDI draws these, and it finds no glyph in a font it takes for a symbol + // font, so every mark is checked through the theme renderer. + for provider in ProviderId::ALL { + set_provider(&mut theme, provider.descriptor().key); + let rendered = render_theme_surface_with_runtime( + &theme, + 0, + None, + ThemeRuntime::new(true, true, false), + ); + assert!(rendered.warnings.is_empty(), "{:?}", rendered.warnings); + let logo = |x: usize, y: usize| rendered.pixels[y * rendered.width as usize + x]; + let drawn = (0..24) + .flat_map(|y| (0..24).map(move |x| (x, y))) + .filter(|(x, y)| logo(*x, *y) >> 24 > 0) + .count(); + assert!(drawn > 100, "the {provider:?} mark drew {drawn} pixels"); + assert!( + (24..rendered.width as usize).all(|x| logo(x, 12) >> 24 == 0), + "the {provider:?} mark stays inside its layer" + ); + } + + set_provider(&mut theme, "nobody"); + assert!(theme + .validate() + .iter() + .any(|error| error.contains("'nobody' is not a provider key"))); +} + #[test] fn theme_schema_does_not_serialize_descriptions() { let source = serde_json::json!({ @@ -2376,10 +2434,11 @@ fn starter_tray_icons_follow_enabled_providers() { #[test] fn built_in_themes_are_valid_and_cannot_be_saved_as_editable_themes() { - assert_eq!(BUILTIN_THEME_SOURCES.len(), 3); + assert_eq!(BUILTIN_THEME_SOURCES.len(), 4); assert_eq!(BUILTIN_THEME_SOURCES[0].0, CLASSIC_THEME_ID); assert_eq!(BUILTIN_THEME_SOURCES[1].0, COMPACT_FLUENT_QUAD_THEME_ID); assert_eq!(BUILTIN_THEME_SOURCES[2].0, CLASSIC_VERTICAL_THEME_ID); + assert_eq!(BUILTIN_THEME_SOURCES[3].0, STACKED_ROWS_THEME_ID); assert!(REMOVED_BUILTIN_THEME_IDS .iter() .all(|id| !is_builtin_theme_id(id))); @@ -3853,3 +3912,371 @@ fn missing_antigravity_external_pool_draws_an_empty_gauge() { assert_eq!(value("antigravity.gemini.weekly.display"), 0.0); assert_eq!(value("antigravity.external.session.display"), 0.0); } + +fn stacked_rows_theme() -> ThemeDocument { + let (_, source) = BUILTIN_THEME_SOURCES + .iter() + .find(|(id, _)| *id == STACKED_ROWS_THEME_ID) + .unwrap(); + let mut theme: ThemeDocument = serde_json::from_str(source).unwrap(); + theme.prepare_runtime(); + assert!(theme.validate().is_empty(), "{:?}", theme.validate()); + theme +} + +fn stacked_rows_model_limit(model: &str, kind: &str, percentage: f64) -> crate::models::UsageLimit { + crate::models::UsageLimit { + key: format!("weekly_scoped_{}", model.to_ascii_lowercase()), + kind: kind.into(), + label: model.into(), + model: Some(model.into()), + is_active: true, + usage: crate::models::UsageSection { + available: true, + percentage, + resets_at: None, + }, + ..Default::default() + } +} + +fn stacked_rows_credits() -> crate::models::CreditsSection { + crate::models::CreditsSection { + percentage: 40.0, + remaining: 30.0, + total: 50.0, + } +} + +#[test] +fn stacked_rows_draws_one_joined_row_per_reported_limit_and_hover_opens_its_flyout() { + use crate::models::{UsageData, UsageSection}; + + let theme = stacked_rows_theme(); + let section = |available| UsageSection { + available, + percentage: 0.0, + resets_at: None, + }; + let claude = |rows: [bool; 6]| UsageData { + session: section(rows[0]), + weekly: section(rows[1]), + limits: [ + ("Fable", "weekly_scoped"), + ("Opus", "seven_day_opus"), + ("Sonnet", "seven_day_sonnet"), + ] + .into_iter() + .zip(&rows[2..5]) + .filter(|(_, shown)| **shown) + .map(|((model, kind), _)| stacked_rows_model_limit(model, kind, 0.0)) + .collect(), + credits: rows[5].then(|| crate::models::CreditsSection { + percentage: 0.0, + ..stacked_rows_credits() + }), + ..Default::default() + }; + let codex = |rows: [bool; 3]| UsageData { + session: section(rows[0]), + weekly: section(rows[1]), + credits: rows[2].then(|| crate::models::CreditsSection { + percentage: 0.0, + ..stacked_rows_credits() + }), + ..Default::default() + }; + // Whole-pixel rows that always fill the 36 px block, e.g. 7+7+7+7+8. + let heights = |rows: usize| { + let rows = rows.max(1); + (0..rows) + .map(|index| 36 * (index + 1) / rows - 36 * index / rows) + .collect::>() + }; + let popups: Vec = theme + .surfaces + .iter() + .enumerate() + .filter(|(_, surface)| surface.id.ends_with("-popup")) + .map(|(index, _)| index) + .collect(); + assert_eq!(popups, [1, 2]); + // Runs of identical pixels down one column of a provider's block. With + // nothing used and no reset known, each row is a single flat track colour. + let runs = |pixels: &[u32], width: u32, x: u32| { + let column: Vec = (0..48).map(|y| pixels[(y * width + x) as usize]).collect(); + assert!(column[..6] + .iter() + .chain(&column[42..]) + .all(|p| p >> 24 == 0)); + assert!(column[6..42].iter().all(|p| p >> 24 > 0), "rows must join"); + let mut lengths = vec![1]; + for pair in column[6..42].windows(2) { + if pair[0] == pair[1] { + *lengths.last_mut().unwrap() += 1; + } else { + lengths.push(1); + } + } + lengths + }; + let runtime = ThemeRuntime::new(true, true, false); + for bits in 0..512u16 { + let flag = |bit: u16| bits & (1 << bit) != 0; + let claude_rows = (0..6).filter(|bit| flag(*bit)).count(); + let codex_rows = (6..9).filter(|bit| flag(*bit)).count(); + let data = AppUsageData::from_iter([ + ( + ProviderId::Claude, + claude([flag(0), flag(1), flag(2), flag(3), flag(4), flag(5)]), + ), + (ProviderId::Codex, codex([flag(6), flag(7), flag(8)])), + ]); + let rendered = render_theme_surface_with_runtime(&theme, 0, Some(&data), runtime); + assert!(rendered.warnings.is_empty(), "{:?}", rendered.warnings); + assert_eq!((rendered.width, rendered.height), (214, 48)); + for (x, rows) in [(42, claude_rows), (151, codex_rows)] { + assert_eq!( + runs(&rendered.pixels, rendered.width, x), + heights(rows), + "{bits:09b}" + ); + } + for &surface_index in &popups { + assert!(!surface_should_render( + &theme, + surface_index, + Some(&data), + runtime + )); + } + } + + let data = AppUsageData::from_iter([ + ( + ProviderId::Claude, + claude([true, true, true, false, false, true]), + ), + (ProviderId::Codex, codex([false, true, false])), + ]); + for (group, popup, rows) in [("claude-group", 1, 4), ("codex-group", 2, 1)] { + let mut overrides = HashMap::new(); + let enter = theme.surfaces[0] + .children + .iter() + .find(|object| object.id == group) + .and_then(|object| object.mouse_events.clone()) + .unwrap(); + execute_mouse_actions( + &theme, + 0, + group, + &enter.mouse_enter, + Some(&data), + runtime, + &mut overrides, + ) + .unwrap(); + let effective = apply_mouse_action_overrides(&theme, &overrides); + assert!(surface_should_render( + &effective, + popup, + Some(&data), + runtime + )); + let rendered = render_theme_surface_with_runtime(&effective, popup, Some(&data), runtime); + assert!(rendered.warnings.is_empty(), "{:?}", rendered.warnings); + assert_eq!( + resolve_surface_content_size(&effective, popup, Some(&data), runtime), + (340, 16 + 40 + 12 + rows * 80 + (rows - 1) * 12 + 16) + ); + // The flyout draws its own card, so the engine must not add its padded + // floating card behind it as a second frame. + let floating = runtime.with_nest(SurfaceNest::Floating); + assert_eq!(surface_horizontal_padding(&theme, popup, floating), 0); + let card = render_theme_surface_with_runtime(&effective, popup, Some(&data), floating); + assert_eq!(card.width, 340); + assert_eq!(card.pixels[0] >> 24, 0, "flyout corners stay transparent"); + execute_mouse_actions( + &theme, + 0, + group, + &enter.mouse_leave, + Some(&data), + runtime, + &mut overrides, + ) + .unwrap(); + let effective = apply_mouse_action_overrides(&theme, &overrides); + assert!(!surface_should_render( + &effective, + popup, + Some(&data), + runtime + )); + } +} + +#[test] +fn stacked_rows_follows_the_usage_direction_and_reports_every_state() { + use crate::models::{UsageData, UsageSection}; + use std::time::{Duration, SystemTime}; + + let theme = stacked_rows_theme(); + // A quarter of the five-hour window has elapsed. + let resets_at = Some(SystemTime::now() + Duration::from_secs(13_500)); + let usage = |percentage| UsageData { + session: UsageSection { + available: true, + percentage, + resets_at, + }, + ..Default::default() + }; + let object = |id: &str| { + theme + .surfaces + .iter() + .flat_map(|surface| &surface.children) + .find(|object| object.id == id) + .unwrap_or_else(|| panic!("missing {id}")) + }; + let context = |data: Option<&AppUsageData>, runtime: ThemeRuntime| { + let mut context = DataContext::from_usage_with_runtime(data, &Canvas::default(), runtime); + context.insert("system.dark", 1.0); + context + }; + let shown = + |id: &str, context: &DataContext| evaluate(&object(id).render.0, context).unwrap() != 0.0; + let text = |id: &str, context: &DataContext| match &object(id).content { + SceneContent::Text { template, .. } => format_template(template, context), + _ => panic!("{id} is not text"), + }; + let runtime = ThemeRuntime::new(true, false, false); + + // Used: the bar fills a fifth and the pace line sits at 25%. Remaining: + // the bar fills four fifths and the line moves to the 75% mark. + let data = AppUsageData::from_iter([(ProviderId::Claude, usage(20.0))]); + for (countdown, value, projection, pace, pace_x) in [ + ( + false, + "20% used", + "5% under pace · ~80% used at reset", + "Pace 25%", + 34 + 17, + ), + ( + true, + "80% left", + "5% under pace · ~20% left at reset", + "Pace 75%", + 34 + 49, + ), + ] { + let runtime = runtime.with_countdown(countdown); + let values = context(Some(&data), runtime); + assert_eq!(text("claude-popup-5h-used", &values), value); + assert!(shown("claude-popup-5h-status-ok", &values)); + assert!(!shown("claude-popup-5h-status-bad", &values)); + assert_eq!(text("claude-popup-5h-status-ok", &values), projection); + assert_eq!(text("claude-popup-5h-pace-label", &values), pace); + + let rendered = render_theme_surface_with_runtime(&theme, 0, Some(&data), runtime); + let pixel = |x: u32| rendered.pixels[(24 * rendered.width + x) as usize]; + assert_eq!( + pixel(pace_x), + 0xFFFF00FF, + "pace line, countdown={countdown}" + ); + // Section 3 of the bar is track when a fifth is used, fill when four + // fifths are left. + assert_eq!(pixel(34 + 5) == pixel(34 + 40), countdown); + } + + let over = AppUsageData::from_iter([(ProviderId::Claude, usage(50.0))]); + let values = context(Some(&over), runtime); + assert!(shown("claude-popup-5h-status-bad", &values)); + assert_eq!( + text("claude-popup-5h-status-bad", &values), + format!( + "25% over pace · runs out in ~{}", + format_template("{4500:duration}", &values) + ) + ); + let spent = AppUsageData::from_iter([(ProviderId::Claude, usage(100.0))]); + let values = context(Some(&spent), runtime); + assert!(shown("claude-popup-5h-status-spent", &values)); + assert!(!shown("claude-popup-5h-status-bad", &values)); + + // Extra usage, model quotas and a monthly Codex allowance get their own rows. + let data = AppUsageData::from_iter([ + ( + ProviderId::Claude, + UsageData { + credits: Some(stacked_rows_credits()), + limits: vec![stacked_rows_model_limit("Opus", "seven_day_opus", 30.0)], + stale: true, + ..usage(100.0) + }, + ), + ( + ProviderId::Codex, + UsageData { + weekly: UsageSection { + available: true, + percentage: 10.0, + resets_at, + }, + weekly_label: Some("30d".into()), + ..Default::default() + }, + ), + ]); + let runtime = ThemeRuntime::new(true, true, false); + for (countdown, credits, opus) in [ + (false, "40% used", "30% used"), + (true, "60% left", "70% left"), + ] { + let values = context(Some(&data), runtime.with_countdown(countdown)); + assert!(shown("claude-popup-credits", &values)); + assert_eq!(text("claude-popup-credits-used", &values), credits); + assert_eq!(text("claude-popup-opus-used", &values), opus); + } + let values = context(Some(&data), runtime); + assert_eq!( + text("claude-popup-credits-balance", &values), + "$30.00 left of $50.00" + ); + assert_eq!(text("codex-popup-7d-name", &values), "30 day"); + // 13,500 s left of a 30-day window is nearly all of it elapsed. + assert_eq!(text("codex-popup-7d-pace-label", &values), "Pace 99%"); + assert_eq!( + evaluate(&object("claude-block").visibility.0, &values).unwrap(), + 55.0 + ); + assert_eq!( + evaluate(&object("codex-block").visibility.0, &values).unwrap(), + 100.0 + ); + assert!(shown("claude-popup-stale", &values)); + assert!(!shown("codex-popup-stale", &values)); + assert_eq!(text("claude-popup-vendor", &values), "Anthropic"); + let rendered = render_theme_surface_with_runtime(&theme, 1, Some(&data), runtime); + assert!(rendered.warnings.is_empty(), "{:?}", rendered.warnings); + + // With nothing to show, the flyout says why. + for (poll_ok, has_error, state) in [ + (false, false, "waiting"), + (false, true, "error"), + (true, false, "none"), + ] { + let values = context(None, runtime.with_poll_state(poll_ok, has_error)); + for candidate in ["waiting", "error", "none"] { + assert_eq!( + shown(&format!("claude-popup-{candidate}"), &values), + candidate == state, + "{state}: {candidate}" + ); + } + } +} diff --git a/src/theme_engine/theme_rendering.rs b/src/theme_engine/theme_rendering.rs index 7d7bea00..c317590a 100644 --- a/src/theme_engine/theme_rendering.rs +++ b/src/theme_engine/theme_rendering.rs @@ -1075,6 +1075,34 @@ pub(super) fn render_object_content( color.resolve(context), ); } + SceneContent::ProviderMark { provider, color } => { + let Some(provider) = crate::providers::ProviderId::from_key(provider) else { + warnings.push(format!( + "{}: '{provider}' is not a provider key", + object.source.name + )); + return; + }; + // Each mark fills a square em (ascent 1000, descent 0) with its + // artwork's padding built in, so the em is the fitted square. + let size = width.min(height) as f64; + if size < 1.0 { + return; + } + render_text_mask( + pixels, + width, + height, + &crate::ui::theme::provider_mark_glyph(provider).to_string(), + crate::widget_font::brand_mark_family(), + size, + 400, + FontRendering::Antialiased, + 1.0, + TextAlign::Center, + color.resolve(context), + ); + } } } diff --git a/src/themes/stacked-rows.json b/src/themes/stacked-rows.json new file mode 100644 index 00000000..980a40f9 --- /dev/null +++ b/src/themes/stacked-rows.json @@ -0,0 +1,5184 @@ +{ + "schema_version": 1, + "id": "stacked-rows", + "name": "Stacked Rows", + "surfaces": [ + { + "id": "main", + "name": "Stacked rows", + "render": "providers.claude.enabled || providers.codex.enabled", + "visibility": "100", + "placement": { + "reference": { + "region": "system_tray", + "display": 0 + }, + "nest": "taskbar", + "horizontal": "left", + "vertical": "bottom", + "surface_horizontal": "right", + "surface_vertical": "bottom", + "offset_x": 6, + "offset_y": 0 + }, + "width": "max(1, providers.claude.enabled + providers.codex.enabled) * 105 + max(0, providers.claude.enabled + providers.codex.enabled - 1) * 4", + "height": "48", + "background": { + "type": "none" + }, + "border": null, + "mouse_events": { + "double_click": "show_dashboard()", + "right_click": "show_context_menu(\"classic-v1\")" + }, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + }, + "children": [ + { + "id": "provider-row", + "name": "Enabled providers", + "render": "1", + "visibility": "100", + "width": "canvas.width", + "height": "48", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "row", + "align": "start", + "gap": "4", + "content": { + "type": "none" + } + }, + { + "id": "claude-group", + "name": "Claude Code group", + "render": "providers.claude.enabled", + "visibility": "100", + "parent": "provider-row", + "width": "105", + "height": "48", + "background": { + "type": "none" + }, + "border": null, + "mouse_events": { + "double_click": "show_dashboard()", + "right_click": "show_context_menu(\"classic-v1\")", + "mouse_enter": "set(\"claude-popup\", render, 1)\nset(\"claude-hover\", render, 1)", + "mouse_leave": "set(\"claude-popup\", render, 0)\nset(\"claude-hover\", render, 0)" + }, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "claude-hover", + "name": "Claude Code hover", + "render": "0", + "visibility": "100", + "parent": "claude-group", + "y": "2", + "width": "105", + "height": "44", + "background": { + "type": "colour", + "colour": { + "color": "#FFFFFF12", + "light_color": "#0000000F", + "opacity": "1" + } + }, + "border": null, + "corner_radius": "4", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "claude-mark", + "name": "Claude Code mark", + "render": "1", + "visibility": "100", + "parent": "claude-group", + "x": "4", + "y": "12", + "width": "24", + "height": "24", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "provider_mark", + "provider": "claude", + "color": { + "color": "#D97757FF", + "opacity": "1" + } + } + }, + { + "id": "claude-block", + "name": "Claude Code rows", + "render": "1", + "visibility": "if(claude.stale, 55, 100)", + "parent": "claude-group", + "x": "34", + "y": "6", + "width": "67", + "height": "36", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "column", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "claude-waiting", + "name": "Claude Code waiting", + "render": "(claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available) == 0", + "visibility": "100", + "parent": "claude-block", + "width": "67", + "height": "36", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "progress", + "value": "0", + "direction": "left_to_right", + "fill": { + "color": "#FFFFFF26", + "light_color": "#0000001F", + "opacity": "1" + }, + "track": { + "color": "#FFFFFF26", + "light_color": "#0000001F", + "opacity": "1" + }, + "corner_radius": "2", + "segments": 4, + "segment_gap": "1" + } + }, + { + "id": "claude-5h", + "name": "Claude Code 5h row", + "render": "claude.five_hour.available", + "visibility": "100", + "parent": "claude-block", + "width": "67", + "height": "floor(36 * (0 + 1) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available))) - floor(36 * 0 / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available)))", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "claude-5h-bar", + "name": "Claude Code 5h bar", + "render": "1", + "visibility": "100", + "parent": "claude-5h", + "y": "-2 * 0", + "width": "67", + "height": "floor(36 * (0 + 1) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available))) - floor(36 * 0 / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available))) + 2 * (0 + min(1, claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available))", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "progress", + "value": "claude.five_hour.display", + "direction": "left_to_right", + "fill": { + "color": "#D97757FF", + "light_color": "#C15F3CFF", + "opacity": "1" + }, + "track": { + "color": "#D9775747", + "light_color": "#C15F3C42", + "opacity": "1" + }, + "corner_radius": "2", + "segments": 4, + "segment_gap": "1" + } + }, + { + "id": "claude-5h-pace", + "name": "Claude Code 5h pace", + "render": "claude.five_hour.reset.seconds > 0", + "visibility": "100", + "parent": "claude-5h", + "x": "min(66, round(67 * if(display.countdown, 100 - clamp(100 * (1 - claude.five_hour.reset.seconds / (18000)), 0, 100), clamp(100 * (1 - claude.five_hour.reset.seconds / (18000)), 0, 100)) / 100)) - (min(66, round(67 * if(display.countdown, 100 - clamp(100 * (1 - claude.five_hour.reset.seconds / (18000)), 0, 100), clamp(100 * (1 - claude.five_hour.reset.seconds / (18000)), 0, 100)) / 100)) % 17 == 16)", + "width": "1", + "height": "floor(36 * (0 + 1) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available))) - floor(36 * 0 / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available)))", + "background": { + "type": "colour", + "colour": { + "color": "#FF00FFFF", + "opacity": "1" + } + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "claude-7d", + "name": "Claude Code 7d row", + "render": "claude.weekly.available", + "visibility": "100", + "parent": "claude-block", + "width": "67", + "height": "floor(36 * ((claude.five_hour.available) + 1) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available))) - floor(36 * (claude.five_hour.available) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available)))", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "claude-7d-bar", + "name": "Claude Code 7d bar", + "render": "1", + "visibility": "100", + "parent": "claude-7d", + "y": "-2 * min(1, claude.five_hour.available)", + "width": "67", + "height": "floor(36 * ((claude.five_hour.available) + 1) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available))) - floor(36 * (claude.five_hour.available) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available))) + 2 * (min(1, claude.five_hour.available) + min(1, claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available))", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "progress", + "value": "claude.weekly.display", + "direction": "left_to_right", + "fill": { + "color": "#E8B04AFF", + "light_color": "#B7791FFF", + "opacity": "1" + }, + "track": { + "color": "#E8B04A47", + "light_color": "#B7791F42", + "opacity": "1" + }, + "corner_radius": "2", + "segments": 4, + "segment_gap": "1" + } + }, + { + "id": "claude-7d-pace", + "name": "Claude Code 7d pace", + "render": "claude.weekly.reset.seconds > 0", + "visibility": "100", + "parent": "claude-7d", + "x": "min(66, round(67 * if(display.countdown, 100 - clamp(100 * (1 - claude.weekly.reset.seconds / (604800)), 0, 100), clamp(100 * (1 - claude.weekly.reset.seconds / (604800)), 0, 100)) / 100)) - (min(66, round(67 * if(display.countdown, 100 - clamp(100 * (1 - claude.weekly.reset.seconds / (604800)), 0, 100), clamp(100 * (1 - claude.weekly.reset.seconds / (604800)), 0, 100)) / 100)) % 17 == 16)", + "width": "1", + "height": "floor(36 * ((claude.five_hour.available) + 1) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available))) - floor(36 * (claude.five_hour.available) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available)))", + "background": { + "type": "colour", + "colour": { + "color": "#FF00FFFF", + "opacity": "1" + } + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "claude-fable", + "name": "Claude Code fable row", + "render": "claude.model.fable.available", + "visibility": "100", + "parent": "claude-block", + "width": "67", + "height": "floor(36 * ((claude.five_hour.available + claude.weekly.available) + 1) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available))) - floor(36 * (claude.five_hour.available + claude.weekly.available) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available)))", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "claude-fable-bar", + "name": "Claude Code fable bar", + "render": "1", + "visibility": "100", + "parent": "claude-fable", + "y": "-2 * min(1, claude.five_hour.available + claude.weekly.available)", + "width": "67", + "height": "floor(36 * ((claude.five_hour.available + claude.weekly.available) + 1) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available))) - floor(36 * (claude.five_hour.available + claude.weekly.available) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available))) + 2 * (min(1, claude.five_hour.available + claude.weekly.available) + min(1, claude.model.opus.available + claude.model.sonnet.available + claude.credits.available))", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "progress", + "value": "claude.model.fable.display", + "direction": "left_to_right", + "fill": { + "color": "#B48CF2FF", + "light_color": "#7C4DDBFF", + "opacity": "1" + }, + "track": { + "color": "#B48CF247", + "light_color": "#7C4DDB42", + "opacity": "1" + }, + "corner_radius": "2", + "segments": 4, + "segment_gap": "1" + } + }, + { + "id": "claude-fable-pace", + "name": "Claude Code fable pace", + "render": "claude.model.fable.reset.seconds > 0", + "visibility": "100", + "parent": "claude-fable", + "x": "min(66, round(67 * if(display.countdown, 100 - clamp(100 * (1 - claude.model.fable.reset.seconds / (604800)), 0, 100), clamp(100 * (1 - claude.model.fable.reset.seconds / (604800)), 0, 100)) / 100)) - (min(66, round(67 * if(display.countdown, 100 - clamp(100 * (1 - claude.model.fable.reset.seconds / (604800)), 0, 100), clamp(100 * (1 - claude.model.fable.reset.seconds / (604800)), 0, 100)) / 100)) % 17 == 16)", + "width": "1", + "height": "floor(36 * ((claude.five_hour.available + claude.weekly.available) + 1) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available))) - floor(36 * (claude.five_hour.available + claude.weekly.available) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available)))", + "background": { + "type": "colour", + "colour": { + "color": "#FF00FFFF", + "opacity": "1" + } + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "claude-opus", + "name": "Claude Code opus row", + "render": "claude.model.opus.available", + "visibility": "100", + "parent": "claude-block", + "width": "67", + "height": "floor(36 * ((claude.five_hour.available + claude.weekly.available + claude.model.fable.available) + 1) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available))) - floor(36 * (claude.five_hour.available + claude.weekly.available + claude.model.fable.available) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available)))", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "claude-opus-bar", + "name": "Claude Code opus bar", + "render": "1", + "visibility": "100", + "parent": "claude-opus", + "y": "-2 * min(1, claude.five_hour.available + claude.weekly.available + claude.model.fable.available)", + "width": "67", + "height": "floor(36 * ((claude.five_hour.available + claude.weekly.available + claude.model.fable.available) + 1) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available))) - floor(36 * (claude.five_hour.available + claude.weekly.available + claude.model.fable.available) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available))) + 2 * (min(1, claude.five_hour.available + claude.weekly.available + claude.model.fable.available) + min(1, claude.model.sonnet.available + claude.credits.available))", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "progress", + "value": "claude.model.opus.display", + "direction": "left_to_right", + "fill": { + "color": "#5FB7E5FF", + "light_color": "#1F78B4FF", + "opacity": "1" + }, + "track": { + "color": "#5FB7E547", + "light_color": "#1F78B442", + "opacity": "1" + }, + "corner_radius": "2", + "segments": 4, + "segment_gap": "1" + } + }, + { + "id": "claude-opus-pace", + "name": "Claude Code opus pace", + "render": "claude.model.opus.reset.seconds > 0", + "visibility": "100", + "parent": "claude-opus", + "x": "min(66, round(67 * if(display.countdown, 100 - clamp(100 * (1 - claude.model.opus.reset.seconds / (604800)), 0, 100), clamp(100 * (1 - claude.model.opus.reset.seconds / (604800)), 0, 100)) / 100)) - (min(66, round(67 * if(display.countdown, 100 - clamp(100 * (1 - claude.model.opus.reset.seconds / (604800)), 0, 100), clamp(100 * (1 - claude.model.opus.reset.seconds / (604800)), 0, 100)) / 100)) % 17 == 16)", + "width": "1", + "height": "floor(36 * ((claude.five_hour.available + claude.weekly.available + claude.model.fable.available) + 1) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available))) - floor(36 * (claude.five_hour.available + claude.weekly.available + claude.model.fable.available) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available)))", + "background": { + "type": "colour", + "colour": { + "color": "#FF00FFFF", + "opacity": "1" + } + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "claude-sonnet", + "name": "Claude Code sonnet row", + "render": "claude.model.sonnet.available", + "visibility": "100", + "parent": "claude-block", + "width": "67", + "height": "floor(36 * ((claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available) + 1) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available))) - floor(36 * (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available)))", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "claude-sonnet-bar", + "name": "Claude Code sonnet bar", + "render": "1", + "visibility": "100", + "parent": "claude-sonnet", + "y": "-2 * min(1, claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available)", + "width": "67", + "height": "floor(36 * ((claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available) + 1) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available))) - floor(36 * (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available))) + 2 * (min(1, claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available) + min(1, claude.credits.available))", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "progress", + "value": "claude.model.sonnet.display", + "direction": "left_to_right", + "fill": { + "color": "#6CCB8AFF", + "light_color": "#2E8B4EFF", + "opacity": "1" + }, + "track": { + "color": "#6CCB8A47", + "light_color": "#2E8B4E42", + "opacity": "1" + }, + "corner_radius": "2", + "segments": 4, + "segment_gap": "1" + } + }, + { + "id": "claude-sonnet-pace", + "name": "Claude Code sonnet pace", + "render": "claude.model.sonnet.reset.seconds > 0", + "visibility": "100", + "parent": "claude-sonnet", + "x": "min(66, round(67 * if(display.countdown, 100 - clamp(100 * (1 - claude.model.sonnet.reset.seconds / (604800)), 0, 100), clamp(100 * (1 - claude.model.sonnet.reset.seconds / (604800)), 0, 100)) / 100)) - (min(66, round(67 * if(display.countdown, 100 - clamp(100 * (1 - claude.model.sonnet.reset.seconds / (604800)), 0, 100), clamp(100 * (1 - claude.model.sonnet.reset.seconds / (604800)), 0, 100)) / 100)) % 17 == 16)", + "width": "1", + "height": "floor(36 * ((claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available) + 1) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available))) - floor(36 * (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available)))", + "background": { + "type": "colour", + "colour": { + "color": "#FF00FFFF", + "opacity": "1" + } + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "claude-credits", + "name": "Claude Code credits row", + "render": "claude.credits.available", + "visibility": "100", + "parent": "claude-block", + "width": "67", + "height": "floor(36 * ((claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available) + 1) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available))) - floor(36 * (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available)))", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "claude-credits-bar", + "name": "Claude Code credits bar", + "render": "1", + "visibility": "100", + "parent": "claude-credits", + "y": "-2 * min(1, claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available)", + "width": "67", + "height": "floor(36 * ((claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available) + 1) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available))) - floor(36 * (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available) / max(1, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available))) + 2 * (min(1, claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available) + 0)", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "progress", + "value": "claude.credits.display", + "direction": "left_to_right", + "fill": { + "color": "#C9CED6FF", + "light_color": "#6B7480FF", + "opacity": "1" + }, + "track": { + "color": "#C9CED647", + "light_color": "#6B748042", + "opacity": "1" + }, + "corner_radius": "2", + "segments": 4, + "segment_gap": "1" + } + }, + { + "id": "codex-group", + "name": "Codex group", + "render": "providers.codex.enabled", + "visibility": "100", + "parent": "provider-row", + "width": "105", + "height": "48", + "background": { + "type": "none" + }, + "border": null, + "mouse_events": { + "double_click": "show_dashboard()", + "right_click": "show_context_menu(\"classic-v1\")", + "mouse_enter": "set(\"codex-popup\", render, 1)\nset(\"codex-hover\", render, 1)", + "mouse_leave": "set(\"codex-popup\", render, 0)\nset(\"codex-hover\", render, 0)" + }, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "codex-hover", + "name": "Codex hover", + "render": "0", + "visibility": "100", + "parent": "codex-group", + "y": "2", + "width": "105", + "height": "44", + "background": { + "type": "colour", + "colour": { + "color": "#FFFFFF12", + "light_color": "#0000000F", + "opacity": "1" + } + }, + "border": null, + "corner_radius": "4", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "codex-mark", + "name": "Codex mark", + "render": "1", + "visibility": "100", + "parent": "codex-group", + "x": "4", + "y": "12", + "width": "24", + "height": "24", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "provider_mark", + "provider": "codex", + "color": { + "color": "#FFFFFFFF", + "light_color": "#1A1A1AFF", + "opacity": "1" + } + } + }, + { + "id": "codex-block", + "name": "Codex rows", + "render": "1", + "visibility": "if(codex.stale, 55, 100)", + "parent": "codex-group", + "x": "34", + "y": "6", + "width": "67", + "height": "36", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "column", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "codex-waiting", + "name": "Codex waiting", + "render": "(codex.five_hour.available + codex.weekly.available + codex.credits.available) == 0", + "visibility": "100", + "parent": "codex-block", + "width": "67", + "height": "36", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "progress", + "value": "0", + "direction": "left_to_right", + "fill": { + "color": "#FFFFFF26", + "light_color": "#0000001F", + "opacity": "1" + }, + "track": { + "color": "#FFFFFF26", + "light_color": "#0000001F", + "opacity": "1" + }, + "corner_radius": "2", + "segments": 4, + "segment_gap": "1" + } + }, + { + "id": "codex-5h", + "name": "Codex 5h row", + "render": "codex.five_hour.available", + "visibility": "100", + "parent": "codex-block", + "width": "67", + "height": "floor(36 * (0 + 1) / max(1, (codex.five_hour.available + codex.weekly.available + codex.credits.available))) - floor(36 * 0 / max(1, (codex.five_hour.available + codex.weekly.available + codex.credits.available)))", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "codex-5h-bar", + "name": "Codex 5h bar", + "render": "1", + "visibility": "100", + "parent": "codex-5h", + "y": "-2 * 0", + "width": "67", + "height": "floor(36 * (0 + 1) / max(1, (codex.five_hour.available + codex.weekly.available + codex.credits.available))) - floor(36 * 0 / max(1, (codex.five_hour.available + codex.weekly.available + codex.credits.available))) + 2 * (0 + min(1, codex.weekly.available + codex.credits.available))", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "progress", + "value": "codex.five_hour.display", + "direction": "left_to_right", + "fill": { + "color": "#2FC79BFF", + "light_color": "#0E8A6BFF", + "opacity": "1" + }, + "track": { + "color": "#2FC79B47", + "light_color": "#0E8A6B42", + "opacity": "1" + }, + "corner_radius": "2", + "segments": 4, + "segment_gap": "1" + } + }, + { + "id": "codex-5h-pace", + "name": "Codex 5h pace", + "render": "codex.five_hour.reset.seconds > 0", + "visibility": "100", + "parent": "codex-5h", + "x": "min(66, round(67 * if(display.countdown, 100 - clamp(100 * (1 - codex.five_hour.reset.seconds / (18000)), 0, 100), clamp(100 * (1 - codex.five_hour.reset.seconds / (18000)), 0, 100)) / 100)) - (min(66, round(67 * if(display.countdown, 100 - clamp(100 * (1 - codex.five_hour.reset.seconds / (18000)), 0, 100), clamp(100 * (1 - codex.five_hour.reset.seconds / (18000)), 0, 100)) / 100)) % 17 == 16)", + "width": "1", + "height": "floor(36 * (0 + 1) / max(1, (codex.five_hour.available + codex.weekly.available + codex.credits.available))) - floor(36 * 0 / max(1, (codex.five_hour.available + codex.weekly.available + codex.credits.available)))", + "background": { + "type": "colour", + "colour": { + "color": "#FF00FFFF", + "opacity": "1" + } + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "codex-7d", + "name": "Codex 7d row", + "render": "codex.weekly.available", + "visibility": "100", + "parent": "codex-block", + "width": "67", + "height": "floor(36 * ((codex.five_hour.available) + 1) / max(1, (codex.five_hour.available + codex.weekly.available + codex.credits.available))) - floor(36 * (codex.five_hour.available) / max(1, (codex.five_hour.available + codex.weekly.available + codex.credits.available)))", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "codex-7d-bar", + "name": "Codex 7d bar", + "render": "1", + "visibility": "100", + "parent": "codex-7d", + "y": "-2 * min(1, codex.five_hour.available)", + "width": "67", + "height": "floor(36 * ((codex.five_hour.available) + 1) / max(1, (codex.five_hour.available + codex.weekly.available + codex.credits.available))) - floor(36 * (codex.five_hour.available) / max(1, (codex.five_hour.available + codex.weekly.available + codex.credits.available))) + 2 * (min(1, codex.five_hour.available) + min(1, codex.credits.available))", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "progress", + "value": "codex.weekly.display", + "direction": "left_to_right", + "fill": { + "color": "#4EA3F7FF", + "light_color": "#2B7BD6FF", + "opacity": "1" + }, + "track": { + "color": "#4EA3F747", + "light_color": "#2B7BD642", + "opacity": "1" + }, + "corner_radius": "2", + "segments": 4, + "segment_gap": "1" + } + }, + { + "id": "codex-7d-pace", + "name": "Codex 7d pace", + "render": "codex.weekly.reset.seconds > 0", + "visibility": "100", + "parent": "codex-7d", + "x": "min(66, round(67 * if(display.countdown, 100 - clamp(100 * (1 - codex.weekly.reset.seconds / (if(codex.weekly.label == \"30d\", 2592000, 604800))), 0, 100), clamp(100 * (1 - codex.weekly.reset.seconds / (if(codex.weekly.label == \"30d\", 2592000, 604800))), 0, 100)) / 100)) - (min(66, round(67 * if(display.countdown, 100 - clamp(100 * (1 - codex.weekly.reset.seconds / (if(codex.weekly.label == \"30d\", 2592000, 604800))), 0, 100), clamp(100 * (1 - codex.weekly.reset.seconds / (if(codex.weekly.label == \"30d\", 2592000, 604800))), 0, 100)) / 100)) % 17 == 16)", + "width": "1", + "height": "floor(36 * ((codex.five_hour.available) + 1) / max(1, (codex.five_hour.available + codex.weekly.available + codex.credits.available))) - floor(36 * (codex.five_hour.available) / max(1, (codex.five_hour.available + codex.weekly.available + codex.credits.available)))", + "background": { + "type": "colour", + "colour": { + "color": "#FF00FFFF", + "opacity": "1" + } + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "codex-credits", + "name": "Codex credits row", + "render": "codex.credits.available", + "visibility": "100", + "parent": "codex-block", + "width": "67", + "height": "floor(36 * ((codex.five_hour.available + codex.weekly.available) + 1) / max(1, (codex.five_hour.available + codex.weekly.available + codex.credits.available))) - floor(36 * (codex.five_hour.available + codex.weekly.available) / max(1, (codex.five_hour.available + codex.weekly.available + codex.credits.available)))", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "codex-credits-bar", + "name": "Codex credits bar", + "render": "1", + "visibility": "100", + "parent": "codex-credits", + "y": "-2 * min(1, codex.five_hour.available + codex.weekly.available)", + "width": "67", + "height": "floor(36 * ((codex.five_hour.available + codex.weekly.available) + 1) / max(1, (codex.five_hour.available + codex.weekly.available + codex.credits.available))) - floor(36 * (codex.five_hour.available + codex.weekly.available) / max(1, (codex.five_hour.available + codex.weekly.available + codex.credits.available))) + 2 * (min(1, codex.five_hour.available + codex.weekly.available) + 0)", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "progress", + "value": "codex.credits.display", + "direction": "left_to_right", + "fill": { + "color": "#F2C14EFF", + "light_color": "#A87400FF", + "opacity": "1" + }, + "track": { + "color": "#F2C14E47", + "light_color": "#A8740042", + "opacity": "1" + }, + "corner_radius": "2", + "segments": 4, + "segment_gap": "1" + } + } + ] + }, + { + "id": "claude-popup", + "name": "Claude Code flyout", + "render": "0", + "visibility": "100", + "placement": { + "reference": { + "region": "system_tray", + "display": 0 + }, + "nest": "floating", + "horizontal": "left", + "vertical": "top", + "surface_horizontal": "right", + "surface_vertical": "bottom", + "offset_x": 2, + "offset_x_expression": "6 - 4 - (providers.codex.enabled) * 109", + "offset_y": -8 + }, + "width": "340", + "height": "16 + 40 + 12 + if((claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available) == 0, 24, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available) * 80 + max(0, (claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available) - 1) * 12) + 16", + "background": { + "type": "colour", + "colour": { + "color": "#000000", + "opacity": "0" + } + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + }, + "children": [ + { + "id": "claude-popup-bg", + "name": "Flyout background", + "render": "1", + "visibility": "100", + "width": "canvas.width", + "height": "canvas.height", + "background": { + "type": "colour", + "colour": { + "color": "#2B2B2BFF", + "light_color": "#F9F9F9FF", + "opacity": "1" + } + }, + "border": { + "color": { + "color": "#3C3C3CFF", + "light_color": "#E0E0E0FF", + "opacity": "1" + }, + "width": "1" + }, + "corner_radius": "8", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "claude-popup-mark", + "name": "Flyout mark", + "render": "1", + "visibility": "100", + "x": "16", + "y": "22", + "width": "28", + "height": "28", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "provider_mark", + "provider": "claude", + "color": { + "color": "#D97757FF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-title", + "name": "Flyout title", + "render": "1", + "visibility": "100", + "x": "54", + "y": "16", + "width": "180", + "height": "22", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Claude Code", + "font_family": "Segoe UI", + "font_size": "16", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FFFFFFFF", + "light_color": "#1A1A1AFF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-vendor", + "name": "Flyout vendor", + "render": "1", + "visibility": "100", + "x": "54", + "y": "38", + "width": "270", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Anthropic{if(claude.account.name != \"\" && claude.account.name != \"Default\", \" · \", \"\")}{if(claude.account.name != \"\" && claude.account.name != \"Default\", claude.account.name, \"\")}", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-stale", + "name": "Flyout last known", + "render": "claude.stale", + "visibility": "100", + "x": "234", + "y": "18", + "width": "90", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Last known", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "right", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-waiting", + "name": "Flyout waiting", + "render": "(claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available) == 0 && data.loading", + "visibility": "100", + "x": "16", + "y": "68", + "width": "308", + "height": "20", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Waiting for usage data", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-error", + "name": "Flyout error", + "render": "(claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available) == 0 && data.has_error", + "visibility": "100", + "x": "16", + "y": "68", + "width": "308", + "height": "20", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Couldn't load usage · retrying", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FF6B5EFF", + "light_color": "#C42B1CFF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-none", + "name": "Flyout none", + "render": "(claude.five_hour.available + claude.weekly.available + claude.model.fable.available + claude.model.opus.available + claude.model.sonnet.available + claude.credits.available) == 0 && !data.loading && !data.has_error", + "visibility": "100", + "x": "16", + "y": "68", + "width": "308", + "height": "20", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "No usage reported for this account", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-rows", + "name": "Flyout rows", + "render": "1", + "visibility": "100", + "x": "16", + "y": "68", + "width": "308", + "height": "canvas.height - 84", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "column", + "align": "start", + "gap": "12", + "content": { + "type": "none" + } + }, + { + "id": "claude-popup-5h", + "name": "Claude Code 5h details", + "render": "claude.five_hour.available", + "visibility": "100", + "parent": "claude-popup-rows", + "width": "308", + "height": "80", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "claude-popup-5h-name", + "name": "5h name", + "render": "1", + "visibility": "100", + "parent": "claude-popup-5h", + "width": "154", + "height": "22", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "5 hour", + "font_family": "Segoe UI", + "font_size": "15", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#D97757FF", + "light_color": "#C15F3CFF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-5h-used", + "name": "5h value", + "render": "1", + "visibility": "100", + "parent": "claude-popup-5h", + "x": "154", + "width": "154", + "height": "22", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{claude.five_hour.display:0}% {if(display.countdown, \"left\", \"used\")}", + "font_family": "Segoe UI", + "font_size": "15", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "right", + "color": { + "color": "#FFFFFFFF", + "light_color": "#1A1A1AFF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-5h-bar", + "name": "5h bar", + "render": "1", + "visibility": "100", + "parent": "claude-popup-5h", + "y": "26", + "width": "307", + "height": "8", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "progress", + "value": "claude.five_hour.display", + "direction": "left_to_right", + "fill": { + "color": "#D97757FF", + "light_color": "#C15F3CFF", + "opacity": "1" + }, + "track": { + "color": "#D9775747", + "light_color": "#C15F3C42", + "opacity": "1" + }, + "corner_radius": "2", + "segments": 4, + "segment_gap": "1" + } + }, + { + "id": "claude-popup-5h-status-ok", + "name": "5h under pace", + "render": "claude.five_hour.reset.seconds > 0 && !(claude.five_hour.percentage > clamp(100 * (1 - claude.five_hour.reset.seconds / (18000)), 0, 100))", + "visibility": "100", + "parent": "claude-popup-5h", + "y": "42", + "width": "228", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{clamp(100 * (1 - claude.five_hour.reset.seconds / (18000)), 0, 100) - claude.five_hour.percentage:0}% under pace · ~{if(display.countdown, 100 - min(100, round(claude.five_hour.percentage * 100 / max(1, clamp(100 * (1 - claude.five_hour.reset.seconds / (18000)), 0, 100)))), min(100, round(claude.five_hour.percentage * 100 / max(1, clamp(100 * (1 - claude.five_hour.reset.seconds / (18000)), 0, 100))))):0}% {if(display.countdown, \"left\", \"used\")} at reset", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#6CCB5FFF", + "light_color": "#0F7B0FFF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-5h-status-bad", + "name": "5h over pace", + "render": "claude.five_hour.reset.seconds > 0 && claude.five_hour.percentage > clamp(100 * (1 - claude.five_hour.reset.seconds / (18000)), 0, 100) && !(claude.five_hour.percentage >= 100)", + "visibility": "100", + "parent": "claude-popup-5h", + "y": "42", + "width": "228", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{claude.five_hour.percentage - clamp(100 * (1 - claude.five_hour.reset.seconds / (18000)), 0, 100):0}% over pace · runs out in ~{(100 - claude.five_hour.percentage) * ((18000) - claude.five_hour.reset.seconds) / max(0.01, claude.five_hour.percentage):duration}", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FF6B5EFF", + "light_color": "#C42B1CFF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-5h-status-spent", + "name": "5h limit reached", + "render": "claude.five_hour.percentage >= 100", + "visibility": "100", + "parent": "claude-popup-5h", + "y": "42", + "width": "228", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Limit reached", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FF6B5EFF", + "light_color": "#C42B1CFF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-5h-pace-label", + "name": "5h pace value", + "render": "claude.five_hour.reset.seconds > 0", + "visibility": "100", + "parent": "claude-popup-5h", + "x": "228", + "y": "42", + "width": "80", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Pace {if(display.countdown, 100 - clamp(100 * (1 - claude.five_hour.reset.seconds / (18000)), 0, 100), clamp(100 * (1 - claude.five_hour.reset.seconds / (18000)), 0, 100)):0}%", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "right", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-5h-reset", + "name": "5h reset", + "render": "claude.five_hour.reset.seconds > 0", + "visibility": "100", + "parent": "claude-popup-5h", + "y": "60", + "width": "154", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Resets in {claude.five_hour.reset.seconds:duration}", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-5h-reset-at", + "name": "5h reset time", + "render": "claude.five_hour.reset.seconds > 0", + "visibility": "100", + "parent": "claude-popup-5h", + "x": "154", + "y": "60", + "width": "154", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{claude.five_hour.reset.unix:time_short}", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "right", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-5h-no-reset", + "name": "5h no reset", + "render": "!(claude.five_hour.reset.seconds > 0) && !(claude.five_hour.percentage >= 100)", + "visibility": "100", + "parent": "claude-popup-5h", + "y": "42", + "width": "308", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "No reset time reported", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-5h-pace", + "name": "5h pace", + "render": "claude.five_hour.reset.seconds > 0", + "visibility": "100", + "parent": "claude-popup-5h", + "x": "min(306, round(307 * if(display.countdown, 100 - clamp(100 * (1 - claude.five_hour.reset.seconds / (18000)), 0, 100), clamp(100 * (1 - claude.five_hour.reset.seconds / (18000)), 0, 100)) / 100)) - (min(306, round(307 * if(display.countdown, 100 - clamp(100 * (1 - claude.five_hour.reset.seconds / (18000)), 0, 100), clamp(100 * (1 - claude.five_hour.reset.seconds / (18000)), 0, 100)) / 100)) % 77 == 76)", + "y": "26", + "width": "1", + "height": "8", + "background": { + "type": "colour", + "colour": { + "color": "#FF00FFFF", + "opacity": "1" + } + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "claude-popup-7d", + "name": "Claude Code 7d details", + "render": "claude.weekly.available", + "visibility": "100", + "parent": "claude-popup-rows", + "width": "308", + "height": "80", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "claude-popup-7d-name", + "name": "7d name", + "render": "1", + "visibility": "100", + "parent": "claude-popup-7d", + "width": "154", + "height": "22", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "7 day", + "font_family": "Segoe UI", + "font_size": "15", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#E8B04AFF", + "light_color": "#B7791FFF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-7d-used", + "name": "7d value", + "render": "1", + "visibility": "100", + "parent": "claude-popup-7d", + "x": "154", + "width": "154", + "height": "22", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{claude.weekly.display:0}% {if(display.countdown, \"left\", \"used\")}", + "font_family": "Segoe UI", + "font_size": "15", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "right", + "color": { + "color": "#FFFFFFFF", + "light_color": "#1A1A1AFF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-7d-bar", + "name": "7d bar", + "render": "1", + "visibility": "100", + "parent": "claude-popup-7d", + "y": "26", + "width": "307", + "height": "8", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "progress", + "value": "claude.weekly.display", + "direction": "left_to_right", + "fill": { + "color": "#E8B04AFF", + "light_color": "#B7791FFF", + "opacity": "1" + }, + "track": { + "color": "#E8B04A47", + "light_color": "#B7791F42", + "opacity": "1" + }, + "corner_radius": "2", + "segments": 4, + "segment_gap": "1" + } + }, + { + "id": "claude-popup-7d-status-ok", + "name": "7d under pace", + "render": "claude.weekly.reset.seconds > 0 && !(claude.weekly.percentage > clamp(100 * (1 - claude.weekly.reset.seconds / (604800)), 0, 100))", + "visibility": "100", + "parent": "claude-popup-7d", + "y": "42", + "width": "228", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{clamp(100 * (1 - claude.weekly.reset.seconds / (604800)), 0, 100) - claude.weekly.percentage:0}% under pace · ~{if(display.countdown, 100 - min(100, round(claude.weekly.percentage * 100 / max(1, clamp(100 * (1 - claude.weekly.reset.seconds / (604800)), 0, 100)))), min(100, round(claude.weekly.percentage * 100 / max(1, clamp(100 * (1 - claude.weekly.reset.seconds / (604800)), 0, 100))))):0}% {if(display.countdown, \"left\", \"used\")} at reset", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#6CCB5FFF", + "light_color": "#0F7B0FFF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-7d-status-bad", + "name": "7d over pace", + "render": "claude.weekly.reset.seconds > 0 && claude.weekly.percentage > clamp(100 * (1 - claude.weekly.reset.seconds / (604800)), 0, 100) && !(claude.weekly.percentage >= 100)", + "visibility": "100", + "parent": "claude-popup-7d", + "y": "42", + "width": "228", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{claude.weekly.percentage - clamp(100 * (1 - claude.weekly.reset.seconds / (604800)), 0, 100):0}% over pace · runs out in ~{(100 - claude.weekly.percentage) * ((604800) - claude.weekly.reset.seconds) / max(0.01, claude.weekly.percentage):duration}", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FF6B5EFF", + "light_color": "#C42B1CFF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-7d-status-spent", + "name": "7d limit reached", + "render": "claude.weekly.percentage >= 100", + "visibility": "100", + "parent": "claude-popup-7d", + "y": "42", + "width": "228", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Limit reached", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FF6B5EFF", + "light_color": "#C42B1CFF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-7d-pace-label", + "name": "7d pace value", + "render": "claude.weekly.reset.seconds > 0", + "visibility": "100", + "parent": "claude-popup-7d", + "x": "228", + "y": "42", + "width": "80", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Pace {if(display.countdown, 100 - clamp(100 * (1 - claude.weekly.reset.seconds / (604800)), 0, 100), clamp(100 * (1 - claude.weekly.reset.seconds / (604800)), 0, 100)):0}%", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "right", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-7d-reset", + "name": "7d reset", + "render": "claude.weekly.reset.seconds > 0", + "visibility": "100", + "parent": "claude-popup-7d", + "y": "60", + "width": "154", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Resets in {claude.weekly.reset.seconds:duration}", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-7d-reset-at", + "name": "7d reset time", + "render": "claude.weekly.reset.seconds > 0", + "visibility": "100", + "parent": "claude-popup-7d", + "x": "154", + "y": "60", + "width": "154", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{claude.weekly.reset.unix:weekday_short} {claude.weekly.reset.unix:day} {claude.weekly.reset.unix:month_short}, {claude.weekly.reset.unix:time_short}", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "right", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-7d-no-reset", + "name": "7d no reset", + "render": "!(claude.weekly.reset.seconds > 0) && !(claude.weekly.percentage >= 100)", + "visibility": "100", + "parent": "claude-popup-7d", + "y": "42", + "width": "308", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "No reset time reported", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-7d-pace", + "name": "7d pace", + "render": "claude.weekly.reset.seconds > 0", + "visibility": "100", + "parent": "claude-popup-7d", + "x": "min(306, round(307 * if(display.countdown, 100 - clamp(100 * (1 - claude.weekly.reset.seconds / (604800)), 0, 100), clamp(100 * (1 - claude.weekly.reset.seconds / (604800)), 0, 100)) / 100)) - (min(306, round(307 * if(display.countdown, 100 - clamp(100 * (1 - claude.weekly.reset.seconds / (604800)), 0, 100), clamp(100 * (1 - claude.weekly.reset.seconds / (604800)), 0, 100)) / 100)) % 77 == 76)", + "y": "26", + "width": "1", + "height": "8", + "background": { + "type": "colour", + "colour": { + "color": "#FF00FFFF", + "opacity": "1" + } + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "claude-popup-fable", + "name": "Claude Code fable details", + "render": "claude.model.fable.available", + "visibility": "100", + "parent": "claude-popup-rows", + "width": "308", + "height": "80", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "claude-popup-fable-name", + "name": "fable name", + "render": "1", + "visibility": "100", + "parent": "claude-popup-fable", + "width": "154", + "height": "22", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Fable 7 day", + "font_family": "Segoe UI", + "font_size": "15", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#B48CF2FF", + "light_color": "#7C4DDBFF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-fable-used", + "name": "fable value", + "render": "1", + "visibility": "100", + "parent": "claude-popup-fable", + "x": "154", + "width": "154", + "height": "22", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{claude.model.fable.display:0}% {if(display.countdown, \"left\", \"used\")}", + "font_family": "Segoe UI", + "font_size": "15", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "right", + "color": { + "color": "#FFFFFFFF", + "light_color": "#1A1A1AFF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-fable-bar", + "name": "fable bar", + "render": "1", + "visibility": "100", + "parent": "claude-popup-fable", + "y": "26", + "width": "307", + "height": "8", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "progress", + "value": "claude.model.fable.display", + "direction": "left_to_right", + "fill": { + "color": "#B48CF2FF", + "light_color": "#7C4DDBFF", + "opacity": "1" + }, + "track": { + "color": "#B48CF247", + "light_color": "#7C4DDB42", + "opacity": "1" + }, + "corner_radius": "2", + "segments": 4, + "segment_gap": "1" + } + }, + { + "id": "claude-popup-fable-status-ok", + "name": "fable under pace", + "render": "claude.model.fable.reset.seconds > 0 && !(claude.model.fable.percentage > clamp(100 * (1 - claude.model.fable.reset.seconds / (604800)), 0, 100))", + "visibility": "100", + "parent": "claude-popup-fable", + "y": "42", + "width": "228", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{clamp(100 * (1 - claude.model.fable.reset.seconds / (604800)), 0, 100) - claude.model.fable.percentage:0}% under pace · ~{if(display.countdown, 100 - min(100, round(claude.model.fable.percentage * 100 / max(1, clamp(100 * (1 - claude.model.fable.reset.seconds / (604800)), 0, 100)))), min(100, round(claude.model.fable.percentage * 100 / max(1, clamp(100 * (1 - claude.model.fable.reset.seconds / (604800)), 0, 100))))):0}% {if(display.countdown, \"left\", \"used\")} at reset", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#6CCB5FFF", + "light_color": "#0F7B0FFF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-fable-status-bad", + "name": "fable over pace", + "render": "claude.model.fable.reset.seconds > 0 && claude.model.fable.percentage > clamp(100 * (1 - claude.model.fable.reset.seconds / (604800)), 0, 100) && !(claude.model.fable.percentage >= 100)", + "visibility": "100", + "parent": "claude-popup-fable", + "y": "42", + "width": "228", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{claude.model.fable.percentage - clamp(100 * (1 - claude.model.fable.reset.seconds / (604800)), 0, 100):0}% over pace · runs out in ~{(100 - claude.model.fable.percentage) * ((604800) - claude.model.fable.reset.seconds) / max(0.01, claude.model.fable.percentage):duration}", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FF6B5EFF", + "light_color": "#C42B1CFF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-fable-status-spent", + "name": "fable limit reached", + "render": "claude.model.fable.percentage >= 100", + "visibility": "100", + "parent": "claude-popup-fable", + "y": "42", + "width": "228", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Limit reached", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FF6B5EFF", + "light_color": "#C42B1CFF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-fable-pace-label", + "name": "fable pace value", + "render": "claude.model.fable.reset.seconds > 0", + "visibility": "100", + "parent": "claude-popup-fable", + "x": "228", + "y": "42", + "width": "80", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Pace {if(display.countdown, 100 - clamp(100 * (1 - claude.model.fable.reset.seconds / (604800)), 0, 100), clamp(100 * (1 - claude.model.fable.reset.seconds / (604800)), 0, 100)):0}%", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "right", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-fable-reset", + "name": "fable reset", + "render": "claude.model.fable.reset.seconds > 0", + "visibility": "100", + "parent": "claude-popup-fable", + "y": "60", + "width": "154", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Resets in {claude.model.fable.reset.seconds:duration}", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-fable-reset-at", + "name": "fable reset time", + "render": "claude.model.fable.reset.seconds > 0", + "visibility": "100", + "parent": "claude-popup-fable", + "x": "154", + "y": "60", + "width": "154", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{claude.model.fable.reset.unix:weekday_short} {claude.model.fable.reset.unix:day} {claude.model.fable.reset.unix:month_short}, {claude.model.fable.reset.unix:time_short}", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "right", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-fable-no-reset", + "name": "fable no reset", + "render": "!(claude.model.fable.reset.seconds > 0) && !(claude.model.fable.percentage >= 100)", + "visibility": "100", + "parent": "claude-popup-fable", + "y": "42", + "width": "308", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "No reset time reported", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-fable-pace", + "name": "fable pace", + "render": "claude.model.fable.reset.seconds > 0", + "visibility": "100", + "parent": "claude-popup-fable", + "x": "min(306, round(307 * if(display.countdown, 100 - clamp(100 * (1 - claude.model.fable.reset.seconds / (604800)), 0, 100), clamp(100 * (1 - claude.model.fable.reset.seconds / (604800)), 0, 100)) / 100)) - (min(306, round(307 * if(display.countdown, 100 - clamp(100 * (1 - claude.model.fable.reset.seconds / (604800)), 0, 100), clamp(100 * (1 - claude.model.fable.reset.seconds / (604800)), 0, 100)) / 100)) % 77 == 76)", + "y": "26", + "width": "1", + "height": "8", + "background": { + "type": "colour", + "colour": { + "color": "#FF00FFFF", + "opacity": "1" + } + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "claude-popup-opus", + "name": "Claude Code opus details", + "render": "claude.model.opus.available", + "visibility": "100", + "parent": "claude-popup-rows", + "width": "308", + "height": "80", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "claude-popup-opus-name", + "name": "opus name", + "render": "1", + "visibility": "100", + "parent": "claude-popup-opus", + "width": "154", + "height": "22", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Opus 7 day", + "font_family": "Segoe UI", + "font_size": "15", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#5FB7E5FF", + "light_color": "#1F78B4FF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-opus-used", + "name": "opus value", + "render": "1", + "visibility": "100", + "parent": "claude-popup-opus", + "x": "154", + "width": "154", + "height": "22", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{claude.model.opus.display:0}% {if(display.countdown, \"left\", \"used\")}", + "font_family": "Segoe UI", + "font_size": "15", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "right", + "color": { + "color": "#FFFFFFFF", + "light_color": "#1A1A1AFF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-opus-bar", + "name": "opus bar", + "render": "1", + "visibility": "100", + "parent": "claude-popup-opus", + "y": "26", + "width": "307", + "height": "8", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "progress", + "value": "claude.model.opus.display", + "direction": "left_to_right", + "fill": { + "color": "#5FB7E5FF", + "light_color": "#1F78B4FF", + "opacity": "1" + }, + "track": { + "color": "#5FB7E547", + "light_color": "#1F78B442", + "opacity": "1" + }, + "corner_radius": "2", + "segments": 4, + "segment_gap": "1" + } + }, + { + "id": "claude-popup-opus-status-ok", + "name": "opus under pace", + "render": "claude.model.opus.reset.seconds > 0 && !(claude.model.opus.percentage > clamp(100 * (1 - claude.model.opus.reset.seconds / (604800)), 0, 100))", + "visibility": "100", + "parent": "claude-popup-opus", + "y": "42", + "width": "228", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{clamp(100 * (1 - claude.model.opus.reset.seconds / (604800)), 0, 100) - claude.model.opus.percentage:0}% under pace · ~{if(display.countdown, 100 - min(100, round(claude.model.opus.percentage * 100 / max(1, clamp(100 * (1 - claude.model.opus.reset.seconds / (604800)), 0, 100)))), min(100, round(claude.model.opus.percentage * 100 / max(1, clamp(100 * (1 - claude.model.opus.reset.seconds / (604800)), 0, 100))))):0}% {if(display.countdown, \"left\", \"used\")} at reset", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#6CCB5FFF", + "light_color": "#0F7B0FFF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-opus-status-bad", + "name": "opus over pace", + "render": "claude.model.opus.reset.seconds > 0 && claude.model.opus.percentage > clamp(100 * (1 - claude.model.opus.reset.seconds / (604800)), 0, 100) && !(claude.model.opus.percentage >= 100)", + "visibility": "100", + "parent": "claude-popup-opus", + "y": "42", + "width": "228", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{claude.model.opus.percentage - clamp(100 * (1 - claude.model.opus.reset.seconds / (604800)), 0, 100):0}% over pace · runs out in ~{(100 - claude.model.opus.percentage) * ((604800) - claude.model.opus.reset.seconds) / max(0.01, claude.model.opus.percentage):duration}", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FF6B5EFF", + "light_color": "#C42B1CFF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-opus-status-spent", + "name": "opus limit reached", + "render": "claude.model.opus.percentage >= 100", + "visibility": "100", + "parent": "claude-popup-opus", + "y": "42", + "width": "228", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Limit reached", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FF6B5EFF", + "light_color": "#C42B1CFF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-opus-pace-label", + "name": "opus pace value", + "render": "claude.model.opus.reset.seconds > 0", + "visibility": "100", + "parent": "claude-popup-opus", + "x": "228", + "y": "42", + "width": "80", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Pace {if(display.countdown, 100 - clamp(100 * (1 - claude.model.opus.reset.seconds / (604800)), 0, 100), clamp(100 * (1 - claude.model.opus.reset.seconds / (604800)), 0, 100)):0}%", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "right", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-opus-reset", + "name": "opus reset", + "render": "claude.model.opus.reset.seconds > 0", + "visibility": "100", + "parent": "claude-popup-opus", + "y": "60", + "width": "154", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Resets in {claude.model.opus.reset.seconds:duration}", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-opus-reset-at", + "name": "opus reset time", + "render": "claude.model.opus.reset.seconds > 0", + "visibility": "100", + "parent": "claude-popup-opus", + "x": "154", + "y": "60", + "width": "154", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{claude.model.opus.reset.unix:weekday_short} {claude.model.opus.reset.unix:day} {claude.model.opus.reset.unix:month_short}, {claude.model.opus.reset.unix:time_short}", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "right", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-opus-no-reset", + "name": "opus no reset", + "render": "!(claude.model.opus.reset.seconds > 0) && !(claude.model.opus.percentage >= 100)", + "visibility": "100", + "parent": "claude-popup-opus", + "y": "42", + "width": "308", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "No reset time reported", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-opus-pace", + "name": "opus pace", + "render": "claude.model.opus.reset.seconds > 0", + "visibility": "100", + "parent": "claude-popup-opus", + "x": "min(306, round(307 * if(display.countdown, 100 - clamp(100 * (1 - claude.model.opus.reset.seconds / (604800)), 0, 100), clamp(100 * (1 - claude.model.opus.reset.seconds / (604800)), 0, 100)) / 100)) - (min(306, round(307 * if(display.countdown, 100 - clamp(100 * (1 - claude.model.opus.reset.seconds / (604800)), 0, 100), clamp(100 * (1 - claude.model.opus.reset.seconds / (604800)), 0, 100)) / 100)) % 77 == 76)", + "y": "26", + "width": "1", + "height": "8", + "background": { + "type": "colour", + "colour": { + "color": "#FF00FFFF", + "opacity": "1" + } + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "claude-popup-sonnet", + "name": "Claude Code sonnet details", + "render": "claude.model.sonnet.available", + "visibility": "100", + "parent": "claude-popup-rows", + "width": "308", + "height": "80", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "claude-popup-sonnet-name", + "name": "sonnet name", + "render": "1", + "visibility": "100", + "parent": "claude-popup-sonnet", + "width": "154", + "height": "22", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Sonnet 7 day", + "font_family": "Segoe UI", + "font_size": "15", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#6CCB8AFF", + "light_color": "#2E8B4EFF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-sonnet-used", + "name": "sonnet value", + "render": "1", + "visibility": "100", + "parent": "claude-popup-sonnet", + "x": "154", + "width": "154", + "height": "22", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{claude.model.sonnet.display:0}% {if(display.countdown, \"left\", \"used\")}", + "font_family": "Segoe UI", + "font_size": "15", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "right", + "color": { + "color": "#FFFFFFFF", + "light_color": "#1A1A1AFF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-sonnet-bar", + "name": "sonnet bar", + "render": "1", + "visibility": "100", + "parent": "claude-popup-sonnet", + "y": "26", + "width": "307", + "height": "8", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "progress", + "value": "claude.model.sonnet.display", + "direction": "left_to_right", + "fill": { + "color": "#6CCB8AFF", + "light_color": "#2E8B4EFF", + "opacity": "1" + }, + "track": { + "color": "#6CCB8A47", + "light_color": "#2E8B4E42", + "opacity": "1" + }, + "corner_radius": "2", + "segments": 4, + "segment_gap": "1" + } + }, + { + "id": "claude-popup-sonnet-status-ok", + "name": "sonnet under pace", + "render": "claude.model.sonnet.reset.seconds > 0 && !(claude.model.sonnet.percentage > clamp(100 * (1 - claude.model.sonnet.reset.seconds / (604800)), 0, 100))", + "visibility": "100", + "parent": "claude-popup-sonnet", + "y": "42", + "width": "228", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{clamp(100 * (1 - claude.model.sonnet.reset.seconds / (604800)), 0, 100) - claude.model.sonnet.percentage:0}% under pace · ~{if(display.countdown, 100 - min(100, round(claude.model.sonnet.percentage * 100 / max(1, clamp(100 * (1 - claude.model.sonnet.reset.seconds / (604800)), 0, 100)))), min(100, round(claude.model.sonnet.percentage * 100 / max(1, clamp(100 * (1 - claude.model.sonnet.reset.seconds / (604800)), 0, 100))))):0}% {if(display.countdown, \"left\", \"used\")} at reset", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#6CCB5FFF", + "light_color": "#0F7B0FFF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-sonnet-status-bad", + "name": "sonnet over pace", + "render": "claude.model.sonnet.reset.seconds > 0 && claude.model.sonnet.percentage > clamp(100 * (1 - claude.model.sonnet.reset.seconds / (604800)), 0, 100) && !(claude.model.sonnet.percentage >= 100)", + "visibility": "100", + "parent": "claude-popup-sonnet", + "y": "42", + "width": "228", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{claude.model.sonnet.percentage - clamp(100 * (1 - claude.model.sonnet.reset.seconds / (604800)), 0, 100):0}% over pace · runs out in ~{(100 - claude.model.sonnet.percentage) * ((604800) - claude.model.sonnet.reset.seconds) / max(0.01, claude.model.sonnet.percentage):duration}", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FF6B5EFF", + "light_color": "#C42B1CFF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-sonnet-status-spent", + "name": "sonnet limit reached", + "render": "claude.model.sonnet.percentage >= 100", + "visibility": "100", + "parent": "claude-popup-sonnet", + "y": "42", + "width": "228", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Limit reached", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FF6B5EFF", + "light_color": "#C42B1CFF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-sonnet-pace-label", + "name": "sonnet pace value", + "render": "claude.model.sonnet.reset.seconds > 0", + "visibility": "100", + "parent": "claude-popup-sonnet", + "x": "228", + "y": "42", + "width": "80", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Pace {if(display.countdown, 100 - clamp(100 * (1 - claude.model.sonnet.reset.seconds / (604800)), 0, 100), clamp(100 * (1 - claude.model.sonnet.reset.seconds / (604800)), 0, 100)):0}%", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "right", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-sonnet-reset", + "name": "sonnet reset", + "render": "claude.model.sonnet.reset.seconds > 0", + "visibility": "100", + "parent": "claude-popup-sonnet", + "y": "60", + "width": "154", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Resets in {claude.model.sonnet.reset.seconds:duration}", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-sonnet-reset-at", + "name": "sonnet reset time", + "render": "claude.model.sonnet.reset.seconds > 0", + "visibility": "100", + "parent": "claude-popup-sonnet", + "x": "154", + "y": "60", + "width": "154", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{claude.model.sonnet.reset.unix:weekday_short} {claude.model.sonnet.reset.unix:day} {claude.model.sonnet.reset.unix:month_short}, {claude.model.sonnet.reset.unix:time_short}", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "right", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-sonnet-no-reset", + "name": "sonnet no reset", + "render": "!(claude.model.sonnet.reset.seconds > 0) && !(claude.model.sonnet.percentage >= 100)", + "visibility": "100", + "parent": "claude-popup-sonnet", + "y": "42", + "width": "308", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "No reset time reported", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-sonnet-pace", + "name": "sonnet pace", + "render": "claude.model.sonnet.reset.seconds > 0", + "visibility": "100", + "parent": "claude-popup-sonnet", + "x": "min(306, round(307 * if(display.countdown, 100 - clamp(100 * (1 - claude.model.sonnet.reset.seconds / (604800)), 0, 100), clamp(100 * (1 - claude.model.sonnet.reset.seconds / (604800)), 0, 100)) / 100)) - (min(306, round(307 * if(display.countdown, 100 - clamp(100 * (1 - claude.model.sonnet.reset.seconds / (604800)), 0, 100), clamp(100 * (1 - claude.model.sonnet.reset.seconds / (604800)), 0, 100)) / 100)) % 77 == 76)", + "y": "26", + "width": "1", + "height": "8", + "background": { + "type": "colour", + "colour": { + "color": "#FF00FFFF", + "opacity": "1" + } + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "claude-popup-credits", + "name": "Claude Code credits details", + "render": "claude.credits.available", + "visibility": "100", + "parent": "claude-popup-rows", + "width": "308", + "height": "80", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "claude-popup-credits-name", + "name": "credits name", + "render": "1", + "visibility": "100", + "parent": "claude-popup-credits", + "width": "154", + "height": "22", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Extra usage", + "font_family": "Segoe UI", + "font_size": "15", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#C9CED6FF", + "light_color": "#6B7480FF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-credits-used", + "name": "credits value", + "render": "1", + "visibility": "100", + "parent": "claude-popup-credits", + "x": "154", + "width": "154", + "height": "22", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{claude.credits.display:0}% {if(display.countdown, \"left\", \"used\")}", + "font_family": "Segoe UI", + "font_size": "15", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "right", + "color": { + "color": "#FFFFFFFF", + "light_color": "#1A1A1AFF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-credits-bar", + "name": "credits bar", + "render": "1", + "visibility": "100", + "parent": "claude-popup-credits", + "y": "26", + "width": "307", + "height": "8", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "progress", + "value": "claude.credits.display", + "direction": "left_to_right", + "fill": { + "color": "#C9CED6FF", + "light_color": "#6B7480FF", + "opacity": "1" + }, + "track": { + "color": "#C9CED647", + "light_color": "#6B748042", + "opacity": "1" + }, + "corner_radius": "2", + "segments": 4, + "segment_gap": "1" + } + }, + { + "id": "claude-popup-credits-balance", + "name": "credits balance", + "render": "1", + "visibility": "100", + "parent": "claude-popup-credits", + "y": "42", + "width": "308", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "${claude.credits.balance:0.00} left of ${claude.credits.total:0.00}", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FFFFFFFF", + "light_color": "#1A1A1AFF", + "opacity": "1" + } + } + }, + { + "id": "claude-popup-credits-note", + "name": "credits note", + "render": "1", + "visibility": "100", + "parent": "claude-popup-credits", + "y": "60", + "width": "308", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "In use while a plan limit is reached", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + } + ] + }, + { + "id": "codex-popup", + "name": "Codex flyout", + "render": "0", + "visibility": "100", + "placement": { + "reference": { + "region": "system_tray", + "display": 0 + }, + "nest": "floating", + "horizontal": "left", + "vertical": "top", + "surface_horizontal": "right", + "surface_vertical": "bottom", + "offset_x": 2, + "offset_x_expression": "6 - 4", + "offset_y": -8 + }, + "width": "340", + "height": "16 + 40 + 12 + if((codex.five_hour.available + codex.weekly.available + codex.credits.available) == 0, 24, (codex.five_hour.available + codex.weekly.available + codex.credits.available) * 80 + max(0, (codex.five_hour.available + codex.weekly.available + codex.credits.available) - 1) * 12) + 16", + "background": { + "type": "colour", + "colour": { + "color": "#000000", + "opacity": "0" + } + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + }, + "children": [ + { + "id": "codex-popup-bg", + "name": "Flyout background", + "render": "1", + "visibility": "100", + "width": "canvas.width", + "height": "canvas.height", + "background": { + "type": "colour", + "colour": { + "color": "#2B2B2BFF", + "light_color": "#F9F9F9FF", + "opacity": "1" + } + }, + "border": { + "color": { + "color": "#3C3C3CFF", + "light_color": "#E0E0E0FF", + "opacity": "1" + }, + "width": "1" + }, + "corner_radius": "8", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "codex-popup-mark", + "name": "Flyout mark", + "render": "1", + "visibility": "100", + "x": "16", + "y": "22", + "width": "28", + "height": "28", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "provider_mark", + "provider": "codex", + "color": { + "color": "#FFFFFFFF", + "light_color": "#1A1A1AFF", + "opacity": "1" + } + } + }, + { + "id": "codex-popup-title", + "name": "Flyout title", + "render": "1", + "visibility": "100", + "x": "54", + "y": "16", + "width": "180", + "height": "22", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Codex", + "font_family": "Segoe UI", + "font_size": "16", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FFFFFFFF", + "light_color": "#1A1A1AFF", + "opacity": "1" + } + } + }, + { + "id": "codex-popup-vendor", + "name": "Flyout vendor", + "render": "1", + "visibility": "100", + "x": "54", + "y": "38", + "width": "270", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "OpenAI{if(codex.account.name != \"\" && codex.account.name != \"Default\", \" · \", \"\")}{if(codex.account.name != \"\" && codex.account.name != \"Default\", codex.account.name, \"\")}", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "codex-popup-stale", + "name": "Flyout last known", + "render": "codex.stale", + "visibility": "100", + "x": "234", + "y": "18", + "width": "90", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Last known", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "right", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "codex-popup-waiting", + "name": "Flyout waiting", + "render": "(codex.five_hour.available + codex.weekly.available + codex.credits.available) == 0 && data.loading", + "visibility": "100", + "x": "16", + "y": "68", + "width": "308", + "height": "20", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Waiting for usage data", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "codex-popup-error", + "name": "Flyout error", + "render": "(codex.five_hour.available + codex.weekly.available + codex.credits.available) == 0 && data.has_error", + "visibility": "100", + "x": "16", + "y": "68", + "width": "308", + "height": "20", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Couldn't load usage · retrying", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FF6B5EFF", + "light_color": "#C42B1CFF", + "opacity": "1" + } + } + }, + { + "id": "codex-popup-none", + "name": "Flyout none", + "render": "(codex.five_hour.available + codex.weekly.available + codex.credits.available) == 0 && !data.loading && !data.has_error", + "visibility": "100", + "x": "16", + "y": "68", + "width": "308", + "height": "20", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "No usage reported for this account", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "codex-popup-rows", + "name": "Flyout rows", + "render": "1", + "visibility": "100", + "x": "16", + "y": "68", + "width": "308", + "height": "canvas.height - 84", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "column", + "align": "start", + "gap": "12", + "content": { + "type": "none" + } + }, + { + "id": "codex-popup-5h", + "name": "Codex 5h details", + "render": "codex.five_hour.available", + "visibility": "100", + "parent": "codex-popup-rows", + "width": "308", + "height": "80", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "codex-popup-5h-name", + "name": "5h name", + "render": "1", + "visibility": "100", + "parent": "codex-popup-5h", + "width": "154", + "height": "22", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "5 hour", + "font_family": "Segoe UI", + "font_size": "15", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#2FC79BFF", + "light_color": "#0E8A6BFF", + "opacity": "1" + } + } + }, + { + "id": "codex-popup-5h-used", + "name": "5h value", + "render": "1", + "visibility": "100", + "parent": "codex-popup-5h", + "x": "154", + "width": "154", + "height": "22", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{codex.five_hour.display:0}% {if(display.countdown, \"left\", \"used\")}", + "font_family": "Segoe UI", + "font_size": "15", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "right", + "color": { + "color": "#FFFFFFFF", + "light_color": "#1A1A1AFF", + "opacity": "1" + } + } + }, + { + "id": "codex-popup-5h-bar", + "name": "5h bar", + "render": "1", + "visibility": "100", + "parent": "codex-popup-5h", + "y": "26", + "width": "307", + "height": "8", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "progress", + "value": "codex.five_hour.display", + "direction": "left_to_right", + "fill": { + "color": "#2FC79BFF", + "light_color": "#0E8A6BFF", + "opacity": "1" + }, + "track": { + "color": "#2FC79B47", + "light_color": "#0E8A6B42", + "opacity": "1" + }, + "corner_radius": "2", + "segments": 4, + "segment_gap": "1" + } + }, + { + "id": "codex-popup-5h-status-ok", + "name": "5h under pace", + "render": "codex.five_hour.reset.seconds > 0 && !(codex.five_hour.percentage > clamp(100 * (1 - codex.five_hour.reset.seconds / (18000)), 0, 100))", + "visibility": "100", + "parent": "codex-popup-5h", + "y": "42", + "width": "228", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{clamp(100 * (1 - codex.five_hour.reset.seconds / (18000)), 0, 100) - codex.five_hour.percentage:0}% under pace · ~{if(display.countdown, 100 - min(100, round(codex.five_hour.percentage * 100 / max(1, clamp(100 * (1 - codex.five_hour.reset.seconds / (18000)), 0, 100)))), min(100, round(codex.five_hour.percentage * 100 / max(1, clamp(100 * (1 - codex.five_hour.reset.seconds / (18000)), 0, 100))))):0}% {if(display.countdown, \"left\", \"used\")} at reset", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#6CCB5FFF", + "light_color": "#0F7B0FFF", + "opacity": "1" + } + } + }, + { + "id": "codex-popup-5h-status-bad", + "name": "5h over pace", + "render": "codex.five_hour.reset.seconds > 0 && codex.five_hour.percentage > clamp(100 * (1 - codex.five_hour.reset.seconds / (18000)), 0, 100) && !(codex.five_hour.percentage >= 100)", + "visibility": "100", + "parent": "codex-popup-5h", + "y": "42", + "width": "228", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{codex.five_hour.percentage - clamp(100 * (1 - codex.five_hour.reset.seconds / (18000)), 0, 100):0}% over pace · runs out in ~{(100 - codex.five_hour.percentage) * ((18000) - codex.five_hour.reset.seconds) / max(0.01, codex.five_hour.percentage):duration}", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FF6B5EFF", + "light_color": "#C42B1CFF", + "opacity": "1" + } + } + }, + { + "id": "codex-popup-5h-status-spent", + "name": "5h limit reached", + "render": "codex.five_hour.percentage >= 100", + "visibility": "100", + "parent": "codex-popup-5h", + "y": "42", + "width": "228", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Limit reached", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FF6B5EFF", + "light_color": "#C42B1CFF", + "opacity": "1" + } + } + }, + { + "id": "codex-popup-5h-pace-label", + "name": "5h pace value", + "render": "codex.five_hour.reset.seconds > 0", + "visibility": "100", + "parent": "codex-popup-5h", + "x": "228", + "y": "42", + "width": "80", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Pace {if(display.countdown, 100 - clamp(100 * (1 - codex.five_hour.reset.seconds / (18000)), 0, 100), clamp(100 * (1 - codex.five_hour.reset.seconds / (18000)), 0, 100)):0}%", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "right", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "codex-popup-5h-reset", + "name": "5h reset", + "render": "codex.five_hour.reset.seconds > 0", + "visibility": "100", + "parent": "codex-popup-5h", + "y": "60", + "width": "154", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Resets in {codex.five_hour.reset.seconds:duration}", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "codex-popup-5h-reset-at", + "name": "5h reset time", + "render": "codex.five_hour.reset.seconds > 0", + "visibility": "100", + "parent": "codex-popup-5h", + "x": "154", + "y": "60", + "width": "154", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{codex.five_hour.reset.unix:time_short}", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "right", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "codex-popup-5h-no-reset", + "name": "5h no reset", + "render": "!(codex.five_hour.reset.seconds > 0) && !(codex.five_hour.percentage >= 100)", + "visibility": "100", + "parent": "codex-popup-5h", + "y": "42", + "width": "308", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "No reset time reported", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "codex-popup-5h-pace", + "name": "5h pace", + "render": "codex.five_hour.reset.seconds > 0", + "visibility": "100", + "parent": "codex-popup-5h", + "x": "min(306, round(307 * if(display.countdown, 100 - clamp(100 * (1 - codex.five_hour.reset.seconds / (18000)), 0, 100), clamp(100 * (1 - codex.five_hour.reset.seconds / (18000)), 0, 100)) / 100)) - (min(306, round(307 * if(display.countdown, 100 - clamp(100 * (1 - codex.five_hour.reset.seconds / (18000)), 0, 100), clamp(100 * (1 - codex.five_hour.reset.seconds / (18000)), 0, 100)) / 100)) % 77 == 76)", + "y": "26", + "width": "1", + "height": "8", + "background": { + "type": "colour", + "colour": { + "color": "#FF00FFFF", + "opacity": "1" + } + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "codex-popup-7d", + "name": "Codex 7d details", + "render": "codex.weekly.available", + "visibility": "100", + "parent": "codex-popup-rows", + "width": "308", + "height": "80", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "codex-popup-7d-name", + "name": "7d name", + "render": "1", + "visibility": "100", + "parent": "codex-popup-7d", + "width": "154", + "height": "22", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{if(codex.weekly.label == \"30d\", \"30 day\", \"7 day\")}", + "font_family": "Segoe UI", + "font_size": "15", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#4EA3F7FF", + "light_color": "#2B7BD6FF", + "opacity": "1" + } + } + }, + { + "id": "codex-popup-7d-used", + "name": "7d value", + "render": "1", + "visibility": "100", + "parent": "codex-popup-7d", + "x": "154", + "width": "154", + "height": "22", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{codex.weekly.display:0}% {if(display.countdown, \"left\", \"used\")}", + "font_family": "Segoe UI", + "font_size": "15", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "right", + "color": { + "color": "#FFFFFFFF", + "light_color": "#1A1A1AFF", + "opacity": "1" + } + } + }, + { + "id": "codex-popup-7d-bar", + "name": "7d bar", + "render": "1", + "visibility": "100", + "parent": "codex-popup-7d", + "y": "26", + "width": "307", + "height": "8", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "progress", + "value": "codex.weekly.display", + "direction": "left_to_right", + "fill": { + "color": "#4EA3F7FF", + "light_color": "#2B7BD6FF", + "opacity": "1" + }, + "track": { + "color": "#4EA3F747", + "light_color": "#2B7BD642", + "opacity": "1" + }, + "corner_radius": "2", + "segments": 4, + "segment_gap": "1" + } + }, + { + "id": "codex-popup-7d-status-ok", + "name": "7d under pace", + "render": "codex.weekly.reset.seconds > 0 && !(codex.weekly.percentage > clamp(100 * (1 - codex.weekly.reset.seconds / (if(codex.weekly.label == \"30d\", 2592000, 604800))), 0, 100))", + "visibility": "100", + "parent": "codex-popup-7d", + "y": "42", + "width": "228", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{clamp(100 * (1 - codex.weekly.reset.seconds / (if(codex.weekly.label == \"30d\", 2592000, 604800))), 0, 100) - codex.weekly.percentage:0}% under pace · ~{if(display.countdown, 100 - min(100, round(codex.weekly.percentage * 100 / max(1, clamp(100 * (1 - codex.weekly.reset.seconds / (if(codex.weekly.label == \"30d\", 2592000, 604800))), 0, 100)))), min(100, round(codex.weekly.percentage * 100 / max(1, clamp(100 * (1 - codex.weekly.reset.seconds / (if(codex.weekly.label == \"30d\", 2592000, 604800))), 0, 100))))):0}% {if(display.countdown, \"left\", \"used\")} at reset", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#6CCB5FFF", + "light_color": "#0F7B0FFF", + "opacity": "1" + } + } + }, + { + "id": "codex-popup-7d-status-bad", + "name": "7d over pace", + "render": "codex.weekly.reset.seconds > 0 && codex.weekly.percentage > clamp(100 * (1 - codex.weekly.reset.seconds / (if(codex.weekly.label == \"30d\", 2592000, 604800))), 0, 100) && !(codex.weekly.percentage >= 100)", + "visibility": "100", + "parent": "codex-popup-7d", + "y": "42", + "width": "228", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{codex.weekly.percentage - clamp(100 * (1 - codex.weekly.reset.seconds / (if(codex.weekly.label == \"30d\", 2592000, 604800))), 0, 100):0}% over pace · runs out in ~{(100 - codex.weekly.percentage) * ((if(codex.weekly.label == \"30d\", 2592000, 604800)) - codex.weekly.reset.seconds) / max(0.01, codex.weekly.percentage):duration}", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FF6B5EFF", + "light_color": "#C42B1CFF", + "opacity": "1" + } + } + }, + { + "id": "codex-popup-7d-status-spent", + "name": "7d limit reached", + "render": "codex.weekly.percentage >= 100", + "visibility": "100", + "parent": "codex-popup-7d", + "y": "42", + "width": "228", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Limit reached", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FF6B5EFF", + "light_color": "#C42B1CFF", + "opacity": "1" + } + } + }, + { + "id": "codex-popup-7d-pace-label", + "name": "7d pace value", + "render": "codex.weekly.reset.seconds > 0", + "visibility": "100", + "parent": "codex-popup-7d", + "x": "228", + "y": "42", + "width": "80", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Pace {if(display.countdown, 100 - clamp(100 * (1 - codex.weekly.reset.seconds / (if(codex.weekly.label == \"30d\", 2592000, 604800))), 0, 100), clamp(100 * (1 - codex.weekly.reset.seconds / (if(codex.weekly.label == \"30d\", 2592000, 604800))), 0, 100)):0}%", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "right", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "codex-popup-7d-reset", + "name": "7d reset", + "render": "codex.weekly.reset.seconds > 0", + "visibility": "100", + "parent": "codex-popup-7d", + "y": "60", + "width": "154", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Resets in {codex.weekly.reset.seconds:duration}", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "codex-popup-7d-reset-at", + "name": "7d reset time", + "render": "codex.weekly.reset.seconds > 0", + "visibility": "100", + "parent": "codex-popup-7d", + "x": "154", + "y": "60", + "width": "154", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{codex.weekly.reset.unix:weekday_short} {codex.weekly.reset.unix:day} {codex.weekly.reset.unix:month_short}, {codex.weekly.reset.unix:time_short}", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "right", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "codex-popup-7d-no-reset", + "name": "7d no reset", + "render": "!(codex.weekly.reset.seconds > 0) && !(codex.weekly.percentage >= 100)", + "visibility": "100", + "parent": "codex-popup-7d", + "y": "42", + "width": "308", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "No reset time reported", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + }, + { + "id": "codex-popup-7d-pace", + "name": "7d pace", + "render": "codex.weekly.reset.seconds > 0", + "visibility": "100", + "parent": "codex-popup-7d", + "x": "min(306, round(307 * if(display.countdown, 100 - clamp(100 * (1 - codex.weekly.reset.seconds / (if(codex.weekly.label == \"30d\", 2592000, 604800))), 0, 100), clamp(100 * (1 - codex.weekly.reset.seconds / (if(codex.weekly.label == \"30d\", 2592000, 604800))), 0, 100)) / 100)) - (min(306, round(307 * if(display.countdown, 100 - clamp(100 * (1 - codex.weekly.reset.seconds / (if(codex.weekly.label == \"30d\", 2592000, 604800))), 0, 100), clamp(100 * (1 - codex.weekly.reset.seconds / (if(codex.weekly.label == \"30d\", 2592000, 604800))), 0, 100)) / 100)) % 77 == 76)", + "y": "26", + "width": "1", + "height": "8", + "background": { + "type": "colour", + "colour": { + "color": "#FF00FFFF", + "opacity": "1" + } + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "codex-popup-credits", + "name": "Codex credits details", + "render": "codex.credits.available", + "visibility": "100", + "parent": "codex-popup-rows", + "width": "308", + "height": "80", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "codex-popup-credits-name", + "name": "credits name", + "render": "1", + "visibility": "100", + "parent": "codex-popup-credits", + "width": "154", + "height": "22", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Credits", + "font_family": "Segoe UI", + "font_size": "15", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#F2C14EFF", + "light_color": "#A87400FF", + "opacity": "1" + } + } + }, + { + "id": "codex-popup-credits-used", + "name": "credits value", + "render": "1", + "visibility": "100", + "parent": "codex-popup-credits", + "x": "154", + "width": "154", + "height": "22", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{codex.credits.display:0}% {if(display.countdown, \"left\", \"used\")}", + "font_family": "Segoe UI", + "font_size": "15", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "right", + "color": { + "color": "#FFFFFFFF", + "light_color": "#1A1A1AFF", + "opacity": "1" + } + } + }, + { + "id": "codex-popup-credits-bar", + "name": "credits bar", + "render": "1", + "visibility": "100", + "parent": "codex-popup-credits", + "y": "26", + "width": "307", + "height": "8", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "progress", + "value": "codex.credits.display", + "direction": "left_to_right", + "fill": { + "color": "#F2C14EFF", + "light_color": "#A87400FF", + "opacity": "1" + }, + "track": { + "color": "#F2C14E47", + "light_color": "#A8740042", + "opacity": "1" + }, + "corner_radius": "2", + "segments": 4, + "segment_gap": "1" + } + }, + { + "id": "codex-popup-credits-balance", + "name": "credits balance", + "render": "1", + "visibility": "100", + "parent": "codex-popup-credits", + "y": "42", + "width": "308", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "${codex.credits.balance:0.00} left of ${codex.credits.total:0.00}", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FFFFFFFF", + "light_color": "#1A1A1AFF", + "opacity": "1" + } + } + }, + { + "id": "codex-popup-credits-note", + "name": "credits note", + "render": "1", + "visibility": "100", + "parent": "codex-popup-credits", + "y": "60", + "width": "308", + "height": "18", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "In use while a plan limit is reached", + "font_family": "Segoe UI", + "font_size": "13", + "weight": "regular", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FFFFFF9E", + "light_color": "#1A1A1A9E", + "opacity": "1" + } + } + } + ] + }, + { + "id": "claude-tray-icon", + "name": "Claude Code usage", + "render": "providers.claude.enabled", + "mouse_events": { + "click": "toggle(\"main\", render)", + "double_click": "toggle(\"main\", render)", + "right_click": "show_context_menu(\"classic-v1\")" + }, + "placement": { + "nest": "tray_icon" + }, + "width": "64", + "height": "64", + "background": { + "type": "colour", + "colour": { + "color": "#D97757FF" + } + }, + "corner_radius": "1", + "children": [ + { + "id": "claude-tray-70-color", + "name": "Claude 50 to 70 percent colour transition", + "render": "claude.headline.percentage > 50", + "parent": "claude-tray-icon", + "width": "64", + "height": "64", + "background": { + "type": "colour", + "colour": { + "color": "#D08540FF", + "opacity": "clamp((claude.session.percentage - 50) / 20, 0, 1)" + } + }, + "corner_radius": "1" + }, + { + "id": "claude-tray-85-color", + "name": "Claude 70 to 85 percent colour transition", + "render": "claude.headline.percentage > 70", + "parent": "claude-tray-icon", + "width": "64", + "height": "64", + "background": { + "type": "colour", + "colour": { + "color": "#CC8C20FF", + "opacity": "clamp((claude.session.percentage - 70) / 15, 0, 1)" + } + }, + "corner_radius": "1" + }, + { + "id": "claude-tray-95-color", + "name": "Claude 85 to 95 percent colour transition", + "render": "claude.headline.percentage > 85", + "parent": "claude-tray-icon", + "width": "64", + "height": "64", + "background": { + "type": "colour", + "colour": { + "color": "#C45020FF", + "opacity": "clamp((claude.session.percentage - 85) / 10, 0, 1)" + } + }, + "corner_radius": "1" + }, + { + "id": "claude-tray-100-color", + "name": "Claude 95 to 100 percent colour transition", + "render": "claude.headline.percentage > 95", + "parent": "claude-tray-icon", + "width": "64", + "height": "64", + "background": { + "type": "colour", + "colour": { + "color": "#B82020FF", + "opacity": "clamp((claude.session.percentage - 95) / 5, 0, 1)" + } + }, + "corner_radius": "1" + }, + { + "id": "claude-tray-one-digit", + "name": "Claude one-digit percentage", + "render": "(data.poll_ok && claude.available && claude.headline.display < 9.5) && claude.credits.available == 0", + "parent": "claude-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "{claude.headline.display:0}", + "font_family": "Arial Bold", + "font_size": "50", + "weight": "bold", + "align": "center", + "color": { + "color": "#FFFFFFFF" + } + } + }, + { + "id": "claude-tray-two-digits", + "name": "Claude two-digit percentage", + "render": "(data.poll_ok && claude.available && claude.headline.display >= 9.5 && claude.headline.display < 99.5) && claude.credits.available == 0", + "parent": "claude-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "{claude.headline.display:0}", + "font_family": "Arial Bold", + "font_size": "42", + "weight": "bold", + "align": "center", + "color": { + "color": "#FFFFFFFF" + } + } + }, + { + "id": "claude-tray-three-digits", + "name": "Claude three-digit percentage", + "render": "(data.poll_ok && claude.available && claude.headline.display >= 99.5) && claude.credits.available == 0", + "parent": "claude-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "{claude.headline.display:0}", + "font_family": "Arial Bold", + "font_size": "30", + "weight": "bold", + "align": "center", + "color": { + "color": "#FFFFFFFF" + } + } + }, + { + "id": "claude-tray-credit-one-digit", + "name": "claude credit balance badge", + "render": "data.poll_ok && claude.available && claude.credits.available && claude.credits.balance < 9.5", + "parent": "claude-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "{claude.credits.balance:0}", + "font_family": "Arial Bold", + "font_size": "50", + "weight": "bold", + "align": "center", + "color": { + "color": "#FFFFFFFF" + } + } + }, + { + "id": "claude-tray-credit-two-digits", + "name": "claude credit balance badge", + "render": "data.poll_ok && claude.available && claude.credits.available && claude.credits.balance >= 9.5 && claude.credits.balance < 99.5", + "parent": "claude-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "{claude.credits.balance:0}", + "font_family": "Arial Bold", + "font_size": "42", + "weight": "bold", + "align": "center", + "color": { + "color": "#FFFFFFFF" + } + } + }, + { + "id": "claude-tray-credit-three-digits", + "name": "claude credit balance badge", + "render": "data.poll_ok && claude.available && claude.credits.available && claude.credits.balance >= 99.5 && claude.credits.balance < 999.5", + "parent": "claude-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "{claude.credits.balance:0}", + "font_family": "Arial Bold", + "font_size": "30", + "weight": "bold", + "align": "center", + "color": { + "color": "#FFFFFFFF" + } + } + }, + { + "id": "claude-tray-credit-thousands", + "name": "claude credit balance badge", + "render": "data.poll_ok && claude.available && claude.credits.available && claude.credits.balance >= 999.5", + "parent": "claude-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "{claude.credits.balance / 1000:0.0}k", + "font_family": "Arial Bold", + "font_size": "30", + "weight": "bold", + "align": "center", + "color": { + "color": "#FFFFFFFF" + } + } + } + ] + }, + { + "id": "codex-tray-icon", + "name": "Codex usage", + "render": "providers.codex.enabled", + "mouse_events": { + "click": "toggle(\"main\", render)", + "double_click": "toggle(\"main\", render)", + "right_click": "show_context_menu(\"classic-v1\")" + }, + "placement": { + "nest": "tray_icon" + }, + "width": "64", + "height": "64", + "background": { + "type": "colour", + "colour": { + "color": "#FFFFFFFF" + } + }, + "corner_radius": "3", + "children": [ + { + "id": "codex-tray-high-outline", + "name": "Codex high-usage dark outline", + "render": "codex.headline.percentage >= 90", + "parent": "codex-tray-icon", + "width": "64", + "height": "64", + "background": { + "type": "colour", + "colour": { + "color": "#111111FF" + } + }, + "corner_radius": "3" + }, + { + "id": "codex-tray-low-fill", + "name": "Codex normal dark fill", + "render": "codex.headline.percentage < 90", + "parent": "codex-tray-icon", + "x": "3", + "y": "3", + "width": "58", + "height": "58", + "background": { + "type": "colour", + "colour": { + "color": "#111111FF" + } + }, + "corner_radius": "1" + }, + { + "id": "codex-tray-high-fill", + "name": "Codex high-usage white fill", + "render": "codex.headline.percentage >= 90", + "parent": "codex-tray-icon", + "x": "3", + "y": "3", + "width": "58", + "height": "58", + "background": { + "type": "colour", + "colour": { + "color": "#FFFFFFFF" + } + }, + "corner_radius": "1" + }, + { + "id": "codex-tray-placeholder", + "name": "Codex loading placeholder", + "render": "data.poll_ok == 0 || codex.available == 0", + "parent": "codex-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "C", + "font_family": "Arial Bold", + "font_size": "50", + "weight": "bold", + "align": "center", + "color": { + "color": "#FFFFFFFF" + } + } + }, + { + "id": "codex-tray-low-one-digit", + "name": "Codex normal one-digit percentage", + "render": "(data.poll_ok && codex.available && codex.headline.display < 9.5 && codex.headline.percentage < 90) && codex.credits.available == 0", + "parent": "codex-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "{codex.headline.display:0}", + "font_family": "Arial Bold", + "font_size": "50", + "weight": "bold", + "align": "center", + "color": { + "color": "#FFFFFFFF" + } + } + }, + { + "id": "codex-tray-low-two-digits", + "name": "Codex normal two-digit percentage", + "render": "(data.poll_ok && codex.available && codex.headline.display >= 9.5 && codex.headline.display < 99.5 && codex.headline.percentage < 90) && codex.credits.available == 0", + "parent": "codex-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "{codex.headline.display:0}", + "font_family": "Arial Bold", + "font_size": "42", + "weight": "bold", + "align": "center", + "color": { + "color": "#FFFFFFFF" + } + } + }, + { + "id": "codex-tray-low-three-digits", + "name": "Codex normal three-digit percentage", + "render": "(data.poll_ok && codex.available && codex.headline.display >= 99.5 && codex.headline.percentage < 90) && codex.credits.available == 0", + "parent": "codex-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "{codex.headline.display:0}", + "font_family": "Arial Bold", + "font_size": "30", + "weight": "bold", + "align": "center", + "color": { + "color": "#FFFFFFFF" + } + } + }, + { + "id": "codex-tray-high-one-digit", + "name": "Codex high-usage one-digit percentage", + "render": "(data.poll_ok && codex.available && codex.headline.display < 9.5 && codex.headline.percentage >= 90) && codex.credits.available == 0", + "parent": "codex-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "{codex.headline.display:0}", + "font_family": "Arial Bold", + "font_size": "50", + "weight": "bold", + "align": "center", + "color": { + "color": "#111111FF" + } + } + }, + { + "id": "codex-tray-high-two-digits", + "name": "Codex high-usage two-digit percentage", + "render": "(data.poll_ok && codex.available && codex.headline.display >= 9.5 && codex.headline.display < 99.5 && codex.headline.percentage >= 90) && codex.credits.available == 0", + "parent": "codex-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "{codex.headline.display:0}", + "font_family": "Arial Bold", + "font_size": "42", + "weight": "bold", + "align": "center", + "color": { + "color": "#111111FF" + } + } + }, + { + "id": "codex-tray-high-three-digits", + "name": "Codex high-usage three-digit percentage", + "render": "(data.poll_ok && codex.available && codex.headline.display >= 99.5 && codex.headline.percentage >= 90) && codex.credits.available == 0", + "parent": "codex-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "{codex.headline.display:0}", + "font_family": "Arial Bold", + "font_size": "30", + "weight": "bold", + "align": "center", + "color": { + "color": "#111111FF" + } + } + }, + { + "id": "codex-tray-credit-one-digit", + "name": "codex credit balance badge", + "render": "data.poll_ok && codex.available && codex.credits.available && codex.credits.balance < 9.5", + "parent": "codex-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "{codex.credits.balance:0}", + "font_family": "Arial Bold", + "font_size": "50", + "weight": "bold", + "align": "center", + "color": { + "color": "#FFFFFFFF" + } + } + }, + { + "id": "codex-tray-credit-two-digits", + "name": "codex credit balance badge", + "render": "data.poll_ok && codex.available && codex.credits.available && codex.credits.balance >= 9.5 && codex.credits.balance < 99.5", + "parent": "codex-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "{codex.credits.balance:0}", + "font_family": "Arial Bold", + "font_size": "42", + "weight": "bold", + "align": "center", + "color": { + "color": "#FFFFFFFF" + } + } + }, + { + "id": "codex-tray-credit-three-digits", + "name": "codex credit balance badge", + "render": "data.poll_ok && codex.available && codex.credits.available && codex.credits.balance >= 99.5 && codex.credits.balance < 999.5", + "parent": "codex-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "{codex.credits.balance:0}", + "font_family": "Arial Bold", + "font_size": "30", + "weight": "bold", + "align": "center", + "color": { + "color": "#111111FF" + } + } + }, + { + "id": "codex-tray-credit-thousands", + "name": "codex credit balance badge", + "render": "data.poll_ok && codex.available && codex.credits.available && codex.credits.balance >= 999.5", + "parent": "codex-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "{codex.credits.balance / 1000:0.0}k", + "font_family": "Arial Bold", + "font_size": "30", + "weight": "bold", + "align": "center", + "color": { + "color": "#111111FF" + } + } + } + ] + } + ] +} diff --git a/src/ui/theme.rs b/src/ui/theme.rs index bb99d411..847af8c4 100644 --- a/src/ui/theme.rs +++ b/src/ui/theme.rs @@ -29,6 +29,11 @@ const UI_FALLBACK_FONT_BYTES: &[u8] = include_bytes!(concat!(env!("OUT_DIR"), "/ /// flattening to clockwise-wound, non-overlapping contours first, or counters /// such as the Codex terminal and the OpenCode ring fill in solid. /// +/// The font also maps U+0020 to an empty glyph. GDI, which draws theme +/// provider-logo layers, treats a font whose characters all sit in +/// U+F000..U+F0FF as a symbol font and then finds none of its glyphs by +/// codepoint, so keep that space when the font is rebuilt. +/// /// | Codepoint | Mark | Source artwork | /// | --------- | ----------- | -------------------------------------- | /// | U+F000 | GitHub | Simple Icons (CC0-1.0) | diff --git a/src/widget_font.rs b/src/widget_font.rs index 9233636c..17d889d4 100644 --- a/src/widget_font.rs +++ b/src/widget_font.rs @@ -38,6 +38,20 @@ pub(crate) fn segoe_ui_family(weight: i32) -> &'static str { } } +/// GDI family of the dashboard's provider brand marks, loaded privately for +/// theme provider-mark layers. The font holds only private-use codepoints. +pub(crate) fn brand_mark_family() -> &'static str { + static LOADED: OnceLock = OnceLock::new(); + LOADED.get_or_init(|| { + let loaded = register_bytes(crate::ui::theme::BRAND_MARK_FONT_BYTES); + if !loaded { + crate::diagnose::log("unable to load the brand mark font for theme provider marks"); + } + loaded + }); + "Brand Marks" +} + fn register_face(path: &std::path::Path) -> bool { let Ok(mut bytes) = std::fs::read(path) else { return false; @@ -45,6 +59,10 @@ fn register_face(path: &std::path::Path) -> bool { if rename_family(&mut bytes).is_none() { return false; } + register_bytes(&bytes) +} + +fn register_bytes(bytes: &[u8]) -> bool { let Ok(size) = u32::try_from(bytes.len()) else { return false; }; From c3def53e8709bb3aa503d02c02ca5d19076af1f3 Mon Sep 17 00:00:00 2001 From: Craig Constable Date: Wed, 25 Nov 2026 10:20:00 +1000 Subject: [PATCH 04/12] refactor(themes): collapse built-in dark and light layers into light-mode colours Classic, Compact Fluent Quad and Classic Vertical drew every mode-dependent element twice, once gated on `system.dark` and once on `1 - system.dark`. Each pair now becomes one layer whose paints carry `light_color`, taking the dark layer's place in the draw order (163 -> 124, 158 -> 118 and 133 -> 114 layers). Both appearances render pixel-identically to before. Gated layers remain fully supported: a new test renders a custom theme with separate dark and light layers against the equivalent single layer in both modes. `theme::with_dark_mode` lets tests choose the Windows appearance. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 4 + src/theme.rs | 19 + src/theme_engine/tests.rs | 177 ++- src/themes/classic-usage-widget.json | 1535 ++++-------------- src/themes/classic-vertical.json | 580 +------ src/themes/compact-fluent-quad.json | 2197 ++++++-------------------- 6 files changed, 1006 insertions(+), 3506 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fd7c09c..2528cbd7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ changes grouped into Added, Changed, Fixed, and Removed where applicable. - Add the Stacked Rows built-in theme: each provider's logo beside joined rows of four-section bars, one row per limit the account reports, with a magenta pace marker. Bars follow the Usage direction setting, and hovering a provider opens a flyout with each limit's usage, reset time and pace, or a waiting, error or no-usage message. - Add a Provider logo layer type (`provider_mark`) to themes and Theme Studio. It draws a provider's brand mark from the dashboard's icon font, tinted and fitted to the layer, so themes need no image assets to show a provider. +### Changed + +- Draw the Classic, Compact Fluent Quad and Classic Vertical built-in themes from single layers with light-mode colours instead of duplicate layers gated on `system.dark` (163 to 124, 158 to 118 and 133 to 114 layers), with identical rendering in both appearances. Custom themes that keep separate dark and light layers render as before. + ### Fixed - Update the transitive `url` dependency from 2.5.8 to 2.5.9, with `form_urlencoded` from 1.2.2 to 1.2.3, to resolve RUSTSEC-2026-0592 found by the release dependency checks. diff --git a/src/theme.rs b/src/theme.rs index 0d8c6c64..4fa9b871 100644 --- a/src/theme.rs +++ b/src/theme.rs @@ -8,9 +8,28 @@ const REGISTRY_KEY: &str = "SystemUsesLightTheme"; /// Check if the system is in dark mode by reading the registry pub fn is_dark_mode() -> bool { + #[cfg(test)] + if let Some(dark) = DARK_MODE_OVERRIDE.with(std::cell::Cell::get) { + return dark; + } !is_light_theme() } +#[cfg(test)] +thread_local! { + static DARK_MODE_OVERRIDE: std::cell::Cell> = const { std::cell::Cell::new(None) }; +} + +/// Runs `f` with this thread reporting the given Windows appearance, so tests +/// can render both modes without depending on the machine's setting. +#[cfg(test)] +pub fn with_dark_mode(dark: bool, f: impl FnOnce() -> T) -> T { + let previous = DARK_MODE_OVERRIDE.with(|cell| cell.replace(Some(dark))); + let result = f(); + DARK_MODE_OVERRIDE.with(|cell| cell.set(previous)); + result +} + fn is_light_theme() -> bool { unsafe { let path = wide_str(REGISTRY_PATH); diff --git a/src/theme_engine/tests.rs b/src/theme_engine/tests.rs index f2c70f9c..09ff0a9b 100644 --- a/src/theme_engine/tests.rs +++ b/src/theme_engine/tests.rs @@ -1008,27 +1008,24 @@ fn classic_stacks_weekly_and_fable_without_a_claude_session() { let weekly_y = if stacked { 5.0 } else { 28.0 }; assert_eq!( - find("session-label-").is_some(), + find("session-label").is_some(), session_available || provider_count > 1 ); - assert_eq!( - find("claude-session-segments-").is_some(), - session_available - ); - assert_eq!(find("claude-window-label-").is_some(), stacked); - assert_eq!(find("fable-window-label-").is_some(), stacked); - - let weekly_bar = find("claude-weekly-segments-").unwrap(); - let weekly_value = find("claude-weekly-value-").unwrap(); - let fable_bar = find("fable-weekly-segments-").unwrap(); - let fable_value = find("fable-weekly-value-").unwrap(); + assert_eq!(find("claude-session-segments").is_some(), session_available); + assert_eq!(find("claude-window-label").is_some(), stacked); + assert_eq!(find("fable-window-label").is_some(), stacked); + + let weekly_bar = find("claude-weekly-segments").unwrap(); + let weekly_value = find("claude-weekly-value").unwrap(); + let fable_bar = find("fable-weekly-segments").unwrap(); + let fable_value = find("fable-weekly-value").unwrap(); assert_eq!(weekly_bar.y, weekly_y); assert_eq!(weekly_value.y, weekly_y); assert_eq!(fable_bar.y, if stacked { 28.0 } else { 5.0 }); assert_eq!(fable_value.y, 28.0); if stacked { - let claude_label = find("claude-window-label-").unwrap(); - let fable_label = find("fable-window-label-").unwrap(); + let claude_label = find("claude-window-label").unwrap(); + let fable_label = find("fable-window-label").unwrap(); assert_eq!(claude_label.x, fable_label.x); assert_eq!(claude_label.y, weekly_bar.y); assert_eq!(fable_label.y, fable_bar.y); @@ -1045,14 +1042,14 @@ fn classic_stacks_weekly_and_fable_without_a_claude_session() { } if provider_count == 1 { assert_eq!(width, 245); - assert!(find("weekly-label-").is_none()); + assert!(find("weekly-label").is_none()); } else if mask == 3 { - let codex_session = find("codex-session-segments-").unwrap(); - let codex_weekly = find("codex-weekly-segments-").unwrap(); + let codex_session = find("codex-session-segments").unwrap(); + let codex_weekly = find("codex-weekly-segments").unwrap(); assert_eq!(codex_session.x, 41.0); assert_eq!(codex_session.x, codex_weekly.x); - assert_eq!(find("session-label-").unwrap().y, codex_session.y); - assert_eq!(find("weekly-label-").unwrap().y, codex_weekly.y); + assert_eq!(find("session-label").unwrap().y, codex_session.y); + assert_eq!(find("weekly-label").unwrap().y, codex_weekly.y); } } else { assert!(fable_bar.x >= weekly_value.x + weekly_value.width); @@ -1161,16 +1158,12 @@ fn starter_theme_round_trips_and_validates() { _ => None, }) .collect::>(); - // Classic contains separate light and dark progress layers so the - // 1.4.9 palette follows the taskbar mode without runtime recolouring: - // five providers over two windows in two modes, plus Grok and Copilot, - // which fill only the long-window row, plus a credit overlay on that row - // for the three providers that report credits, plus the two eight-segment - // Fable layers. - assert_eq!( - segments, - [vec![10; 5 * 2 * 2 + 2 * 2 + 3 * 2], vec![8; 2]].concat() - ); + // Each Classic progress layer carries its light-mode colours, so the + // 1.4.9 palette follows the taskbar mode from one layer: five providers + // over two windows, plus Grok and Copilot, which fill only the + // long-window row, plus a credit overlay on that row for the three + // providers that report credits, plus the eight-segment Fable layer. + assert_eq!(segments, [vec![10; 5 * 2 + 2 + 3], vec![8; 1]].concat()); assert!(theme.surfaces[0] .children .iter() @@ -1295,6 +1288,72 @@ fn paints_use_their_light_colour_only_in_light_mode() { .any(|error| error.contains("light_color") && error.contains("not a colour"))); } +#[test] +fn custom_themes_with_separate_dark_and_light_layers_still_render() { + // Themes written before light-mode colours existed draw one layer per + // appearance gated on `system.dark`; they must keep rendering exactly as + // a single layer that carries both colours. + let layer = |id: &str, render: &str, fill: serde_json::Value| -> SceneObject { + serde_json::from_value(serde_json::json!({ + "id": id, + "name": id, + "width": "20", + "height": "10", + "render": render, + "content": { "type": "shape", "shape": "rectangle", "fill": fill } + })) + .unwrap() + }; + let mut separate = ThemeDocument::starter(); + separate.surfaces[0].children = vec![ + layer( + "bar-dark", + "system.dark", + serde_json::json!({ "color": "#D97757FF" }), + ), + layer( + "bar-light", + "1 - system.dark", + serde_json::json!({ "color": "#1A5FB4FF" }), + ), + ]; + let mut combined = ThemeDocument::starter(); + combined.surfaces[0].children = vec![layer( + "bar", + "1", + serde_json::json!({ "color": "#D97757FF", "light_color": "#1A5FB4FF" }), + )]; + assert!(separate.validate().is_empty(), "{:?}", separate.validate()); + assert!(combined.validate().is_empty(), "{:?}", combined.validate()); + + let runtime = ThemeRuntime::new(true, true, false); + let render = |theme: &ThemeDocument, dark: bool| { + crate::theme::with_dark_mode(dark, || { + render_theme_surface_with_runtime(theme, 0, None, runtime).pixels + }) + }; + for dark in [true, false] { + assert_eq!( + render(&separate, dark), + render(&combined, dark), + "dark = {dark}" + ); + } + assert_ne!(render(&separate, true), render(&separate, false)); + + // The built-in themes use light-mode colours rather than duplicate layers. + for (id, source) in BUILTIN_THEME_SOURCES { + assert!( + !source.contains("system.dark"), + "{id} gates layers on system.dark" + ); + assert!( + source.contains("light_color"), + "{id} has no light-mode colours" + ); + } +} + #[test] fn provider_marks_draw_the_brand_glyph_and_reject_unknown_providers() { let mut theme = ThemeDocument::starter(); @@ -2562,7 +2621,7 @@ fn classic_vertical_formats_monthly_limits_and_countdown_badges() { let text = theme.surfaces[0] .children .iter() - .find(|object| object.id == "codex-weekly-value-dark") + .find(|object| object.id == "codex-weekly-value") .unwrap(); let SceneContent::Text { template, .. } = &text.content else { panic!("missing usage badge") @@ -2590,12 +2649,12 @@ fn classic_vertical_headings_remain_legible_on_taskbars_and_floating_cards() { }; 0.2126 * linear(color.r) + 0.7152 * linear(color.g) + 0.0722 * linear(color.b) }; - for (suffix, backgrounds) in [ - ("-light", ["#CBD4E6", "#D3D3D3", "#FFFFFF", "#F3F3F3"]), - ("", ["#010A1C", "#181820", "#141E34", "#182137"]), + for (dark, backgrounds) in [ + (false, ["#CBD4E6", "#D3D3D3", "#FFFFFF", "#F3F3F3"]), + (true, ["#010A1C", "#181820", "#141E34", "#182137"]), ] { for provider in ProviderId::ALL { - let id = format!("{}-title{suffix}", provider.descriptor().key); + let id = format!("{}-title", provider.descriptor().key); let title = theme.surfaces[0] .children .iter() @@ -2604,7 +2663,7 @@ fn classic_vertical_headings_remain_legible_on_taskbars_and_floating_cards() { let SceneContent::Text { color, .. } = &title.content else { panic!("missing heading"); }; - let foreground = luminance(parse_color(&color.color).unwrap()); + let foreground = luminance(parse_color(color.color_for(dark)).unwrap()); // Include the tinted Windows 10 VM taskbar and floating card. for background in backgrounds { let background = luminance(parse_color(background).unwrap()); @@ -3447,12 +3506,12 @@ fn classic_usage_direction_defaults_to_used_until_enabled() { let gauge = theme.surfaces[0] .children .iter() - .find(|object| object.id == "claude-session-segments-dark") + .find(|object| object.id == "claude-session-segments") .unwrap(); let label = theme.surfaces[0] .children .iter() - .find(|object| object.id == "claude-session-value-dark") + .find(|object| object.id == "claude-session-value") .unwrap(); let SceneContent::Progress { value, .. } = &gauge.content else { panic!("expected gauge") @@ -3778,12 +3837,12 @@ fn compact_fluent_quad_antigravity_dual_and_solo_modes() { .unwrap_or(false) }; - assert!(find_render("antigravity-session-gemini-solo-dark")); - assert!(!find_render("antigravity-session-external-solo-dark")); - assert!(!find_render("antigravity-session-gemini-dual-dark")); - assert!(!find_render("antigravity-session-external-dual-dark")); - assert!(find_render("antigravity-session-gemini-value-dark")); - assert!(!find_render("antigravity-session-external-value-dark")); + assert!(find_render("antigravity-session-gemini-solo")); + assert!(!find_render("antigravity-session-external-solo")); + assert!(!find_render("antigravity-session-gemini-dual")); + assert!(!find_render("antigravity-session-external-dual")); + assert!(find_render("antigravity-session-gemini-value")); + assert!(!find_render("antigravity-session-external-value")); } // 2. Solo External @@ -3813,12 +3872,12 @@ fn compact_fluent_quad_antigravity_dual_and_solo_modes() { .unwrap_or(false) }; - assert!(!find_render("antigravity-session-gemini-solo-dark")); - assert!(find_render("antigravity-session-external-solo-dark")); - assert!(!find_render("antigravity-session-gemini-dual-dark")); - assert!(!find_render("antigravity-session-external-dual-dark")); - assert!(!find_render("antigravity-session-gemini-value-dark")); - assert!(find_render("antigravity-session-external-value-dark")); + assert!(!find_render("antigravity-session-gemini-solo")); + assert!(find_render("antigravity-session-external-solo")); + assert!(!find_render("antigravity-session-gemini-dual")); + assert!(!find_render("antigravity-session-external-dual")); + assert!(!find_render("antigravity-session-gemini-value")); + assert!(find_render("antigravity-session-external-value")); } // 3. Dual Mode Crossfade @@ -3841,12 +3900,12 @@ fn compact_fluent_quad_antigravity_dual_and_solo_modes() { .unwrap_or(false) }; - assert!(!find_render("antigravity-session-gemini-solo-dark")); - assert!(!find_render("antigravity-session-external-solo-dark")); - assert!(find_render("antigravity-session-gemini-dual-dark")); - assert!(find_render("antigravity-session-external-dual-dark")); - assert!(find_render("antigravity-session-gemini-value-dark")); - assert!(!find_render("antigravity-session-external-value-dark")); + assert!(!find_render("antigravity-session-gemini-solo")); + assert!(!find_render("antigravity-session-external-solo")); + assert!(find_render("antigravity-session-gemini-dual")); + assert!(find_render("antigravity-session-external-dual")); + assert!(find_render("antigravity-session-gemini-value")); + assert!(!find_render("antigravity-session-external-value")); // At opacity 0.5 (Mid-transition) let runtime_mid = @@ -3863,8 +3922,8 @@ fn compact_fluent_quad_antigravity_dual_and_solo_modes() { .map(|o| evaluate(&o.render.0, &context_mid).unwrap() != 0.0) .unwrap_or(false) }; - assert!(find_render_mid("antigravity-session-gemini-value-dark")); - assert!(find_render_mid("antigravity-session-external-value-dark")); + assert!(find_render_mid("antigravity-session-gemini-value")); + assert!(find_render_mid("antigravity-session-external-value")); // At opacity 0.0 (External holding) let runtime_ext = @@ -3881,8 +3940,8 @@ fn compact_fluent_quad_antigravity_dual_and_solo_modes() { .map(|o| evaluate(&o.render.0, &context_ext).unwrap() != 0.0) .unwrap_or(false) }; - assert!(!find_render_ext("antigravity-session-gemini-value-dark")); - assert!(find_render_ext("antigravity-session-external-value-dark")); + assert!(!find_render_ext("antigravity-session-gemini-value")); + assert!(find_render_ext("antigravity-session-external-value")); } } diff --git a/src/themes/classic-usage-widget.json b/src/themes/classic-usage-widget.json index e71a2ea1..7b7f100c 100644 --- a/src/themes/classic-usage-widget.json +++ b/src/themes/classic-usage-widget.json @@ -27,23 +27,24 @@ }, "children": [ { - "id": "divider-dark-left", - "name": "Dark divider left", - "render": "system.dark", + "id": "divider-left", + "name": "Divider left", + "render": "1", "y": "10", "width": "2", "height": "25", "background": { "type": "colour", "colour": { - "color": "#505050FF" + "color": "#505050FF", + "light_color": "#A0A0A0FF" } } }, { - "id": "divider-dark-right", - "name": "Dark divider right", - "render": "system.dark", + "id": "divider-right", + "name": "Divider right", + "render": "1", "x": "2", "y": "10", "width": "1", @@ -51,133 +52,15 @@ "background": { "type": "colour", "colour": { - "color": "#282828FF" + "color": "#282828FF", + "light_color": "#E6E6E6FF" } } }, { - "id": "divider-light-left", - "name": "Light divider left", - "render": "1 - system.dark", - "y": "10", - "width": "2", - "height": "25", - "background": { - "type": "colour", - "colour": { - "color": "#A0A0A0FF" - } - } - }, - { - "id": "divider-light-right", - "name": "Light divider right", - "render": "1 - system.dark", - "x": "2", - "y": "10", - "width": "1", - "height": "25", - "background": { - "type": "colour", - "colour": { - "color": "#E6E6E6FF" - } - } - }, - { - "id": "session-label-dark", - "name": "dark 5-hour label", - "render": "system.dark && !(providers.count == 1 && providers.claude.enabled && claude.weekly.available && !claude.session.available)", - "x": "13", - "y": "5", - "width": "18", - "height": "13", - "content": { - "type": "text", - "template": "{i18n.session_window}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#888888FF" - } - } - }, - { - "id": "weekly-label-dark", - "name": "dark 7-day label", - "render": "system.dark && !providers.opencode.enabled && !((providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available) && providers.count == 1)", - "x": "13", - "y": "28 - 12 * (providers.count == 1 && providers.claude.enabled && claude.weekly.available && !claude.session.available)", - "width": "18", - "height": "13", - "content": { - "type": "text", - "template": "{i18n.weekly_window}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#888888FF" - } - } - }, - { - "id": "claude-window-label-dark", - "name": "dark Claude 7-day label", - "render": "system.dark && (providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available)", - "x": "0", - "y": "5", - "width": "18", - "height": "13", - "content": { - "type": "text", - "template": "{i18n.weekly_window}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#888888FF" - } - }, - "parent": "claude-usage" - }, - { - "id": "fable-window-label-dark", - "name": "dark Fable 7-day label", - "render": "system.dark && (providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available)", - "x": "0", - "y": "28", - "width": "18", - "height": "13", - "content": { - "type": "text", - "template": "{i18n.weekly_window}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#888888FF" - } - }, - "parent": "claude-usage" - }, - { - "id": "session-label-light", - "name": "light 5-hour label", - "render": "(1 - system.dark) && !(providers.count == 1 && providers.claude.enabled && claude.weekly.available && !claude.session.available)", + "id": "session-label", + "name": "5-hour label", + "render": "!(providers.count == 1 && providers.claude.enabled && claude.weekly.available && !claude.session.available)", "x": "13", "y": "5", "width": "18", @@ -192,14 +75,15 @@ "contrast": "1", "align": "left", "color": { - "color": "#404040FF" + "color": "#888888FF", + "light_color": "#404040FF" } } }, { - "id": "weekly-label-light", - "name": "light 7-day label", - "render": "(1 - system.dark) && !providers.opencode.enabled && !((providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available) && providers.count == 1)", + "id": "weekly-label", + "name": "7-day label", + "render": "!providers.opencode.enabled && !((providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available) && providers.count == 1)", "x": "13", "y": "28 - 12 * (providers.count == 1 && providers.claude.enabled && claude.weekly.available && !claude.session.available)", "width": "18", @@ -214,14 +98,15 @@ "contrast": "1", "align": "left", "color": { - "color": "#404040FF" + "color": "#888888FF", + "light_color": "#404040FF" } } }, { - "id": "claude-window-label-light", - "name": "light Claude 7-day label", - "render": "(1 - system.dark) && (providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available)", + "id": "claude-window-label", + "name": "Claude 7-day label", + "render": "(providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available)", "x": "0", "y": "5", "width": "18", @@ -236,15 +121,16 @@ "contrast": "1", "align": "left", "color": { - "color": "#404040FF" + "color": "#888888FF", + "light_color": "#404040FF" } }, "parent": "claude-usage" }, { - "id": "fable-window-label-light", - "name": "light Fable 7-day label", - "render": "(1 - system.dark) && (providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available)", + "id": "fable-window-label", + "name": "Fable 7-day label", + "render": "(providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available)", "x": "0", "y": "28", "width": "18", @@ -259,7 +145,8 @@ "contrast": "1", "align": "left", "color": { - "color": "#404040FF" + "color": "#888888FF", + "light_color": "#404040FF" } }, "parent": "claude-usage" @@ -273,56 +160,9 @@ "height": "46" }, { - "id": "cursor-session-segments-dark", - "name": "dark Cursor Auto segments", - "render": "system.dark", - "parent": "cursor-provider", - "y": "5", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "13", - "content": { - "type": "progress", - "value": "cursor.session.display", - "direction": "left_to_right", - "fill": { - "color": "#F5F5F5FF" - }, - "track": { - "color": "#444444FF" - }, - "corner_radius": "2", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "cursor-session-value-dark", - "name": "dark Cursor Auto value", - "render": "system.dark", - "parent": "cursor-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "5", - "width": "90", - "height": "13", - "content": { - "type": "text", - "template": "{i18n.cursor_auto_window} {cursor.session.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#E0E0E0FF" - } - } - }, - { - "id": "cursor-session-segments-light", - "name": "light Cursor Auto segments", - "render": "1 - system.dark", + "id": "cursor-session-segments", + "name": "Cursor Auto segments", + "render": "1", "parent": "cursor-provider", "y": "5", "width": "ceil(10 / max(1, providers.count)) * 11 - 1", @@ -332,10 +172,12 @@ "value": "cursor.session.display", "direction": "left_to_right", "fill": { - "color": "#1A1A1AFF" + "color": "#F5F5F5FF", + "light_color": "#1A1A1AFF" }, "track": { - "color": "#AAAAAAFF" + "color": "#444444FF", + "light_color": "#AAAAAAFF" }, "corner_radius": "2", "segments": 10, @@ -344,9 +186,9 @@ } }, { - "id": "cursor-session-value-light", - "name": "light Cursor Auto value", - "render": "1 - system.dark", + "id": "cursor-session-value", + "name": "Cursor Auto value", + "render": "1", "parent": "cursor-provider", "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", "y": "5", @@ -362,61 +204,15 @@ "contrast": "1", "align": "left", "color": { - "color": "#1A1A1AFF" - } - } - }, - { - "id": "cursor-weekly-segments-dark", - "name": "dark Cursor API segments", - "render": "system.dark", - "parent": "cursor-provider", - "y": "28", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "13", - "content": { - "type": "progress", - "value": "cursor.weekly.display", - "direction": "left_to_right", - "fill": { - "color": "#F5F5F5FF" - }, - "track": { - "color": "#444444FF" - }, - "corner_radius": "2", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "cursor-weekly-value-dark", - "name": "dark Cursor API value", - "render": "system.dark", - "parent": "cursor-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "28", - "width": "90", - "height": "13", - "content": { - "type": "text", - "template": "{i18n.cursor_api_window} {cursor.weekly.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#E0E0E0FF" + "color": "#E0E0E0FF", + "light_color": "#1A1A1AFF" } } }, { - "id": "cursor-weekly-segments-light", - "name": "light Cursor API segments", - "render": "1 - system.dark", + "id": "cursor-weekly-segments", + "name": "Cursor API segments", + "render": "1", "parent": "cursor-provider", "y": "28", "width": "ceil(10 / max(1, providers.count)) * 11 - 1", @@ -426,10 +222,12 @@ "value": "cursor.weekly.display", "direction": "left_to_right", "fill": { - "color": "#1A1A1AFF" + "color": "#F5F5F5FF", + "light_color": "#1A1A1AFF" }, "track": { - "color": "#AAAAAAFF" + "color": "#444444FF", + "light_color": "#AAAAAAFF" }, "corner_radius": "2", "segments": 10, @@ -438,9 +236,9 @@ } }, { - "id": "cursor-weekly-value-light", - "name": "light Cursor API value", - "render": "1 - system.dark", + "id": "cursor-weekly-value", + "name": "Cursor API value", + "render": "1", "parent": "cursor-provider", "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", "y": "28", @@ -456,36 +254,15 @@ "contrast": "1", "align": "left", "color": { - "color": "#1A1A1AFF" - } - } - }, - { - "id": "opencode-long-label-dark", - "name": "dark OpenCode 7-day or 30-day label", - "render": "system.dark * providers.opencode.enabled", - "x": "8", - "y": "28", - "width": "30", - "height": "13", - "content": { - "type": "text", - "template": "7/30d", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#888888FF" + "color": "#E0E0E0FF", + "light_color": "#1A1A1AFF" } } }, { - "id": "opencode-long-label-light", - "name": "light OpenCode 7-day or 30-day label", - "render": "(1 - system.dark) * providers.opencode.enabled", + "id": "opencode-long-label", + "name": "OpenCode 7-day or 30-day label", + "render": "providers.opencode.enabled", "x": "8", "y": "28", "width": "30", @@ -500,7 +277,8 @@ "contrast": "1", "align": "left", "color": { - "color": "#404040FF" + "color": "#888888FF", + "light_color": "#404040FF" } } }, @@ -527,709 +305,26 @@ "render": "providers.claude.enabled", "x": "if((providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available), canvas.width - 1 - ((ceil(10 / max(1, providers.count)) * 11 - 1) + 4 + 90 + 28), 41 + providers.cursor.enabled * ((ceil(10 / max(1, providers.count)) * 11 - 1) + 4 + 90 + 3))", "width": "if((providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available), (ceil(10 / max(1, providers.count)) * 11 - 1) + 4 + 90 + 28, (ceil(10 / max(1, providers.count)) * 11 - 1) + 4 + 62)", - "height": "46" - }, - { - "id": "claude-session-segments-dark", - "name": "dark Claude Code 5-hour segments", - "render": "(system.dark) && claude.session.available", - "parent": "claude-usage", - "y": "5", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "13", - "content": { - "type": "progress", - "value": "claude.session.display", - "direction": "left_to_right", - "fill": { - "color": "#D97757FF" - }, - "track": { - "color": "#444444FF" - }, - "corner_radius": "2", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "claude-session-value-dark", - "name": "dark Claude Code 5-hour value", - "render": "(system.dark) && claude.session.available", - "parent": "claude-usage", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "5", - "width": "62", - "height": "13", - "content": { - "type": "text", - "template": "{claude.session.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#F09A7AFF" - } - } - }, - { - "id": "claude-session-segments-light", - "name": "light Claude Code 5-hour segments", - "render": "(1 - system.dark) && claude.session.available", - "parent": "claude-usage", - "y": "5", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "13", - "content": { - "type": "progress", - "value": "claude.session.display", - "direction": "left_to_right", - "fill": { - "color": "#D97757FF" - }, - "track": { - "color": "#AAAAAAFF" - }, - "corner_radius": "2", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "claude-session-value-light", - "name": "light Claude Code 5-hour value", - "render": "(1 - system.dark) && claude.session.available", - "parent": "claude-usage", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "5", - "width": "62", - "height": "13", - "content": { - "type": "text", - "template": "{claude.session.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#A94F32FF" - } - } - }, - { - "id": "claude-weekly-segments-dark", - "name": "dark Claude Code 7-day segments", - "render": "system.dark", - "parent": "claude-usage", - "y": "if((providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available), 5, 28 - 12 * (providers.count == 1 && providers.claude.enabled && claude.weekly.available && !claude.session.available))", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "13", - "content": { - "type": "progress", - "value": "claude.weekly.display", - "direction": "left_to_right", - "fill": { - "color": "#D97757FF" - }, - "track": { - "color": "#444444FF" - }, - "corner_radius": "2", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - }, - "x": "0 + 28 * (providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available)" - }, - { - "id": "claude-weekly-value-dark", - "name": "dark Claude Code 7-day value", - "render": "(system.dark) && !claude.credits.available", - "parent": "claude-usage", - "x": "(ceil(10 / max(1, providers.count)) * 11 - 1) + 4 + 28 * (providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available)", - "y": "if((providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available), 5, 28 - 12 * (providers.count == 1 && providers.claude.enabled && claude.weekly.available && !claude.session.available))", - "width": "62", - "height": "13", - "content": { - "type": "text", - "template": "{claude.weekly.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#F09A7AFF" - } - } - }, - { - "id": "claude-weekly-segments-light", - "name": "light Claude Code 7-day segments", - "render": "1 - system.dark", - "parent": "claude-usage", - "y": "if((providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available), 5, 28 - 12 * (providers.count == 1 && providers.claude.enabled && claude.weekly.available && !claude.session.available))", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "13", - "content": { - "type": "progress", - "value": "claude.weekly.display", - "direction": "left_to_right", - "fill": { - "color": "#D97757FF" - }, - "track": { - "color": "#AAAAAAFF" - }, - "corner_radius": "2", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - }, - "x": "0 + 28 * (providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available)" - }, - { - "id": "claude-weekly-value-light", - "name": "light Claude Code 7-day value", - "render": "(1 - system.dark) && !claude.credits.available", - "parent": "claude-usage", - "x": "(ceil(10 / max(1, providers.count)) * 11 - 1) + 4 + 28 * (providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available)", - "y": "if((providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available), 5, 28 - 12 * (providers.count == 1 && providers.claude.enabled && claude.weekly.available && !claude.session.available))", - "width": "62", - "height": "13", - "content": { - "type": "text", - "template": "{claude.weekly.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#A94F32FF" - } - } - }, - { - "id": "codex-provider", - "name": "Codex provider", - "render": "providers.codex.enabled", - "parent": "provider-row", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4 + 62", - "height": "46" - }, - { - "id": "codex-session-segments-dark", - "name": "dark Codex 5-hour segments", - "render": "system.dark", - "parent": "codex-provider", - "y": "5", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "13", - "content": { - "type": "progress", - "value": "codex.five_hour.display", - "direction": "left_to_right", - "fill": { - "color": "#F5F5F5FF" - }, - "track": { - "color": "#444444FF" - }, - "corner_radius": "2", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "codex-session-value-dark", - "name": "dark Codex 5-hour value", - "render": "system.dark", - "parent": "codex-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "5", - "width": "62", - "height": "13", - "content": { - "type": "text", - "template": "{codex.five_hour.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#F5F5F5FF" - } - } - }, - { - "id": "codex-session-segments-light", - "name": "light Codex 5-hour segments", - "render": "1 - system.dark", - "parent": "codex-provider", - "y": "5", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "13", - "content": { - "type": "progress", - "value": "codex.five_hour.display", - "direction": "left_to_right", - "fill": { - "color": "#1F1F1FFF" - }, - "track": { - "color": "#AAAAAAFF" - }, - "corner_radius": "2", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "codex-session-value-light", - "name": "light Codex 5-hour value", - "render": "1 - system.dark", - "parent": "codex-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "5", - "width": "62", - "height": "13", - "content": { - "type": "text", - "template": "{codex.five_hour.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#1F1F1FFF" - } - } - }, - { - "id": "codex-weekly-segments-dark", - "name": "dark Codex 7-day segments", - "render": "system.dark", - "parent": "codex-provider", - "y": "28", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "13", - "content": { - "type": "progress", - "value": "codex.weekly.display", - "direction": "left_to_right", - "fill": { - "color": "#F5F5F5FF" - }, - "track": { - "color": "#444444FF" - }, - "corner_radius": "2", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "codex-weekly-value-dark", - "name": "dark Codex 7-day value", - "render": "(system.dark) && !codex.credits.available", - "parent": "codex-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "28", - "width": "62", - "height": "13", - "content": { - "type": "text", - "template": "{codex.weekly.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#F5F5F5FF" - } - } - }, - { - "id": "codex-weekly-segments-light", - "name": "light Codex 7-day segments", - "render": "1 - system.dark", - "parent": "codex-provider", - "y": "28", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "13", - "content": { - "type": "progress", - "value": "codex.weekly.display", - "direction": "left_to_right", - "fill": { - "color": "#1F1F1FFF" - }, - "track": { - "color": "#AAAAAAFF" - }, - "corner_radius": "2", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "codex-weekly-value-light", - "name": "light Codex 7-day value", - "render": "(1 - system.dark) && !codex.credits.available", - "parent": "codex-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "28", - "width": "62", - "height": "13", - "content": { - "type": "text", - "template": "{codex.weekly.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#1F1F1FFF" - } - } - }, - { - "id": "antigravity-provider", - "name": "Antigravity provider", - "render": "providers.antigravity.enabled", - "parent": "provider-row", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4 + 62", - "height": "46" - }, - { - "id": "antigravity-session-segments-dark", - "name": "dark Antigravity 5-hour segments", - "render": "system.dark", - "parent": "antigravity-provider", - "y": "5", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "13", - "content": { - "type": "progress", - "value": "antigravity.session.display", - "direction": "left_to_right", - "fill": { - "color": "#4285F4FF" - }, - "track": { - "color": "#444444FF" - }, - "corner_radius": "2", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "antigravity-session-value-dark", - "name": "dark Antigravity 5-hour value", - "render": "system.dark", - "parent": "antigravity-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "5", - "width": "62", - "height": "13", - "content": { - "type": "text", - "template": "{antigravity.session.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#8AB4F8FF" - } - } - }, - { - "id": "antigravity-session-segments-light", - "name": "light Antigravity 5-hour segments", - "render": "1 - system.dark", - "parent": "antigravity-provider", - "y": "5", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "13", - "content": { - "type": "progress", - "value": "antigravity.session.display", - "direction": "left_to_right", - "fill": { - "color": "#4285F4FF" - }, - "track": { - "color": "#AAAAAAFF" - }, - "corner_radius": "2", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "antigravity-session-value-light", - "name": "light Antigravity 5-hour value", - "render": "1 - system.dark", - "parent": "antigravity-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "5", - "width": "62", - "height": "13", - "content": { - "type": "text", - "template": "{antigravity.session.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#1967D2FF" - } - } - }, - { - "id": "antigravity-weekly-segments-dark", - "name": "dark Antigravity 7-day segments", - "render": "system.dark", - "parent": "antigravity-provider", - "y": "28", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "13", - "content": { - "type": "progress", - "value": "antigravity.weekly.display", - "direction": "left_to_right", - "fill": { - "color": "#4285F4FF" - }, - "track": { - "color": "#444444FF" - }, - "corner_radius": "2", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "antigravity-weekly-value-dark", - "name": "dark Antigravity 7-day value", - "render": "system.dark", - "parent": "antigravity-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "28", - "width": "62", - "height": "13", - "content": { - "type": "text", - "template": "{antigravity.weekly.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#8AB4F8FF" - } - } - }, - { - "id": "antigravity-weekly-segments-light", - "name": "light Antigravity 7-day segments", - "render": "1 - system.dark", - "parent": "antigravity-provider", - "y": "28", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "13", - "content": { - "type": "progress", - "value": "antigravity.weekly.display", - "direction": "left_to_right", - "fill": { - "color": "#4285F4FF" - }, - "track": { - "color": "#AAAAAAFF" - }, - "corner_radius": "2", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "antigravity-weekly-value-light", - "name": "light Antigravity 7-day value", - "render": "1 - system.dark", - "parent": "antigravity-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "28", - "width": "62", - "height": "13", - "content": { - "type": "text", - "template": "{antigravity.weekly.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#1967D2FF" - } - } - }, - { - "id": "opencode-provider", - "name": "OpenCode provider", - "render": "providers.opencode.enabled", - "parent": "provider-row", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4 + 90", - "height": "46" - }, - { - "id": "opencode-session-segments-dark", - "name": "dark OpenCode 5-hour segments", - "render": "system.dark", - "parent": "opencode-provider", - "y": "5", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "13", - "content": { - "type": "progress", - "value": "opencode.session.display", - "direction": "left_to_right", - "fill": { - "color": "#4CAF50FF" - }, - "track": { - "color": "#444444FF" - }, - "corner_radius": "2", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "opencode-session-value-dark", - "name": "dark OpenCode 5-hour value", - "render": "system.dark", - "parent": "opencode-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "5", - "width": "62", - "height": "13", - "content": { - "type": "text", - "template": "{opencode.session.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#81C784FF" - } - } - }, - { - "id": "opencode-session-segments-light", - "name": "light OpenCode 5-hour segments", - "render": "1 - system.dark", - "parent": "opencode-provider", - "y": "5", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "13", - "content": { - "type": "progress", - "value": "opencode.session.display", - "direction": "left_to_right", - "fill": { - "color": "#2E7D32FF" - }, - "track": { - "color": "#AAAAAAFF" - }, - "corner_radius": "2", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "opencode-session-value-light", - "name": "light OpenCode 5-hour value", - "render": "1 - system.dark", - "parent": "opencode-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "5", - "width": "62", - "height": "13", - "content": { - "type": "text", - "template": "{opencode.session.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#1B5E20FF" - } - } + "height": "46" }, { - "id": "opencode-weekly-segments-dark", - "name": "dark OpenCode long-window segments", - "render": "system.dark", - "parent": "opencode-provider", - "y": "28", + "id": "claude-session-segments", + "name": "Claude Code 5-hour segments", + "render": "claude.session.available", + "parent": "claude-usage", + "y": "5", "width": "ceil(10 / max(1, providers.count)) * 11 - 1", "height": "13", "content": { "type": "progress", - "value": "opencode.weekly.display", + "value": "claude.session.display", "direction": "left_to_right", "fill": { - "color": "#4CAF50FF" + "color": "#D97757FF" }, "track": { - "color": "#444444FF" + "color": "#444444FF", + "light_color": "#AAAAAAFF" }, "corner_radius": "2", "segments": 10, @@ -1238,17 +333,17 @@ } }, { - "id": "opencode-weekly-value-dark", - "name": "dark OpenCode long-window value", - "render": "system.dark", - "parent": "opencode-provider", + "id": "claude-session-value", + "name": "Claude Code 5-hour value", + "render": "claude.session.available", + "parent": "claude-usage", "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "28", - "width": "90", + "y": "5", + "width": "62", "height": "13", "content": { "type": "text", - "template": "{opencode.weekly.label} {opencode.weekly.display:usage_line}", + "template": "{claude.session.display:usage_line}", "font_family": "Segoe UI", "font_size": "12", "weight": "medium", @@ -1256,46 +351,49 @@ "contrast": "1", "align": "left", "color": { - "color": "#81C784FF" + "color": "#F09A7AFF", + "light_color": "#A94F32FF" } } }, { - "id": "opencode-weekly-segments-light", - "name": "light OpenCode long-window segments", - "render": "1 - system.dark", - "parent": "opencode-provider", - "y": "28", + "id": "claude-weekly-segments", + "name": "Claude Code 7-day segments", + "render": "1", + "parent": "claude-usage", + "y": "if((providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available), 5, 28 - 12 * (providers.count == 1 && providers.claude.enabled && claude.weekly.available && !claude.session.available))", "width": "ceil(10 / max(1, providers.count)) * 11 - 1", "height": "13", "content": { "type": "progress", - "value": "opencode.weekly.display", + "value": "claude.weekly.display", "direction": "left_to_right", "fill": { - "color": "#2E7D32FF" + "color": "#D97757FF" }, "track": { - "color": "#AAAAAAFF" + "color": "#444444FF", + "light_color": "#AAAAAAFF" }, "corner_radius": "2", "segments": 10, "segments_expression": "ceil(10 / max(1, providers.count))", "segment_gap": "1" - } + }, + "x": "0 + 28 * (providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available)" }, { - "id": "opencode-weekly-value-light", - "name": "light OpenCode long-window value", - "render": "1 - system.dark", - "parent": "opencode-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "28", - "width": "90", + "id": "claude-weekly-value", + "name": "Claude Code 7-day value", + "render": "!claude.credits.available", + "parent": "claude-usage", + "x": "(ceil(10 / max(1, providers.count)) * 11 - 1) + 4 + 28 * (providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available)", + "y": "if((providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available), 5, 28 - 12 * (providers.count == 1 && providers.claude.enabled && claude.weekly.available && !claude.session.available))", + "width": "62", "height": "13", "content": { "type": "text", - "template": "{opencode.weekly.label} {opencode.weekly.display:usage_line}", + "template": "{claude.weekly.display:usage_line}", "font_family": "Segoe UI", "font_size": "12", "weight": "medium", @@ -1303,49 +401,57 @@ "contrast": "1", "align": "left", "color": { - "color": "#1B5E20FF" + "color": "#F09A7AFF", + "light_color": "#A94F32FF" } } }, { - "id": "claude-credits-segments-dark", - "name": "dark claude credit overlay", - "render": "(system.dark) && claude.credits.available", - "parent": "claude-usage", - "y": "if((providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available), 5, 28 - 12 * (providers.count == 1 && providers.claude.enabled && claude.weekly.available && !claude.session.available))", + "id": "codex-provider", + "name": "Codex provider", + "render": "providers.codex.enabled", + "parent": "provider-row", + "width": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4 + 62", + "height": "46" + }, + { + "id": "codex-session-segments", + "name": "Codex 5-hour segments", + "render": "1", + "parent": "codex-provider", + "y": "5", "width": "ceil(10 / max(1, providers.count)) * 11 - 1", "height": "13", "content": { "type": "progress", - "value": "claude.credits.display", + "value": "codex.five_hour.display", "direction": "left_to_right", "fill": { - "color": "#F5A623FF", - "opacity": "1" + "color": "#F5F5F5FF", + "light_color": "#1F1F1FFF" }, "track": { - "color": "#00000000", - "opacity": "0" + "color": "#444444FF", + "light_color": "#AAAAAAFF" }, "corner_radius": "2", "segments": 10, "segments_expression": "ceil(10 / max(1, providers.count))", "segment_gap": "1" - }, - "x": "0 + 28 * (providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available)" + } }, { - "id": "claude-credits-value-dark", - "name": "dark claude credit balance", - "render": "(system.dark) && claude.credits.available", - "parent": "claude-usage", - "x": "(ceil(10 / max(1, providers.count)) * 11 - 1) + 4 + 28 * (providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available)", - "y": "if((providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available), 5, 28 - 12 * (providers.count == 1 && providers.claude.enabled && claude.weekly.available && !claude.session.available))", + "id": "codex-session-value", + "name": "Codex 5-hour value", + "render": "1", + "parent": "codex-provider", + "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", + "y": "5", "width": "62", "height": "13", "content": { "type": "text", - "template": "${claude.credits.balance:0.00}", + "template": "{codex.five_hour.display:usage_line}", "font_family": "Segoe UI", "font_size": "12", "weight": "medium", @@ -1353,50 +459,49 @@ "contrast": "1", "align": "left", "color": { - "color": "#F5A623FF", - "opacity": "1" + "color": "#F5F5F5FF", + "light_color": "#1F1F1FFF" } } }, { - "id": "claude-credits-segments-light", - "name": "light claude credit overlay", - "render": "(1 - system.dark) && claude.credits.available", - "parent": "claude-usage", - "y": "if((providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available), 5, 28 - 12 * (providers.count == 1 && providers.claude.enabled && claude.weekly.available && !claude.session.available))", + "id": "codex-weekly-segments", + "name": "Codex 7-day segments", + "render": "1", + "parent": "codex-provider", + "y": "28", "width": "ceil(10 / max(1, providers.count)) * 11 - 1", "height": "13", "content": { "type": "progress", - "value": "claude.credits.display", + "value": "codex.weekly.display", "direction": "left_to_right", "fill": { - "color": "#C77700FF", - "opacity": "1" + "color": "#F5F5F5FF", + "light_color": "#1F1F1FFF" }, "track": { - "color": "#00000000", - "opacity": "0" + "color": "#444444FF", + "light_color": "#AAAAAAFF" }, "corner_radius": "2", "segments": 10, "segments_expression": "ceil(10 / max(1, providers.count))", "segment_gap": "1" - }, - "x": "0 + 28 * (providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available)" + } }, { - "id": "claude-credits-value-light", - "name": "light claude credit balance", - "render": "(1 - system.dark) && claude.credits.available", - "parent": "claude-usage", - "x": "(ceil(10 / max(1, providers.count)) * 11 - 1) + 4 + 28 * (providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available)", - "y": "if((providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available), 5, 28 - 12 * (providers.count == 1 && providers.claude.enabled && claude.weekly.available && !claude.session.available))", + "id": "codex-weekly-value", + "name": "Codex 7-day value", + "render": "!codex.credits.available", + "parent": "codex-provider", + "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", + "y": "28", "width": "62", "height": "13", "content": { "type": "text", - "template": "${claude.credits.balance:0.00}", + "template": "{codex.weekly.display:usage_line}", "font_family": "Segoe UI", "font_size": "12", "weight": "medium", @@ -1404,30 +509,37 @@ "contrast": "1", "align": "left", "color": { - "color": "#C77700FF", - "opacity": "1" + "color": "#F5F5F5FF", + "light_color": "#1F1F1FFF" } } }, { - "id": "codex-credits-segments-dark", - "name": "dark codex credit overlay", - "render": "(system.dark) && codex.credits.available", - "parent": "codex-provider", - "y": "28", + "id": "antigravity-provider", + "name": "Antigravity provider", + "render": "providers.antigravity.enabled", + "parent": "provider-row", + "width": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4 + 62", + "height": "46" + }, + { + "id": "antigravity-session-segments", + "name": "Antigravity 5-hour segments", + "render": "1", + "parent": "antigravity-provider", + "y": "5", "width": "ceil(10 / max(1, providers.count)) * 11 - 1", "height": "13", "content": { "type": "progress", - "value": "codex.credits.display", + "value": "antigravity.session.display", "direction": "left_to_right", "fill": { - "color": "#F5A623FF", - "opacity": "1" + "color": "#4285F4FF" }, "track": { - "color": "#00000000", - "opacity": "0" + "color": "#444444FF", + "light_color": "#AAAAAAFF" }, "corner_radius": "2", "segments": 10, @@ -1436,17 +548,17 @@ } }, { - "id": "codex-credits-value-dark", - "name": "dark codex credit balance", - "render": "(system.dark) && codex.credits.available", - "parent": "codex-provider", + "id": "antigravity-session-value", + "name": "Antigravity 5-hour value", + "render": "1", + "parent": "antigravity-provider", "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "28", + "y": "5", "width": "62", "height": "13", "content": { "type": "text", - "template": "${codex.credits.balance:0.00}", + "template": "{antigravity.session.display:usage_line}", "font_family": "Segoe UI", "font_size": "12", "weight": "medium", @@ -1454,30 +566,29 @@ "contrast": "1", "align": "left", "color": { - "color": "#F5A623FF", - "opacity": "1" + "color": "#8AB4F8FF", + "light_color": "#1967D2FF" } } }, { - "id": "codex-credits-segments-light", - "name": "light codex credit overlay", - "render": "(1 - system.dark) && codex.credits.available", - "parent": "codex-provider", + "id": "antigravity-weekly-segments", + "name": "Antigravity 7-day segments", + "render": "1", + "parent": "antigravity-provider", "y": "28", "width": "ceil(10 / max(1, providers.count)) * 11 - 1", "height": "13", "content": { "type": "progress", - "value": "codex.credits.display", + "value": "antigravity.weekly.display", "direction": "left_to_right", "fill": { - "color": "#C77700FF", - "opacity": "1" + "color": "#4285F4FF" }, "track": { - "color": "#00000000", - "opacity": "0" + "color": "#444444FF", + "light_color": "#AAAAAAFF" }, "corner_radius": "2", "segments": 10, @@ -1486,17 +597,17 @@ } }, { - "id": "codex-credits-value-light", - "name": "light codex credit balance", - "render": "(1 - system.dark) && codex.credits.available", - "parent": "codex-provider", + "id": "antigravity-weekly-value", + "name": "Antigravity 7-day value", + "render": "1", + "parent": "antigravity-provider", "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", "y": "28", "width": "62", "height": "13", "content": { "type": "text", - "template": "${codex.credits.balance:0.00}", + "template": "{antigravity.weekly.display:usage_line}", "font_family": "Segoe UI", "font_size": "12", "weight": "medium", @@ -1504,36 +615,38 @@ "contrast": "1", "align": "left", "color": { - "color": "#C77700FF", - "opacity": "1" + "color": "#8AB4F8FF", + "light_color": "#1967D2FF" } } }, { - "id": "grok-provider", - "name": "Grok provider", - "render": "providers.grok.enabled", + "id": "opencode-provider", + "name": "OpenCode provider", + "render": "providers.opencode.enabled", "parent": "provider-row", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4 + 62", + "width": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4 + 90", "height": "46" }, { - "id": "grok-pool-segments-dark", - "name": "dark Grok pool segments", - "render": "system.dark", - "parent": "grok-provider", - "y": "28", + "id": "opencode-session-segments", + "name": "OpenCode 5-hour segments", + "render": "1", + "parent": "opencode-provider", + "y": "5", "width": "ceil(10 / max(1, providers.count)) * 11 - 1", "height": "13", "content": { "type": "progress", - "value": "grok.weekly.display", + "value": "opencode.session.display", "direction": "left_to_right", "fill": { - "color": "#8B5CF6FF" + "color": "#4CAF50FF", + "light_color": "#2E7D32FF" }, "track": { - "color": "#444444FF" + "color": "#444444FF", + "light_color": "#AAAAAAFF" }, "corner_radius": "2", "segments": 10, @@ -1542,17 +655,17 @@ } }, { - "id": "grok-pool-value-dark", - "name": "dark Grok pool value", - "render": "(system.dark) && !grok.credits.available", - "parent": "grok-provider", + "id": "opencode-session-value", + "name": "OpenCode 5-hour value", + "render": "1", + "parent": "opencode-provider", "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "28", + "y": "5", "width": "62", "height": "13", "content": { "type": "text", - "template": "{grok.weekly.display:usage_line}", + "template": "{opencode.session.display:usage_line}", "font_family": "Segoe UI", "font_size": "12", "weight": "medium", @@ -1560,27 +673,30 @@ "contrast": "1", "align": "left", "color": { - "color": "#F5F5F5FF" + "color": "#81C784FF", + "light_color": "#1B5E20FF" } } }, { - "id": "grok-pool-segments-light", - "name": "light Grok pool segments", - "render": "1 - system.dark", - "parent": "grok-provider", + "id": "opencode-weekly-segments", + "name": "OpenCode long-window segments", + "render": "1", + "parent": "opencode-provider", "y": "28", "width": "ceil(10 / max(1, providers.count)) * 11 - 1", "height": "13", "content": { "type": "progress", - "value": "grok.weekly.display", + "value": "opencode.weekly.display", "direction": "left_to_right", "fill": { - "color": "#7C3AEDFF" + "color": "#4CAF50FF", + "light_color": "#2E7D32FF" }, "track": { - "color": "#AAAAAAFF" + "color": "#444444FF", + "light_color": "#AAAAAAFF" }, "corner_radius": "2", "segments": 10, @@ -1589,17 +705,17 @@ } }, { - "id": "grok-pool-value-light", - "name": "light Grok pool value", - "render": "(1 - system.dark) && !grok.credits.available", - "parent": "grok-provider", + "id": "opencode-weekly-value", + "name": "OpenCode long-window value", + "render": "1", + "parent": "opencode-provider", "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", "y": "28", - "width": "62", + "width": "90", "height": "13", "content": { "type": "text", - "template": "{grok.weekly.display:usage_line}", + "template": "{opencode.weekly.label} {opencode.weekly.display:usage_line}", "font_family": "Segoe UI", "font_size": "12", "weight": "medium", @@ -1607,24 +723,26 @@ "contrast": "1", "align": "left", "color": { - "color": "#1F1F1FFF" + "color": "#81C784FF", + "light_color": "#1B5E20FF" } } }, { - "id": "grok-credits-segments-dark", - "name": "dark Grok on-demand segments", - "render": "(system.dark) && grok.credits.available", - "parent": "grok-provider", - "y": "28", + "id": "claude-credits-segments", + "name": "claude credit overlay", + "render": "claude.credits.available", + "parent": "claude-usage", + "y": "if((providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available), 5, 28 - 12 * (providers.count == 1 && providers.claude.enabled && claude.weekly.available && !claude.session.available))", "width": "ceil(10 / max(1, providers.count)) * 11 - 1", "height": "13", "content": { "type": "progress", - "value": "grok.credits.display", + "value": "claude.credits.display", "direction": "left_to_right", "fill": { "color": "#F5A623FF", + "light_color": "#C77700FF", "opacity": "1" }, "track": { @@ -1635,20 +753,21 @@ "segments": 10, "segments_expression": "ceil(10 / max(1, providers.count))", "segment_gap": "1" - } + }, + "x": "0 + 28 * (providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available)" }, { - "id": "grok-credits-value-dark", - "name": "dark Grok on-demand value", - "render": "(system.dark) && grok.credits.available", - "parent": "grok-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "28", + "id": "claude-credits-value", + "name": "claude credit balance", + "render": "claude.credits.available", + "parent": "claude-usage", + "x": "(ceil(10 / max(1, providers.count)) * 11 - 1) + 4 + 28 * (providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available)", + "y": "if((providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available), 5, 28 - 12 * (providers.count == 1 && providers.claude.enabled && claude.weekly.available && !claude.session.available))", "width": "62", "height": "13", "content": { "type": "text", - "template": "${grok.credits.balance:0.00}", + "template": "${claude.credits.balance:0.00}", "font_family": "Segoe UI", "font_size": "12", "weight": "medium", @@ -1657,24 +776,26 @@ "align": "left", "color": { "color": "#F5A623FF", + "light_color": "#C77700FF", "opacity": "1" } } }, { - "id": "grok-credits-segments-light", - "name": "light Grok on-demand segments", - "render": "(1 - system.dark) && grok.credits.available", - "parent": "grok-provider", + "id": "codex-credits-segments", + "name": "codex credit overlay", + "render": "codex.credits.available", + "parent": "codex-provider", "y": "28", "width": "ceil(10 / max(1, providers.count)) * 11 - 1", "height": "13", "content": { "type": "progress", - "value": "grok.credits.display", + "value": "codex.credits.display", "direction": "left_to_right", "fill": { - "color": "#C77700FF", + "color": "#F5A623FF", + "light_color": "#C77700FF", "opacity": "1" }, "track": { @@ -1688,17 +809,17 @@ } }, { - "id": "grok-credits-value-light", - "name": "light Grok on-demand value", - "render": "(1 - system.dark) && grok.credits.available", - "parent": "grok-provider", + "id": "codex-credits-value", + "name": "codex credit balance", + "render": "codex.credits.available", + "parent": "codex-provider", "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", "y": "28", "width": "62", "height": "13", "content": { "type": "text", - "template": "${grok.credits.balance:0.00}", + "template": "${codex.credits.balance:0.00}", "font_family": "Segoe UI", "font_size": "12", "weight": "medium", @@ -1706,36 +827,39 @@ "contrast": "1", "align": "left", "color": { - "color": "#C77700FF", + "color": "#F5A623FF", + "light_color": "#C77700FF", "opacity": "1" } } }, { - "id": "copilot-provider", - "name": "Copilot provider", - "render": "providers.copilot.enabled", + "id": "grok-provider", + "name": "Grok provider", + "render": "providers.grok.enabled", "parent": "provider-row", "width": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4 + 62", "height": "46" }, { - "id": "copilot-pool-segments-dark", - "name": "dark Copilot pool segments", - "render": "system.dark", - "parent": "copilot-provider", + "id": "grok-pool-segments", + "name": "Grok pool segments", + "render": "1", + "parent": "grok-provider", "y": "28", "width": "ceil(10 / max(1, providers.count)) * 11 - 1", "height": "13", "content": { "type": "progress", - "value": "copilot.weekly.display", + "value": "grok.weekly.display", "direction": "left_to_right", "fill": { - "color": "#EC4899FF" + "color": "#8B5CF6FF", + "light_color": "#7C3AEDFF" }, "track": { - "color": "#444444FF" + "color": "#444444FF", + "light_color": "#AAAAAAFF" }, "corner_radius": "2", "segments": 10, @@ -1744,17 +868,17 @@ } }, { - "id": "copilot-pool-value-dark", - "name": "dark Copilot pool value", - "render": "system.dark", - "parent": "copilot-provider", + "id": "grok-pool-value", + "name": "Grok pool value", + "render": "!grok.credits.available", + "parent": "grok-provider", "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", "y": "28", "width": "62", "height": "13", "content": { "type": "text", - "template": "{copilot.weekly.display:usage_line}", + "template": "{grok.weekly.display:usage_line}", "font_family": "Segoe UI", "font_size": "12", "weight": "medium", @@ -1762,27 +886,31 @@ "contrast": "1", "align": "left", "color": { - "color": "#F5F5F5FF" + "color": "#F5F5F5FF", + "light_color": "#1F1F1FFF" } } }, { - "id": "copilot-pool-segments-light", - "name": "light Copilot pool segments", - "render": "1 - system.dark", - "parent": "copilot-provider", + "id": "grok-credits-segments", + "name": "Grok on-demand segments", + "render": "grok.credits.available", + "parent": "grok-provider", "y": "28", "width": "ceil(10 / max(1, providers.count)) * 11 - 1", "height": "13", "content": { "type": "progress", - "value": "copilot.weekly.display", + "value": "grok.credits.display", "direction": "left_to_right", "fill": { - "color": "#DB2777FF" + "color": "#F5A623FF", + "light_color": "#C77700FF", + "opacity": "1" }, "track": { - "color": "#AAAAAAFF" + "color": "#00000000", + "opacity": "0" }, "corner_radius": "2", "segments": 10, @@ -1791,17 +919,17 @@ } }, { - "id": "copilot-pool-value-light", - "name": "light Copilot pool value", - "render": "1 - system.dark", - "parent": "copilot-provider", + "id": "grok-credits-value", + "name": "Grok on-demand value", + "render": "grok.credits.available", + "parent": "grok-provider", "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", "y": "28", "width": "62", "height": "13", "content": { "type": "text", - "template": "{copilot.weekly.display:usage_line}", + "template": "${grok.credits.balance:0.00}", "font_family": "Segoe UI", "font_size": "12", "weight": "medium", @@ -1809,54 +937,58 @@ "contrast": "1", "align": "left", "color": { - "color": "#1F1F1FFF" + "color": "#F5A623FF", + "light_color": "#C77700FF", + "opacity": "1" } } }, { - "id": "fable-provider", - "name": "Fable weekly meter", - "render": "providers.claude.enabled && claude.model.fable.available", - "x": "canvas.width - 1 - if((providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available), (ceil(10 / max(1, providers.count)) * 11 - 1) + 4 + 90, 90)", - "width": "if((providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available), (ceil(10 / max(1, providers.count)) * 11 - 1) + 4 + 90, 90)", + "id": "copilot-provider", + "name": "Copilot provider", + "render": "providers.copilot.enabled", + "parent": "provider-row", + "width": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4 + 62", "height": "46" }, { - "id": "fable-weekly-segments-dark", - "name": "dark Fable weekly segments", - "render": "system.dark", - "parent": "fable-provider", - "y": "if((providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available), 28, 5)", - "width": "if((providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available), (ceil(10 / max(1, providers.count)) * 11 - 1), 87)", + "id": "copilot-pool-segments", + "name": "Copilot pool segments", + "render": "1", + "parent": "copilot-provider", + "y": "28", + "width": "ceil(10 / max(1, providers.count)) * 11 - 1", "height": "13", "content": { "type": "progress", - "value": "claude.model.fable.display", + "value": "copilot.weekly.display", "direction": "left_to_right", "fill": { - "color": "#7C6BB0FF" + "color": "#EC4899FF", + "light_color": "#DB2777FF" }, "track": { - "color": "#444444FF" + "color": "#444444FF", + "light_color": "#AAAAAAFF" }, "corner_radius": "2", - "segments": 8, - "segments_expression": "if((providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available), ceil(10 / max(1, providers.count)), 8)", + "segments": 10, + "segments_expression": "ceil(10 / max(1, providers.count))", "segment_gap": "1" } }, { - "id": "fable-weekly-value-dark", - "name": "dark Fable weekly value", - "render": "system.dark", - "parent": "fable-provider", - "x": "((ceil(10 / max(1, providers.count)) * 11 - 1) + 4) * (providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available)", + "id": "copilot-pool-value", + "name": "Copilot pool value", + "render": "1", + "parent": "copilot-provider", + "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", "y": "28", - "width": "90", + "width": "62", "height": "13", "content": { "type": "text", - "template": "Fable {claude.model.fable.display:usage_line}", + "template": "{copilot.weekly.display:usage_line}", "font_family": "Segoe UI", "font_size": "12", "weight": "medium", @@ -1864,14 +996,23 @@ "contrast": "1", "align": "left", "color": { - "color": "#B5A8E0FF" + "color": "#F5F5F5FF", + "light_color": "#1F1F1FFF" } } }, { - "id": "fable-weekly-segments-light", - "name": "light Fable weekly segments", - "render": "1 - system.dark", + "id": "fable-provider", + "name": "Fable weekly meter", + "render": "providers.claude.enabled && claude.model.fable.available", + "x": "canvas.width - 1 - if((providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available), (ceil(10 / max(1, providers.count)) * 11 - 1) + 4 + 90, 90)", + "width": "if((providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available), (ceil(10 / max(1, providers.count)) * 11 - 1) + 4 + 90, 90)", + "height": "46" + }, + { + "id": "fable-weekly-segments", + "name": "Fable weekly segments", + "render": "1", "parent": "fable-provider", "y": "if((providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available), 28, 5)", "width": "if((providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available), (ceil(10 / max(1, providers.count)) * 11 - 1), 87)", @@ -1884,7 +1025,8 @@ "color": "#7C6BB0FF" }, "track": { - "color": "#AAAAAAFF" + "color": "#444444FF", + "light_color": "#AAAAAAFF" }, "corner_radius": "2", "segments": 8, @@ -1893,9 +1035,9 @@ } }, { - "id": "fable-weekly-value-light", - "name": "light Fable weekly value", - "render": "1 - system.dark", + "id": "fable-weekly-value", + "name": "Fable weekly value", + "render": "1", "parent": "fable-provider", "x": "((ceil(10 / max(1, providers.count)) * 11 - 1) + 4) * (providers.claude.enabled && claude.weekly.available && !claude.session.available && claude.model.fable.available)", "y": "28", @@ -1911,7 +1053,8 @@ "contrast": "1", "align": "left", "color": { - "color": "#5B4B8AFF" + "color": "#B5A8E0FF", + "light_color": "#5B4B8AFF" } } } diff --git a/src/themes/classic-vertical.json b/src/themes/classic-vertical.json index 97af21ee..c8c2fdcb 100644 --- a/src/themes/classic-vertical.json +++ b/src/themes/classic-vertical.json @@ -44,7 +44,7 @@ "id": "claude-title", "name": "claude-title", "parent": "claude-provider", - "render": "system.dark", + "render": "1", "x": "2", "y": "2", "width": "max(1, canvas.width - 4)", @@ -59,61 +59,16 @@ "contrast": "1", "align": "center", "color": { - "color": "#D97757" - } - } - }, - { - "id": "claude-title-light", - "name": "claude-title-light", - "parent": "claude-provider", - "render": "1 - system.dark", - "x": "2", - "y": "2", - "width": "max(1, canvas.width - 4)", - "height": "14", - "content": { - "type": "text", - "template": "Claude", - "font_family": "Segoe UI", - "font_size": "min(10, (canvas.width - 4) / 5.5)", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "center", - "color": { - "color": "#8B3E25" - } - } - }, - { - "id": "claude-session-value-dark", - "name": "claude-session-value-dark", - "parent": "claude-provider", - "render": "(system.dark) && claude.session.available", - "x": "2", - "y": "18", - "width": "max(1, canvas.width - 4)", - "height": "14", - "content": { - "type": "text", - "template": "{i18n.session_window} {claude.session.display:usage_badge}", - "font_family": "Segoe UI", - "font_size": "min(10, (canvas.width - 4) / 5.5)", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "center", - "color": { - "color": "#F5F5F5" + "color": "#D97757", + "light_color": "#8B3E25" } } }, { - "id": "claude-session-value-light", - "name": "claude-session-value-light", + "id": "claude-session-value", + "name": "claude-session-value", "parent": "claude-provider", - "render": "(1 - system.dark) && claude.session.available", + "render": "claude.session.available", "x": "2", "y": "18", "width": "max(1, canvas.width - 4)", @@ -128,7 +83,8 @@ "contrast": "1", "align": "center", "color": { - "color": "#202020" + "color": "#F5F5F5", + "light_color": "#202020" } } }, @@ -155,33 +111,10 @@ } }, { - "id": "claude-weekly-value-dark", - "name": "claude-weekly-value-dark", - "parent": "claude-provider", - "render": "system.dark", - "x": "2", - "y": "40", - "width": "max(1, canvas.width - 4)", - "height": "14", - "content": { - "type": "text", - "template": "{claude.weekly.label} {claude.weekly.display:usage_badge}", - "font_family": "Segoe UI", - "font_size": "min(10, (canvas.width - 4) / 5.5)", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "center", - "color": { - "color": "#F5F5F5" - } - } - }, - { - "id": "claude-weekly-value-light", - "name": "claude-weekly-value-light", + "id": "claude-weekly-value", + "name": "claude-weekly-value", "parent": "claude-provider", - "render": "1 - system.dark", + "render": "1", "x": "2", "y": "40", "width": "max(1, canvas.width - 4)", @@ -196,7 +129,8 @@ "contrast": "1", "align": "center", "color": { - "color": "#202020" + "color": "#F5F5F5", + "light_color": "#202020" } } }, @@ -234,30 +168,7 @@ "id": "codex-title", "name": "codex-title", "parent": "codex-provider", - "render": "system.dark", - "x": "2", - "y": "2", - "width": "max(1, canvas.width - 4)", - "height": "14", - "content": { - "type": "text", - "template": "Codex", - "font_family": "Segoe UI", - "font_size": "min(10, (canvas.width - 4) / 5.5)", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "center", - "color": { - "color": "#4CAF50" - } - } - }, - { - "id": "codex-title-light", - "name": "codex-title-light", - "parent": "codex-provider", - "render": "1 - system.dark", + "render": "1", "x": "2", "y": "2", "width": "max(1, canvas.width - 4)", @@ -272,38 +183,16 @@ "contrast": "1", "align": "center", "color": { - "color": "#1B5E20" - } - } - }, - { - "id": "codex-session-value-dark", - "name": "codex-session-value-dark", - "parent": "codex-provider", - "render": "system.dark", - "x": "2", - "y": "18", - "width": "max(1, canvas.width - 4)", - "height": "14", - "content": { - "type": "text", - "template": "{i18n.session_window} {codex.session.display:usage_badge}", - "font_family": "Segoe UI", - "font_size": "min(10, (canvas.width - 4) / 5.5)", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "center", - "color": { - "color": "#F5F5F5" + "color": "#4CAF50", + "light_color": "#1B5E20" } } }, { - "id": "codex-session-value-light", - "name": "codex-session-value-light", + "id": "codex-session-value", + "name": "codex-session-value", "parent": "codex-provider", - "render": "1 - system.dark", + "render": "1", "x": "2", "y": "18", "width": "max(1, canvas.width - 4)", @@ -318,7 +207,8 @@ "contrast": "1", "align": "center", "color": { - "color": "#202020" + "color": "#F5F5F5", + "light_color": "#202020" } } }, @@ -345,33 +235,10 @@ } }, { - "id": "codex-weekly-value-dark", - "name": "codex-weekly-value-dark", - "parent": "codex-provider", - "render": "system.dark", - "x": "2", - "y": "40", - "width": "max(1, canvas.width - 4)", - "height": "14", - "content": { - "type": "text", - "template": "{codex.weekly.label} {codex.weekly.display:usage_badge}", - "font_family": "Segoe UI", - "font_size": "min(10, (canvas.width - 4) / 5.5)", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "center", - "color": { - "color": "#F5F5F5" - } - } - }, - { - "id": "codex-weekly-value-light", - "name": "codex-weekly-value-light", + "id": "codex-weekly-value", + "name": "codex-weekly-value", "parent": "codex-provider", - "render": "1 - system.dark", + "render": "1", "x": "2", "y": "40", "width": "max(1, canvas.width - 4)", @@ -386,7 +253,8 @@ "contrast": "1", "align": "center", "color": { - "color": "#202020" + "color": "#F5F5F5", + "light_color": "#202020" } } }, @@ -424,7 +292,7 @@ "id": "antigravity-title", "name": "antigravity-title", "parent": "antigravity-provider", - "render": "system.dark", + "render": "1", "x": "2", "y": "2", "width": "max(1, canvas.width - 4)", @@ -439,61 +307,16 @@ "contrast": "1", "align": "center", "color": { - "color": "#2196F3" - } - } - }, - { - "id": "antigravity-title-light", - "name": "antigravity-title-light", - "parent": "antigravity-provider", - "render": "1 - system.dark", - "x": "2", - "y": "2", - "width": "max(1, canvas.width - 4)", - "height": "14", - "content": { - "type": "text", - "template": "Antigravity", - "font_family": "Segoe UI", - "font_size": "min(10, (canvas.width - 4) / 5.5)", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "center", - "color": { - "color": "#0B5C9E" - } - } - }, - { - "id": "antigravity-session-value-dark", - "name": "antigravity-session-value-dark", - "parent": "antigravity-provider", - "render": "system.dark", - "x": "2", - "y": "18", - "width": "max(1, canvas.width - 4)", - "height": "14", - "content": { - "type": "text", - "template": "{i18n.session_window} {antigravity.session.display:usage_badge}", - "font_family": "Segoe UI", - "font_size": "min(10, (canvas.width - 4) / 5.5)", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "center", - "color": { - "color": "#F5F5F5" + "color": "#2196F3", + "light_color": "#0B5C9E" } } }, { - "id": "antigravity-session-value-light", - "name": "antigravity-session-value-light", + "id": "antigravity-session-value", + "name": "antigravity-session-value", "parent": "antigravity-provider", - "render": "1 - system.dark", + "render": "1", "x": "2", "y": "18", "width": "max(1, canvas.width - 4)", @@ -508,7 +331,8 @@ "contrast": "1", "align": "center", "color": { - "color": "#202020" + "color": "#F5F5F5", + "light_color": "#202020" } } }, @@ -535,33 +359,10 @@ } }, { - "id": "antigravity-weekly-value-dark", - "name": "antigravity-weekly-value-dark", - "parent": "antigravity-provider", - "render": "system.dark", - "x": "2", - "y": "40", - "width": "max(1, canvas.width - 4)", - "height": "14", - "content": { - "type": "text", - "template": "{antigravity.weekly.label} {antigravity.weekly.display:usage_badge}", - "font_family": "Segoe UI", - "font_size": "min(10, (canvas.width - 4) / 5.5)", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "center", - "color": { - "color": "#F5F5F5" - } - } - }, - { - "id": "antigravity-weekly-value-light", - "name": "antigravity-weekly-value-light", + "id": "antigravity-weekly-value", + "name": "antigravity-weekly-value", "parent": "antigravity-provider", - "render": "1 - system.dark", + "render": "1", "x": "2", "y": "40", "width": "max(1, canvas.width - 4)", @@ -576,7 +377,8 @@ "contrast": "1", "align": "center", "color": { - "color": "#202020" + "color": "#F5F5F5", + "light_color": "#202020" } } }, @@ -614,7 +416,7 @@ "id": "opencode-title", "name": "opencode-title", "parent": "opencode-provider", - "render": "system.dark", + "render": "1", "x": "2", "y": "2", "width": "max(1, canvas.width - 4)", @@ -629,61 +431,16 @@ "contrast": "1", "align": "center", "color": { - "color": "#F59E0B" + "color": "#F59E0B", + "light_color": "#805000" } } }, { - "id": "opencode-title-light", - "name": "opencode-title-light", + "id": "opencode-session-value", + "name": "opencode-session-value", "parent": "opencode-provider", - "render": "1 - system.dark", - "x": "2", - "y": "2", - "width": "max(1, canvas.width - 4)", - "height": "14", - "content": { - "type": "text", - "template": "OpenCode", - "font_family": "Segoe UI", - "font_size": "min(10, (canvas.width - 4) / 5.5)", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "center", - "color": { - "color": "#805000" - } - } - }, - { - "id": "opencode-session-value-dark", - "name": "opencode-session-value-dark", - "parent": "opencode-provider", - "render": "system.dark", - "x": "2", - "y": "18", - "width": "max(1, canvas.width - 4)", - "height": "14", - "content": { - "type": "text", - "template": "{i18n.session_window} {opencode.session.display:usage_badge}", - "font_family": "Segoe UI", - "font_size": "min(10, (canvas.width - 4) / 5.5)", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "center", - "color": { - "color": "#F5F5F5" - } - } - }, - { - "id": "opencode-session-value-light", - "name": "opencode-session-value-light", - "parent": "opencode-provider", - "render": "1 - system.dark", + "render": "1", "x": "2", "y": "18", "width": "max(1, canvas.width - 4)", @@ -698,7 +455,8 @@ "contrast": "1", "align": "center", "color": { - "color": "#202020" + "color": "#F5F5F5", + "light_color": "#202020" } } }, @@ -725,33 +483,10 @@ } }, { - "id": "opencode-weekly-value-dark", - "name": "opencode-weekly-value-dark", - "parent": "opencode-provider", - "render": "system.dark", - "x": "2", - "y": "40", - "width": "max(1, canvas.width - 4)", - "height": "14", - "content": { - "type": "text", - "template": "{opencode.weekly.label} {opencode.weekly.display:usage_badge}", - "font_family": "Segoe UI", - "font_size": "min(10, (canvas.width - 4) / 5.5)", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "center", - "color": { - "color": "#F5F5F5" - } - } - }, - { - "id": "opencode-weekly-value-light", - "name": "opencode-weekly-value-light", + "id": "opencode-weekly-value", + "name": "opencode-weekly-value", "parent": "opencode-provider", - "render": "1 - system.dark", + "render": "1", "x": "2", "y": "40", "width": "max(1, canvas.width - 4)", @@ -766,7 +501,8 @@ "contrast": "1", "align": "center", "color": { - "color": "#202020" + "color": "#F5F5F5", + "light_color": "#202020" } } }, @@ -804,30 +540,7 @@ "id": "cursor-title", "name": "cursor-title", "parent": "cursor-provider", - "render": "system.dark", - "x": "2", - "y": "2", - "width": "max(1, canvas.width - 4)", - "height": "14", - "content": { - "type": "text", - "template": "Cursor", - "font_family": "Segoe UI", - "font_size": "min(10, (canvas.width - 4) / 5.5)", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "center", - "color": { - "color": "#00BCD4" - } - } - }, - { - "id": "cursor-title-light", - "name": "cursor-title-light", - "parent": "cursor-provider", - "render": "1 - system.dark", + "render": "1", "x": "2", "y": "2", "width": "max(1, canvas.width - 4)", @@ -842,15 +555,16 @@ "contrast": "1", "align": "center", "color": { - "color": "#006473" + "color": "#00BCD4", + "light_color": "#006473" } } }, { - "id": "cursor-session-value-dark", - "name": "cursor-session-value-dark", + "id": "cursor-session-value", + "name": "cursor-session-value", "parent": "cursor-provider", - "render": "system.dark", + "render": "1", "x": "2", "y": "18", "width": "max(1, canvas.width - 4)", @@ -865,30 +579,8 @@ "contrast": "1", "align": "center", "color": { - "color": "#F5F5F5" - } - } - }, - { - "id": "cursor-session-value-light", - "name": "cursor-session-value-light", - "parent": "cursor-provider", - "render": "1 - system.dark", - "x": "2", - "y": "18", - "width": "max(1, canvas.width - 4)", - "height": "14", - "content": { - "type": "text", - "template": "Auto {cursor.session.display:usage_badge}", - "font_family": "Segoe UI", - "font_size": "min(10, (canvas.width - 4) / 5.5)", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "center", - "color": { - "color": "#202020" + "color": "#F5F5F5", + "light_color": "#202020" } } }, @@ -915,10 +607,10 @@ } }, { - "id": "cursor-weekly-value-dark", - "name": "cursor-weekly-value-dark", + "id": "cursor-weekly-value", + "name": "cursor-weekly-value", "parent": "cursor-provider", - "render": "system.dark", + "render": "1", "x": "2", "y": "40", "width": "max(1, canvas.width - 4)", @@ -933,30 +625,8 @@ "contrast": "1", "align": "center", "color": { - "color": "#F5F5F5" - } - } - }, - { - "id": "cursor-weekly-value-light", - "name": "cursor-weekly-value-light", - "parent": "cursor-provider", - "render": "1 - system.dark", - "x": "2", - "y": "40", - "width": "max(1, canvas.width - 4)", - "height": "14", - "content": { - "type": "text", - "template": "API {cursor.weekly.display:usage_badge}", - "font_family": "Segoe UI", - "font_size": "min(10, (canvas.width - 4) / 5.5)", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "center", - "color": { - "color": "#202020" + "color": "#F5F5F5", + "light_color": "#202020" } } }, @@ -994,30 +664,7 @@ "id": "grok-title", "name": "grok-title", "parent": "grok-provider", - "render": "system.dark", - "x": "2", - "y": "2", - "width": "max(1, canvas.width - 4)", - "height": "14", - "content": { - "type": "text", - "template": "Grok", - "font_family": "Segoe UI", - "font_size": "min(10, (canvas.width - 4) / 5.5)", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "center", - "color": { - "color": "#B57EF8" - } - } - }, - { - "id": "grok-title-light", - "name": "grok-title-light", - "parent": "grok-provider", - "render": "1 - system.dark", + "render": "1", "x": "2", "y": "2", "width": "max(1, canvas.width - 4)", @@ -1032,15 +679,16 @@ "contrast": "1", "align": "center", "color": { - "color": "#7132A8" + "color": "#B57EF8", + "light_color": "#7132A8" } } }, { - "id": "grok-weekly-value-dark", - "name": "grok-weekly-value-dark", + "id": "grok-weekly-value", + "name": "grok-weekly-value", "parent": "grok-provider", - "render": "system.dark", + "render": "1", "x": "2", "y": "18", "width": "max(1, canvas.width - 4)", @@ -1055,30 +703,8 @@ "contrast": "1", "align": "center", "color": { - "color": "#F5F5F5" - } - } - }, - { - "id": "grok-weekly-value-light", - "name": "grok-weekly-value-light", - "parent": "grok-provider", - "render": "1 - system.dark", - "x": "2", - "y": "18", - "width": "max(1, canvas.width - 4)", - "height": "14", - "content": { - "type": "text", - "template": "{grok.weekly.label} {grok.weekly.display:usage_badge}", - "font_family": "Segoe UI", - "font_size": "min(10, (canvas.width - 4) / 5.5)", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "center", - "color": { - "color": "#202020" + "color": "#F5F5F5", + "light_color": "#202020" } } }, @@ -1116,7 +742,7 @@ "id": "copilot-title", "name": "copilot-title", "parent": "copilot-provider", - "render": "system.dark", + "render": "1", "x": "2", "y": "2", "width": "max(1, canvas.width - 4)", @@ -1131,61 +757,16 @@ "contrast": "1", "align": "center", "color": { - "color": "#F472B6" - } - } - }, - { - "id": "copilot-title-light", - "name": "copilot-title-light", - "parent": "copilot-provider", - "render": "1 - system.dark", - "x": "2", - "y": "2", - "width": "max(1, canvas.width - 4)", - "height": "14", - "content": { - "type": "text", - "template": "Copilot", - "font_family": "Segoe UI", - "font_size": "min(10, (canvas.width - 4) / 5.5)", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "center", - "color": { - "color": "#A11250" - } - } - }, - { - "id": "copilot-weekly-value-dark", - "name": "copilot-weekly-value-dark", - "parent": "copilot-provider", - "render": "system.dark", - "x": "2", - "y": "18", - "width": "max(1, canvas.width - 4)", - "height": "14", - "content": { - "type": "text", - "template": "{copilot.weekly.label} {copilot.weekly.display:usage_badge}", - "font_family": "Segoe UI", - "font_size": "min(10, (canvas.width - 4) / 5.5)", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "center", - "color": { - "color": "#F5F5F5" + "color": "#F472B6", + "light_color": "#A11250" } } }, { - "id": "copilot-weekly-value-light", - "name": "copilot-weekly-value-light", + "id": "copilot-weekly-value", + "name": "copilot-weekly-value", "parent": "copilot-provider", - "render": "1 - system.dark", + "render": "1", "x": "2", "y": "18", "width": "max(1, canvas.width - 4)", @@ -1200,7 +781,8 @@ "contrast": "1", "align": "center", "color": { - "color": "#202020" + "color": "#F5F5F5", + "light_color": "#202020" } } }, diff --git a/src/themes/compact-fluent-quad.json b/src/themes/compact-fluent-quad.json index 0a5a9e2e..ac5ac298 100644 --- a/src/themes/compact-fluent-quad.json +++ b/src/themes/compact-fluent-quad.json @@ -59,9 +59,9 @@ } }, { - "id": "cursor-session-segments-dark", - "name": "dark Cursor Auto segments", - "render": "system.dark", + "id": "cursor-session-segments", + "name": "Cursor Auto segments", + "render": "1", "visibility": "100", "parent": "cursor-provider", "y": "11", @@ -81,10 +81,12 @@ "direction": "left_to_right", "fill": { "color": "#FFFFFFFF", + "light_color": "#1A1A1AFF", "opacity": "1" }, "track": { "color": "#444444FF", + "light_color": "#AAAAAAFF", "opacity": "1" }, "corner_radius": "1.5", @@ -94,9 +96,9 @@ } }, { - "id": "cursor-session-value-dark", - "name": "dark Cursor Auto value", - "render": "system.dark", + "id": "cursor-session-value", + "name": "Cursor Auto value", + "render": "1", "visibility": "100", "parent": "cursor-provider", "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", @@ -122,17 +124,18 @@ "align": "left", "color": { "color": "#F1F5F9FF", + "light_color": "#1A1A1AFF", "opacity": "1" } } }, { - "id": "cursor-session-segments-light", - "name": "light Cursor Auto segments", - "render": "1 - system.dark", + "id": "cursor-weekly-segments", + "name": "Cursor API segments", + "render": "1", "visibility": "100", "parent": "cursor-provider", - "y": "11", + "y": "27", "width": "ceil(10 / max(1, providers.count)) * 11 - 1", "height": "9", "background": { @@ -145,14 +148,16 @@ "gap": "0", "content": { "type": "progress", - "value": "cursor.session.display", + "value": "cursor.weekly.display", "direction": "left_to_right", "fill": { - "color": "#1A1A1AFF", + "color": "#FFFFFFFF", + "light_color": "#1A1A1AFF", "opacity": "1" }, "track": { - "color": "#AAAAAAFF", + "color": "#444444FF", + "light_color": "#AAAAAAFF", "opacity": "1" }, "corner_radius": "1.5", @@ -162,13 +167,13 @@ } }, { - "id": "cursor-session-value-light", - "name": "light Cursor Auto value", - "render": "1 - system.dark", + "id": "cursor-weekly-value", + "name": "Cursor API value", + "render": "1", "visibility": "100", "parent": "cursor-provider", "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "9", + "y": "25", "width": "80", "height": "13", "background": { @@ -181,7 +186,7 @@ "gap": "0", "content": { "type": "text", - "template": "int {cursor.session.display:usage_line}", + "template": "ext {cursor.weekly.display:usage_line}", "font_family": "Segoe UI", "font_size": "12", "weight": "medium", @@ -189,18 +194,59 @@ "contrast": "1", "align": "left", "color": { - "color": "#1A1A1AFF", + "color": "#F1F5F9FF", + "light_color": "#1A1A1AFF", "opacity": "1" } } }, { - "id": "cursor-weekly-segments-dark", - "name": "dark Cursor API segments", - "render": "system.dark", + "id": "provider-row", + "name": "Enabled providers", + "render": "1", "visibility": "100", - "parent": "cursor-provider", - "y": "27", + "x": "0", + "width": "canvas.width", + "height": "46", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "row", + "align": "start", + "gap": "6", + "content": { + "type": "none" + } + }, + { + "id": "claude-provider", + "name": "Claude Code provider", + "render": "providers.claude.enabled", + "visibility": "100", + "parent": "provider-row", + "width": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4 + 62", + "height": "46", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "claude-session-segments", + "name": "Claude Code 5-hour segments", + "render": "claude.session.available", + "visibility": "100", + "parent": "claude-provider", + "y": "11", "width": "ceil(10 / max(1, providers.count)) * 11 - 1", "height": "9", "background": { @@ -213,14 +259,15 @@ "gap": "0", "content": { "type": "progress", - "value": "cursor.weekly.display", + "value": "claude.session.display", "direction": "left_to_right", "fill": { - "color": "#FFFFFFFF", + "color": "#D97757FF", "opacity": "1" }, "track": { "color": "#444444FF", + "light_color": "#AAAAAAFF", "opacity": "1" }, "corner_radius": "1.5", @@ -230,14 +277,14 @@ } }, { - "id": "cursor-weekly-value-dark", - "name": "dark Cursor API value", - "render": "system.dark", + "id": "claude-session-value", + "name": "Claude Code 5-hour value", + "render": "claude.session.available", "visibility": "100", - "parent": "cursor-provider", + "parent": "claude-provider", "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "25", - "width": "80", + "y": "9", + "width": "62", "height": "13", "background": { "type": "none" @@ -249,7 +296,7 @@ "gap": "0", "content": { "type": "text", - "template": "ext {cursor.weekly.display:usage_line}", + "template": "{claude.session.display:usage_line}", "font_family": "Segoe UI", "font_size": "12", "weight": "medium", @@ -257,17 +304,18 @@ "contrast": "1", "align": "left", "color": { - "color": "#F1F5F9FF", + "color": "#F09A7AFF", + "light_color": "#A94F32FF", "opacity": "1" } } }, { - "id": "cursor-weekly-segments-light", - "name": "light Cursor API segments", - "render": "1 - system.dark", + "id": "claude-weekly-segments", + "name": "Claude Code 7-day segments", + "render": "1", "visibility": "100", - "parent": "cursor-provider", + "parent": "claude-provider", "y": "27", "width": "ceil(10 / max(1, providers.count)) * 11 - 1", "height": "9", @@ -281,14 +329,15 @@ "gap": "0", "content": { "type": "progress", - "value": "cursor.weekly.display", + "value": "claude.weekly.display", "direction": "left_to_right", "fill": { - "color": "#1A1A1AFF", + "color": "#D97757FF", "opacity": "1" }, "track": { - "color": "#AAAAAAFF", + "color": "#444444FF", + "light_color": "#AAAAAAFF", "opacity": "1" }, "corner_radius": "1.5", @@ -298,14 +347,14 @@ } }, { - "id": "cursor-weekly-value-light", - "name": "light Cursor API value", - "render": "1 - system.dark", + "id": "claude-weekly-value", + "name": "Claude Code 7-day value", + "render": "!claude.credits.available", "visibility": "100", - "parent": "cursor-provider", + "parent": "claude-provider", "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", "y": "25", - "width": "80", + "width": "62", "height": "13", "background": { "type": "none" @@ -317,7 +366,7 @@ "gap": "0", "content": { "type": "text", - "template": "ext {cursor.weekly.display:usage_line}", + "template": "{claude.weekly.display:usage_line}", "font_family": "Segoe UI", "font_size": "12", "weight": "medium", @@ -325,38 +374,19 @@ "contrast": "1", "align": "left", "color": { - "color": "#1A1A1AFF", + "color": "#F09A7AFF", + "light_color": "#A94F32FF", "opacity": "1" } } }, { - "id": "provider-row", - "name": "Enabled providers", - "render": "1", - "visibility": "100", - "x": "0", - "width": "canvas.width", - "height": "46", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "row", - "align": "start", - "gap": "6", - "content": { - "type": "none" - } - }, - { - "id": "claude-provider", - "name": "Claude Code provider", - "render": "providers.claude.enabled", + "id": "fable-provider", + "name": "Fable weekly meter", + "render": "providers.claude.enabled && claude.model.fable.available", "visibility": "100", "parent": "provider-row", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4 + 62", + "width": "90", "height": "46", "background": { "type": "none" @@ -371,13 +401,13 @@ } }, { - "id": "claude-session-segments-dark", - "name": "dark Claude Code 5-hour segments", - "render": "(system.dark) && claude.session.available", + "id": "fable-weekly-segments", + "name": "Fable weekly segments", + "render": "1", "visibility": "100", - "parent": "claude-provider", + "parent": "fable-provider", "y": "11", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", + "width": "floor((90 + 1) / 11) * 11 - 1", "height": "9", "background": { "type": "none" @@ -389,31 +419,31 @@ "gap": "0", "content": { "type": "progress", - "value": "claude.session.display", + "value": "claude.model.fable.display", "direction": "left_to_right", "fill": { - "color": "#D97757FF", + "color": "#7C6BB0FF", "opacity": "1" }, "track": { "color": "#444444FF", + "light_color": "#AAAAAAFF", "opacity": "1" }, "corner_radius": "1.5", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", + "segments": 8, + "segments_expression": "floor((90 + 1) / 11)", "segment_gap": "1" } }, { - "id": "claude-session-value-dark", - "name": "dark Claude Code 5-hour value", - "render": "(system.dark) && claude.session.available", + "id": "fable-weekly-value", + "name": "Fable weekly value", + "render": "1", "visibility": "100", - "parent": "claude-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "9", - "width": "62", + "parent": "fable-provider", + "y": "25", + "width": "90", "height": "13", "background": { "type": "none" @@ -425,7 +455,7 @@ "gap": "0", "content": { "type": "text", - "template": "{claude.session.display:usage_line}", + "template": "Fable {claude.model.fable.display:usage_line}", "font_family": "Segoe UI", "font_size": "12", "weight": "medium", @@ -433,20 +463,20 @@ "contrast": "1", "align": "left", "color": { - "color": "#F09A7AFF", + "color": "#B5A8E0FF", + "light_color": "#5B4B8AFF", "opacity": "1" } } }, { - "id": "claude-session-segments-light", - "name": "light Claude Code 5-hour segments", - "render": "(1 - system.dark) && claude.session.available", + "id": "codex-provider", + "name": "Codex provider", + "render": "providers.codex.enabled", "visibility": "100", - "parent": "claude-provider", - "y": "11", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "9", + "parent": "provider-row", + "width": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4 + 62", + "height": "46", "background": { "type": "none" }, @@ -456,63 +486,16 @@ "align": "start", "gap": "0", "content": { - "type": "progress", - "value": "claude.session.display", - "direction": "left_to_right", - "fill": { - "color": "#D97757FF", - "opacity": "1" - }, - "track": { - "color": "#AAAAAAFF", - "opacity": "1" - }, - "corner_radius": "1.5", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "claude-session-value-light", - "name": "light Claude Code 5-hour value", - "render": "(1 - system.dark) && claude.session.available", - "visibility": "100", - "parent": "claude-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "9", - "width": "62", - "height": "13", - "background": { "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "text", - "template": "{claude.session.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#A94F32FF", - "opacity": "1" - } } }, { - "id": "claude-weekly-segments-dark", - "name": "dark Claude Code 7-day segments", - "render": "system.dark", + "id": "codex-session-segments", + "name": "Codex 5-hour segments", + "render": "1", "visibility": "100", - "parent": "claude-provider", - "y": "27", + "parent": "codex-provider", + "y": "11", "width": "ceil(10 / max(1, providers.count)) * 11 - 1", "height": "9", "background": { @@ -525,14 +508,16 @@ "gap": "0", "content": { "type": "progress", - "value": "claude.weekly.display", + "value": "codex.five_hour.display", "direction": "left_to_right", "fill": { - "color": "#D97757FF", + "color": "#3B82F6FF", + "light_color": "#2563EBFF", "opacity": "1" }, "track": { "color": "#444444FF", + "light_color": "#AAAAAAFF", "opacity": "1" }, "corner_radius": "1.5", @@ -542,13 +527,13 @@ } }, { - "id": "claude-weekly-value-dark", - "name": "dark Claude Code 7-day value", - "render": "(system.dark) && !claude.credits.available", + "id": "codex-session-value", + "name": "Codex 5-hour value", + "render": "1", "visibility": "100", - "parent": "claude-provider", + "parent": "codex-provider", "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "25", + "y": "9", "width": "62", "height": "13", "background": { @@ -561,7 +546,7 @@ "gap": "0", "content": { "type": "text", - "template": "{claude.weekly.display:usage_line}", + "template": "{codex.five_hour.display:usage_line}", "font_family": "Segoe UI", "font_size": "12", "weight": "medium", @@ -569,17 +554,18 @@ "contrast": "1", "align": "left", "color": { - "color": "#F09A7AFF", + "color": "#93C5FDFF", + "light_color": "#1D4ED8FF", "opacity": "1" } } }, { - "id": "claude-weekly-segments-light", - "name": "light Claude Code 7-day segments", - "render": "1 - system.dark", + "id": "codex-weekly-segments", + "name": "Codex 7-day segments", + "render": "1", "visibility": "100", - "parent": "claude-provider", + "parent": "codex-provider", "y": "27", "width": "ceil(10 / max(1, providers.count)) * 11 - 1", "height": "9", @@ -593,14 +579,16 @@ "gap": "0", "content": { "type": "progress", - "value": "claude.weekly.display", + "value": "codex.weekly.display", "direction": "left_to_right", "fill": { - "color": "#D97757FF", + "color": "#3B82F6FF", + "light_color": "#2563EBFF", "opacity": "1" }, "track": { - "color": "#AAAAAAFF", + "color": "#444444FF", + "light_color": "#AAAAAAFF", "opacity": "1" }, "corner_radius": "1.5", @@ -610,11 +598,11 @@ } }, { - "id": "claude-weekly-value-light", - "name": "light Claude Code 7-day value", - "render": "(1 - system.dark) && !claude.credits.available", + "id": "codex-weekly-value", + "name": "Codex 7-day value", + "render": "!codex.credits.available", "visibility": "100", - "parent": "claude-provider", + "parent": "codex-provider", "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", "y": "25", "width": "62", @@ -629,7 +617,7 @@ "gap": "0", "content": { "type": "text", - "template": "{claude.weekly.display:usage_line}", + "template": "{codex.weekly.display:usage_line}", "font_family": "Segoe UI", "font_size": "12", "weight": "medium", @@ -637,18 +625,19 @@ "contrast": "1", "align": "left", "color": { - "color": "#A94F32FF", + "color": "#93C5FDFF", + "light_color": "#1D4ED8FF", "opacity": "1" } } }, { - "id": "fable-provider", - "name": "Fable weekly meter", - "render": "providers.claude.enabled && claude.model.fable.available", + "id": "antigravity-provider", + "name": "Antigravity provider", + "render": "providers.antigravity.enabled", "visibility": "100", "parent": "provider-row", - "width": "90", + "width": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4 + 62", "height": "46", "background": { "type": "none" @@ -663,13 +652,13 @@ } }, { - "id": "fable-weekly-segments-dark", - "name": "dark Fable weekly segments", - "render": "system.dark", + "id": "antigravity-session-gemini-solo", + "name": "Antigravity Gemini solo session segments", + "render": "antigravity.gemini.enabled && !antigravity.dual_mode", "visibility": "100", - "parent": "fable-provider", + "parent": "antigravity-provider", "y": "11", - "width": "floor((90 + 1) / 11) * 11 - 1", + "width": "ceil(10 / max(1, providers.count)) * 11 - 1", "height": "9", "background": { "type": "none" @@ -681,63 +670,33 @@ "gap": "0", "content": { "type": "progress", - "value": "claude.model.fable.display", + "value": "antigravity.gemini.session.display", "direction": "left_to_right", "fill": { - "color": "#7C6BB0FF", + "color": "#00D2B4FF", + "light_color": "#00A896FF", "opacity": "1" }, "track": { "color": "#444444FF", + "light_color": "#AAAAAAFF", "opacity": "1" }, "corner_radius": "1.5", - "segments": 8, - "segments_expression": "floor((90 + 1) / 11)", + "segments": 10, + "segments_expression": "ceil(10 / max(1, providers.count))", "segment_gap": "1" } }, { - "id": "fable-weekly-value-dark", - "name": "dark Fable weekly value", - "render": "system.dark", + "id": "antigravity-session-external-solo", + "name": "Antigravity External solo session segments", + "render": "antigravity.external.enabled && !antigravity.dual_mode", "visibility": "100", - "parent": "fable-provider", - "y": "25", - "width": "90", - "height": "13", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "text", - "template": "Fable {claude.model.fable.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#B5A8E0FF", - "opacity": "1" - } - } - }, - { - "id": "fable-weekly-segments-light", - "name": "light Fable weekly segments", - "render": "1 - system.dark", - "visibility": "100", - "parent": "fable-provider", - "y": "11", - "width": "floor((90 + 1) / 11) * 11 - 1", - "height": "9", + "parent": "antigravity-provider", + "y": "11", + "width": "ceil(10 / max(1, providers.count)) * 11 - 1", + "height": "9", "background": { "type": "none" }, @@ -748,83 +707,33 @@ "gap": "0", "content": { "type": "progress", - "value": "claude.model.fable.display", + "value": "antigravity.external.session.display", "direction": "left_to_right", "fill": { - "color": "#7C6BB0FF", + "color": "#6EB4C8FF", + "light_color": "#4A8B9EFF", "opacity": "1" }, "track": { - "color": "#AAAAAAFF", + "color": "#444444FF", + "light_color": "#AAAAAAFF", "opacity": "1" }, "corner_radius": "1.5", - "segments": 8, - "segments_expression": "floor((90 + 1) / 11)", + "segments": 10, + "segments_expression": "ceil(10 / max(1, providers.count))", "segment_gap": "1" } }, { - "id": "fable-weekly-value-light", - "name": "light Fable weekly value", - "render": "1 - system.dark", - "visibility": "100", - "parent": "fable-provider", - "y": "25", - "width": "90", - "height": "13", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "text", - "template": "Fable {claude.model.fable.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#5B4B8AFF", - "opacity": "1" - } - } - }, - { - "id": "codex-provider", - "name": "Codex provider", - "render": "providers.codex.enabled", - "visibility": "100", - "parent": "provider-row", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4 + 62", - "height": "46", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "none" - } - }, - { - "id": "codex-session-segments-dark", - "name": "dark Codex 5-hour segments", - "render": "system.dark", + "id": "antigravity-session-gemini-dual", + "name": "Antigravity Gemini dual session segments", + "render": "antigravity.dual_mode", "visibility": "100", - "parent": "codex-provider", + "parent": "antigravity-provider", "y": "11", "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "9", + "height": "4", "background": { "type": "none" }, @@ -835,14 +744,16 @@ "gap": "0", "content": { "type": "progress", - "value": "codex.five_hour.display", + "value": "antigravity.gemini.session.display", "direction": "left_to_right", "fill": { - "color": "#3B82F6FF", + "color": "#00D2B4FF", + "light_color": "#00A896FF", "opacity": "1" }, "track": { "color": "#444444FF", + "light_color": "#AAAAAAFF", "opacity": "1" }, "corner_radius": "1.5", @@ -852,47 +763,14 @@ } }, { - "id": "codex-session-value-dark", - "name": "dark Codex 5-hour value", - "render": "system.dark", - "visibility": "100", - "parent": "codex-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "9", - "width": "62", - "height": "13", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "text", - "template": "{codex.five_hour.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#93C5FDFF", - "opacity": "1" - } - } - }, - { - "id": "codex-session-segments-light", - "name": "light Codex 5-hour segments", - "render": "1 - system.dark", + "id": "antigravity-session-external-dual", + "name": "Antigravity External dual session segments", + "render": "antigravity.dual_mode", "visibility": "100", - "parent": "codex-provider", - "y": "11", + "parent": "antigravity-provider", + "y": "16", "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "9", + "height": "4", "background": { "type": "none" }, @@ -903,14 +781,16 @@ "gap": "0", "content": { "type": "progress", - "value": "codex.five_hour.display", + "value": "antigravity.external.session.display", "direction": "left_to_right", "fill": { - "color": "#2563EBFF", + "color": "#6EB4C8FF", + "light_color": "#4A8B9EFF", "opacity": "1" }, "track": { - "color": "#AAAAAAFF", + "color": "#444444FF", + "light_color": "#AAAAAAFF", "opacity": "1" }, "corner_radius": "1.5", @@ -920,11 +800,11 @@ } }, { - "id": "codex-session-value-light", - "name": "light Codex 5-hour value", - "render": "1 - system.dark", + "id": "antigravity-session-gemini-value", + "name": "Antigravity Gemini session value", + "render": "antigravity.gemini.enabled && (!antigravity.dual_mode || antigravity.crossfade_opacity > 0.01)", "visibility": "100", - "parent": "codex-provider", + "parent": "antigravity-provider", "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", "y": "9", "width": "62", @@ -939,7 +819,7 @@ "gap": "0", "content": { "type": "text", - "template": "{codex.five_hour.display:usage_line}", + "template": "{antigravity.gemini.session.display:usage_line}", "font_family": "Segoe UI", "font_size": "12", "weight": "medium", @@ -947,54 +827,20 @@ "contrast": "1", "align": "left", "color": { - "color": "#1D4ED8FF", - "opacity": "1" + "color": "#5EEAD4FF", + "light_color": "#007A6CFF", + "opacity": "if(antigravity.dual_mode, antigravity.crossfade_opacity, 1.0)" } } }, { - "id": "codex-weekly-segments-dark", - "name": "dark Codex 7-day segments", - "render": "system.dark", - "visibility": "100", - "parent": "codex-provider", - "y": "27", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "9", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "progress", - "value": "codex.weekly.display", - "direction": "left_to_right", - "fill": { - "color": "#3B82F6FF", - "opacity": "1" - }, - "track": { - "color": "#444444FF", - "opacity": "1" - }, - "corner_radius": "1.5", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "codex-weekly-value-dark", - "name": "dark Codex 7-day value", - "render": "(system.dark) && !codex.credits.available", + "id": "antigravity-session-external-value", + "name": "Antigravity External session value", + "render": "antigravity.external.enabled && (!antigravity.dual_mode || (1.0 - antigravity.crossfade_opacity) > 0.01)", "visibility": "100", - "parent": "codex-provider", + "parent": "antigravity-provider", "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "25", + "y": "9", "width": "62", "height": "13", "background": { @@ -1007,7 +853,7 @@ "gap": "0", "content": { "type": "text", - "template": "{codex.weekly.display:usage_line}", + "template": "{antigravity.external.session.display:usage_line}", "font_family": "Segoe UI", "font_size": "12", "weight": "medium", @@ -1015,17 +861,18 @@ "contrast": "1", "align": "left", "color": { - "color": "#93C5FDFF", - "opacity": "1" + "color": "#98D0E0FF", + "light_color": "#2D6F82FF", + "opacity": "if(antigravity.dual_mode, 1.0 - antigravity.crossfade_opacity, 1.0)" } } }, { - "id": "codex-weekly-segments-light", - "name": "light Codex 7-day segments", - "render": "1 - system.dark", + "id": "antigravity-weekly-gemini-solo", + "name": "Antigravity Gemini solo weekly segments", + "render": "antigravity.gemini.enabled && !antigravity.dual_mode", "visibility": "100", - "parent": "codex-provider", + "parent": "antigravity-provider", "y": "27", "width": "ceil(10 / max(1, providers.count)) * 11 - 1", "height": "9", @@ -1039,1197 +886,30 @@ "gap": "0", "content": { "type": "progress", - "value": "codex.weekly.display", + "value": "antigravity.gemini.weekly.display", "direction": "left_to_right", "fill": { - "color": "#2563EBFF", - "opacity": "1" - }, - "track": { - "color": "#AAAAAAFF", - "opacity": "1" - }, - "corner_radius": "1.5", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "codex-weekly-value-light", - "name": "light Codex 7-day value", - "render": "(1 - system.dark) && !codex.credits.available", - "visibility": "100", - "parent": "codex-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "25", - "width": "62", - "height": "13", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "text", - "template": "{codex.weekly.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#1D4ED8FF", + "color": "#00D2B4FF", + "light_color": "#00A896FF", "opacity": "1" - } - } - }, - { - "id": "antigravity-provider", - "name": "Antigravity provider", - "render": "providers.antigravity.enabled", - "visibility": "100", - "parent": "provider-row", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4 + 62", - "height": "46", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "none" - } - }, - { - "id": "antigravity-session-gemini-solo-dark", - "name": "dark Antigravity Gemini solo session segments", - "render": "system.dark && antigravity.gemini.enabled && !antigravity.dual_mode", - "visibility": "100", - "parent": "antigravity-provider", - "y": "11", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "9", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "progress", - "value": "antigravity.gemini.session.display", - "direction": "left_to_right", - "fill": { - "color": "#00D2B4FF", - "opacity": "1" - }, - "track": { - "color": "#444444FF", - "opacity": "1" - }, - "corner_radius": "1.5", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "antigravity-session-gemini-solo-light", - "name": "light Antigravity Gemini solo session segments", - "render": "(1 - system.dark) && antigravity.gemini.enabled && !antigravity.dual_mode", - "visibility": "100", - "parent": "antigravity-provider", - "y": "11", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "9", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "progress", - "value": "antigravity.gemini.session.display", - "direction": "left_to_right", - "fill": { - "color": "#00A896FF", - "opacity": "1" - }, - "track": { - "color": "#AAAAAAFF", - "opacity": "1" - }, - "corner_radius": "1.5", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "antigravity-session-external-solo-dark", - "name": "dark Antigravity External solo session segments", - "render": "system.dark && antigravity.external.enabled && !antigravity.dual_mode", - "visibility": "100", - "parent": "antigravity-provider", - "y": "11", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "9", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "progress", - "value": "antigravity.external.session.display", - "direction": "left_to_right", - "fill": { - "color": "#6EB4C8FF", - "opacity": "1" - }, - "track": { - "color": "#444444FF", - "opacity": "1" - }, - "corner_radius": "1.5", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "antigravity-session-external-solo-light", - "name": "light Antigravity External solo session segments", - "render": "(1 - system.dark) && antigravity.external.enabled && !antigravity.dual_mode", - "visibility": "100", - "parent": "antigravity-provider", - "y": "11", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "9", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "progress", - "value": "antigravity.external.session.display", - "direction": "left_to_right", - "fill": { - "color": "#4A8B9EFF", - "opacity": "1" - }, - "track": { - "color": "#AAAAAAFF", - "opacity": "1" - }, - "corner_radius": "1.5", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "antigravity-session-gemini-dual-dark", - "name": "dark Antigravity Gemini dual session segments", - "render": "system.dark && antigravity.dual_mode", - "visibility": "100", - "parent": "antigravity-provider", - "y": "11", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "4", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "progress", - "value": "antigravity.gemini.session.display", - "direction": "left_to_right", - "fill": { - "color": "#00D2B4FF", - "opacity": "1" - }, - "track": { - "color": "#444444FF", - "opacity": "1" - }, - "corner_radius": "1.5", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "antigravity-session-gemini-dual-light", - "name": "light Antigravity Gemini dual session segments", - "render": "(1 - system.dark) && antigravity.dual_mode", - "visibility": "100", - "parent": "antigravity-provider", - "y": "11", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "4", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "progress", - "value": "antigravity.gemini.session.display", - "direction": "left_to_right", - "fill": { - "color": "#00A896FF", - "opacity": "1" - }, - "track": { - "color": "#AAAAAAFF", - "opacity": "1" - }, - "corner_radius": "1.5", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "antigravity-session-external-dual-dark", - "name": "dark Antigravity External dual session segments", - "render": "system.dark && antigravity.dual_mode", - "visibility": "100", - "parent": "antigravity-provider", - "y": "16", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "4", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "progress", - "value": "antigravity.external.session.display", - "direction": "left_to_right", - "fill": { - "color": "#6EB4C8FF", - "opacity": "1" - }, - "track": { - "color": "#444444FF", - "opacity": "1" - }, - "corner_radius": "1.5", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "antigravity-session-external-dual-light", - "name": "light Antigravity External dual session segments", - "render": "(1 - system.dark) && antigravity.dual_mode", - "visibility": "100", - "parent": "antigravity-provider", - "y": "16", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "4", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "progress", - "value": "antigravity.external.session.display", - "direction": "left_to_right", - "fill": { - "color": "#4A8B9EFF", - "opacity": "1" - }, - "track": { - "color": "#AAAAAAFF", - "opacity": "1" - }, - "corner_radius": "1.5", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "antigravity-session-gemini-value-dark", - "name": "dark Antigravity Gemini session value", - "render": "system.dark && antigravity.gemini.enabled && (!antigravity.dual_mode || antigravity.crossfade_opacity > 0.01)", - "visibility": "100", - "parent": "antigravity-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "9", - "width": "62", - "height": "13", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "text", - "template": "{antigravity.gemini.session.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#5EEAD4FF", - "opacity": "if(antigravity.dual_mode, antigravity.crossfade_opacity, 1.0)" - } - } - }, - { - "id": "antigravity-session-gemini-value-light", - "name": "light Antigravity Gemini session value", - "render": "(1 - system.dark) && antigravity.gemini.enabled && (!antigravity.dual_mode || antigravity.crossfade_opacity > 0.01)", - "visibility": "100", - "parent": "antigravity-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "9", - "width": "62", - "height": "13", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "text", - "template": "{antigravity.gemini.session.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#007A6CFF", - "opacity": "if(antigravity.dual_mode, antigravity.crossfade_opacity, 1.0)" - } - } - }, - { - "id": "antigravity-session-external-value-dark", - "name": "dark Antigravity External session value", - "render": "system.dark && antigravity.external.enabled && (!antigravity.dual_mode || (1.0 - antigravity.crossfade_opacity) > 0.01)", - "visibility": "100", - "parent": "antigravity-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "9", - "width": "62", - "height": "13", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "text", - "template": "{antigravity.external.session.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#98D0E0FF", - "opacity": "if(antigravity.dual_mode, 1.0 - antigravity.crossfade_opacity, 1.0)" - } - } - }, - { - "id": "antigravity-session-external-value-light", - "name": "light Antigravity External session value", - "render": "(1 - system.dark) && antigravity.external.enabled && (!antigravity.dual_mode || (1.0 - antigravity.crossfade_opacity) > 0.01)", - "visibility": "100", - "parent": "antigravity-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "9", - "width": "62", - "height": "13", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "text", - "template": "{antigravity.external.session.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#2D6F82FF", - "opacity": "if(antigravity.dual_mode, 1.0 - antigravity.crossfade_opacity, 1.0)" - } - } - }, - { - "id": "antigravity-weekly-gemini-solo-dark", - "name": "dark Antigravity Gemini solo weekly segments", - "render": "system.dark && antigravity.gemini.enabled && !antigravity.dual_mode", - "visibility": "100", - "parent": "antigravity-provider", - "y": "27", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "9", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "progress", - "value": "antigravity.gemini.weekly.display", - "direction": "left_to_right", - "fill": { - "color": "#00D2B4FF", - "opacity": "1" - }, - "track": { - "color": "#444444FF", - "opacity": "1" - }, - "corner_radius": "1.5", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "antigravity-weekly-gemini-solo-light", - "name": "light Antigravity Gemini solo weekly segments", - "render": "(1 - system.dark) && antigravity.gemini.enabled && !antigravity.dual_mode", - "visibility": "100", - "parent": "antigravity-provider", - "y": "27", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "9", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "progress", - "value": "antigravity.gemini.weekly.display", - "direction": "left_to_right", - "fill": { - "color": "#00A896FF", - "opacity": "1" - }, - "track": { - "color": "#AAAAAAFF", - "opacity": "1" - }, - "corner_radius": "1.5", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "antigravity-weekly-external-solo-dark", - "name": "dark Antigravity External solo weekly segments", - "render": "system.dark && antigravity.external.enabled && !antigravity.dual_mode", - "visibility": "100", - "parent": "antigravity-provider", - "y": "27", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "9", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "progress", - "value": "antigravity.external.weekly.display", - "direction": "left_to_right", - "fill": { - "color": "#6EB4C8FF", - "opacity": "1" - }, - "track": { - "color": "#444444FF", - "opacity": "1" - }, - "corner_radius": "1.5", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "antigravity-weekly-external-solo-light", - "name": "light Antigravity External solo weekly segments", - "render": "(1 - system.dark) && antigravity.external.enabled && !antigravity.dual_mode", - "visibility": "100", - "parent": "antigravity-provider", - "y": "27", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "9", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "progress", - "value": "antigravity.external.weekly.display", - "direction": "left_to_right", - "fill": { - "color": "#4A8B9EFF", - "opacity": "1" - }, - "track": { - "color": "#AAAAAAFF", - "opacity": "1" - }, - "corner_radius": "1.5", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "antigravity-weekly-gemini-dual-dark", - "name": "dark Antigravity Gemini dual weekly segments", - "render": "system.dark && antigravity.dual_mode", - "visibility": "100", - "parent": "antigravity-provider", - "y": "27", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "4", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "progress", - "value": "antigravity.gemini.weekly.display", - "direction": "left_to_right", - "fill": { - "color": "#00D2B4FF", - "opacity": "1" - }, - "track": { - "color": "#444444FF", - "opacity": "1" - }, - "corner_radius": "1.5", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "antigravity-weekly-gemini-dual-light", - "name": "light Antigravity Gemini dual weekly segments", - "render": "(1 - system.dark) && antigravity.dual_mode", - "visibility": "100", - "parent": "antigravity-provider", - "y": "27", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "4", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "progress", - "value": "antigravity.gemini.weekly.display", - "direction": "left_to_right", - "fill": { - "color": "#00A896FF", - "opacity": "1" - }, - "track": { - "color": "#AAAAAAFF", - "opacity": "1" - }, - "corner_radius": "1.5", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "antigravity-weekly-external-dual-dark", - "name": "dark Antigravity External dual weekly segments", - "render": "system.dark && antigravity.dual_mode", - "visibility": "100", - "parent": "antigravity-provider", - "y": "32", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "4", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "progress", - "value": "antigravity.external.weekly.display", - "direction": "left_to_right", - "fill": { - "color": "#6EB4C8FF", - "opacity": "1" - }, - "track": { - "color": "#444444FF", - "opacity": "1" - }, - "corner_radius": "1.5", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "antigravity-weekly-external-dual-light", - "name": "light Antigravity External dual weekly segments", - "render": "(1 - system.dark) && antigravity.dual_mode", - "visibility": "100", - "parent": "antigravity-provider", - "y": "32", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "4", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "progress", - "value": "antigravity.external.weekly.display", - "direction": "left_to_right", - "fill": { - "color": "#4A8B9EFF", - "opacity": "1" - }, - "track": { - "color": "#AAAAAAFF", - "opacity": "1" - }, - "corner_radius": "1.5", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "antigravity-weekly-gemini-value-dark", - "name": "dark Antigravity Gemini weekly value", - "render": "system.dark && antigravity.gemini.enabled && (!antigravity.dual_mode || antigravity.crossfade_opacity > 0.01)", - "visibility": "100", - "parent": "antigravity-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "25", - "width": "62", - "height": "13", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "text", - "template": "{antigravity.gemini.weekly.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#5EEAD4FF", - "opacity": "if(antigravity.dual_mode, antigravity.crossfade_opacity, 1.0)" - } - } - }, - { - "id": "antigravity-weekly-gemini-value-light", - "name": "light Antigravity Gemini weekly value", - "render": "(1 - system.dark) && antigravity.gemini.enabled && (!antigravity.dual_mode || antigravity.crossfade_opacity > 0.01)", - "visibility": "100", - "parent": "antigravity-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "25", - "width": "62", - "height": "13", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "text", - "template": "{antigravity.gemini.weekly.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#007A6CFF", - "opacity": "if(antigravity.dual_mode, antigravity.crossfade_opacity, 1.0)" - } - } - }, - { - "id": "antigravity-weekly-external-value-dark", - "name": "dark Antigravity External weekly value", - "render": "system.dark && antigravity.external.enabled && (!antigravity.dual_mode || (1.0 - antigravity.crossfade_opacity) > 0.01)", - "visibility": "100", - "parent": "antigravity-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "25", - "width": "62", - "height": "13", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "text", - "template": "{antigravity.external.weekly.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#98D0E0FF", - "opacity": "if(antigravity.dual_mode, 1.0 - antigravity.crossfade_opacity, 1.0)" - } - } - }, - { - "id": "antigravity-weekly-external-value-light", - "name": "light Antigravity External weekly value", - "render": "(1 - system.dark) && antigravity.external.enabled && (!antigravity.dual_mode || (1.0 - antigravity.crossfade_opacity) > 0.01)", - "visibility": "100", - "parent": "antigravity-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "25", - "width": "62", - "height": "13", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "text", - "template": "{antigravity.external.weekly.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#2D6F82FF", - "opacity": "if(antigravity.dual_mode, 1.0 - antigravity.crossfade_opacity, 1.0)" - } - } - }, - { - "id": "opencode-provider", - "name": "OpenCode provider", - "render": "providers.opencode.enabled", - "visibility": "100", - "parent": "provider-row", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4 + 90", - "height": "46", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "none" - } - }, - { - "id": "opencode-session-segments-dark", - "name": "dark OpenCode 5-hour segments", - "render": "system.dark", - "visibility": "100", - "parent": "opencode-provider", - "y": "11", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "9", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "progress", - "value": "opencode.session.display", - "direction": "left_to_right", - "fill": { - "color": "#4CAF50FF", - "opacity": "1" - }, - "track": { - "color": "#444444FF", - "opacity": "1" - }, - "corner_radius": "1.5", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "opencode-session-value-dark", - "name": "dark OpenCode 5-hour value", - "render": "system.dark", - "visibility": "100", - "parent": "opencode-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "9", - "width": "62", - "height": "13", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "text", - "template": "{opencode.session.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#81C784FF", - "opacity": "1" - } - } - }, - { - "id": "opencode-session-segments-light", - "name": "light OpenCode 5-hour segments", - "render": "1 - system.dark", - "visibility": "100", - "parent": "opencode-provider", - "y": "11", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "9", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "progress", - "value": "opencode.session.display", - "direction": "left_to_right", - "fill": { - "color": "#2E7D32FF", - "opacity": "1" - }, - "track": { - "color": "#AAAAAAFF", - "opacity": "1" - }, - "corner_radius": "1.5", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "opencode-session-value-light", - "name": "light OpenCode 5-hour value", - "render": "1 - system.dark", - "visibility": "100", - "parent": "opencode-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "9", - "width": "62", - "height": "13", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "text", - "template": "{opencode.session.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#1B5E20FF", - "opacity": "1" - } - } - }, - { - "id": "opencode-weekly-segments-dark", - "name": "dark OpenCode long-window segments", - "render": "system.dark", - "visibility": "100", - "parent": "opencode-provider", - "y": "27", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "9", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "progress", - "value": "opencode.weekly.display", - "direction": "left_to_right", - "fill": { - "color": "#4CAF50FF", - "opacity": "1" - }, - "track": { - "color": "#444444FF", - "opacity": "1" - }, - "corner_radius": "1.5", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "opencode-weekly-value-dark", - "name": "dark OpenCode long-window value", - "render": "system.dark", - "visibility": "100", - "parent": "opencode-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "25", - "width": "90", - "height": "13", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "text", - "template": "{opencode.weekly.label} {opencode.weekly.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#81C784FF", - "opacity": "1" - } - } - }, - { - "id": "opencode-weekly-segments-light", - "name": "light OpenCode long-window segments", - "render": "1 - system.dark", - "visibility": "100", - "parent": "opencode-provider", - "y": "27", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "9", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "progress", - "value": "opencode.weekly.display", - "direction": "left_to_right", - "fill": { - "color": "#2E7D32FF", - "opacity": "1" - }, - "track": { - "color": "#AAAAAAFF", - "opacity": "1" - }, - "corner_radius": "1.5", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "opencode-weekly-value-light", - "name": "light OpenCode long-window value", - "render": "1 - system.dark", - "visibility": "100", - "parent": "opencode-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "25", - "width": "90", - "height": "13", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "text", - "template": "{opencode.weekly.label} {opencode.weekly.display:usage_line}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#1B5E20FF", + }, + "track": { + "color": "#444444FF", + "light_color": "#AAAAAAFF", "opacity": "1" - } + }, + "corner_radius": "1.5", + "segments": 10, + "segments_expression": "ceil(10 / max(1, providers.count))", + "segment_gap": "1" } }, { - "id": "claude-credits-segments-dark", - "name": "dark claude credit overlay", - "render": "(system.dark) && claude.credits.available", + "id": "antigravity-weekly-external-solo", + "name": "Antigravity External solo weekly segments", + "render": "antigravity.external.enabled && !antigravity.dual_mode", "visibility": "100", - "parent": "claude-provider", + "parent": "antigravity-provider", "y": "27", "width": "ceil(10 / max(1, providers.count)) * 11 - 1", "height": "9", @@ -2243,15 +923,17 @@ "gap": "0", "content": { "type": "progress", - "value": "claude.credits.display", + "value": "antigravity.external.weekly.display", "direction": "left_to_right", "fill": { - "color": "#F5A623FF", + "color": "#6EB4C8FF", + "light_color": "#4A8B9EFF", "opacity": "1" }, "track": { - "color": "#00000000", - "opacity": "0" + "color": "#444444FF", + "light_color": "#AAAAAAFF", + "opacity": "1" }, "corner_radius": "1.5", "segments": 10, @@ -2260,15 +942,14 @@ } }, { - "id": "claude-credits-value-dark", - "name": "dark claude credit balance", - "render": "(system.dark) && claude.credits.available", + "id": "antigravity-weekly-gemini-dual", + "name": "Antigravity Gemini dual weekly segments", + "render": "antigravity.dual_mode", "visibility": "100", - "parent": "claude-provider", - "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "25", - "width": "62", - "height": "13", + "parent": "antigravity-provider", + "y": "27", + "width": "ceil(10 / max(1, providers.count)) * 11 - 1", + "height": "4", "background": { "type": "none" }, @@ -2278,29 +959,34 @@ "align": "start", "gap": "0", "content": { - "type": "text", - "template": "${claude.credits.balance:0.00}", - "font_family": "Segoe UI", - "font_size": "12", - "weight": "medium", - "rendering": "clear_type", - "contrast": "1", - "align": "left", - "color": { - "color": "#F5A623FF", + "type": "progress", + "value": "antigravity.gemini.weekly.display", + "direction": "left_to_right", + "fill": { + "color": "#00D2B4FF", + "light_color": "#00A896FF", "opacity": "1" - } + }, + "track": { + "color": "#444444FF", + "light_color": "#AAAAAAFF", + "opacity": "1" + }, + "corner_radius": "1.5", + "segments": 10, + "segments_expression": "ceil(10 / max(1, providers.count))", + "segment_gap": "1" } }, { - "id": "claude-credits-segments-light", - "name": "light claude credit overlay", - "render": "(1 - system.dark) && claude.credits.available", + "id": "antigravity-weekly-external-dual", + "name": "Antigravity External dual weekly segments", + "render": "antigravity.dual_mode", "visibility": "100", - "parent": "claude-provider", - "y": "27", + "parent": "antigravity-provider", + "y": "32", "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "9", + "height": "4", "background": { "type": "none" }, @@ -2311,15 +997,17 @@ "gap": "0", "content": { "type": "progress", - "value": "claude.credits.display", + "value": "antigravity.external.weekly.display", "direction": "left_to_right", "fill": { - "color": "#C77700FF", + "color": "#6EB4C8FF", + "light_color": "#4A8B9EFF", "opacity": "1" }, "track": { - "color": "#00000000", - "opacity": "0" + "color": "#444444FF", + "light_color": "#AAAAAAFF", + "opacity": "1" }, "corner_radius": "1.5", "segments": 10, @@ -2328,11 +1016,11 @@ } }, { - "id": "claude-credits-value-light", - "name": "light claude credit balance", - "render": "(1 - system.dark) && claude.credits.available", + "id": "antigravity-weekly-gemini-value", + "name": "Antigravity Gemini weekly value", + "render": "antigravity.gemini.enabled && (!antigravity.dual_mode || antigravity.crossfade_opacity > 0.01)", "visibility": "100", - "parent": "claude-provider", + "parent": "antigravity-provider", "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", "y": "25", "width": "62", @@ -2347,7 +1035,7 @@ "gap": "0", "content": { "type": "text", - "template": "${claude.credits.balance:0.00}", + "template": "{antigravity.gemini.weekly.display:usage_line}", "font_family": "Segoe UI", "font_size": "12", "weight": "medium", @@ -2355,52 +1043,18 @@ "contrast": "1", "align": "left", "color": { - "color": "#C77700FF", - "opacity": "1" + "color": "#5EEAD4FF", + "light_color": "#007A6CFF", + "opacity": "if(antigravity.dual_mode, antigravity.crossfade_opacity, 1.0)" } } }, { - "id": "codex-credits-segments-dark", - "name": "dark codex credit overlay", - "render": "(system.dark) && codex.credits.available", - "visibility": "100", - "parent": "codex-provider", - "y": "27", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1", - "height": "9", - "background": { - "type": "none" - }, - "border": null, - "corner_radius": "0", - "layout": "freeform", - "align": "start", - "gap": "0", - "content": { - "type": "progress", - "value": "codex.credits.display", - "direction": "left_to_right", - "fill": { - "color": "#F5A623FF", - "opacity": "1" - }, - "track": { - "color": "#00000000", - "opacity": "0" - }, - "corner_radius": "1.5", - "segments": 10, - "segments_expression": "ceil(10 / max(1, providers.count))", - "segment_gap": "1" - } - }, - { - "id": "codex-credits-value-dark", - "name": "dark codex credit balance", - "render": "(system.dark) && codex.credits.available", + "id": "antigravity-weekly-external-value", + "name": "Antigravity External weekly value", + "render": "antigravity.external.enabled && (!antigravity.dual_mode || (1.0 - antigravity.crossfade_opacity) > 0.01)", "visibility": "100", - "parent": "codex-provider", + "parent": "antigravity-provider", "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", "y": "25", "width": "62", @@ -2415,7 +1069,7 @@ "gap": "0", "content": { "type": "text", - "template": "${codex.credits.balance:0.00}", + "template": "{antigravity.external.weekly.display:usage_line}", "font_family": "Segoe UI", "font_size": "12", "weight": "medium", @@ -2423,18 +1077,39 @@ "contrast": "1", "align": "left", "color": { - "color": "#F5A623FF", - "opacity": "1" + "color": "#98D0E0FF", + "light_color": "#2D6F82FF", + "opacity": "if(antigravity.dual_mode, 1.0 - antigravity.crossfade_opacity, 1.0)" } } }, { - "id": "codex-credits-segments-light", - "name": "light codex credit overlay", - "render": "(1 - system.dark) && codex.credits.available", + "id": "opencode-provider", + "name": "OpenCode provider", + "render": "providers.opencode.enabled", "visibility": "100", - "parent": "codex-provider", - "y": "27", + "parent": "provider-row", + "width": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4 + 90", + "height": "46", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "opencode-session-segments", + "name": "OpenCode 5-hour segments", + "render": "1", + "visibility": "100", + "parent": "opencode-provider", + "y": "11", "width": "ceil(10 / max(1, providers.count)) * 11 - 1", "height": "9", "background": { @@ -2447,15 +1122,17 @@ "gap": "0", "content": { "type": "progress", - "value": "codex.credits.display", + "value": "opencode.session.display", "direction": "left_to_right", "fill": { - "color": "#C77700FF", + "color": "#4CAF50FF", + "light_color": "#2E7D32FF", "opacity": "1" }, "track": { - "color": "#00000000", - "opacity": "0" + "color": "#444444FF", + "light_color": "#AAAAAAFF", + "opacity": "1" }, "corner_radius": "1.5", "segments": 10, @@ -2464,13 +1141,13 @@ } }, { - "id": "codex-credits-value-light", - "name": "light codex credit balance", - "render": "(1 - system.dark) && codex.credits.available", + "id": "opencode-session-value", + "name": "OpenCode 5-hour value", + "render": "1", "visibility": "100", - "parent": "codex-provider", + "parent": "opencode-provider", "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", - "y": "25", + "y": "9", "width": "62", "height": "13", "background": { @@ -2483,7 +1160,7 @@ "gap": "0", "content": { "type": "text", - "template": "${codex.credits.balance:0.00}", + "template": "{opencode.session.display:usage_line}", "font_family": "Segoe UI", "font_size": "12", "weight": "medium", @@ -2491,25 +1168,18 @@ "contrast": "1", "align": "left", "color": { - "color": "#C77700FF", + "color": "#81C784FF", + "light_color": "#1B5E20FF", "opacity": "1" } } }, { - "id": "grok-provider", - "name": "Grok provider", - "render": "providers.grok.enabled", - "parent": "provider-row", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4 + 62", - "height": "46" - }, - { - "id": "grok-pool-segments-dark", - "name": "dark Grok pool segments", - "render": "system.dark", + "id": "opencode-weekly-segments", + "name": "OpenCode long-window segments", + "render": "1", "visibility": "100", - "parent": "grok-provider", + "parent": "opencode-provider", "y": "27", "width": "ceil(10 / max(1, providers.count)) * 11 - 1", "height": "9", @@ -2523,14 +1193,16 @@ "gap": "0", "content": { "type": "progress", - "value": "grok.weekly.display", + "value": "opencode.weekly.display", "direction": "left_to_right", "fill": { - "color": "#8B5CF6FF", + "color": "#4CAF50FF", + "light_color": "#2E7D32FF", "opacity": "1" }, "track": { "color": "#444444FF", + "light_color": "#AAAAAAFF", "opacity": "1" }, "corner_radius": "1.5", @@ -2540,14 +1212,14 @@ } }, { - "id": "grok-pool-value-dark", - "name": "dark Grok pool value", - "render": "(system.dark) && !grok.credits.available", + "id": "opencode-weekly-value", + "name": "OpenCode long-window value", + "render": "1", "visibility": "100", - "parent": "grok-provider", + "parent": "opencode-provider", "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", "y": "25", - "width": "62", + "width": "90", "height": "13", "background": { "type": "none" @@ -2559,7 +1231,7 @@ "gap": "0", "content": { "type": "text", - "template": "{grok.weekly.display:usage_line}", + "template": "{opencode.weekly.label} {opencode.weekly.display:usage_line}", "font_family": "Segoe UI", "font_size": "12", "weight": "medium", @@ -2567,17 +1239,18 @@ "contrast": "1", "align": "left", "color": { - "color": "#C4B5FDFF", + "color": "#81C784FF", + "light_color": "#1B5E20FF", "opacity": "1" } } }, { - "id": "grok-pool-segments-light", - "name": "light Grok pool segments", - "render": "1 - system.dark", + "id": "claude-credits-segments", + "name": "claude credit overlay", + "render": "claude.credits.available", "visibility": "100", - "parent": "grok-provider", + "parent": "claude-provider", "y": "27", "width": "ceil(10 / max(1, providers.count)) * 11 - 1", "height": "9", @@ -2591,15 +1264,16 @@ "gap": "0", "content": { "type": "progress", - "value": "grok.weekly.display", + "value": "claude.credits.display", "direction": "left_to_right", "fill": { - "color": "#7C3AEDFF", + "color": "#F5A623FF", + "light_color": "#C77700FF", "opacity": "1" }, "track": { - "color": "#AAAAAAFF", - "opacity": "1" + "color": "#00000000", + "opacity": "0" }, "corner_radius": "1.5", "segments": 10, @@ -2608,11 +1282,11 @@ } }, { - "id": "grok-pool-value-light", - "name": "light Grok pool value", - "render": "(1 - system.dark) && !grok.credits.available", + "id": "claude-credits-value", + "name": "claude credit balance", + "render": "claude.credits.available", "visibility": "100", - "parent": "grok-provider", + "parent": "claude-provider", "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", "y": "25", "width": "62", @@ -2627,7 +1301,7 @@ "gap": "0", "content": { "type": "text", - "template": "{grok.weekly.display:usage_line}", + "template": "${claude.credits.balance:0.00}", "font_family": "Segoe UI", "font_size": "12", "weight": "medium", @@ -2635,17 +1309,18 @@ "contrast": "1", "align": "left", "color": { - "color": "#6D28D9FF", + "color": "#F5A623FF", + "light_color": "#C77700FF", "opacity": "1" } } }, { - "id": "grok-credits-segments-dark", - "name": "dark Grok on-demand segments", - "render": "(system.dark) && grok.credits.available", + "id": "codex-credits-segments", + "name": "codex credit overlay", + "render": "codex.credits.available", "visibility": "100", - "parent": "grok-provider", + "parent": "codex-provider", "y": "27", "width": "ceil(10 / max(1, providers.count)) * 11 - 1", "height": "9", @@ -2659,10 +1334,11 @@ "gap": "0", "content": { "type": "progress", - "value": "grok.credits.display", + "value": "codex.credits.display", "direction": "left_to_right", "fill": { "color": "#F5A623FF", + "light_color": "#C77700FF", "opacity": "1" }, "track": { @@ -2676,11 +1352,11 @@ } }, { - "id": "grok-credits-value-dark", - "name": "dark Grok on-demand value", - "render": "(system.dark) && grok.credits.available", + "id": "codex-credits-value", + "name": "codex credit balance", + "render": "codex.credits.available", "visibility": "100", - "parent": "grok-provider", + "parent": "codex-provider", "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", "y": "25", "width": "62", @@ -2695,7 +1371,7 @@ "gap": "0", "content": { "type": "text", - "template": "${grok.credits.balance:0.00}", + "template": "${codex.credits.balance:0.00}", "font_family": "Segoe UI", "font_size": "12", "weight": "medium", @@ -2704,14 +1380,23 @@ "align": "left", "color": { "color": "#F5A623FF", + "light_color": "#C77700FF", "opacity": "1" } } }, { - "id": "grok-credits-segments-light", - "name": "light Grok on-demand segments", - "render": "(1 - system.dark) && grok.credits.available", + "id": "grok-provider", + "name": "Grok provider", + "render": "providers.grok.enabled", + "parent": "provider-row", + "width": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4 + 62", + "height": "46" + }, + { + "id": "grok-pool-segments", + "name": "Grok pool segments", + "render": "1", "visibility": "100", "parent": "grok-provider", "y": "27", @@ -2727,15 +1412,17 @@ "gap": "0", "content": { "type": "progress", - "value": "grok.credits.display", + "value": "grok.weekly.display", "direction": "left_to_right", "fill": { - "color": "#C77700FF", + "color": "#8B5CF6FF", + "light_color": "#7C3AEDFF", "opacity": "1" }, "track": { - "color": "#00000000", - "opacity": "0" + "color": "#444444FF", + "light_color": "#AAAAAAFF", + "opacity": "1" }, "corner_radius": "1.5", "segments": 10, @@ -2744,9 +1431,9 @@ } }, { - "id": "grok-credits-value-light", - "name": "light Grok on-demand value", - "render": "(1 - system.dark) && grok.credits.available", + "id": "grok-pool-value", + "name": "Grok pool value", + "render": "!grok.credits.available", "visibility": "100", "parent": "grok-provider", "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", @@ -2763,7 +1450,7 @@ "gap": "0", "content": { "type": "text", - "template": "${grok.credits.balance:0.00}", + "template": "{grok.weekly.display:usage_line}", "font_family": "Segoe UI", "font_size": "12", "weight": "medium", @@ -2771,25 +1458,18 @@ "contrast": "1", "align": "left", "color": { - "color": "#C77700FF", + "color": "#C4B5FDFF", + "light_color": "#6D28D9FF", "opacity": "1" } } }, { - "id": "copilot-provider", - "name": "Copilot provider", - "render": "providers.copilot.enabled", - "parent": "provider-row", - "width": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4 + 62", - "height": "46" - }, - { - "id": "copilot-pool-segments-dark", - "name": "dark Copilot pool segments", - "render": "system.dark", + "id": "grok-credits-segments", + "name": "Grok on-demand segments", + "render": "grok.credits.available", "visibility": "100", - "parent": "copilot-provider", + "parent": "grok-provider", "y": "27", "width": "ceil(10 / max(1, providers.count)) * 11 - 1", "height": "9", @@ -2803,15 +1483,16 @@ "gap": "0", "content": { "type": "progress", - "value": "copilot.weekly.display", + "value": "grok.credits.display", "direction": "left_to_right", "fill": { - "color": "#EC4899FF", + "color": "#F5A623FF", + "light_color": "#C77700FF", "opacity": "1" }, "track": { - "color": "#444444FF", - "opacity": "1" + "color": "#00000000", + "opacity": "0" }, "corner_radius": "1.5", "segments": 10, @@ -2820,11 +1501,11 @@ } }, { - "id": "copilot-pool-value-dark", - "name": "dark Copilot pool value", - "render": "system.dark", + "id": "grok-credits-value", + "name": "Grok on-demand value", + "render": "grok.credits.available", "visibility": "100", - "parent": "copilot-provider", + "parent": "grok-provider", "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", "y": "25", "width": "62", @@ -2839,7 +1520,7 @@ "gap": "0", "content": { "type": "text", - "template": "{copilot.weekly.display:usage_line}", + "template": "${grok.credits.balance:0.00}", "font_family": "Segoe UI", "font_size": "12", "weight": "medium", @@ -2847,15 +1528,24 @@ "contrast": "1", "align": "left", "color": { - "color": "#F9A8D4FF", + "color": "#F5A623FF", + "light_color": "#C77700FF", "opacity": "1" } } }, { - "id": "copilot-pool-segments-light", - "name": "light Copilot pool segments", - "render": "1 - system.dark", + "id": "copilot-provider", + "name": "Copilot provider", + "render": "providers.copilot.enabled", + "parent": "provider-row", + "width": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4 + 62", + "height": "46" + }, + { + "id": "copilot-pool-segments", + "name": "Copilot pool segments", + "render": "1", "visibility": "100", "parent": "copilot-provider", "y": "27", @@ -2874,11 +1564,13 @@ "value": "copilot.weekly.display", "direction": "left_to_right", "fill": { - "color": "#DB2777FF", + "color": "#EC4899FF", + "light_color": "#DB2777FF", "opacity": "1" }, "track": { - "color": "#AAAAAAFF", + "color": "#444444FF", + "light_color": "#AAAAAAFF", "opacity": "1" }, "corner_radius": "1.5", @@ -2888,9 +1580,9 @@ } }, { - "id": "copilot-pool-value-light", - "name": "light Copilot pool value", - "render": "1 - system.dark", + "id": "copilot-pool-value", + "name": "Copilot pool value", + "render": "1", "visibility": "100", "parent": "copilot-provider", "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", @@ -2915,7 +1607,8 @@ "contrast": "1", "align": "left", "color": { - "color": "#BE185DFF", + "color": "#F9A8D4FF", + "light_color": "#BE185DFF", "opacity": "1" } } From 08d0d9ef1cf3300ea599fbea18cde4ccee2cd487 Mon Sep 17 00:00:00 2001 From: Craig Constable Date: Wed, 25 Nov 2026 10:20:34 +1000 Subject: [PATCH 05/12] fix(deps): update cookie to 0.18.3 for RUSTSEC-2026-0594 Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 1 + Cargo.lock | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2528cbd7..d2ab2708 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ changes grouped into Added, Changed, Fixed, and Removed where applicable. ### Fixed - Update the transitive `url` dependency from 2.5.8 to 2.5.9, with `form_urlencoded` from 1.2.2 to 1.2.3, to resolve RUSTSEC-2026-0592 found by the release dependency checks. +- Update the transitive `cookie` dependency from 0.18.2 to 0.18.3 to resolve RUSTSEC-2026-0594 found by the release dependency checks. ## [2.25.3] - 2026-11-21 diff --git a/Cargo.lock b/Cargo.lock index d777ca2f..14d33ca6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -322,9 +322,9 @@ dependencies = [ [[package]] name = "cookie" -version = "0.18.2" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a373e3602691c3cdea496d2f0ee5935151e6168fe87739483c463db1b2f2f87" +checksum = "d55f2d6c30eeec7d5c6f98bd4395d4abb1895629eab97ee6522d340623615f8a" dependencies = [ "percent-encoding", "time", From 08ec506514f6dca80133f0ed939963b95dabb99f Mon Sep 17 00:00:00 2001 From: Craig Constable Date: Thu, 26 Nov 2026 08:06:36 +1000 Subject: [PATCH 06/12] ci: run checks on every pull request and script the release workflow Add a CI workflow that runs formatting, Clippy with warnings denied, tests, a locked release build, the dependency security checks and the repository checks on every pull request and push to main, reporting a single `CI passed` status for branch protection. The tagged Release workflow now requires CI to pass first. Merged work accumulates under `[Unreleased]` in CHANGELOG.md. tests/Test-Repository.ps1 checks the release metadata, and scripts/New-Release.ps1, Publish-Release.ps1 and Build-Release.ps1 prepare, tag and build releases (docs/releasing.md). Patch-level Dependabot Cargo updates auto-merge once CI passes. Also resolve the remaining Clippy warnings in test code. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 160 +++++++ .github/workflows/dependabot-auto-merge.yml | 45 ++ .github/workflows/dependency-security.yml | 5 +- .github/workflows/release.yml | 7 +- CHANGELOG.md | 7 + CONTRIBUTING.md | 10 +- docs/releasing.md | 113 +++++ scripts/Build-Release.ps1 | 80 ++++ scripts/New-Release.ps1 | 130 ++++++ scripts/Publish-Release.ps1 | 50 +++ scripts/ReleaseTools.psm1 | 465 ++++++++++++++++++++ src/poller/tests.rs | 4 +- src/window/taskbar_collision.rs | 2 +- tests/Test-ReleaseTools.ps1 | 141 ++++++ tests/Test-Repository.ps1 | 14 + 15 files changed, 1220 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/dependabot-auto-merge.yml create mode 100644 docs/releasing.md create mode 100644 scripts/Build-Release.ps1 create mode 100644 scripts/New-Release.ps1 create mode 100644 scripts/Publish-Release.ps1 create mode 100644 scripts/ReleaseTools.psm1 create mode 100644 tests/Test-ReleaseTools.ps1 create mode 100644 tests/Test-Repository.ps1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..229decf1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,160 @@ +name: CI + +on: + pull_request: + push: + branches: [main] + workflow_dispatch: + workflow_call: + +permissions: + contents: read + +concurrency: + group: ci-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +env: + CARGO_TERM_COLOR: always + # Keep in sync with rust-toolchain.toml. + RUST_TOOLCHAIN: 1.95.0 + +jobs: + fmt: + name: rustfmt + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable + with: + toolchain: ${{ env.RUST_TOOLCHAIN }} + components: rustfmt + + - name: Check formatting + run: cargo fmt --all -- --check + + clippy: + name: clippy + runs-on: windows-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable + with: + toolchain: ${{ env.RUST_TOOLCHAIN }} + components: clippy + + - uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3 + with: + save-if: ${{ github.ref == 'refs/heads/main' }} + + - name: Run Clippy + run: cargo clippy --locked --all-targets -- -D warnings + + test: + name: test + runs-on: windows-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable + with: + toolchain: ${{ env.RUST_TOOLCHAIN }} + + - uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3 + with: + save-if: ${{ github.ref == 'refs/heads/main' }} + + # Tests needing signed-in providers, the live Internet or the current + # desktop are #[ignore]d and do not run here. + - name: Run tests + run: cargo test --locked + + # Every theme surface rendered in dark and light mode by the snapshot + # tests, plus a -diff.png for each mismatch, so theme changes can be + # reviewed as pictures. + - name: Upload theme renders + if: always() + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: theme-snapshots + path: target/theme-snapshots + if-no-files-found: ignore + retention-days: 14 + + release-build: + name: release build + runs-on: windows-latest + timeout-minutes: 45 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable + with: + toolchain: ${{ env.RUST_TOOLCHAIN }} + + - uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3 + with: + save-if: ${{ github.ref == 'refs/heads/main' }} + + - name: Build release binary + run: cargo build --release --locked + + # Release metadata and tracked-file rules from scripts/ReleaseTools.psm1. Uses + # Windows PowerShell 5.1, the shell the local release scripts run in. + repository: + name: repository checks + runs-on: windows-latest + timeout-minutes: 10 + defaults: + run: + shell: powershell + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Test release tooling + run: ./tests/Test-ReleaseTools.ps1 + + - name: Check repository state + run: ./tests/Test-Repository.ps1 + + # cargo-audit and cargo-deny. Part of CI passed, so a pull request that adds + # a vulnerable or disallowed dependency cannot merge. + dependency-security: + name: dependency security + uses: ./.github/workflows/dependency-security.yml + permissions: + contents: read + + # Single stable check name to require in branch protection. + ci-passed: + name: CI passed + if: always() + needs: [fmt, clippy, test, release-build, repository, dependency-security] + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Require every CI job to succeed + env: + RESULTS: ${{ join(needs.*.result, ' ') }} + run: | + echo "Job results: $RESULTS" + for result in $RESULTS; do + if [ "$result" != "success" ]; then + exit 1 + fi + done diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml new file mode 100644 index 00000000..0ab44a80 --- /dev/null +++ b/.github/workflows/dependabot-auto-merge.yml @@ -0,0 +1,45 @@ +name: Dependabot auto-merge + +# Turns on auto-merge for Dependabot pull requests that only make patch-level +# Cargo updates. GitHub merges them once the required "CI passed" check +# succeeds. Minor and major updates, the egui group (the local egui-winit patch +# needs review, see docs/dependency-security.md) and GitHub Actions updates +# (workflow code that runs with release secrets) still wait for a maintainer. Merged updates collect +# on main until the next release, and scripts/New-Release.ps1 lists them in +# CHANGELOG.md. See docs/releasing.md. +# +# Needs "Allow auto-merge" in the repository settings and a branch protection +# rule (or ruleset) on main that requires "CI passed". Without the required +# check, auto-merge would merge immediately. + +on: + pull_request_target: + types: [opened, reopened, synchronize] + +permissions: {} + +jobs: + auto-merge: + name: auto-merge patch updates + # pull_request_target runs with write access, so this job never checks out + # or runs code from the pull request. + if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'CodeZeno/Claude-Code-Usage-Monitor' + runs-on: ubuntu-latest + timeout-minutes: 5 + permissions: + contents: write + pull-requests: write + steps: + - name: Read Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0 + + - name: Enable auto-merge + if: >- + steps.metadata.outputs.update-type == 'version-update:semver-patch' && + steps.metadata.outputs.package-ecosystem == 'cargo' && + steps.metadata.outputs.dependency-group != 'egui' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_URL: ${{ github.event.pull_request.html_url }} + run: gh pr merge --auto --squash "$PR_URL" diff --git a/.github/workflows/dependency-security.yml b/.github/workflows/dependency-security.yml index 57915245..2a33557e 100644 --- a/.github/workflows/dependency-security.yml +++ b/.github/workflows/dependency-security.yml @@ -1,9 +1,8 @@ name: Dependency security +# Pull requests and pushes to main run these checks through ci.yml, as part of +# the CI passed status. on: - pull_request: - push: - branches: ["**"] schedule: # Find newly published advisories even when the lockfile has not changed. - cron: "23 3 * * *" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8f50e0bb..849bde37 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,13 +13,14 @@ env: WINGET_PACKAGE_ID: CodeZeno.ClaudeCodeUsageMonitor jobs: - dependency-security: - uses: ./.github/workflows/dependency-security.yml + # Includes the dependency security checks. + ci: + uses: ./.github/workflows/ci.yml permissions: contents: read build: - needs: dependency-security + needs: [ci] runs-on: windows-latest steps: - uses: actions/checkout@v7 diff --git a/CHANGELOG.md b/CHANGELOG.md index d2ab2708..ea0d808a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,13 +8,20 @@ changes grouped into Added, Changed, Fixed, and Removed where applicable. ### Added +- Run formatting, Clippy with warnings denied, tests, a locked release build, and repository checks on every pull request and push to `main`, reporting a single `CI passed` status for branch protection. +- Check release metadata in CI and locally with `tests/Test-Repository.ps1`: tracked ignored or local-only files, the `Cargo.lock` package version, and `CHANGELOG.md` structure, ordering, links, and agreement with the `Cargo.toml` version. Merged changes accumulate under `[Unreleased]` until a release is prepared. +- Add `scripts/New-Release.ps1` to prepare a `vVERSION` release commit from the `[Unreleased]` entries, `scripts/Publish-Release.ps1` to tag a pushed release, and `scripts/Build-Release.ps1` for local release builds. See [docs/releasing.md](docs/releasing.md). - Let theme colours set an optional light-mode colour (`light_color`), so one layer can serve both Windows appearances instead of a pair of layers gated on `system.dark`. In Theme Studio, the sun and moon button beside a colour expands it into separate Dark mode and Light mode colours; collapsing keeps the dark mode colour. Colours without `light_color` render and save as before, and themes that keep separate per-mode layers are unaffected. - Add the Stacked Rows built-in theme: each provider's logo beside joined rows of four-section bars, one row per limit the account reports, with a magenta pace marker. Bars follow the Usage direction setting, and hovering a provider opens a flyout with each limit's usage, reset time and pace, or a waiting, error or no-usage message. - Add a Provider logo layer type (`provider_mark`) to themes and Theme Studio. It draws a provider's brand mark from the dashboard's icon font, tinted and fitted to the layer, so themes need no image assets to show a provider. +- Auto-merge Dependabot pull requests with patch-level Cargo updates once `CI passed` succeeds. `scripts/New-Release.ps1` adds changelog entries for them and refuses to prepare a release when `origin/main` has commits that local `main` lacks. See [docs/releasing.md](docs/releasing.md#dependabot-updates). ### Changed +- Require the CI checks to pass before the tagged Release workflow builds and publishes artifacts. +- Resolve the remaining Clippy warnings in test code so CI can deny warnings. - Draw the Classic, Compact Fluent Quad and Classic Vertical built-in themes from single layers with light-mode colours instead of duplicate layers gated on `system.dark` (163 to 124, 158 to 118 and 133 to 114 layers), with identical rendering in both appearances. Custom themes that keep separate dark and light layers render as before. +- Run the dependency security checks as part of `CI passed` on pull requests and pushes to `main`, and once in the tagged Release workflow through CI. ### Fixed diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1a75a0d9..54d0f27e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -44,12 +44,15 @@ See the [user guide](USER_GUIDE.md) for application behavior, ## Checks -For Rust changes, run the checks relevant to your change on Windows: +For Rust changes, run these checks on Windows. CI runs the same checks on every +pull request, and all of them must pass before merging: ```powershell cargo fmt --all -- --check +cargo clippy --locked --all-targets -- -D warnings cargo test --locked cargo build --locked --release +./tests/Test-Repository.ps1 ``` Add regression coverage for behavior changes where practical, using dummy data @@ -69,8 +72,9 @@ Use a descriptive title, such as `fix(poller): handle expired credentials` or sections in the pull request template. Link related public issues when relevant. Do not edit `CHANGELOG.md`, bump package versions, or create release tags as part -of a contribution unless a maintainer explicitly requests it. Release metadata -is handled separately. Change `Cargo.lock` only when the contribution requires a +of a contribution unless a maintainer explicitly requests it. Maintainers add +merged changes to the `[Unreleased]` changelog section and prepare releases +separately; see [releasing](docs/releasing.md). Change `Cargo.lock` only when the contribution requires a dependency update. Contributions are provided under the repository's [MIT License](LICENSE). diff --git a/docs/releasing.md b/docs/releasing.md new file mode 100644 index 00000000..50e66302 --- /dev/null +++ b/docs/releasing.md @@ -0,0 +1,113 @@ +# Releasing + +Merged changes accumulate under `## [Unreleased]` in [CHANGELOG.md](../CHANGELOG.md). +The package version in `Cargo.toml` stays at the last release until a maintainer +prepares the next one, so `main` can take any number of pull requests between +releases. + +The scripts run in Windows PowerShell 5.1 or PowerShell 7. Release preparation and +publishing require a clean working tree on `main`. + +## Day to day + +Each merged change adds an entry under `## [Unreleased]`, in one of the +`Added`, `Changed`, `Deprecated`, `Removed`, `Fixed`, or `Security` categories, and +leaves the version unchanged. Pushing `main` publishes nothing. + +`tests/Test-Repository.ps1` runs in CI and should run before each commit. It checks +that: + +- no ignored or local-only file (`AGENTS.md`, `workflow.cmd`) is tracked; +- `Cargo.lock` records the same package version as `Cargo.toml`; +- the newest dated changelog release equals the `Cargo.toml` version, so a version + bump without a release section fails; +- changelog headings, categories, version order, dates, and comparison links are + consistent, including `[Unreleased]: .../compare/vNEWEST...HEAD`. + +`tests/Test-ReleaseTools.ps1` tests the shared logic in `scripts/ReleaseTools.psm1`. + +### Dependabot updates + +`.github/workflows/dependabot-auto-merge.yml` turns on auto-merge for Dependabot +pull requests that only make a patch-level Cargo update. GitHub squash-merges them +once the required `CI passed` check succeeds, which includes the dependency +security checks. Minor and major updates, the `egui` group (see +[dependency security](dependency-security.md)) and GitHub Actions updates wait for +a maintainer as before. + +Auto-merged updates carry no changelog entry. `scripts/New-Release.ps1` adds one +under `Changed` for each Dependabot commit since the previous release tag, unless +an entry already names that pull request or the same version change, so a +maintainer can still write a more detailed entry by hand. + +This needs two repository settings: **Allow auto-merge** (Settings, General), and +a branch protection rule or ruleset on `main` that requires the `CI passed` status +check. Without the required check, auto-merge would merge without waiting for CI. + +Because these merges happen on GitHub, pull before pushing local work +(`git pull --rebase origin main`, then `workflow -p`). A merge made with the +workflow's token does not start another CI run on `main`; the pull request's +`CI passed` run already covered the merged commit's content. + +## When to release + +Release in batches rather than once per merge. Merged pull requests and +dependency updates collect under `[Unreleased]` and ship together, for example +once a week, or sooner for a user-facing fix or a security advisory that affects +the shipped application. A dependency update alone is rarely a reason for a +release: the scheduled dependency checks report advisories, and the next release +picks the update up. + +## Preparing a release + +```powershell +./scripts/New-Release.ps1 -Level minor # or patch, major, or 2.26.0 +``` + +The script: + +1. fetches `origin/main` and refuses when it has commits that local `main` lacks + (pass `-SkipRemoteCheck` when offline); +2. adds changelog entries for Dependabot updates merged since the last release; +3. requires `[Unreleased]` entries, and refuses a patch release when any are `Added`; +4. sets the `Cargo.toml` version, synchronizes `Cargo.lock`, and refuses any lockfile + change other than this package's version; +5. moves the entries into `## [VERSION] - YYYY-MM-DD`, keeps an empty + `## [Unreleased]` heading, and updates the comparison links; +6. runs `tests/Test-Repository.ps1` and `tests/Test-Dependencies.ps1`; +7. commits `Cargo.toml`, `Cargo.lock`, and `CHANGELOG.md` as `vVERSION`. + +If any step fails, the three files are restored. Nothing is pushed or tagged. +Use `-BodyFile` for a commit body and `-Date` to override today's date. + +`scripts/Build-Release.ps1` runs the dependency gates, closes running copies of this +repository's `target/release` executable, and builds it with `cargo build --release --locked`. + +## Publishing + +Push `main` first, so the release commit runs CI there, then: + +```powershell +./scripts/Publish-Release.ps1 +``` + +It tags `vVERSION` at `HEAD` and pushes the tag, which starts the Release workflow. +That workflow runs CI and the dependency checks again before building and publishing +the GitHub release, WinGet, and Chocolatey packages. The script refuses when: + +- `[Unreleased]` has entries, which the tag would ship without listing; +- the tag already exists locally or on `origin`; +- `HEAD` is not `origin/main`. + +## Maintainer wrapper + +The local, untracked `workflow.cmd` runs each step separately or in sequence +(`-r`, `-b`, `-p`, `-d`): + +```text +workflow -p push main; changes stay unreleased (pull first) +workflow -r minor -m "body" prepare the release commit +workflow -b build target/release +workflow -r patch -p -d prepare, push, and publish +workflow -d publish an already pushed release commit +``` diff --git a/scripts/Build-Release.ps1 b/scripts/Build-Release.ps1 new file mode 100644 index 00000000..4a955613 --- /dev/null +++ b/scripts/Build-Release.ps1 @@ -0,0 +1,80 @@ +# Build target/release/claude-code-usage-monitor.exe the supported way: run the +# dependency gates, close instances of this repository's executable, then +# `cargo build --release --locked` in the normal target directory. +[CmdletBinding()] +param( + [switch]$SkipDependencyChecks +) + +$ErrorActionPreference = 'Stop' +Import-Module (Join-Path $PSScriptRoot 'ReleaseTools.psm1') -Force + +$root = Get-RepositoryRoot +$exe = [System.IO.Path]::GetFullPath((Join-Path $root 'target/release/claude-code-usage-monitor.exe')) + +function Get-RepositoryInstance { + @(Get-Process -Name 'claude-code-usage-monitor' -ErrorAction SilentlyContinue | Where-Object { + $_.Path -and [string]::Equals([System.IO.Path]::GetFullPath($_.Path), $exe, [System.StringComparison]::OrdinalIgnoreCase) + }) +} + +if ($env:CARGO_TARGET_DIR) { + throw 'CARGO_TARGET_DIR is set. Build in the normal target/release directory instead.' +} + +if (-not $SkipDependencyChecks) { + & (Join-Path $root 'tests/Test-Dependencies.ps1') +} + +# Only this repository's executable, matched by full path, is closed. +$instances = Get-RepositoryInstance +if ($instances.Count -gt 0) { + Write-Host "Closing $($instances.Count) running instance(s) of $exe." + if (-not ('CcumBuildWindows' -as [type])) { + Add-Type -TypeDefinition @' +using System; +using System.Runtime.InteropServices; +public static class CcumBuildWindows { + delegate bool EnumProc(IntPtr hwnd, IntPtr data); + [DllImport("user32.dll")] static extern bool EnumWindows(EnumProc callback, IntPtr data); + [DllImport("user32.dll")] static extern uint GetWindowThreadProcessId(IntPtr hwnd, out uint processId); + [DllImport("user32.dll")] static extern bool PostMessage(IntPtr hwnd, uint msg, IntPtr wparam, IntPtr lparam); + // The widget is reparented into the taskbar, so Process.CloseMainWindow finds + // nothing; the hidden controller window shuts the application down on WM_CLOSE. + public static int Close(int processId) { + int posted = 0; + EnumWindows((hwnd, data) => { + uint owner; + GetWindowThreadProcessId(hwnd, out owner); + if (owner == (uint)processId && PostMessage(hwnd, 0x0010, IntPtr.Zero, IntPtr.Zero)) { posted++; } + return true; + }, IntPtr.Zero); + return posted; + } +} +'@ + } + foreach ($process in $instances) { [void][CcumBuildWindows]::Close($process.Id) } + $deadline = (Get-Date).AddSeconds(10) + while ((Get-RepositoryInstance).Count -gt 0 -and (Get-Date) -lt $deadline) { + Start-Sleep -Milliseconds 250 + } + foreach ($process in (Get-RepositoryInstance)) { + Write-Host "Stopping process $($process.Id), which did not close normally." + Stop-Process -Id $process.Id -Force + $process.WaitForExit(10000) | Out-Null + } +} + +Push-Location $root +try { + $cargo = (Get-Command cargo -CommandType Application | Select-Object -First 1).Source + $ErrorActionPreference = 'Continue' + & $cargo build --release --locked + if ($LASTEXITCODE -ne 0) { + throw 'cargo build --release --locked failed.' + } +} finally { + Pop-Location +} +Write-Host "Built $exe" diff --git a/scripts/New-Release.ps1 b/scripts/New-Release.ps1 new file mode 100644 index 00000000..bf5c33ba --- /dev/null +++ b/scripts/New-Release.ps1 @@ -0,0 +1,130 @@ +# Prepare a release commit on main: move the CHANGELOG.md [Unreleased] entries +# into a dated section, set the Cargo.toml version, synchronize Cargo.lock, run +# the repository and dependency checks, and commit the result as vVERSION. +# Nothing is pushed or tagged; see scripts/Publish-Release.ps1. +[CmdletBinding()] +param( + # patch, minor, major, or an explicit MAJOR.MINOR.PATCH version. + [Parameter(Mandatory = $true)] + [string]$Level, + # Optional file whose contents become the commit body. + [string]$BodyFile, + [string]$Date = (Get-Date -Format 'yyyy-MM-dd'), + [switch]$SkipDependencyChecks, + # Skip fetching origin/main, for example when offline. + [switch]$SkipRemoteCheck +) + +$ErrorActionPreference = 'Stop' +Import-Module (Join-Path $PSScriptRoot 'ReleaseTools.psm1') -Force + +$root = Get-RepositoryRoot +$releaseFiles = @('Cargo.toml', 'Cargo.lock', 'CHANGELOG.md') + +Assert-OnMainBranch $root 'preparing a release' +Assert-CleanWorktree $root 'preparing a release' +Assert-RepositoryState $root + +# Auto-merged Dependabot updates land on origin/main, so a release prepared from a +# main that lacks them would leave them out and could not be pushed. +if (-not $SkipRemoteCheck) { + & git -C $root fetch -q origin main + if ($LASTEXITCODE -ne 0) { + throw 'Unable to fetch origin/main. Check the connection, or pass -SkipRemoteCheck.' + } + & git -C $root merge-base --is-ancestor origin/main HEAD + if ($LASTEXITCODE -ne 0) { + throw 'origin/main has commits that local main does not, such as auto-merged Dependabot updates. Run "git pull --rebase origin main" and prepare the release again.' + } +} + +$cargoTomlPath = Join-Path $root 'Cargo.toml' +$changelogPath = Join-Path $root 'CHANGELOG.md' +$current = Get-PackageVersionFromToml (Read-TextFile $cargoTomlPath) +$changelogText = Read-TextFile $changelogPath + +# Auto-merged Dependabot pull requests carry no changelog entry; list them here. +$dependabotSubjects = @(Get-DependabotCommitSubjects $root "v$current") +$dependencyEntries = @(Get-DependencyUpdateEntries $dependabotSubjects $changelogText) +if ($dependencyEntries.Count -gt 0) { + $changelogText = Add-UnreleasedEntries $changelogText 'Changed' $dependencyEntries + Write-Host "Adding $($dependencyEntries.Count) changelog entries for Dependabot updates merged since v${current}:" + foreach ($entry in $dependencyEntries) { Write-Host " $entry" } +} + +$changelog = Read-Changelog $changelogText +$entryCount = Get-UnreleasedEntryCount $changelog +if ($entryCount -eq 0) { + throw "CHANGELOG.md has no entries under '## [Unreleased]'. Add the changes being released first." +} + +$version = Get-NextVersion $current $Level.ToLowerInvariant() +$change = Get-VersionChangeLevel $current $version +$categories = @(Get-UnreleasedCategories $changelog) +if ($categories -contains 'Added' -and $change -eq 'patch') { + throw "[Unreleased] lists Added entries, which need at least a minor release. Use 'minor' (or 'major') instead of a patch version." +} + +& git -C $root rev-parse -q --verify "refs/tags/v$version" | Out-Null +if ($LASTEXITCODE -eq 0) { + throw "Tag v$version already exists." +} + +Write-Host "Preparing v$version ($change release after $current) with $entryCount changelog entries." + +$committed = $false +try { + Write-TextFile $cargoTomlPath (Set-PackageVersionInToml (Read-TextFile $cargoTomlPath) $version) + Write-TextFile $changelogPath (Add-ChangelogRelease $changelogText $version $current $Date) + + # Synchronize only this package's version in Cargo.lock. + $cargo = (Get-Command cargo -CommandType Application | Select-Object -First 1).Source + $ErrorActionPreference = 'Continue' + & $cargo metadata --format-version 1 --manifest-path $cargoTomlPath | Out-Null + $metadataExit = $LASTEXITCODE + $ErrorActionPreference = 'Stop' + if ($metadataExit -ne 0) { + throw 'cargo metadata failed while synchronizing Cargo.lock.' + } + $lockChange = @(Invoke-Git -C $root diff --numstat '--' Cargo.lock) + if ($lockChange.Count -ne 1 -or $lockChange[0] -notmatch '^1\s+1\s') { + throw "Cargo.lock changed more than this package's version ($($lockChange -join '; ')). Review the dependency changes separately." + } + + Assert-RepositoryState $root + if (-not $SkipDependencyChecks) { + & (Join-Path $root 'tests/Test-Dependencies.ps1') + } + + Invoke-Git -C $root add '--' @releaseFiles | Out-Null + $staged = @(Invoke-Git -C $root diff --cached --name-only) + $unexpected = @($staged | Where-Object { $releaseFiles -notcontains $_ }) + if ($unexpected.Count -gt 0) { + throw "Unexpected staged files: $($unexpected -join ', ')" + } + + $messagePath = [System.IO.Path]::GetTempFileName() + try { + $message = "v$version" + if ($BodyFile) { + $body = (Read-TextFile (Resolve-Path $BodyFile)).Trim() + if ($body) { $message += "`n`n$body" } + } + Write-TextFile $messagePath ($message + "`n") + Invoke-Git -C $root commit -q -F $messagePath | Out-Null + $committed = $true + } finally { + Remove-Item -LiteralPath $messagePath -ErrorAction SilentlyContinue + } +} finally { + if (-not $committed) { + # The worktree was clean on entry, so restoring these files is safe. + & git -C $root reset -q -- @releaseFiles + & git -C $root checkout -q -- @releaseFiles + Write-Host 'Release preparation failed; restored Cargo.toml, Cargo.lock and CHANGELOG.md.' + } +} + +$commit = (Invoke-Git -C $root rev-parse --short HEAD) | Select-Object -First 1 +Write-Host "Committed v$version as $commit. Nothing was pushed or tagged." +Write-Host 'Next: push main (workflow -p), then publish the tag (workflow -d).' diff --git a/scripts/Publish-Release.ps1 b/scripts/Publish-Release.ps1 new file mode 100644 index 00000000..3e3965b3 --- /dev/null +++ b/scripts/Publish-Release.ps1 @@ -0,0 +1,50 @@ +# Tag the released version at HEAD and push the tag, which starts the Release +# workflow (CI, dependency checks, GitHub release, WinGet and Chocolatey). +# Requires a release commit from scripts/New-Release.ps1 that is already on origin/main. +[CmdletBinding()] +param() + +$ErrorActionPreference = 'Stop' +Import-Module (Join-Path $PSScriptRoot 'ReleaseTools.psm1') -Force + +$root = Get-RepositoryRoot + +Assert-OnMainBranch $root 'publishing a release' +Assert-CleanWorktree $root 'publishing a release' +Assert-RepositoryState $root + +$changelog = Read-Changelog (Read-TextFile (Join-Path $root 'CHANGELOG.md')) +$pending = Get-UnreleasedEntryCount $changelog +if ($pending -gt 0) { + throw "CHANGELOG.md has $pending [Unreleased] entries that this tag would ship without listing. Prepare a release first (workflow -r patch|minor|major)." +} + +$version = Get-PackageVersionFromToml (Read-TextFile (Join-Path $root 'Cargo.toml')) +$tag = "v$version" + +& git -C $root rev-parse -q --verify "refs/tags/$tag" | Out-Null +if ($LASTEXITCODE -eq 0) { + throw "Tag $tag already exists locally. Prepare a new release (workflow -r ...) before publishing." +} +& git -C $root ls-remote --exit-code --tags origin "refs/tags/$tag" | Out-Null +if ($LASTEXITCODE -eq 0) { + throw "Tag $tag already exists on origin." +} +if ($LASTEXITCODE -ne 2) { + throw "Unable to check origin for tag $tag (git ls-remote exit code $LASTEXITCODE)." +} + +Invoke-Git -C $root fetch -q origin main | Out-Null +$head = (Invoke-Git -C $root rev-parse HEAD) | Select-Object -First 1 +$remote = (Invoke-Git -C $root rev-parse origin/main) | Select-Object -First 1 +if ($head -ne $remote) { + & git -C $root merge-base --is-ancestor HEAD origin/main + if ($LASTEXITCODE -eq 0) { + throw 'origin/main has commits that local main does not. Pull them and prepare the release again.' + } + throw 'HEAD is not on origin/main. Push main first (workflow -p) so the tagged commit has passed CI on main.' +} + +Invoke-Git -C $root tag $tag | Out-Null +Invoke-Git -C $root push origin $tag | Out-Null +Write-Host "Pushed $tag. The Release workflow now runs CI and publishes the release." diff --git a/scripts/ReleaseTools.psm1 b/scripts/ReleaseTools.psm1 new file mode 100644 index 00000000..455f96c7 --- /dev/null +++ b/scripts/ReleaseTools.psm1 @@ -0,0 +1,465 @@ +# Shared release metadata rules for tests/Test-Repository.ps1 and the release scripts. +# Compatible with Windows PowerShell 5.1 and PowerShell 7. +Set-StrictMode -Version 3.0 + +$script:PackageName = 'claude-code-usage-monitor' +$script:RepositoryUrl = 'https://github.com/CodeZeno/Claude-Code-Usage-Monitor' +$script:Categories = @('Added', 'Changed', 'Deprecated', 'Removed', 'Fixed', 'Security') +$script:Utf8NoBom = New-Object System.Text.UTF8Encoding($false) +$script:LocalOnlyFiles = @('AGENTS.md', 'workflow.cmd') + +function Get-RepositoryRoot { + Split-Path -Parent $PSScriptRoot +} + +function Read-TextFile([string]$Path) { + [System.IO.File]::ReadAllText($Path, $script:Utf8NoBom) +} + +function Write-TextFile([string]$Path, [string]$Text) { + [System.IO.File]::WriteAllText($Path, $Text, $script:Utf8NoBom) +} + +function Get-Newline([string]$Text) { + if ($Text.Contains("`r`n")) { return "`r`n" } + return "`n" +} + +function Split-Lines([string]$Text) { + $Text -split "`r?`n" +} + +function Invoke-Git { + # Quote '--' when calling this: PowerShell drops a bare -- passed to a function. + $output = & git @args + if ($LASTEXITCODE -ne 0) { + throw "git $($args -join ' ') failed with exit code $LASTEXITCODE." + } + $output +} + +function Test-ReleaseVersion([string]$Version) { + $Version -match '^\d+\.\d+\.\d+$' +} + +function ConvertTo-ReleaseVersion([string]$Version) { + if (-not (Test-ReleaseVersion $Version)) { + throw "'$Version' is not a MAJOR.MINOR.PATCH version." + } + [System.Version]::Parse($Version) +} + +function Get-NextVersion([string]$Current, [string]$Level) { + $version = ConvertTo-ReleaseVersion $Current + switch ($Level) { + 'major' { return "$($version.Major + 1).0.0" } + 'minor' { return "$($version.Major).$($version.Minor + 1).0" } + 'patch' { return "$($version.Major).$($version.Minor).$($version.Build + 1)" } + } + $next = ConvertTo-ReleaseVersion $Level + if ($next -le $version) { + throw "Release version $Level must be greater than the current version $Current." + } + $Level +} + +# Returns 'major', 'minor' or 'patch' for the most significant part that changed. +function Get-VersionChangeLevel([string]$From, [string]$To) { + $old = ConvertTo-ReleaseVersion $From + $new = ConvertTo-ReleaseVersion $To + if ($new.Major -ne $old.Major) { return 'major' } + if ($new.Minor -ne $old.Minor) { return 'minor' } + 'patch' +} + +function Get-PackageVersionFromToml([string]$Text) { + $section = '' + foreach ($line in (Split-Lines $Text)) { + if ($line -match '^\s*\[([^\]]+)\]\s*$') { + $section = $Matches[1] + continue + } + if ($section -eq 'package' -and $line -match '^version\s*=\s*"([^"]+)"\s*$') { + return $Matches[1] + } + } + throw 'Cargo.toml has no [package] version.' +} + +function Set-PackageVersionInToml([string]$Text, [string]$Version) { + $newline = Get-Newline $Text + $lines = @(Split-Lines $Text) + $section = '' + for ($index = 0; $index -lt $lines.Count; $index++) { + if ($lines[$index] -match '^\s*\[([^\]]+)\]\s*$') { + $section = $Matches[1] + continue + } + if ($section -eq 'package' -and $lines[$index] -match '^version\s*=\s*"[^"]+"\s*$') { + $lines[$index] = "version = `"$Version`"" + return ($lines -join $newline) + } + } + throw 'Cargo.toml has no [package] version.' +} + +function Get-LockedPackageVersion([string]$Text) { + $pattern = '(?m)^name = "' + [regex]::Escape($script:PackageName) + '"\r?\nversion = "([^"]+)"' + $match = [regex]::Match($Text, $pattern) + if (-not $match.Success) { + throw "Cargo.lock has no entry for $script:PackageName." + } + $match.Groups[1].Value +} + +# Parses CHANGELOG.md into release sections and link references, collecting +# structural problems instead of stopping at the first one. +function Read-Changelog([string]$Text) { + $releases = New-Object System.Collections.Generic.List[object] + $links = [ordered]@{} + $problems = New-Object System.Collections.Generic.List[string] + $release = $null + $category = $null + $lineNumber = 0 + + foreach ($line in (Split-Lines $Text)) { + $lineNumber++ + if ($line -match '^## ') { + $category = $null + if ($line -eq '## [Unreleased]') { + $release = [pscustomobject]@{ Name = 'Unreleased'; Date = $null; Line = $lineNumber; Categories = New-Object System.Collections.Generic.List[object] } + } elseif ($line -match '^## \[(\d+\.\d+\.\d+)\] - (\d{4}-\d{2}-\d{2})$') { + $release = [pscustomobject]@{ Name = $Matches[1]; Date = $Matches[2]; Line = $lineNumber; Categories = New-Object System.Collections.Generic.List[object] } + } else { + $problems.Add("CHANGELOG.md:${lineNumber}: '$line' must be '## [Unreleased]' or '## [MAJOR.MINOR.PATCH] - YYYY-MM-DD'.") + $release = $null + continue + } + $releases.Add($release) + } elseif ($line -match '^### (.*)$') { + $name = $Matches[1] + if ($null -eq $release) { + $problems.Add("CHANGELOG.md:${lineNumber}: '### $name' must be inside a '## [...]' release section.") + continue + } + if ($script:Categories -cnotcontains $name) { + $problems.Add("CHANGELOG.md:${lineNumber}: '### $name' is not a changelog category. Use one of: $($script:Categories -join ', ').") + } + if (@($release.Categories | Where-Object { $_.Name -ceq $name }).Count -gt 0) { + $problems.Add("CHANGELOG.md:${lineNumber}: '### $name' appears twice in [$($release.Name)]. Merge the entries into one category.") + } + $category = [pscustomobject]@{ Name = $name; Line = $lineNumber; Entries = 0 } + $release.Categories.Add($category) + } elseif ($line -match '^- ') { + if ($null -ne $category) { + $category.Entries++ + } elseif ($null -ne $release) { + $problems.Add("CHANGELOG.md:${lineNumber}: entry in [$($release.Name)] must be under a '### Added/Changed/Fixed/Removed' category.") + } + } elseif ($line -match '^\[([^\]]+)\]:\s*(\S+)\s*$') { + $release = $null + $category = $null + if ($links.Contains($Matches[1])) { + $problems.Add("CHANGELOG.md:${lineNumber}: link reference [$($Matches[1])] is defined twice.") + } else { + $links[$Matches[1]] = $Matches[2] + } + } + } + + [pscustomobject]@{ + Releases = $releases.ToArray() + Links = $links + Problems = $problems.ToArray() + } +} + +function Get-UnreleasedEntryCount($Changelog) { + $unreleased = @($Changelog.Releases | Where-Object { $_.Name -eq 'Unreleased' }) + if ($unreleased.Count -eq 0) { return 0 } + $count = 0 + foreach ($category in $unreleased[0].Categories) { $count += $category.Entries } + $count +} + +function Get-UnreleasedCategories($Changelog) { + $unreleased = @($Changelog.Releases | Where-Object { $_.Name -eq 'Unreleased' }) + if ($unreleased.Count -eq 0) { return @() } + @($unreleased[0].Categories | Where-Object { $_.Entries -gt 0 } | ForEach-Object { $_.Name }) +} + +function Get-CompareUrl([string]$From, [string]$To) { + "$script:RepositoryUrl/compare/$From...$To" +} + +# Returns the problems that make CHANGELOG.md inconsistent with itself or with +# the Cargo.toml package version (the newest released version). +function Test-ChangelogText([string]$Text, [string]$PackageVersion) { + $changelog = Read-Changelog $Text + $problems = New-Object System.Collections.Generic.List[string] + foreach ($problem in $changelog.Problems) { $problems.Add($problem) } + + $releases = $changelog.Releases + $unreleased = @($releases | Where-Object { $_.Name -eq 'Unreleased' }) + $dated = @($releases | Where-Object { $_.Name -ne 'Unreleased' }) + + if ($unreleased.Count -gt 1) { + $problems.Add("CHANGELOG.md:$($unreleased[1].Line): only one '## [Unreleased]' section is allowed.") + } + if ($unreleased.Count -gt 0 -and $releases[0].Name -ne 'Unreleased') { + $problems.Add("CHANGELOG.md:$($unreleased[0].Line): '## [Unreleased]' must be the first release section.") + } + foreach ($section in $unreleased) { + foreach ($category in $section.Categories) { + if ($category.Entries -eq 0) { + $problems.Add("CHANGELOG.md:$($category.Line): remove the empty '### $($category.Name)' heading from [Unreleased].") + } + } + } + + $seen = @{} + for ($index = 0; $index -lt $dated.Count; $index++) { + $release = $dated[$index] + if ($seen.ContainsKey($release.Name)) { + $problems.Add("CHANGELOG.md:$($release.Line): version $($release.Name) appears twice.") + } + $seen[$release.Name] = $true + $parsedDate = [datetime]::MinValue + if (-not [datetime]::TryParseExact($release.Date, 'yyyy-MM-dd', [Globalization.CultureInfo]::InvariantCulture, [Globalization.DateTimeStyles]::None, [ref]$parsedDate)) { + $problems.Add("CHANGELOG.md:$($release.Line): $($release.Date) is not a valid date.") + } + if ($release.Categories.Count -eq 0) { + $problems.Add("CHANGELOG.md:$($release.Line): [$($release.Name)] has no entries.") + } + foreach ($category in $release.Categories) { + if ($category.Entries -eq 0) { + $problems.Add("CHANGELOG.md:$($category.Line): '### $($category.Name)' in [$($release.Name)] has no entries.") + } + } + if ($index -gt 0) { + $newer = $dated[$index - 1] + if ((ConvertTo-ReleaseVersion $release.Name) -ge (ConvertTo-ReleaseVersion $newer.Name)) { + $problems.Add("CHANGELOG.md:$($release.Line): $($release.Name) must be older than $($newer.Name) above it; list releases newest first.") + } + if ([string]::CompareOrdinal($release.Date, $newer.Date) -gt 0) { + $problems.Add("CHANGELOG.md:$($release.Line): $($release.Name) is dated after $($newer.Name) above it.") + } + } + if (-not $changelog.Links.Contains($release.Name)) { + $problems.Add("CHANGELOG.md:$($release.Line): add a [$($release.Name)]: link reference at the bottom of the changelog.") + } + } + + if ($dated.Count -eq 0) { + $problems.Add('CHANGELOG.md has no released versions.') + } else { + $newest = $dated[0].Name + if ($newest -ne $PackageVersion) { + $problems.Add("Cargo.toml version $PackageVersion does not match the newest CHANGELOG.md release $newest. Leave the version unchanged and add entries under '## [Unreleased]'; scripts/New-Release.ps1 sets the version when a release is prepared.") + } + if ($dated.Count -gt 1) { + $expected = Get-CompareUrl "v$($dated[1].Name)" "v$newest" + if ($changelog.Links.Contains($newest) -and $changelog.Links[$newest] -ne $expected) { + $problems.Add("CHANGELOG.md: the [$newest] link must be $expected") + } + } + if ($unreleased.Count -gt 0) { + $expected = Get-CompareUrl "v$newest" 'HEAD' + if (-not $changelog.Links.Contains('Unreleased')) { + $problems.Add("CHANGELOG.md: add '[Unreleased]: $expected' at the bottom of the changelog.") + } elseif ($changelog.Links['Unreleased'] -ne $expected) { + $problems.Add("CHANGELOG.md: the [Unreleased] link must be $expected") + } + } + } + + foreach ($name in $changelog.Links.Keys) { + if ($name -eq 'Unreleased') { + if ($unreleased.Count -eq 0) { + $problems.Add("CHANGELOG.md: remove the [Unreleased] link or add a '## [Unreleased]' section.") + } + } elseif ((Test-ReleaseVersion $name) -and -not $seen.ContainsKey($name)) { + $problems.Add("CHANGELOG.md: link reference [$name] has no matching release section.") + } + } + + $problems.ToArray() +} + +# Moves the [Unreleased] entries into a dated release section, keeping an empty +# [Unreleased] heading at the top, and updates the comparison links. +function Add-ChangelogRelease([string]$Text, [string]$Version, [string]$PreviousVersion, [string]$Date) { + $newline = Get-Newline $Text + $output = New-Object System.Collections.Generic.List[string] + $found = $false + foreach ($line in (Split-Lines $Text)) { + if ($line -eq '## [Unreleased]') { + $output.Add($line) + $output.Add('') + $output.Add("## [$Version] - $Date") + $found = $true + } elseif ($line -notmatch '^\[Unreleased\]:') { + $output.Add($line) + } + } + if (-not $found) { + throw "CHANGELOG.md has no '## [Unreleased]' section to release." + } + while ($output.Count -gt 0 -and $output[$output.Count - 1] -eq '') { + $output.RemoveAt($output.Count - 1) + } + $output.Add("[$Version]: $(Get-CompareUrl "v$PreviousVersion" "v$Version")") + $output.Add("[Unreleased]: $(Get-CompareUrl "v$Version" 'HEAD')") + ($output -join $newline) + $newline +} + +# Subjects of the Dependabot commits on HEAD since $SinceRef (normally the last +# release tag), oldest first. Auto-merged Dependabot pull requests cannot add +# their own changelog entries; New-Release.ps1 writes them from these subjects. +function Get-DependabotCommitSubjects([string]$Root, [string]$SinceRef) { + & git -C $Root rev-parse -q --verify "$SinceRef^{commit}" | Out-Null + if ($LASTEXITCODE -ne 0) { + Write-Warning "$SinceRef not found; Dependabot updates were not added to the changelog." + return @() + } + $log = @(Invoke-Git -C $Root log --reverse --no-merges '--format=%an%x09%s' "$SinceRef..HEAD") + @($log | Where-Object { $_ -match "^dependabot\[bot\]`t" } | ForEach-Object { ($_ -split "`t", 2)[1] }) +} + +# Turns Dependabot commit subjects ("chore(deps): bump ureq from 3.5.1 to 3.5.2 (#227)") +# into changelog entries, skipping updates the changelog already describes by +# pull request link or by package and versions. +function Get-DependencyUpdateEntries([string[]]$Subjects, [string]$ChangelogText) { + $entries = New-Object System.Collections.Generic.List[string] + foreach ($subject in $Subjects) { + $title = $subject.Trim() + $link = '' + if ($title -match '^(.*?)\s*\(#(\d+)\)$') { + $title = $Matches[1] + $number = $Matches[2] + if ($ChangelogText.Contains("/pull/$number)")) { continue } + $link = " ([#$number]($script:RepositoryUrl/pull/$number))" + } + $title = $title -replace '^[a-z]+(\([^)]*\))?!?:\s*', '' + if ($title -match '^bump (\S+) from (\S+) to (\S+)') { + $name = $Matches[1]; $from = $Matches[2]; $to = $Matches[3] + $described = [regex]::Escape("``$name``") + '[^\r\n]*' + [regex]::Escape("from $from to $to") + if ($ChangelogText -match $described) { continue } + $entry = "Update ``$name`` from $from to $to." + } elseif ($title -match '^bump the (\S+) group') { + $entry = "Update the ``$($Matches[1])`` dependency group: $title." + } else { + $entry = "$title." + } + $entry = $entry.Substring(0, 1).ToUpperInvariant() + $entry.Substring(1) + $entries.Add("- $entry$link") + } + $entries.ToArray() +} + +# Appends entries to a category of the [Unreleased] section, adding the +# category heading in Keep a Changelog order when it is missing. +function Add-UnreleasedEntries([string]$Text, [string]$Category, [string[]]$Entries) { + if (@($Entries).Count -eq 0) { return $Text } + if ($script:Categories -cnotcontains $Category) { throw "'$Category' is not a changelog category." } + $newline = Get-Newline $Text + $lines = New-Object System.Collections.Generic.List[string] + foreach ($line in (Split-Lines $Text)) { $lines.Add($line) } + $start = $lines.IndexOf('## [Unreleased]') + if ($start -lt 0) { throw "CHANGELOG.md has no '## [Unreleased]' section." } + $end = $start + 1 + while ($end -lt $lines.Count -and $lines[$end] -notmatch '^## |^\[[^\]]+\]:') { $end++ } + $last = $end - 1 + while ($last -gt $start -and $lines[$last] -eq '') { $last-- } + + $order = [array]::IndexOf($script:Categories, $Category) + $heading = -1 + $before = -1 + for ($i = $start + 1; $i -le $last; $i++) { + if ($lines[$i] -match '^### (.*)$') { + if ($Matches[1] -ceq $Category) { + $heading = $i + } elseif ($before -lt 0 -and [array]::IndexOf($script:Categories, $Matches[1]) -gt $order) { + $before = $i + } + } + } + + if ($heading -ge 0) { + $insert = $heading + 1 + for ($j = $heading + 1; $j -le $last -and $lines[$j] -notmatch '^### '; $j++) { + if ($lines[$j] -ne '') { $insert = $j + 1 } + } + $block = @($Entries) + if ($insert -eq $heading + 1) { $block = @('') + $block } + $lines.InsertRange($insert, [string[]]$block) + } elseif ($before -ge 0) { + $lines.InsertRange($before, [string[]](@("### $Category", '') + @($Entries) + @(''))) + } else { + $lines.InsertRange($last + 1, [string[]](@('', "### $Category", '') + @($Entries))) + } + $lines -join $newline +} + +# Returns problems with the files the repository must not track and with the +# Cargo.toml, Cargo.lock and CHANGELOG.md release metadata. +function Test-RepositoryState([string]$Root) { + $problems = New-Object System.Collections.Generic.List[string] + + $ignored = @(Invoke-Git -C $Root ls-files -ci --exclude-standard) + foreach ($path in $ignored) { + $problems.Add("$path is ignored by .gitignore but tracked or staged. Untrack it and keep the local file: git rm --cached -- `"$path`"") + } + foreach ($path in $script:LocalOnlyFiles) { + if (@(Invoke-Git -C $Root ls-files '--' $path).Count -gt 0) { + $problems.Add("$path is a local-only file and must not be tracked: git rm --cached -- $path") + } + & git -C $Root check-ignore -q -- $path + if ($LASTEXITCODE -ne 0) { + $problems.Add("$path must stay listed in .gitignore.") + } + } + + $packageVersion = Get-PackageVersionFromToml (Read-TextFile (Join-Path $Root 'Cargo.toml')) + $lockedVersion = Get-LockedPackageVersion (Read-TextFile (Join-Path $Root 'Cargo.lock')) + if ($lockedVersion -ne $packageVersion) { + $problems.Add("Cargo.lock records $script:PackageName $lockedVersion but Cargo.toml is $packageVersion. Run 'cargo metadata --format-version 1' and review the Cargo.lock diff.") + } + + foreach ($problem in (Test-ChangelogText (Read-TextFile (Join-Path $Root 'CHANGELOG.md')) $packageVersion)) { + $problems.Add($problem) + } + + $problems.ToArray() +} + +function Assert-RepositoryState([string]$Root) { + $problems = @(Test-RepositoryState $Root) + if ($problems.Count -gt 0) { + foreach ($problem in $problems) { Write-Host " - $problem" } + throw "Repository checks failed with $($problems.Count) problem(s)." + } +} + +function Assert-CleanWorktree([string]$Root, [string]$Action) { + $status = @(Invoke-Git -C $Root status --porcelain) + if ($status.Count -gt 0) { + throw "The working tree has uncommitted changes. Commit or stash them before $Action." + } +} + +function Assert-OnMainBranch([string]$Root, [string]$Action) { + $branch = (Invoke-Git -C $Root rev-parse --abbrev-ref HEAD) | Select-Object -First 1 + if ($branch -ne 'main') { + throw "Switch to main before $Action (current branch: $branch)." + } +} + +Export-ModuleMember -Function ` + Get-RepositoryRoot, Read-TextFile, Write-TextFile, Invoke-Git, ` + ConvertTo-ReleaseVersion, Get-NextVersion, Get-VersionChangeLevel, ` + Get-PackageVersionFromToml, Set-PackageVersionInToml, Get-LockedPackageVersion, ` + Read-Changelog, Get-UnreleasedEntryCount, Get-UnreleasedCategories, ` + Test-ChangelogText, Add-ChangelogRelease, Test-RepositoryState, ` + Get-DependabotCommitSubjects, Get-DependencyUpdateEntries, Add-UnreleasedEntries, ` + Assert-RepositoryState, Assert-CleanWorktree, Assert-OnMainBranch diff --git a/src/poller/tests.rs b/src/poller/tests.rs index a9665996..4568b64c 100644 --- a/src/poller/tests.rs +++ b/src/poller/tests.rs @@ -498,7 +498,6 @@ fn antigravity_gemini_weekly_reset_projection_tests() { let leap = (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0); let y_days = if leap { 366 } else { 365 }; if d < y_days { - let mut month = 1; let month_days = [ 31, if leap { 29 } else { 28 }, @@ -513,7 +512,7 @@ fn antigravity_gemini_weekly_reset_projection_tests() { 30, 31, ]; - for &m_len in &month_days { + for (month, &m_len) in (1..).zip(&month_days) { if d < m_len { return format!( "{year:04}-{month:02}-{:02}T{hours:02}:{minutes:02}:{seconds:02}Z", @@ -521,7 +520,6 @@ fn antigravity_gemini_weekly_reset_projection_tests() { ); } d -= m_len; - month += 1; } } d -= y_days; diff --git a/src/window/taskbar_collision.rs b/src/window/taskbar_collision.rs index e33b4b58..85bcf3a8 100644 --- a/src/window/taskbar_collision.rs +++ b/src/window/taskbar_collision.rs @@ -511,7 +511,7 @@ mod tests { #[test] fn stale_failed_moved_and_recreated_taskbars_are_unknown_not_free() { let now = Instant::now(); - let hwnd = HWND(1usize as *mut _); + let hwnd = HWND(std::ptr::dangling_mut()); let other = HWND(2usize as *mut _); let bounds = rect(0, 1032, 1920, 1080); let sample = layout(bounds, vec![rect(700, 1032, 1220, 1080)]); diff --git a/tests/Test-ReleaseTools.ps1 b/tests/Test-ReleaseTools.ps1 new file mode 100644 index 00000000..3500ced8 --- /dev/null +++ b/tests/Test-ReleaseTools.ps1 @@ -0,0 +1,141 @@ +# Regression tests for scripts/ReleaseTools.psm1. Runs in Windows PowerShell 5.1 +# and PowerShell 7 without Pester. +[CmdletBinding()] +param() + +$ErrorActionPreference = 'Stop' +Import-Module (Join-Path (Split-Path -Parent $PSScriptRoot) 'scripts/ReleaseTools.psm1') -Force + +$script:Failures = New-Object System.Collections.Generic.List[string] +$script:Count = 0 + +function Assert-True([bool]$Condition, [string]$Name) { + $script:Count++ + if (-not $Condition) { $script:Failures.Add($Name) } +} + +function Assert-Equal($Expected, $Actual, [string]$Name) { + Assert-True ($Expected -ceq $Actual) "$Name (expected '$Expected', got '$Actual')" +} + +function Assert-Problem([string[]]$Problems, [string]$Pattern, [string]$Name) { + Assert-True (@($Problems | Where-Object { $_ -match $Pattern }).Count -gt 0) "$Name (no problem matching '$Pattern' in: $($Problems -join ' | '))" +} + +function Assert-Throws([scriptblock]$Script, [string]$Name) { + $threw = $false + try { & $Script | Out-Null } catch { $threw = $true } + Assert-True $threw "$Name (did not throw)" +} + +$repo = 'https://github.com/CodeZeno/Claude-Code-Usage-Monitor' + +# $Unreleased is untyped: a [string] parameter would turn $null into ''. +function New-Changelog($Unreleased = $null, [string]$UnreleasedLink = "$repo/compare/v1.1.0...HEAD") { + $lines = @('# Changelog', '', 'Intro text.', '') + if ($null -ne $Unreleased) { + $lines += '## [Unreleased]' + $lines += '' + if ($Unreleased) { $lines += $Unreleased; $lines += '' } + } + $lines += @( + '## [1.1.0] - 2026-02-01', '', '### Added', '', '- New thing.', '', + '## [1.0.0] - 2026-01-01', '', '### Fixed', '', '- Old thing.', '', + "[1.0.0]: $repo/commit/abc", + "[1.1.0]: $repo/compare/v1.0.0...v1.1.0" + ) + if ($null -ne $Unreleased -and $UnreleasedLink) { $lines += "[Unreleased]: $UnreleasedLink" } + ($lines -join "`n") + "`n" +} + +# Valid changelogs. +Assert-Equal 0 @(Test-ChangelogText (New-Changelog) '1.1.0').Count 'released changelog without Unreleased is valid' +Assert-Equal 0 @(Test-ChangelogText (New-Changelog '') '1.1.0').Count 'empty Unreleased heading is valid' +Assert-Equal 0 @(Test-ChangelogText (New-Changelog "### Fixed`n`n- Pending fix.") '1.1.0').Count 'Unreleased with entries is valid' + +# Version and structure problems. +Assert-Problem @(Test-ChangelogText (New-Changelog "### Fixed`n`n- Pending fix.") '1.2.0') 'does not match the newest' 'bumped Cargo version without release is rejected' +Assert-Problem @(Test-ChangelogText (New-Changelog '### Fixed') '1.1.0') 'empty .### Fixed' 'empty Unreleased category is rejected' +Assert-Problem @(Test-ChangelogText (New-Changelog "### Improved`n`n- Thing.") '1.1.0') 'not a changelog category' 'unknown category is rejected' +Assert-Problem @(Test-ChangelogText (New-Changelog "- Loose entry.") '1.1.0') 'must be under a' 'entry without category is rejected' +Assert-Problem @(Test-ChangelogText (New-Changelog '' '') '1.1.0') 'add .\[Unreleased\]:' 'missing Unreleased link is rejected' +Assert-Problem @(Test-ChangelogText (New-Changelog '' "$repo/compare/v1.0.0...HEAD") '1.1.0') 'Unreleased\] link must be' 'stale Unreleased link is rejected' +Assert-Problem @(Test-ChangelogText ((New-Changelog) + "[Unreleased]: $repo/compare/v1.1.0...HEAD`n") '1.1.0') 'remove the \[Unreleased\] link' 'Unreleased link without heading is rejected' + +$misplaced = (New-Changelog) -replace '## \[1\.0\.0\]', "## [Unreleased]`n`n## [1.0.0]" +Assert-Problem @(Test-ChangelogText $misplaced '1.1.0') 'must be the first release section' 'Unreleased below a release is rejected' +$unordered = (New-Changelog) -replace '1\.0\.0\] - 2026-01-01', '1.2.0] - 2026-01-01' -replace '\[1\.0\.0\]: ', '[1.2.0]: ' +Assert-Problem @(Test-ChangelogText $unordered '1.1.0') 'must be older than' 'out-of-order versions are rejected' +Assert-Problem @(Test-ChangelogText ((New-Changelog) -replace '2026-01-01', '2026-03-01') '1.1.0') 'is dated after' 'out-of-order dates are rejected' +Assert-Problem @(Test-ChangelogText ((New-Changelog) -replace '## \[1\.1\.0\] - ', '## 1.1.0 - ') '1.1.0') 'must be .## \[Unreleased\]' 'malformed heading is rejected' +Assert-Problem @(Test-ChangelogText ((New-Changelog) -replace "\[1\.0\.0\]: [^\n]+\n", '') '1.1.0') 'add a \[1\.0\.0\]: link' 'missing version link is rejected' +Assert-Problem @(Test-ChangelogText ((New-Changelog) -replace 'v1\.0\.0\.\.\.v1\.1\.0', 'v0.9.0...v1.1.0') '1.1.0') 'link must be' 'wrong newest compare link is rejected' +Assert-Problem @(Test-ChangelogText ((New-Changelog) -replace '### Fixed', "### Fixed`n`n- Extra.`n`n### Fixed") '1.1.0') 'appears twice' 'duplicate category is rejected' + +# Preparing a release keeps an empty Unreleased heading and moves the entries. +$pending = New-Changelog "### Added`n`n- Pending feature." +$released = Add-ChangelogRelease $pending '1.2.0' '1.1.0' '2026-03-01' +Assert-Equal 0 @(Test-ChangelogText $released '1.2.0').Count 'released changelog is valid' +Assert-True ($released.Contains("## [Unreleased]`n`n## [1.2.0] - 2026-03-01`n`n### Added`n`n- Pending feature.")) 'entries move under the new release' +Assert-True ($released.EndsWith("[1.2.0]: $repo/compare/v1.1.0...v1.2.0`n[Unreleased]: $repo/compare/v1.2.0...HEAD`n")) 'release links are appended' +Assert-Equal 0 (Get-UnreleasedEntryCount (Read-Changelog $released)) 'Unreleased is empty after release' +Assert-Equal 1 (Get-UnreleasedEntryCount (Read-Changelog $pending)) 'Unreleased entry count' +Assert-Equal 'Added' ((Get-UnreleasedCategories (Read-Changelog $pending)) -join ',') 'Unreleased categories' +Assert-Throws { Add-ChangelogRelease (New-Changelog) '1.2.0' '1.1.0' '2026-03-01' } 'release without Unreleased section throws' + +$crlf = Add-ChangelogRelease ($pending -replace "`n", "`r`n") '1.2.0' '1.1.0' '2026-03-01' +Assert-True ($crlf.Contains("## [Unreleased]`r`n`r`n## [1.2.0]") -and -not ($crlf -match "[^`r]`n")) 'CRLF line endings are preserved' + +# Versions. +Assert-Equal '1.2.4' (Get-NextVersion '1.2.3' 'patch') 'patch bump' +Assert-Equal '1.3.0' (Get-NextVersion '1.2.3' 'minor') 'minor bump resets patch' +Assert-Equal '2.0.0' (Get-NextVersion '1.2.3' 'major') 'major bump resets minor and patch' +Assert-Equal '1.5.0' (Get-NextVersion '1.2.3' '1.5.0') 'explicit version' +Assert-Throws { Get-NextVersion '1.2.3' '1.2.3' } 'explicit version must increase' +Assert-Throws { Get-NextVersion '1.2.3' 'v1.3' } 'explicit version must be MAJOR.MINOR.PATCH' +Assert-Equal 'minor' (Get-VersionChangeLevel '1.2.3' '1.3.0') 'minor change level' +Assert-Equal 'patch' (Get-VersionChangeLevel '1.2.3' '1.2.9') 'patch change level' +Assert-Equal 'major' (Get-VersionChangeLevel '1.2.3' '2.0.0') 'major change level' + +# Cargo metadata. +$toml = "[package]`nname = `"claude-code-usage-monitor`"`nversion = `"1.2.3`"`n`n[dependencies.windows]`nversion = `"0.62`"`n" +Assert-Equal '1.2.3' (Get-PackageVersionFromToml $toml) 'package version is read from [package]' +$bumped = Set-PackageVersionInToml $toml '1.3.0' +Assert-Equal '1.3.0' (Get-PackageVersionFromToml $bumped) 'package version is updated' +Assert-True ($bumped.Contains("[dependencies.windows]`nversion = `"0.62`"")) 'dependency versions are untouched' +$lock = "[[package]]`nname = `"chrono`"`nversion = `"0.4.0`"`n`n[[package]]`nname = `"claude-code-usage-monitor`"`nversion = `"1.2.3`"`n" +Assert-Equal '1.2.3' (Get-LockedPackageVersion $lock) 'locked package version' + +# Changelog entries for auto-merged Dependabot pull requests. +$described = New-Changelog "### Changed`n`n- Update the locked ``zip`` dependency from 9.3.0 to 9.6.1 for import. ([#228]($repo/pull/228))" +$entries = @(Get-DependencyUpdateEntries @( + 'chore(deps): bump ureq from 3.5.1 to 3.5.2 (#227)', + 'chore(deps): bump zip from 9.3.0 to 9.6.1', + 'chore(deps): bump lucide-icons from 1.67.0 to 1.73.0 (#228)', + 'chore(deps): bump the github-actions group with 2 updates (#230)', + 'Bump serde from 1.0.1 to 1.0.2' + ) $described) +Assert-Equal 3 $entries.Count 'updates already in the changelog are skipped' +Assert-Equal "- Update ``ureq`` from 3.5.1 to 3.5.2. ([#227]($repo/pull/227))" $entries[0] 'bump with a pull request number' +Assert-Equal "- Update the ``github-actions`` dependency group: bump the github-actions group with 2 updates. ([#230]($repo/pull/230))" $entries[1] 'grouped bump' +Assert-Equal "- Update ``serde`` from 1.0.1 to 1.0.2." $entries[2] 'bump without a pull request number' + +$withNew = Add-UnreleasedEntries $described 'Changed' @("- Update ``a`` from 1 to 2.") +Assert-Equal 0 @(Test-ChangelogText $withNew '1.1.0').Count 'entries appended to an existing category keep the changelog valid' +Assert-True ($withNew.Contains("([#228]($repo/pull/228))`n- Update ``a`` from 1 to 2.`n`n## [1.1.0]")) 'entry follows the existing entries' + +$intoEmpty = Add-UnreleasedEntries (New-Changelog '') 'Changed' @("- Update ``a`` from 1 to 2.") +Assert-Equal 0 @(Test-ChangelogText $intoEmpty '1.1.0').Count 'a category is added to an empty Unreleased section' +Assert-True ($intoEmpty.Contains("## [Unreleased]`n`n### Changed`n`n- Update ``a`` from 1 to 2.`n`n## [1.1.0]")) 'new category layout' + +$ordered = Add-UnreleasedEntries (New-Changelog "### Added`n`n- New.`n`n### Fixed`n`n- Fix.") 'Changed' @("- Update ``a`` from 1 to 2.") +Assert-Equal 0 @(Test-ChangelogText $ordered '1.1.0').Count 'a category inserted between others keeps the changelog valid' +Assert-True ($ordered.Contains("- New.`n`n### Changed`n`n- Update ``a`` from 1 to 2.`n`n### Fixed")) 'Changed goes between Added and Fixed' +Assert-Equal $described (Add-UnreleasedEntries $described 'Changed' @()) 'no entries leaves the changelog unchanged' +Assert-Throws { Add-UnreleasedEntries (New-Changelog) 'Changed' @('- X.') } 'a changelog without Unreleased is refused' + +if ($script:Failures.Count -gt 0) { + foreach ($failure in $script:Failures) { Write-Host "FAILED: $failure" } + throw "$($script:Failures.Count) of $script:Count release tool checks failed." +} +Write-Host "All $script:Count release tool checks passed." diff --git a/tests/Test-Repository.ps1 b/tests/Test-Repository.ps1 new file mode 100644 index 00000000..623c2f64 --- /dev/null +++ b/tests/Test-Repository.ps1 @@ -0,0 +1,14 @@ +# Check the repository rules that CI and the release scripts enforce: +# - files ignored by .gitignore (including AGENTS.md and workflow.cmd) are not tracked; +# - Cargo.lock records the Cargo.toml package version; +# - CHANGELOG.md is well formed, its newest release matches Cargo.toml, and +# unreleased changes are listed under '## [Unreleased]'. +[CmdletBinding()] +param() + +$ErrorActionPreference = 'Stop' +Import-Module (Join-Path (Split-Path -Parent $PSScriptRoot) 'scripts/ReleaseTools.psm1') -Force + +$root = Get-RepositoryRoot +Assert-RepositoryState $root +Write-Host 'Repository checks passed.' From cc868a2842367566bda6a5bf230387fb1634226b Mon Sep 17 00:00:00 2001 From: Craig Constable Date: Thu, 26 Nov 2026 08:07:53 +1000 Subject: [PATCH 07/12] build(lints): enforce unsafe, unwrap and HTTP-agent boundaries with lints Add [lints] to Cargo.toml and a clippy.toml so Clippy reports broken project rules with the fix in the message: - unsafe code is denied unless a file opts in with #![allow(unsafe_code, reason = "...")]; - new unsafe blocks need a // SAFETY: comment; files that predate the rule carry a ratchet allow until their blocks are documented; - production code cannot call unwrap(); the 11 remaining calls are replaced; - ureq agents are created only by poller::build_agent and updater::build_agent; - code cannot modify the process environment. CONTRIBUTING.md describes the rules. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 6 ++++ CONTRIBUTING.md | 21 +++++++++++++ Cargo.toml | 14 +++++++++ clippy.toml | 31 ++++++++++++++++++++ src/app_settings.rs | 3 ++ src/dashboard.rs | 5 ++++ src/desktop_compositor.rs | 6 ++++ src/font_catalog.rs | 4 +++ src/known_folders.rs | 4 +++ src/localization/mod.rs | 5 ++++ src/models.rs | 4 ++- src/native_interop.rs | 6 ++++ src/native_interop/tests.rs | 6 ++++ src/poller.rs | 4 +++ src/poller/claude_desktop.rs | 5 ++++ src/poller/windows_credentials.rs | 6 ++++ src/studio_app.rs | 5 ++++ src/studio_app/studio_context_menu_editor.rs | 4 ++- src/studio_app/studio_diagnostics.rs | 6 ++++ src/studio_app/studio_helper_panels.rs | 2 +- src/studio_app/studio_native_menu.rs | 6 ++++ src/studio_app/studio_utilities.rs | 6 ++++ src/studio_app/tests.rs | 6 ++++ src/studio_app/warp.rs | 5 ++++ src/theme.rs | 6 ++++ src/theme_engine/theme_datetime.rs | 6 ++++ src/theme_engine/theme_rendering.rs | 6 ++++ src/tray_icon.rs | 6 ++++ src/tray_icon/settings.rs | 11 +++++-- src/ui/theme.rs | 6 ++++ src/updater.rs | 10 +++++++ src/updater/download.rs | 10 +++++-- src/widget_font.rs | 5 ++++ src/window.rs | 28 +++++++++++------- src/window/layered_window_tests.rs | 6 ++++ src/window/lifecycle.rs | 8 ++++- src/window/lifecycle/tests.rs | 6 ++++ src/window/message_loop.rs | 6 ++++ src/window/mouse.rs | 6 ++++ src/window/positioning.rs | 6 ++++ src/window/taskbar_collision.rs | 5 ++++ src/window/widget_tooltip.rs | 5 ++++ src/window/window_context_menu.rs | 6 ++++ src/winsqlite.rs | 5 ++++ 44 files changed, 304 insertions(+), 19 deletions(-) create mode 100644 clippy.toml diff --git a/CHANGELOG.md b/CHANGELOG.md index ea0d808a..cb63bc81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,12 @@ changes grouped into Added, Changed, Fixed, and Removed where applicable. - Require the CI checks to pass before the tagged Release workflow builds and publishes artifacts. - Resolve the remaining Clippy warnings in test code so CI can deny warnings. +- Enforce code boundaries with lints in `Cargo.toml` and `clippy.toml`, described in [CONTRIBUTING.md](CONTRIBUTING.md#lint-rules): + - unsafe code is allowed only in files that opt in; + - new unsafe blocks need a `// SAFETY:` comment, as a ratchet; + - production code cannot use `unwrap()`, and the 11 remaining calls are replaced; + - HTTP agents are created only in the poller and updater; + - code cannot modify the process environment. - Draw the Classic, Compact Fluent Quad and Classic Vertical built-in themes from single layers with light-mode colours instead of duplicate layers gated on `system.dark` (163 to 124, 158 to 118 and 133 to 114 layers), with identical rendering in both appearances. Custom themes that keep separate dark and light layers render as before. - Run the dependency security checks as part of `CI passed` on pull requests and pushes to `main`, and once in the tagged Release workflow through CI. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 54d0f27e..5a1f153c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -61,6 +61,27 @@ check the affected dashboard or taskbar behavior and include redacted screenshot when helpful. For documentation-only changes, check links and formatting; compiling the application is not necessary. +### Lint rules + +`Cargo.toml`'s `[lints]` table and `clippy.toml` encode project rules, so Clippy +reports a broken rule and the fix: + +- `unsafe` code is denied unless a file opts in with + `#![allow(unsafe_code, reason = "...")]`. Keep native calls in files that + already opt in where practical. +- Every unsafe block needs a `// SAFETY:` comment explaining why the call is + sound. Files with a `ratchet` allow for `clippy::undocumented_unsafe_blocks` + predate the rule. When you document their blocks, remove the allow. +- Production code must not use `unwrap()`. Return or handle the error, or use + `expect("...")` stating why the value cannot be missing. Tests may unwrap. +- HTTP agents are created only by `poller::build_agent` and + `updater::build_agent`, which apply the TLS and timeout settings. +- Do not change the process environment (`std::env::set_var` and + `std::env::remove_var`); provider discovery and parallel tests share it. + +Fix the code rather than adding an `allow`. When an exception is necessary, +scope it to the item that needs it and give a `reason`. + ## Pull requests Keep each pull request focused on one problem and avoid unrelated formatting or diff --git a/Cargo.toml b/Cargo.toml index 64cc13e3..0fa496d1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -81,6 +81,20 @@ winresource = "0.1.31" # Keep native text copy/paste without arboard's image codecs. See vendor/egui-winit/PATCH.md. egui-winit = { path = "vendor/egui-winit" } +[lints.rust] +# Unsafe code needs an explicit opt-in: a file that calls native APIs starts with +# #![allow(unsafe_code, reason = "...")]. Keep new unsafe code in those files. +unsafe_code = "deny" + +[lints.clippy] +# Every new unsafe block needs a // SAFETY: comment. Files listed with a +# "ratchet" allow predate this rule; document their blocks and drop the allow. +undocumented_unsafe_blocks = "deny" +# Outside tests, handle the error, or use expect("why this cannot fail"). +unwrap_used = "deny" +dbg_macro = "deny" +todo = "deny" + [profile.release] opt-level = "z" lto = true diff --git a/clippy.toml b/clippy.toml new file mode 100644 index 00000000..b200c51c --- /dev/null +++ b/clippy.toml @@ -0,0 +1,31 @@ +# Project rules enforced by Clippy. Lint levels live in Cargo.toml's [lints] table. +# Each `reason` is printed with the error, so it should name the fix. + +# Tests may unwrap; production code may not (see `unwrap_used` in Cargo.toml). +allow-unwrap-in-tests = true + +disallowed-methods = [ + # HTTP stays in poller/ and updater/. Each has one `build_agent` that sets + # native TLS, the platform certificate verifier and timeouts; + # those two functions are the only places allowed to create a ureq agent. + { path = "ureq::Agent::new_with_defaults", reason = "create HTTP agents only in poller::build_agent or updater::build_agent, which apply the TLS and timeout policy; call those instead" }, + { path = "ureq::Agent::new_with_config", reason = "create HTTP agents only in poller::build_agent or updater::build_agent, which apply the TLS and timeout policy; call those instead" }, + { path = "ureq::Agent::config_builder", reason = "create HTTP agents only in poller::build_agent or updater::build_agent, which apply the TLS and timeout policy; call those instead" }, + { path = "ureq::Agent::with_parts", reason = "create HTTP agents only in poller::build_agent or updater::build_agent, which apply the TLS and timeout policy; call those instead" }, + { path = "ureq::config::Config::new_agent", reason = "create HTTP agents only in poller::build_agent or updater::build_agent, which apply the TLS and timeout policy; call those instead" }, + { path = "ureq::agent", reason = "the default ureq agent skips the project's TLS and timeout policy; use poller::build_agent or updater::build_agent" }, + { path = "ureq::run", reason = "the default ureq agent skips the project's TLS and timeout policy; use poller::build_agent or updater::build_agent" }, + { path = "ureq::get", reason = "the default ureq agent skips the project's TLS and timeout policy; use poller::build_agent or updater::build_agent" }, + { path = "ureq::post", reason = "the default ureq agent skips the project's TLS and timeout policy; use poller::build_agent or updater::build_agent" }, + { path = "ureq::put", reason = "the default ureq agent skips the project's TLS and timeout policy; use poller::build_agent or updater::build_agent" }, + { path = "ureq::delete", reason = "the default ureq agent skips the project's TLS and timeout policy; use poller::build_agent or updater::build_agent" }, + { path = "ureq::head", reason = "the default ureq agent skips the project's TLS and timeout policy; use poller::build_agent or updater::build_agent" }, + { path = "ureq::options", reason = "the default ureq agent skips the project's TLS and timeout policy; use poller::build_agent or updater::build_agent" }, + { path = "ureq::connect", reason = "the default ureq agent skips the project's TLS and timeout policy; use poller::build_agent or updater::build_agent" }, + { path = "ureq::patch", reason = "the default ureq agent skips the project's TLS and timeout policy; use poller::build_agent or updater::build_agent" }, + { path = "ureq::trace", reason = "the default ureq agent skips the project's TLS and timeout policy; use poller::build_agent or updater::build_agent" }, + + # The process environment is shared by provider discovery and parallel tests. + { path = "std::env::set_var", reason = "the process environment is shared by provider discovery and parallel tests; pass paths or settings explicitly (tests use app_settings::app_data_directory)" }, + { path = "std::env::remove_var", reason = "the process environment is shared by provider discovery and parallel tests; pass paths or settings explicitly (tests use app_settings::app_data_directory)" }, +] diff --git a/src/app_settings.rs b/src/app_settings.rs index 472e5d20..3b984629 100644 --- a/src/app_settings.rs +++ b/src/app_settings.rs @@ -1,4 +1,5 @@ //! Shared, atomically persisted state used by the widget and studio processes. +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] use std::path::{Path, PathBuf}; use std::time::{SystemTime, UNIX_EPOCH}; @@ -469,6 +470,8 @@ pub fn write_json_atomic(path: &Path, value: &T) -> Result<(), Str } let source = wide_path(&temporary); let destination = wide_path(path); + // SAFETY: both buffers are NUL-terminated UTF-16 paths from wide_path and + // outlive the call. let moved = unsafe { MoveFileExW( PCWSTR::from_raw(source.as_ptr()), diff --git a/src/dashboard.rs b/src/dashboard.rs index e143d99a..23280ca3 100644 --- a/src/dashboard.rs +++ b/src/dashboard.rs @@ -1,4 +1,9 @@ //! Launches and focuses the single GPU-rendered dashboard process. +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] use std::time::Duration; diff --git a/src/desktop_compositor.rs b/src/desktop_compositor.rs index 937fdc88..8a06ebc6 100644 --- a/src/desktop_compositor.rs +++ b/src/desktop_compositor.rs @@ -1,3 +1,9 @@ +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] + use std::cell::RefCell; use std::collections::HashMap; use std::ffi::c_void; diff --git a/src/font_catalog.rs b/src/font_catalog.rs index d21e7217..5b364728 100644 --- a/src/font_catalog.rs +++ b/src/font_catalog.rs @@ -1,4 +1,5 @@ //! Platform font discovery used by font-selection UI. +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] use std::sync::OnceLock; @@ -11,6 +12,9 @@ pub(crate) fn installed_font_families() -> &'static [String] { static FAMILIES: OnceLock> = OnceLock::new(); FAMILIES.get_or_init(|| { let mut families = Vec::new(); + // SAFETY: the screen DC is released on the path that acquired it. + // Enumeration is synchronous, so `families` outlives every callback, + // and collect_font_family casts the LPARAM back to that same Vec. unsafe { let hdc = GetDC(None); if !hdc.is_invalid() { diff --git a/src/known_folders.rs b/src/known_folders.rs index c6ef4777..34eee547 100644 --- a/src/known_folders.rs +++ b/src/known_folders.rs @@ -2,6 +2,7 @@ //! //! Resolves the same folders as `SHGetKnownFolderPath`-based crates, so paths //! follow folder redirection instead of trusting environment variables. +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] use std::ffi::OsString; use std::os::windows::ffi::OsStringExt; @@ -30,6 +31,9 @@ pub fn local_app_data_dir() -> Option { } fn known_folder(id: &GUID) -> Option { + // SAFETY: on success SHGetKnownFolderPath returns a NUL-terminated string + // allocated with CoTaskMemAlloc. It is copied before CoTaskMemFree releases + // it exactly once, and the pointer is not used afterwards. unsafe { let path = SHGetKnownFolderPath(id, KNOWN_FOLDER_FLAG(0), None).ok()?; let wide = OsString::from_wide(path.as_wide()); diff --git a/src/localization/mod.rs b/src/localization/mod.rs index bd23eab4..1484a523 100644 --- a/src/localization/mod.rs +++ b/src/localization/mod.rs @@ -1,6 +1,11 @@ // Keep the complete translation catalogue while the GPU dashboard progressively // adopts the legacy widget strings. #![allow(dead_code)] +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] use windows::core::PWSTR; use windows::Win32::Globalization::{ diff --git a/src/models.rs b/src/models.rs index 1d8e4392..e55aaf15 100644 --- a/src/models.rs +++ b/src/models.rs @@ -255,7 +255,9 @@ impl AppUsageData { .is_some_and(|selected| *selected == account.profile); } for provider in [ProviderId::Claude, ProviderId::Codex] { - let configured = settings.get(provider).unwrap(); + let Some(configured) = settings.get(provider) else { + continue; + }; let tracked = self .accounts .iter() diff --git a/src/native_interop.rs b/src/native_interop.rs index 3bd6d407..31dbf59c 100644 --- a/src/native_interop.rs +++ b/src/native_interop.rs @@ -1,3 +1,9 @@ +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] + use std::sync::Mutex; use windows::core::BOOL; diff --git a/src/native_interop/tests.rs b/src/native_interop/tests.rs index d181d861..5e002ebb 100644 --- a/src/native_interop/tests.rs +++ b/src/native_interop/tests.rs @@ -1,3 +1,9 @@ +#![allow(unsafe_code, reason = "test fixtures call Win32 APIs")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] + use super::*; use std::cell::RefCell; use windows::Win32::Foundation::LRESULT; diff --git a/src/poller.rs b/src/poller.rs index 996b94e2..dfd7c354 100644 --- a/src/poller.rs +++ b/src/poller.rs @@ -364,6 +364,10 @@ fn antigravity_credential_watch_snapshot(_all_sources: bool) -> CredentialWatchS vec![antigravity::antigravity_credential_watch_signature()] } +#[allow( + clippy::disallowed_methods, + reason = "the one place this module creates its HTTP agent" +)] fn build_agent() -> Result { static AGENT: OnceLock> = OnceLock::new(); // Agent clones share their connection pool, cookies, and TLS configuration. diff --git a/src/poller/claude_desktop.rs b/src/poller/claude_desktop.rs index 98edb9c5..621b70f1 100644 --- a/src/poller/claude_desktop.rs +++ b/src/poller/claude_desktop.rs @@ -10,6 +10,11 @@ //! //! Everything here is read-only, runs as the signed-in user, and degrades to //! `None` whenever the layout is not what we expect. +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] use std::ffi::c_void; use std::path::{Path, PathBuf}; diff --git a/src/poller/windows_credentials.rs b/src/poller/windows_credentials.rs index 6dda5d4d..4bc10f32 100644 --- a/src/poller/windows_credentials.rs +++ b/src/poller/windows_credentials.rs @@ -1,3 +1,9 @@ +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] + use std::ffi::c_void; use crate::diagnose; diff --git a/src/studio_app.rs b/src/studio_app.rs index 954b862d..93f560d0 100644 --- a/src/studio_app.rs +++ b/src/studio_app.rs @@ -1,4 +1,9 @@ //! DPI-aware settings dashboard and visual theme studio, hosted in a separate process. +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] use std::collections::HashMap; use std::path::{Path, PathBuf}; diff --git a/src/studio_app/studio_context_menu_editor.rs b/src/studio_app/studio_context_menu_editor.rs index f0b588dc..ce6514c7 100644 --- a/src/studio_app/studio_context_menu_editor.rs +++ b/src/studio_app/studio_context_menu_editor.rs @@ -240,7 +240,9 @@ pub(super) fn move_context_menu_item_to( path } ContextMenuDropTarget::Before(_) | ContextMenuDropTarget::After(_) => { - let (&target_index, parent_path) = adjusted_target.split_last().unwrap(); + let Some((&target_index, parent_path)) = adjusted_target.split_last() else { + return false; + }; let Some(siblings) = context_menu_items_mut(items, parent_path) else { return false; }; diff --git a/src/studio_app/studio_diagnostics.rs b/src/studio_app/studio_diagnostics.rs index 6865c6eb..0b95e766 100644 --- a/src/studio_app/studio_diagnostics.rs +++ b/src/studio_app/studio_diagnostics.rs @@ -1,3 +1,9 @@ +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] + use super::*; use crate::ui::components::layout::{setting_row_with_control_width, settings_group}; use windows::Win32::Foundation::{FILETIME, SYSTEMTIME}; diff --git a/src/studio_app/studio_helper_panels.rs b/src/studio_app/studio_helper_panels.rs index a105e2f8..f91461e3 100644 --- a/src/studio_app/studio_helper_panels.rs +++ b/src/studio_app/studio_helper_panels.rs @@ -725,7 +725,7 @@ pub(super) fn text_template_choices( ) -> Vec { let mut result = Vec::new(); for (index, value) in TEXT_TEMPLATE_VALUES.iter().enumerate() { - result.push(text_template_choice(value.expression, context, language).unwrap()); + result.extend(text_template_choice(value.expression, context, language)); if TEXT_TEMPLATE_VALUES .get(index + 1) .is_some_and(|next| next.group == value.group) diff --git a/src/studio_app/studio_native_menu.rs b/src/studio_app/studio_native_menu.rs index 2f450c91..37303b43 100644 --- a/src/studio_app/studio_native_menu.rs +++ b/src/studio_app/studio_native_menu.rs @@ -1,3 +1,9 @@ +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] + use super::*; #[derive(Clone)] diff --git a/src/studio_app/studio_utilities.rs b/src/studio_app/studio_utilities.rs index 38008641..7e991a81 100644 --- a/src/studio_app/studio_utilities.rs +++ b/src/studio_app/studio_utilities.rs @@ -1,3 +1,9 @@ +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] + use super::*; pub(super) fn languages(language: LanguageId) -> Vec<(&'static str, &'static str)> { diff --git a/src/studio_app/tests.rs b/src/studio_app/tests.rs index 22277ccf..ba9059fb 100644 --- a/src/studio_app/tests.rs +++ b/src/studio_app/tests.rs @@ -1,3 +1,9 @@ +#![allow(unsafe_code, reason = "test fixtures call Win32 APIs")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] + use super::*; #[test] diff --git a/src/studio_app/warp.rs b/src/studio_app/warp.rs index eb1fe513..e2cf11f8 100644 --- a/src/studio_app/warp.rs +++ b/src/studio_app/warp.rs @@ -1,5 +1,10 @@ //! Native D3D11/WARP host. Runs in a fresh dashboard process after OpenGL fails. //! Windows supplies the software rasterizer; the painter embeds precompiled shaders. +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] use super::{egui, style_native_titlebar, Page, StudioApp}; use raw_window_handle::{HasWindowHandle, RawWindowHandle}; diff --git a/src/theme.rs b/src/theme.rs index 4fa9b871..eb60b960 100644 --- a/src/theme.rs +++ b/src/theme.rs @@ -1,3 +1,9 @@ +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] + use windows::core::PCWSTR; use windows::Win32::System::Registry::*; diff --git a/src/theme_engine/theme_datetime.rs b/src/theme_engine/theme_datetime.rs index 8fcc2383..725e62f7 100644 --- a/src/theme_engine/theme_datetime.rs +++ b/src/theme_engine/theme_datetime.rs @@ -1,3 +1,9 @@ +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] + use super::*; use windows::core::PCWSTR; diff --git a/src/theme_engine/theme_rendering.rs b/src/theme_engine/theme_rendering.rs index c317590a..bee38989 100644 --- a/src/theme_engine/theme_rendering.rs +++ b/src/theme_engine/theme_rendering.rs @@ -1,3 +1,9 @@ +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] + use super::*; /// The automatic floating card owns its inset; it is not part of theme layout. diff --git a/src/tray_icon.rs b/src/tray_icon.rs index 3b5372e9..033700ec 100644 --- a/src/tray_icon.rs +++ b/src/tray_icon.rs @@ -1,3 +1,9 @@ +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] + use std::sync::Mutex; use windows::core::{GUID, PCWSTR}; diff --git a/src/tray_icon/settings.rs b/src/tray_icon/settings.rs index d7c8c41a..71d23a87 100644 --- a/src/tray_icon/settings.rs +++ b/src/tray_icon/settings.rs @@ -1,5 +1,10 @@ //! Narrow migration of Windows 11's legacy, position-based tray cache. //! This cache is undocumented: missing or unfamiliar values are left alone. +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] use windows::core::{GUID, PCWSTR, PWSTR}; use windows::Win32::Foundation::*; use windows::Win32::Storage::FileSystem::{ @@ -361,8 +366,10 @@ fn prune_order(cache: HKEY, removed: &[u64]) { return; } let retained: Vec = order - .chunks_exact(8) - .filter(|chunk| !removed.contains(&u64::from_le_bytes((*chunk).try_into().unwrap()))) + .as_chunks::<8>() + .0 + .iter() + .filter(|chunk| !removed.contains(&u64::from_le_bytes(**chunk))) .flatten() .copied() .collect(); diff --git a/src/ui/theme.rs b/src/ui/theme.rs index 847af8c4..5a048e7a 100644 --- a/src/ui/theme.rs +++ b/src/ui/theme.rs @@ -1,3 +1,9 @@ +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] + use std::path::PathBuf; use eframe::egui; diff --git a/src/updater.rs b/src/updater.rs index 89ccb107..5c368a92 100644 --- a/src/updater.rs +++ b/src/updater.rs @@ -1,3 +1,9 @@ +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] + use std::fs::File; use std::io::{self, Read}; use std::os::windows::process::CommandExt; @@ -286,6 +292,10 @@ fn fetch_latest_release() -> Result, String> { release_descriptor(release, env!("CARGO_PKG_VERSION")) } +#[allow( + clippy::disallowed_methods, + reason = "the one place this module creates its HTTP agent" +)] fn build_agent() -> Result { let tls = ureq::tls::TlsConfig::builder() .provider(ureq::tls::TlsProvider::NativeTls) diff --git a/src/updater/download.rs b/src/updater/download.rs index 954501eb..884829c2 100644 --- a/src/updater/download.rs +++ b/src/updater/download.rs @@ -1,3 +1,9 @@ +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] + use std::fs::{File, OpenOptions}; use std::io::{self, Read, Seek, Write}; use std::os::windows::fs::OpenOptionsExt; @@ -30,8 +36,8 @@ impl AssetIntegrity { .ok_or_else(|| "The update is missing a valid GitHub SHA-256 digest.".to_string())?; let mut sha256 = [0; 32]; for (byte, pair) in sha256.iter_mut().zip(hex.as_bytes().chunks_exact(2)) { - // Validated as ASCII hex above. - *byte = u8::from_str_radix(std::str::from_utf8(pair).unwrap(), 16).unwrap(); + let pair = std::str::from_utf8(pair).map_err(|error| error.to_string())?; + *byte = u8::from_str_radix(pair, 16).map_err(|error| error.to_string())?; } Ok(Self { size, sha256 }) } diff --git a/src/widget_font.rs b/src/widget_font.rs index 17d889d4..1b933fe1 100644 --- a/src/widget_font.rs +++ b/src/widget_font.rs @@ -4,6 +4,11 @@ //! "Segoe UI". Load the installed files under a private family name so opting //! out of the Windows font actually bypasses that substitution. The original //! files and system settings are never changed or redistributed. +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] use std::path::PathBuf; use std::sync::OnceLock; diff --git a/src/window.rs b/src/window.rs index 03bb97b4..e8144667 100644 --- a/src/window.rs +++ b/src/window.rs @@ -1,3 +1,9 @@ +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] + use std::collections::HashMap; use std::path::PathBuf; use std::sync::atomic::{AtomicBool, AtomicIsize, AtomicU32, Ordering}; @@ -1280,22 +1286,19 @@ fn tray_error_lines( let mut accounts: Vec<_> = data .into_iter() .flat_map(|data| &data.accounts) - .filter(|account| { - providers.contains(account.provider) - && account.profile.enabled - && account.error.is_some() - }) + .filter(|account| providers.contains(account.provider) && account.profile.enabled) + .filter_map(|account| account.error.map(|error| (account, error))) .collect(); // Windows truncates tray tooltips: put the selected account's error first. - accounts.sort_by_key(|account| !account.selected); + accounts.sort_by_key(|(account, _)| !account.selected); let mut lines: Vec<_> = accounts .into_iter() - .map(|account| { + .map(|(account, error)| { format!( "{} ({}): {}", language.text(account.provider.descriptor().display_name), account.profile.name, - account.error.unwrap().message(language), + error.message(language), ) }) .collect(); @@ -2242,7 +2245,8 @@ unsafe fn create_desktop_surface_window() -> HWND { } unsafe fn create_desktop_surface_window_in(desktop: native_interop::DesktopHost) -> HWND { - let instance = GetModuleHandleW(PCWSTR::null()).unwrap(); + let instance = + GetModuleHandleW(PCWSTR::null()).expect("the running executable has a module handle"); let class = native_interop::wide_str("CCUMDesktopSurface"); let title = native_interop::wide_str(""); let wc = WNDCLASSEXW { @@ -2284,7 +2288,8 @@ unsafe fn create_desktop_surface_window_in(desktop: native_interop::DesktopHost) } unsafe fn create_mirror_window() -> HWND { - let instance = GetModuleHandleW(PCWSTR::null()).unwrap(); + let instance = + GetModuleHandleW(PCWSTR::null()).expect("the running executable has a module handle"); let class = native_interop::wide_str("CCUMThemeMirror"); let wc = WNDCLASSEXW { cbSize: std::mem::size_of::() as u32, @@ -2470,7 +2475,8 @@ pub fn run() { let class_name = native_interop::wide_str("ClaudeCodeUsageMonitor"); unsafe { - let hinstance = GetModuleHandleW(PCWSTR::null()).unwrap(); + let hinstance = + GetModuleHandleW(PCWSTR::null()).expect("the running executable has a module handle"); let (large_icon, small_icon) = tray_icon::load_app_icons(); let wc = WNDCLASSEXW { diff --git a/src/window/layered_window_tests.rs b/src/window/layered_window_tests.rs index 7ee13221..e9fa8ae8 100644 --- a/src/window/layered_window_tests.rs +++ b/src/window/layered_window_tests.rs @@ -1,3 +1,9 @@ +#![allow(unsafe_code, reason = "test fixtures call Win32 APIs")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] + use super::*; use std::cell::RefCell; diff --git a/src/window/lifecycle.rs b/src/window/lifecycle.rs index 041c1d94..501fd198 100644 --- a/src/window/lifecycle.rs +++ b/src/window/lifecycle.rs @@ -1,4 +1,9 @@ //! The controller owns application lifetime; Explorer owns only replaceable surfaces. +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] use super::*; use std::cell::Cell; @@ -147,7 +152,8 @@ unsafe fn dispatch_to_surface(msg: u32, wparam: WPARAM, lparam: LPARAM) -> LRESU } pub(super) unsafe fn create_primary_surface() -> HWND { - let instance = GetModuleHandleW(PCWSTR::null()).unwrap(); + let instance = + GetModuleHandleW(PCWSTR::null()).expect("the running executable has a module handle"); let class = native_interop::wide_str("ClaudeCodeUsageSurface"); RegisterClassW(&WNDCLASSW { style: CS_DBLCLKS, diff --git a/src/window/lifecycle/tests.rs b/src/window/lifecycle/tests.rs index a250d39f..6e6801c8 100644 --- a/src/window/lifecycle/tests.rs +++ b/src/window/lifecycle/tests.rs @@ -1,3 +1,9 @@ +#![allow(unsafe_code, reason = "test fixtures call Win32 APIs")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] + use super::*; /// Run the native lifetime regression in its own process: it publishes STATE diff --git a/src/window/message_loop.rs b/src/window/message_loop.rs index d49015dd..b437ebeb 100644 --- a/src/window/message_loop.rs +++ b/src/window/message_loop.rs @@ -1,3 +1,9 @@ +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] + use super::*; #[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] diff --git a/src/window/mouse.rs b/src/window/mouse.rs index acc7bb88..88164af7 100644 --- a/src/window/mouse.rs +++ b/src/window/mouse.rs @@ -1,3 +1,9 @@ +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] + use super::*; use windows::Win32::UI::Input::KeyboardAndMouse::{TME_NONCLIENT, TME_QUERY}; diff --git a/src/window/positioning.rs b/src/window/positioning.rs index adbf297f..e5c86999 100644 --- a/src/window/positioning.rs +++ b/src/window/positioning.rs @@ -1,3 +1,9 @@ +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] + use super::*; pub(super) fn position_at_taskbar() { diff --git a/src/window/taskbar_collision.rs b/src/window/taskbar_collision.rs index 85bcf3a8..9496bff1 100644 --- a/src/window/taskbar_collision.rs +++ b/src/window/taskbar_collision.rs @@ -1,5 +1,10 @@ //! Physical taskbar occupancy. Shell accessibility calls stay on a dedicated //! MTA thread; neither the UI thread nor the Explorer watchdog waits for them. +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] use super::*; use windows::Win32::System::Com::{ CoCreateInstance, CoInitializeEx, CoUninitialize, CLSCTX_INPROC_SERVER, COINIT_MULTITHREADED, diff --git a/src/window/widget_tooltip.rs b/src/window/widget_tooltip.rs index 6b5d0390..df5add8d 100644 --- a/src/window/widget_tooltip.rs +++ b/src/window/widget_tooltip.rs @@ -1,4 +1,9 @@ //! Explorer-style native tooltips, owned and accessed only by the window thread. +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] use std::cell::RefCell; use windows::core::PWSTR; diff --git a/src/window/window_context_menu.rs b/src/window/window_context_menu.rs index 8efafea4..4c2cd981 100644 --- a/src/window/window_context_menu.rs +++ b/src/window/window_context_menu.rs @@ -1,3 +1,9 @@ +#![allow(unsafe_code, reason = "calls Win32 APIs through the windows crate")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] + use super::*; pub(super) fn show_context_menu_document( diff --git a/src/winsqlite.rs b/src/winsqlite.rs index a680b005..ae9e8374 100644 --- a/src/winsqlite.rs +++ b/src/winsqlite.rs @@ -3,6 +3,11 @@ //! Keep this intentionally narrow: the monitor only needs to retrieve one text //! value from an application-owned database. Linking as a raw DLL import avoids //! bundling SQLite or depending on a Windows SDK import library at build time. +#![allow(unsafe_code, reason = "calls the SQLite library shipped with Windows")] +#![allow( + clippy::undocumented_unsafe_blocks, + reason = "ratchet: add // SAFETY: comments to the existing unsafe blocks, then remove this allow" +)] use std::ffi::{c_char, c_int, c_uchar, CStr, CString}; use std::fmt; From d02dd2599773f5e32e1743c8b54d7fc6b09b28f7 Mon Sep 17 00:00:00 2001 From: Craig Constable Date: Thu, 26 Nov 2026 08:09:02 +1000 Subject: [PATCH 08/12] test(poller): add a provider contract test every_provider_meets_the_contract checks each provider in ProviderId::ALL: a redacted response fixture in src/poller/fixtures that the provider's own parser reads, usage that survives the usage cache and reaches theme fields, translated setting text in every language, and unique keys, cache keys and menu command ids. A new provider does not compile until it adds a fixture parser. The test found the Cursor and OpenCode Go setting descriptions untranslated; translate them. CONTRIBUTING.md describes the contract. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 2 + CONTRIBUTING.md | 18 +++ src/localization/locales/de.toml | 2 + src/localization/locales/en.toml | 2 + src/localization/locales/es.toml | 2 + src/localization/locales/fr.toml | 2 + src/localization/locales/ja.toml | 2 + src/localization/locales/ko.toml | 2 + src/localization/locales/nl.toml | 2 + src/localization/locales/pl.toml | 2 + src/localization/locales/pt-BR.toml | 2 + src/localization/locales/ru.toml | 2 + src/localization/locales/th.toml | 2 + src/localization/locales/tr.toml | 2 + src/localization/locales/zh-CN.toml | 2 + src/localization/locales/zh-TW.toml | 2 + src/localization/mod.rs | 10 ++ src/poller.rs | 16 +++ src/poller/antigravity.rs | 7 + src/poller/claude.rs | 7 + src/poller/codex.rs | 7 + src/poller/copilot.rs | 7 + src/poller/cursor.rs | 7 + src/poller/fixtures/antigravity.json | 11 ++ src/poller/fixtures/claude.json | 16 +++ src/poller/fixtures/codex.json | 10 ++ src/poller/fixtures/copilot.json | 12 ++ src/poller/fixtures/cursor.json | 6 + src/poller/fixtures/grok.json | 18 +++ src/poller/fixtures/opencode.json | 13 ++ src/poller/grok.rs | 7 + src/poller/opencode.rs | 23 +++- src/poller/tests.rs | 199 +++++++++++++++++++++++++++ 33 files changed, 419 insertions(+), 5 deletions(-) create mode 100644 src/poller/fixtures/antigravity.json create mode 100644 src/poller/fixtures/claude.json create mode 100644 src/poller/fixtures/codex.json create mode 100644 src/poller/fixtures/copilot.json create mode 100644 src/poller/fixtures/cursor.json create mode 100644 src/poller/fixtures/grok.json create mode 100644 src/poller/fixtures/opencode.json diff --git a/CHANGELOG.md b/CHANGELOG.md index cb63bc81..7106e248 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ changes grouped into Added, Changed, Fixed, and Removed where applicable. - Let theme colours set an optional light-mode colour (`light_color`), so one layer can serve both Windows appearances instead of a pair of layers gated on `system.dark`. In Theme Studio, the sun and moon button beside a colour expands it into separate Dark mode and Light mode colours; collapsing keeps the dark mode colour. Colours without `light_color` render and save as before, and themes that keep separate per-mode layers are unaffected. - Add the Stacked Rows built-in theme: each provider's logo beside joined rows of four-section bars, one row per limit the account reports, with a magenta pace marker. Bars follow the Usage direction setting, and hovering a provider opens a flyout with each limit's usage, reset time and pace, or a waiting, error or no-usage message. - Add a Provider logo layer type (`provider_mark`) to themes and Theme Studio. It draws a provider's brand mark from the dashboard's icon font, tinted and fitted to the layer, so themes need no image assets to show a provider. +- Add a provider contract test: every provider needs a redacted response fixture that its parser reads, usage that survives the usage cache and reaches themes, translated setting text, and unique identifiers. See [CONTRIBUTING.md](CONTRIBUTING.md#provider-changes). - Auto-merge Dependabot pull requests with patch-level Cargo updates once `CI passed` succeeds. `scripts/New-Release.ps1` adds changelog entries for them and refuses to prepare a release when `origin/main` has commits that local `main` lacks. See [docs/releasing.md](docs/releasing.md#dependabot-updates). ### Changed @@ -33,6 +34,7 @@ changes grouped into Added, Changed, Fixed, and Removed where applicable. - Update the transitive `url` dependency from 2.5.8 to 2.5.9, with `form_urlencoded` from 1.2.2 to 1.2.3, to resolve RUSTSEC-2026-0592 found by the release dependency checks. - Update the transitive `cookie` dependency from 0.18.2 to 0.18.3 to resolve RUSTSEC-2026-0594 found by the release dependency checks. +- Translate the Cursor and OpenCode Go provider setting descriptions, which showed in English in every other language. ## [2.25.3] - 2026-11-21 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5a1f153c..a7a1f62e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -61,6 +61,24 @@ check the affected dashboard or taskbar behavior and include redacted screenshot when helpful. For documentation-only changes, check links and formatting; compiling the application is not necessary. +### Provider changes + +`every_provider_meets_the_contract` in `src/poller/tests.rs` checks every +provider in `ProviderId::ALL`. A new provider needs: + +- a redacted response body in `src/poller/fixtures/.json`, using + placeholders such as `redacted`, `usr_example` and `someone@example.com` + instead of tokens, cookies, account ids and email addresses. The test rejects + values that look like credentials; +- a `usage_from_fixture` function in its poller module, listed in + `poller::usage_from_fixture`, that parses the body the way a poll does and + reports at least one available limit; +- usage that survives a save and load of the usage cache, and that themes see + as `.available`; +- its display name and setting description in every file in + `src/localization/locales/`; +- a unique key, cache key and menu command id in `src/providers.rs`. + ### Lint rules `Cargo.toml`'s `[lints]` table and `clippy.toml` encode project rules, so Clippy diff --git a/src/localization/locales/de.toml b/src/localization/locales/de.toml index a19aa860..cd43c17e 100644 --- a/src/localization/locales/de.toml +++ b/src/localization/locales/de.toml @@ -130,9 +130,11 @@ copilot_window_title = "Copilot-Nutzungsmonitor" "Close Builder" = "Baukasten schließen" "Codex" = "Codex" "Collect usage from Anthropic" = "Nutzungsdaten von Anthropic abrufen" +"Collect usage from Cursor" = "Nutzungsdaten von Cursor abrufen" "Collect usage from GitHub" = "Nutzungsdaten von GitHub abrufen" "Collect usage from Google" = "Nutzungsdaten von Google abrufen" "Collect usage from OpenAI" = "Nutzungsdaten von OpenAI abrufen" +"Collect usage from OpenCode Go" = "Nutzungsdaten von OpenCode Go abrufen" "Collect usage from xAI" = "Nutzungsdaten von xAI abrufen" "Colour" = "Farbe" "Column" = "Column" diff --git a/src/localization/locales/en.toml b/src/localization/locales/en.toml index c6d8b508..789ee740 100644 --- a/src/localization/locales/en.toml +++ b/src/localization/locales/en.toml @@ -130,9 +130,11 @@ copilot_window_title = "Copilot Usage Monitor" "Close Builder" = "Close Builder" "Codex" = "Codex" "Collect usage from Anthropic" = "Collect usage from Anthropic" +"Collect usage from Cursor" = "Collect usage from Cursor" "Collect usage from GitHub" = "Collect usage from GitHub" "Collect usage from Google" = "Collect usage from Google" "Collect usage from OpenAI" = "Collect usage from OpenAI" +"Collect usage from OpenCode Go" = "Collect usage from OpenCode Go" "Collect usage from xAI" = "Collect usage from xAI" "Colour" = "Colour" "Column" = "Column" diff --git a/src/localization/locales/es.toml b/src/localization/locales/es.toml index f8dcda48..b396c217 100644 --- a/src/localization/locales/es.toml +++ b/src/localization/locales/es.toml @@ -130,9 +130,11 @@ copilot_window_title = "Monitor de uso de Copilot" "Close Builder" = "Cerrar Constructor" "Codex" = "Codex" "Collect usage from Anthropic" = "Recopilar uso de Anthropic" +"Collect usage from Cursor" = "Recopilar uso de Cursor" "Collect usage from GitHub" = "Recopilar uso de GitHub" "Collect usage from Google" = "Recopilar uso de Google" "Collect usage from OpenAI" = "Recopilar uso de OpenAI" +"Collect usage from OpenCode Go" = "Recopilar uso de OpenCode Go" "Collect usage from xAI" = "Recopilar uso de xAI" "Colour" = "Color" "Column" = "Column" diff --git a/src/localization/locales/fr.toml b/src/localization/locales/fr.toml index fd0ed609..705e0914 100644 --- a/src/localization/locales/fr.toml +++ b/src/localization/locales/fr.toml @@ -130,9 +130,11 @@ copilot_window_title = "Moniteur d'utilisation Copilot" "Close Builder" = "Fermer le Constructeur" "Codex" = "Codex" "Collect usage from Anthropic" = "Collecter l'utilisation depuis Anthropic" +"Collect usage from Cursor" = "Collecter l'utilisation depuis Cursor" "Collect usage from GitHub" = "Collecter l'utilisation depuis GitHub" "Collect usage from Google" = "Collecter l'utilisation depuis Google" "Collect usage from OpenAI" = "Collecter l'utilisation depuis OpenAI" +"Collect usage from OpenCode Go" = "Collecter l'utilisation depuis OpenCode Go" "Collect usage from xAI" = "Collecter l'utilisation depuis xAI" "Colour" = "Couleur" "Column" = "Column" diff --git a/src/localization/locales/ja.toml b/src/localization/locales/ja.toml index 64963292..f7a3516f 100644 --- a/src/localization/locales/ja.toml +++ b/src/localization/locales/ja.toml @@ -132,9 +132,11 @@ copilot_window_title = "Copilot 使用量モニター" "Close Builder" = "ビルダーを閉じる" "Codex" = "Codex" "Collect usage from Anthropic" = "Anthropic から使用量を取得" +"Collect usage from Cursor" = "Cursor から使用量を取得" "Collect usage from GitHub" = "GitHub から使用量を取得" "Collect usage from Google" = "Google から使用量を取得" "Collect usage from OpenAI" = "OpenAI から使用量を取得" +"Collect usage from OpenCode Go" = "OpenCode Go から使用量を取得" "Collect usage from xAI" = "xAI から使用量を取得" "Colour" = "色" "Column" = "Column" diff --git a/src/localization/locales/ko.toml b/src/localization/locales/ko.toml index 2df3aef2..cc365021 100644 --- a/src/localization/locales/ko.toml +++ b/src/localization/locales/ko.toml @@ -132,9 +132,11 @@ copilot_window_title = "Copilot 사용량 모니터" "Close Builder" = "빌더 닫기" "Codex" = "Codex" "Collect usage from Anthropic" = "Anthropic에서 사용량 수집" +"Collect usage from Cursor" = "Cursor에서 사용량 수집" "Collect usage from GitHub" = "GitHub에서 사용량 수집" "Collect usage from Google" = "Google에서 사용량 수집" "Collect usage from OpenAI" = "OpenAI에서 사용량 수집" +"Collect usage from OpenCode Go" = "OpenCode Go에서 사용량 수집" "Collect usage from xAI" = "xAI에서 사용량 수집" "Colour" = "색상" "Column" = "Column" diff --git a/src/localization/locales/nl.toml b/src/localization/locales/nl.toml index dbf1c2e1..dcfbf11a 100644 --- a/src/localization/locales/nl.toml +++ b/src/localization/locales/nl.toml @@ -130,9 +130,11 @@ copilot_window_title = "Copilot-gebruiksmonitor" "Close Builder" = "Bouwer sluiten" "Codex" = "Codex" "Collect usage from Anthropic" = "Gebruiksgegevens ophalen bij Anthropic" +"Collect usage from Cursor" = "Gebruiksgegevens ophalen bij Cursor" "Collect usage from GitHub" = "Gebruiksgegevens ophalen bij GitHub" "Collect usage from Google" = "Gebruiksgegevens ophalen bij Google" "Collect usage from OpenAI" = "Gebruiksgegevens ophalen bij OpenAI" +"Collect usage from OpenCode Go" = "Gebruiksgegevens ophalen bij OpenCode Go" "Collect usage from xAI" = "Gebruiksgegevens ophalen bij xAI" "Colour" = "Kleur" "Column" = "Column" diff --git a/src/localization/locales/pl.toml b/src/localization/locales/pl.toml index bbe67ddd..9e32b230 100644 --- a/src/localization/locales/pl.toml +++ b/src/localization/locales/pl.toml @@ -130,9 +130,11 @@ copilot_window_title = "Monitor zużycia Copilot" "Close Builder" = "Zamknij kreator" "Codex" = "Codex" "Collect usage from Anthropic" = "Zbieraj dane o zużyciu z Anthropic" +"Collect usage from Cursor" = "Zbieraj dane o zużyciu z Cursor" "Collect usage from GitHub" = "Zbieraj dane o zużyciu z GitHuba" "Collect usage from Google" = "Zbieraj dane o zużyciu z Google" "Collect usage from OpenAI" = "Zbieraj dane o zużyciu z OpenAI" +"Collect usage from OpenCode Go" = "Zbieraj dane o zużyciu z OpenCode Go" "Collect usage from xAI" = "Zbieraj dane o zużyciu z xAI" "Colour" = "Kolor" "Column" = "Kolumna" diff --git a/src/localization/locales/pt-BR.toml b/src/localization/locales/pt-BR.toml index 0c1c2953..04f952f6 100644 --- a/src/localization/locales/pt-BR.toml +++ b/src/localization/locales/pt-BR.toml @@ -130,9 +130,11 @@ copilot_window_title = "Monitor de uso do Copilot" "Close Builder" = "Fechar Construtor" "Codex" = "Codex" "Collect usage from Anthropic" = "Coletar uso da Anthropic" +"Collect usage from Cursor" = "Coletar uso do Cursor" "Collect usage from GitHub" = "Coletar uso do GitHub" "Collect usage from Google" = "Coletar uso do Google" "Collect usage from OpenAI" = "Coletar uso da OpenAI" +"Collect usage from OpenCode Go" = "Coletar uso do OpenCode Go" "Collect usage from xAI" = "Coletar uso da xAI" "Colour" = "Cor" "Column" = "Column" diff --git a/src/localization/locales/ru.toml b/src/localization/locales/ru.toml index 72fd3548..c2bb730a 100644 --- a/src/localization/locales/ru.toml +++ b/src/localization/locales/ru.toml @@ -130,9 +130,11 @@ copilot_window_title = "Монитор использования Copilot" "Close Builder" = "Закрыть конструктор" "Codex" = "Codex" "Collect usage from Anthropic" = "Получать данные об использовании Anthropic" +"Collect usage from Cursor" = "Получать данные об использовании Cursor" "Collect usage from GitHub" = "Получать данные об использовании GitHub" "Collect usage from Google" = "Получать данные об использовании Google" "Collect usage from OpenAI" = "Получать данные об использовании OpenAI" +"Collect usage from OpenCode Go" = "Получать данные об использовании OpenCode Go" "Collect usage from xAI" = "Получать данные об использовании xAI" "Colour" = "Цвет" "Column" = "Column" diff --git a/src/localization/locales/th.toml b/src/localization/locales/th.toml index e551b00b..913448a5 100644 --- a/src/localization/locales/th.toml +++ b/src/localization/locales/th.toml @@ -132,9 +132,11 @@ copilot_window_title = "ตัวติดตามการใช้งาน C "Close Builder" = "ปิดตัวสร้าง" "Codex" = "Codex" "Collect usage from Anthropic" = "ดึงข้อมูลการใช้งานจาก Anthropic" +"Collect usage from Cursor" = "ดึงข้อมูลการใช้งานจาก Cursor" "Collect usage from GitHub" = "ดึงข้อมูลการใช้งานจาก GitHub" "Collect usage from Google" = "ดึงข้อมูลการใช้งานจาก Google" "Collect usage from OpenAI" = "ดึงข้อมูลการใช้งานจาก OpenAI" +"Collect usage from OpenCode Go" = "ดึงข้อมูลการใช้งานจาก OpenCode Go" "Collect usage from xAI" = "ดึงข้อมูลการใช้งานจาก xAI" "Colour" = "สี" "Column" = "คอลัมน์" diff --git a/src/localization/locales/tr.toml b/src/localization/locales/tr.toml index 1df75bc4..5f416609 100644 --- a/src/localization/locales/tr.toml +++ b/src/localization/locales/tr.toml @@ -130,9 +130,11 @@ copilot_window_title = "Copilot Kullanım İzleyicisi" "Close Builder" = "Oluşturucuyu kapat" "Codex" = "Codex" "Collect usage from Anthropic" = "Anthropic kullanımını topla" +"Collect usage from Cursor" = "Cursor kullanımını topla" "Collect usage from GitHub" = "GitHub kullanımını topla" "Collect usage from Google" = "Google kullanımını topla" "Collect usage from OpenAI" = "OpenAI kullanımını topla" +"Collect usage from OpenCode Go" = "OpenCode Go kullanımını topla" "Collect usage from xAI" = "xAI kullanımını topla" "Colour" = "Renk" "Column" = "Column" diff --git a/src/localization/locales/zh-CN.toml b/src/localization/locales/zh-CN.toml index b3673bd7..77e71639 100644 --- a/src/localization/locales/zh-CN.toml +++ b/src/localization/locales/zh-CN.toml @@ -132,9 +132,11 @@ copilot_window_title = "Copilot 使用量监控" "Close Builder" = "关闭构建器" "Codex" = "Codex" "Collect usage from Anthropic" = "从 Anthropic 获取使用量" +"Collect usage from Cursor" = "从 Cursor 获取使用量" "Collect usage from GitHub" = "从 GitHub 获取使用量" "Collect usage from Google" = "从 Google 获取使用量" "Collect usage from OpenAI" = "从 OpenAI 获取使用量" +"Collect usage from OpenCode Go" = "从 OpenCode Go 获取使用量" "Collect usage from xAI" = "从 xAI 获取使用量" "Colour" = "颜色" "Column" = "Column" diff --git a/src/localization/locales/zh-TW.toml b/src/localization/locales/zh-TW.toml index 6a6712f5..b113b950 100644 --- a/src/localization/locales/zh-TW.toml +++ b/src/localization/locales/zh-TW.toml @@ -132,9 +132,11 @@ copilot_window_title = "Copilot 使用量監控" "Close Builder" = "關閉建構器" "Codex" = "Codex" "Collect usage from Anthropic" = "從 Anthropic 取得使用量" +"Collect usage from Cursor" = "從 Cursor 取得使用量" "Collect usage from GitHub" = "從 GitHub 取得使用量" "Collect usage from Google" = "從 Google 取得使用量" "Collect usage from OpenAI" = "從 OpenAI 取得使用量" +"Collect usage from OpenCode Go" = "從 OpenCode Go 取得使用量" "Collect usage from xAI" = "從 xAI 取得使用量" "Colour" = "色彩" "Column" = "Column" diff --git a/src/localization/mod.rs b/src/localization/mod.rs index 1484a523..6356caef 100644 --- a/src/localization/mod.rs +++ b/src/localization/mod.rs @@ -70,6 +70,16 @@ impl LanguageId { .unwrap_or(english) } + /// Whether this language's catalogue has an entry for `english`, rather + /// than falling back to the English key. + #[cfg(test)] + pub fn has_translation(self, english: &str) -> bool { + self.locale() + .translations + .binary_search_by(|(key, _)| (*key).cmp(english)) + .is_ok() + } + pub fn update_via_winget_label(self) -> &'static str { self.locale().update_via_winget_label } diff --git a/src/poller.rs b/src/poller.rs index dfd7c354..d569f61f 100644 --- a/src/poller.rs +++ b/src/poller.rs @@ -583,5 +583,21 @@ pub fn app_is_past_reset(data: &AppUsageData) -> bool { data.all_usage().any(is_past_reset) } +/// Parses a saved response body for `provider` with that provider's own +/// parser. A new provider does not compile here until it has one; see the +/// provider contract test in `tests`. +#[cfg(test)] +fn usage_from_fixture(provider: ProviderId, body: &str) -> Option { + match provider { + ProviderId::Claude => claude::usage_from_fixture(body), + ProviderId::Codex => codex::usage_from_fixture(body), + ProviderId::Antigravity => antigravity::usage_from_fixture(body), + ProviderId::OpenCode => opencode::usage_from_fixture(body), + ProviderId::Cursor => cursor::usage_from_fixture(body), + ProviderId::Grok => grok::usage_from_fixture(body), + ProviderId::Copilot => copilot::usage_from_fixture(body), + } +} + #[cfg(test)] mod tests; diff --git a/src/poller/antigravity.rs b/src/poller/antigravity.rs index dcf56bef..df35e9b9 100644 --- a/src/poller/antigravity.rs +++ b/src/poller/antigravity.rs @@ -588,6 +588,13 @@ pub(super) fn antigravity_section_from_summary_bucket( }) } +/// Parses a saved response body as a poll would, for the provider contract test +/// in `poller::tests`. +#[cfg(test)] +pub(super) fn usage_from_fixture(body: &str) -> Option { + antigravity_usage_from_summary(serde_json::from_str(body).ok()?) +} + pub(super) fn antigravity_usage_from_summary( response: AntigravityQuotaSummaryResponse, ) -> Option { diff --git a/src/poller/claude.rs b/src/poller/claude.rs index b08c7b71..80772e15 100644 --- a/src/poller/claude.rs +++ b/src/poller/claude.rs @@ -270,6 +270,13 @@ fn parse_usage_body(body: &mut ureq::Body) -> Result { validated_usage_from_response(response) } +/// Parses a saved response body as a poll would, for the provider contract test +/// in `poller::tests`. +#[cfg(test)] +pub(super) fn usage_from_fixture(body: &str) -> Option { + validated_usage_from_response(serde_json::from_str(body).ok()?).ok() +} + fn validated_usage_from_response(response: UsageResponse) -> Result { let data = usage_from_response(response); if !data.sections().any(|section| section.available) { diff --git a/src/poller/codex.rs b/src/poller/codex.rs index 0eca8b51..af78bd75 100644 --- a/src/poller/codex.rs +++ b/src/poller/codex.rs @@ -164,6 +164,13 @@ pub(super) fn codex_usage_from_response( codex_usage_from_response_at(response, account_id, None) } +/// Parses a saved response body as a poll would, for the provider contract test +/// in `poller::tests`. +#[cfg(test)] +pub(super) fn usage_from_fixture(body: &str) -> Option { + codex_usage_from_response(serde_json::from_str(body).ok()?, None) +} + fn codex_usage_from_response_at( response: CodexUsageResponse, account_id: Option<&str>, diff --git a/src/poller/copilot.rs b/src/poller/copilot.rs index c9a6fe0b..046f78b9 100644 --- a/src/poller/copilot.rs +++ b/src/poller/copilot.rs @@ -210,6 +210,13 @@ fn fetch_copilot_usage(token: &str) -> Result { }) } +/// Parses a saved response body as a poll would, for the provider contract test +/// in `poller::tests`. +#[cfg(test)] +pub(super) fn usage_from_fixture(body: &str) -> Option { + copilot_usage_from_user(serde_json::from_str(body).ok()?) +} + fn copilot_usage_from_user(response: CopilotUserResponse) -> Option { let snapshots = response .quota_snapshots diff --git a/src/poller/cursor.rs b/src/poller/cursor.rs index 238ddbe9..67cd5569 100644 --- a/src/poller/cursor.rs +++ b/src/poller/cursor.rs @@ -331,6 +331,13 @@ fn fetch_cursor_usage_summary(cookie: &str) -> Result { }) } +/// Parses a saved response body as a poll would, for the provider contract test +/// in `poller::tests`. +#[cfg(test)] +pub(super) fn usage_from_fixture(body: &str) -> Option { + cursor_usage_from_current_period(&serde_json::from_str(body).ok()?) +} + fn cursor_usage_from_current_period(value: &serde_json::Value) -> Option { if value.get("enabled").and_then(|value| value.as_bool()) == Some(false) { return None; diff --git a/src/poller/fixtures/antigravity.json b/src/poller/fixtures/antigravity.json new file mode 100644 index 00000000..48150174 --- /dev/null +++ b/src/poller/fixtures/antigravity.json @@ -0,0 +1,11 @@ +{ + "groups": [ + { + "displayName": "Gemini Models", + "buckets": [ + { "bucketId": "gemini-5h", "window": "5h", "resetTime": "2027-01-15T12:00:00Z", "remainingFraction": 0.8 }, + { "bucketId": "gemini-weekly", "window": "weekly", "resetTime": "2027-01-20T08:00:00Z", "remainingFraction": 0.55 } + ] + } + ] +} diff --git a/src/poller/fixtures/claude.json b/src/poller/fixtures/claude.json new file mode 100644 index 00000000..48ad0d9d --- /dev/null +++ b/src/poller/fixtures/claude.json @@ -0,0 +1,16 @@ +{ + "five_hour": { "utilization": 42.0, "resets_at": "2027-01-15T10:15:00Z" }, + "seven_day": { "utilization": 63.0, "resets_at": "2027-01-18T12:00:00Z" }, + "spend": null, + "limits": [ + { "kind": "session", "percent": 42, "resets_at": "2027-01-15T10:15:00Z" }, + { "kind": "weekly_all", "percent": 63, "resets_at": "2027-01-18T12:00:00Z" }, + { + "kind": "weekly_scoped", + "percent": 18, + "is_active": true, + "resets_at": "2027-01-18T12:00:00Z", + "scope": { "model": { "id": null, "display_name": "Fable" } } + } + ] +} diff --git a/src/poller/fixtures/codex.json b/src/poller/fixtures/codex.json new file mode 100644 index 00000000..b9c0f0f2 --- /dev/null +++ b/src/poller/fixtures/codex.json @@ -0,0 +1,10 @@ +{ + "plan_type": "plus", + "rate_limit": { + "allowed": true, + "limit_reached": false, + "primary_window": { "used_percent": 12, "limit_window_seconds": 18000, "reset_at": 1800014400 }, + "secondary_window": { "used_percent": 71, "limit_window_seconds": 604800, "reset_at": 1800432000 } + }, + "credits": null +} diff --git a/src/poller/fixtures/copilot.json b/src/poller/fixtures/copilot.json new file mode 100644 index 00000000..d883ad47 --- /dev/null +++ b/src/poller/fixtures/copilot.json @@ -0,0 +1,12 @@ +{ + "access_type_sku": "copilot_enterprise_seat_quota", + "copilot_plan": "enterprise", + "quota_reset_date": "2026-11-01", + "quota_reset_date_utc": "2026-11-01T00:00:00.000Z", + "token_based_billing": true, + "quota_snapshots": { + "chat": { "entitlement": 0, "remaining": 0, "percent_remaining": 100.0, "quota_id": "chat", "unlimited": true, "overage_permitted": false }, + "completions": { "entitlement": 0, "remaining": 0, "percent_remaining": 100.0, "quota_id": "completions", "unlimited": true }, + "premium_interactions": { "entitlement": 30000, "remaining": 22500, "percent_remaining": 75.0, "quota_id": "premium_interactions", "unlimited": false, "overage_permitted": true, "credits_used": 0 } + } +} diff --git a/src/poller/fixtures/cursor.json b/src/poller/fixtures/cursor.json new file mode 100644 index 00000000..7b08a9dc --- /dev/null +++ b/src/poller/fixtures/cursor.json @@ -0,0 +1,6 @@ +{ + "enabled": true, + "billingCycleStart": "1792405460651", + "billingCycleEnd": "1793010260651", + "planUsage": { "autoPercentUsed": 7.08, "apiPercentUsed": 0, "totalPercentUsed": 7.08 } +} diff --git a/src/poller/fixtures/grok.json b/src/poller/fixtures/grok.json new file mode 100644 index 00000000..38c6ecce --- /dev/null +++ b/src/poller/fixtures/grok.json @@ -0,0 +1,18 @@ +{ + "config": { + "currentPeriod": { + "type": "USAGE_PERIOD_TYPE_WEEKLY", + "start": "2026-09-20T13:10:00.412622+00:00", + "end": "2026-09-27T13:10:00.412622+00:00" + }, + "creditUsagePercent": 48.0, + "onDemandCap": { "val": 0 }, + "onDemandUsed": { "val": 0 }, + "productUsage": [{ "product": "GrokBuild", "usagePercent": 48.0 }], + "isUnifiedBillingUser": true, + "prepaidBalance": { "val": 0 }, + "topUpMethod": "TOP_UP_METHOD_SAVED_PAYMENT_METHOD", + "billingPeriodStart": "2026-09-20T13:10:00.412622+00:00", + "billingPeriodEnd": "2026-09-27T13:10:00.412622+00:00" + } +} diff --git a/src/poller/fixtures/opencode.json b/src/poller/fixtures/opencode.json new file mode 100644 index 00000000..9eb40263 --- /dev/null +++ b/src/poller/fixtures/opencode.json @@ -0,0 +1,13 @@ +{ + "subscriberUserID": "usr_example", + "useBalance": false, + "access": { + "startsAt": "2026-09-01T00:00:00.000Z", + "endsAt": "2026-10-01T00:00:00.000Z", + "meters": { + "fiveHour": { "limitMicroCents": "2000000000", "usedMicroCents": "250000000", "resetsAt": "2026-09-17T05:00:00.000Z" }, + "week": { "limitMicroCents": "10000000000", "usedMicroCents": "4500000000", "resetsAt": "2026-09-21T00:00:00.000Z" }, + "month": { "limitMicroCents": "20000000000", "usedMicroCents": "12000000000" } + } + } +} diff --git a/src/poller/grok.rs b/src/poller/grok.rs index 45f7f909..c89a204c 100644 --- a/src/poller/grok.rs +++ b/src/poller/grok.rs @@ -271,6 +271,13 @@ fn fetch_grok_usage(session: &GrokSession) -> Result { }) } +/// Parses a saved response body as a poll would, for the provider contract test +/// in `poller::tests`. +#[cfg(test)] +pub(super) fn usage_from_fixture(body: &str) -> Option { + grok_usage_from_billing(serde_json::from_str(body).ok()?) +} + fn grok_usage_from_billing(response: GrokBillingResponse) -> Option { let config = response.config?; let period = config.current_period.as_ref(); diff --git a/src/poller/opencode.rs b/src/poller/opencode.rs index 7848b53e..3f7f0a35 100644 --- a/src/poller/opencode.rs +++ b/src/poller/opencode.rs @@ -99,13 +99,26 @@ fn poll_dashboard(credentials: &DashboardCredentials) -> Result Option { + let status = serde_json::from_str::>(body).ok()?; + usage_data_from_dashboard(&usage_from_status(status).ok()?) +} + +fn usage_data_from_dashboard(usage: &DashboardUsage) -> Option { + if usage.rolling.is_none() && usage.weekly.is_none() && usage.monthly.is_none() { + return None; } let session = usage @@ -113,9 +126,9 @@ fn poll_dashboard(credentials: &DashboardCredentials) -> Result.json` that its own parser reads into +// usable data that survives a save and load of the usage cache, translated +// names in every language, and data that themes can see. A provider that is +// only partly wired fails here with a list of what is missing. + +const PROVIDER_FIXTURES: &str = "src/poller/fixtures"; + +fn provider_fixture_folder() -> std::path::PathBuf { + std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join(PROVIDER_FIXTURES) +} + +/// Collects values in a fixture that look like credentials or personal details. +fn unredacted_values(value: &serde_json::Value, key: &str, found: &mut Vec) { + const SECRET_KEYS: [&str; 9] = [ + "token", + "secret", + "password", + "cookie", + "authorization", + "api_key", + "apikey", + "credential", + "session_id", + ]; + const SECRET_PREFIXES: [&str; 8] = [ + "eyJ", + "sk-", + "ghp_", + "gho_", + "ghu_", + "github_pat_", + "xai-", + "Bearer ", + ]; + match value { + serde_json::Value::Object(object) => { + for (child_key, child) in object { + unredacted_values(child, child_key, found); + } + } + serde_json::Value::Array(items) => { + for item in items { + unredacted_values(item, key, found); + } + } + serde_json::Value::String(text) => { + let lower_key = key.to_ascii_lowercase(); + let secret_key = SECRET_KEYS.iter().any(|secret| lower_key.contains(secret)); + let placeholder = text.is_empty() || text.contains("example") || text == "redacted"; + let email = text.contains('@') && !text.ends_with("@example.com"); + let prefixed = SECRET_PREFIXES + .iter() + .any(|prefix| text.starts_with(prefix)); + let token_like = text.len() >= 32 + && text + .chars() + .all(|c| c.is_ascii_alphanumeric() || matches!(c, '_' | '-' | '.' | '=')) + && text.chars().any(|c| c.is_ascii_digit()) + && text.chars().any(|c| c.is_ascii_alphabetic()); + if (secret_key && !placeholder) || email || prefixed || token_like { + found.push(format!("{key}: {text}")); + } + } + _ => {} + } +} + +#[test] +fn every_provider_meets_the_contract() { + use crate::localization::LanguageId; + use crate::theme_engine::{Canvas, DataContext, ThemeRuntime}; + + let folder = provider_fixture_folder(); + let mut problems = Vec::new(); + for provider in ProviderId::ALL { + let descriptor = provider.descriptor(); + let key = descriptor.key; + let path = folder.join(format!("{key}.json")); + + for language in LanguageId::ALL { + for text in [descriptor.display_name, descriptor.settings_description] { + if !language.has_translation(text) { + problems.push(format!( + "{key}: src/localization/locales/{}.toml has no translation for {text:?}", + language.code() + )); + } + } + } + + let Ok(body) = std::fs::read_to_string(&path) else { + problems.push(format!( + "{key}: add a redacted API response at {PROVIDER_FIXTURES}/{key}.json" + )); + continue; + }; + match serde_json::from_str::(&body) { + Ok(value) => { + let mut found = Vec::new(); + unredacted_values(&value, "", &mut found); + for value in found { + problems.push(format!( + "{key}: fixture value looks like a credential or personal detail; \ + replace it with a placeholder (redacted, usr_example, \ + someone@example.com): {value}" + )); + } + } + Err(error) => problems.push(format!("{key}: fixture is not valid JSON: {error}")), + } + + let Some(usage) = usage_from_fixture(provider, &body) else { + problems.push(format!( + "{key}: the provider's parser rejected {PROVIDER_FIXTURES}/{key}.json" + )); + continue; + }; + if !usage.sections().any(|section| section.available) { + problems.push(format!( + "{key}: the fixture parses without any available limit" + )); + } + + let cache: AppUsageData = [(provider, usage.clone())].into_iter().collect(); + let saved = serde_json::to_string(&cache).unwrap(); + let loaded: AppUsageData = serde_json::from_str(&saved).unwrap(); + if loaded.get(provider) != Some(&usage) { + problems.push(format!( + "{key}: usage changes when the cache is saved and loaded" + )); + } + + let context = DataContext::from_usage_with_runtime( + Some(&cache), + &Canvas::default(), + ThemeRuntime::from_providers(ProviderSet::from_enabled([provider])), + ); + if context.get(&format!("{key}.available")) != Some(1.0) { + problems.push(format!("{key}: themes do not see {key}.available")); + } + } + + for entry in std::fs::read_dir(&folder).unwrap() { + let path = entry.unwrap().path(); + let stem = path.file_stem().unwrap_or_default().to_string_lossy(); + if path.extension().is_none_or(|extension| extension != "json") + || ProviderId::from_key(&stem).is_none() + { + problems.push(format!( + "{}: not a fixture for any provider key", + path.strip_prefix(&folder).unwrap().display() + )); + } + } + + assert!( + problems.is_empty(), + "provider contract problems:\n {}", + problems.join("\n ") + ); +} + +#[test] +fn provider_identifiers_are_unique() { + use std::collections::BTreeSet; + let descriptors = crate::providers::PROVIDER_DESCRIPTORS; + let count = descriptors.len(); + assert_eq!(ProviderId::ALL.len(), count); + for (index, provider) in ProviderId::ALL.into_iter().enumerate() { + assert_eq!(descriptors[index].id, provider, "descriptor order"); + } + let keys: BTreeSet<_> = descriptors.iter().map(|d| d.key).collect(); + let cache_keys: BTreeSet<_> = descriptors.iter().map(|d| d.cache_key).collect(); + let commands: BTreeSet<_> = descriptors + .iter() + .map(|d| d.native_menu_command_id) + .collect(); + assert_eq!(keys.len(), count, "provider keys must be unique"); + assert_eq!(cache_keys.len(), count, "cache keys must be unique"); + assert_eq!(commands.len(), count, "menu command ids must be unique"); +} + +#[test] +fn fixture_redaction_check_flags_secrets() { + let value = serde_json::json!({ + "access_token": "abc", + "nested": [{"email": "person@company.com"}], + "id": "eyJhbGciOiJIUzI1NiJ9", + "opaque": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8", + "subscriberUserID": "usr_example", + "auth_token": "redacted", + "reset": "2026-09-27T13:10:00.412622+00:00" + }); + let mut found = Vec::new(); + unredacted_values(&value, "", &mut found); + assert_eq!(found.len(), 4, "{found:?}"); +} From 7024b6bfdc50290779a6af94cdff71d3c2bde122 Mon Sep 17 00:00:00 2001 From: Craig Constable Date: Thu, 26 Nov 2026 08:11:02 +1000 Subject: [PATCH 09/12] feat(themes): render themes to PNG and snapshot the built-in themes Add `--render-theme --out ` with --surface, --appearance, --fixture, --now, --utc-offset and --scale. Rendering fixes the clock, time zone and appearance, so the same input always gives the same image. A test renders every surface of every built-in theme in dark and light mode from the sample usage and compares the result with the reference images in tests/snapshots/themes (regenerate with CCUM_UPDATE_SNAPSHOTS=1). CI uploads the renders as the theme-snapshots artifact, so a theme pull request can be reviewed as pictures. CONTRIBUTING.md and the pull request template describe the workflow. Co-Authored-By: Claude Opus 5.5 --- .github/pull_request_template.md | 4 + CHANGELOG.md | 2 + CONTRIBUTING.md | 33 ++ Cargo.toml | 1 + src/main.rs | 5 + src/theme_engine.rs | 12 +- src/theme_engine/theme_datetime.rs | 14 + src/theme_engine/theme_limits.rs | 2 +- src/theme_engine/theme_render_environment.rs | 73 ++++ src/theme_engine/theme_rendering.rs | 6 +- src/theme_engine/theme_storage.rs | 24 +- src/theme_render.rs | 364 +++++++++++++++++ src/theme_render/tests.rs | 367 ++++++++++++++++++ tests/fixtures/theme-usage.json | 42 ++ .../antigravity-tray-icon-dark.png | Bin 0 -> 1193 bytes .../antigravity-tray-icon-light.png | Bin 0 -> 1193 bytes .../claude-tray-icon-dark.png | Bin 0 -> 1770 bytes .../claude-tray-icon-light.png | Bin 0 -> 1770 bytes .../codex-tray-icon-dark.png | Bin 0 -> 1002 bytes .../codex-tray-icon-light.png | Bin 0 -> 1002 bytes .../copilot-tray-icon-dark.png | Bin 0 -> 1506 bytes .../copilot-tray-icon-light.png | Bin 0 -> 1506 bytes .../cursor-tray-icon-dark.png | Bin 0 -> 1387 bytes .../cursor-tray-icon-light.png | Bin 0 -> 1387 bytes .../grok-tray-icon-dark.png | Bin 0 -> 1199 bytes .../grok-tray-icon-light.png | Bin 0 -> 1199 bytes .../themes/classic-usage-widget/main-dark.png | Bin 0 -> 6263 bytes .../classic-usage-widget/main-light.png | Bin 0 -> 6506 bytes .../opencode-tray-icon-dark.png | Bin 0 -> 1644 bytes .../opencode-tray-icon-light.png | Bin 0 -> 1644 bytes .../antigravity-tray-icon-dark.png | Bin 0 -> 1193 bytes .../antigravity-tray-icon-light.png | Bin 0 -> 1193 bytes .../claude-tray-icon-dark.png | Bin 0 -> 1770 bytes .../claude-tray-icon-light.png | Bin 0 -> 1770 bytes .../classic-vertical/codex-tray-icon-dark.png | Bin 0 -> 1002 bytes .../codex-tray-icon-light.png | Bin 0 -> 1002 bytes .../copilot-tray-icon-dark.png | Bin 0 -> 1506 bytes .../copilot-tray-icon-light.png | Bin 0 -> 1506 bytes .../cursor-tray-icon-dark.png | Bin 0 -> 1387 bytes .../cursor-tray-icon-light.png | Bin 0 -> 1387 bytes .../classic-vertical/grok-tray-icon-dark.png | Bin 0 -> 1199 bytes .../classic-vertical/grok-tray-icon-light.png | Bin 0 -> 1199 bytes .../themes/classic-vertical/main-dark.png | Bin 0 -> 3555 bytes .../themes/classic-vertical/main-light.png | Bin 0 -> 3703 bytes .../opencode-tray-icon-dark.png | Bin 0 -> 1644 bytes .../opencode-tray-icon-light.png | Bin 0 -> 1644 bytes .../antigravity-tray-icon-dark.png | Bin 0 -> 1193 bytes .../antigravity-tray-icon-light.png | Bin 0 -> 1193 bytes .../claude-tray-icon-dark.png | Bin 0 -> 1770 bytes .../claude-tray-icon-light.png | Bin 0 -> 1770 bytes .../codex-tray-icon-dark.png | Bin 0 -> 1002 bytes .../codex-tray-icon-light.png | Bin 0 -> 1002 bytes .../copilot-tray-icon-dark.png | Bin 0 -> 1506 bytes .../copilot-tray-icon-light.png | Bin 0 -> 1506 bytes .../cursor-tray-icon-dark.png | Bin 0 -> 1387 bytes .../cursor-tray-icon-light.png | Bin 0 -> 1387 bytes .../grok-tray-icon-dark.png | Bin 0 -> 1199 bytes .../grok-tray-icon-light.png | Bin 0 -> 1199 bytes .../themes/compact-fluent-quad/main-dark.png | Bin 0 -> 5385 bytes .../themes/compact-fluent-quad/main-light.png | Bin 0 -> 5566 bytes .../opencode-tray-icon-dark.png | Bin 0 -> 1644 bytes .../opencode-tray-icon-light.png | Bin 0 -> 1644 bytes .../shared-tray-icon-dark.png | Bin 0 -> 2137 bytes .../shared-tray-icon-light.png | Bin 0 -> 2137 bytes .../minecraft-codex/layer-62744-2-dark.png | Bin 0 -> 2306 bytes .../minecraft-codex/layer-62744-2-light.png | Bin 0 -> 2306 bytes .../themes/stacked-rows/claude-popup-dark.png | Bin 0 -> 38786 bytes .../stacked-rows/claude-popup-light.png | Bin 0 -> 39855 bytes .../stacked-rows/claude-tray-icon-dark.png | Bin 0 -> 1770 bytes .../stacked-rows/claude-tray-icon-light.png | Bin 0 -> 1770 bytes .../themes/stacked-rows/codex-popup-dark.png | Bin 0 -> 25526 bytes .../themes/stacked-rows/codex-popup-light.png | Bin 0 -> 26394 bytes .../stacked-rows/codex-tray-icon-dark.png | Bin 0 -> 1002 bytes .../stacked-rows/codex-tray-icon-light.png | Bin 0 -> 1002 bytes .../themes/stacked-rows/main-dark.png | Bin 0 -> 2267 bytes .../themes/stacked-rows/main-light.png | Bin 0 -> 2406 bytes 76 files changed, 939 insertions(+), 10 deletions(-) create mode 100644 src/theme_engine/theme_render_environment.rs create mode 100644 src/theme_render.rs create mode 100644 src/theme_render/tests.rs create mode 100644 tests/fixtures/theme-usage.json create mode 100644 tests/snapshots/themes/classic-usage-widget/antigravity-tray-icon-dark.png create mode 100644 tests/snapshots/themes/classic-usage-widget/antigravity-tray-icon-light.png create mode 100644 tests/snapshots/themes/classic-usage-widget/claude-tray-icon-dark.png create mode 100644 tests/snapshots/themes/classic-usage-widget/claude-tray-icon-light.png create mode 100644 tests/snapshots/themes/classic-usage-widget/codex-tray-icon-dark.png create mode 100644 tests/snapshots/themes/classic-usage-widget/codex-tray-icon-light.png create mode 100644 tests/snapshots/themes/classic-usage-widget/copilot-tray-icon-dark.png create mode 100644 tests/snapshots/themes/classic-usage-widget/copilot-tray-icon-light.png create mode 100644 tests/snapshots/themes/classic-usage-widget/cursor-tray-icon-dark.png create mode 100644 tests/snapshots/themes/classic-usage-widget/cursor-tray-icon-light.png create mode 100644 tests/snapshots/themes/classic-usage-widget/grok-tray-icon-dark.png create mode 100644 tests/snapshots/themes/classic-usage-widget/grok-tray-icon-light.png create mode 100644 tests/snapshots/themes/classic-usage-widget/main-dark.png create mode 100644 tests/snapshots/themes/classic-usage-widget/main-light.png create mode 100644 tests/snapshots/themes/classic-usage-widget/opencode-tray-icon-dark.png create mode 100644 tests/snapshots/themes/classic-usage-widget/opencode-tray-icon-light.png create mode 100644 tests/snapshots/themes/classic-vertical/antigravity-tray-icon-dark.png create mode 100644 tests/snapshots/themes/classic-vertical/antigravity-tray-icon-light.png create mode 100644 tests/snapshots/themes/classic-vertical/claude-tray-icon-dark.png create mode 100644 tests/snapshots/themes/classic-vertical/claude-tray-icon-light.png create mode 100644 tests/snapshots/themes/classic-vertical/codex-tray-icon-dark.png create mode 100644 tests/snapshots/themes/classic-vertical/codex-tray-icon-light.png create mode 100644 tests/snapshots/themes/classic-vertical/copilot-tray-icon-dark.png create mode 100644 tests/snapshots/themes/classic-vertical/copilot-tray-icon-light.png create mode 100644 tests/snapshots/themes/classic-vertical/cursor-tray-icon-dark.png create mode 100644 tests/snapshots/themes/classic-vertical/cursor-tray-icon-light.png create mode 100644 tests/snapshots/themes/classic-vertical/grok-tray-icon-dark.png create mode 100644 tests/snapshots/themes/classic-vertical/grok-tray-icon-light.png create mode 100644 tests/snapshots/themes/classic-vertical/main-dark.png create mode 100644 tests/snapshots/themes/classic-vertical/main-light.png create mode 100644 tests/snapshots/themes/classic-vertical/opencode-tray-icon-dark.png create mode 100644 tests/snapshots/themes/classic-vertical/opencode-tray-icon-light.png create mode 100644 tests/snapshots/themes/compact-fluent-quad/antigravity-tray-icon-dark.png create mode 100644 tests/snapshots/themes/compact-fluent-quad/antigravity-tray-icon-light.png create mode 100644 tests/snapshots/themes/compact-fluent-quad/claude-tray-icon-dark.png create mode 100644 tests/snapshots/themes/compact-fluent-quad/claude-tray-icon-light.png create mode 100644 tests/snapshots/themes/compact-fluent-quad/codex-tray-icon-dark.png create mode 100644 tests/snapshots/themes/compact-fluent-quad/codex-tray-icon-light.png create mode 100644 tests/snapshots/themes/compact-fluent-quad/copilot-tray-icon-dark.png create mode 100644 tests/snapshots/themes/compact-fluent-quad/copilot-tray-icon-light.png create mode 100644 tests/snapshots/themes/compact-fluent-quad/cursor-tray-icon-dark.png create mode 100644 tests/snapshots/themes/compact-fluent-quad/cursor-tray-icon-light.png create mode 100644 tests/snapshots/themes/compact-fluent-quad/grok-tray-icon-dark.png create mode 100644 tests/snapshots/themes/compact-fluent-quad/grok-tray-icon-light.png create mode 100644 tests/snapshots/themes/compact-fluent-quad/main-dark.png create mode 100644 tests/snapshots/themes/compact-fluent-quad/main-light.png create mode 100644 tests/snapshots/themes/compact-fluent-quad/opencode-tray-icon-dark.png create mode 100644 tests/snapshots/themes/compact-fluent-quad/opencode-tray-icon-light.png create mode 100644 tests/snapshots/themes/compact-fluent-quad/shared-tray-icon-dark.png create mode 100644 tests/snapshots/themes/compact-fluent-quad/shared-tray-icon-light.png create mode 100644 tests/snapshots/themes/minecraft-codex/layer-62744-2-dark.png create mode 100644 tests/snapshots/themes/minecraft-codex/layer-62744-2-light.png create mode 100644 tests/snapshots/themes/stacked-rows/claude-popup-dark.png create mode 100644 tests/snapshots/themes/stacked-rows/claude-popup-light.png create mode 100644 tests/snapshots/themes/stacked-rows/claude-tray-icon-dark.png create mode 100644 tests/snapshots/themes/stacked-rows/claude-tray-icon-light.png create mode 100644 tests/snapshots/themes/stacked-rows/codex-popup-dark.png create mode 100644 tests/snapshots/themes/stacked-rows/codex-popup-light.png create mode 100644 tests/snapshots/themes/stacked-rows/codex-tray-icon-dark.png create mode 100644 tests/snapshots/themes/stacked-rows/codex-tray-icon-light.png create mode 100644 tests/snapshots/themes/stacked-rows/main-dark.png create mode 100644 tests/snapshots/themes/stacked-rows/main-light.png diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index c75f8ac5..484d3938 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -23,4 +23,8 @@ Include relevant manual verification and redacted screenshots for UI changes. -- - [ ] I have read CONTRIBUTING.md and CODE_OF_CONDUCT.md. - [ ] The change is focused and contains no credentials or sensitive data. - [ ] I have added or updated relevant documentation and tests, where applicable. +- [ ] Theme changes: I have updated `tests/snapshots/themes` and checked the new images + (see CONTRIBUTING.md, Theme changes). +- [ ] New providers: `every_provider_meets_the_contract` passes with a redacted fixture + (see CONTRIBUTING.md, Provider changes). - [ ] I have left changelog and version changes to maintainers unless requested. diff --git a/CHANGELOG.md b/CHANGELOG.md index 7106e248..b5998a75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ changes grouped into Added, Changed, Fixed, and Removed where applicable. - Let theme colours set an optional light-mode colour (`light_color`), so one layer can serve both Windows appearances instead of a pair of layers gated on `system.dark`. In Theme Studio, the sun and moon button beside a colour expands it into separate Dark mode and Light mode colours; collapsing keeps the dark mode colour. Colours without `light_color` render and save as before, and themes that keep separate per-mode layers are unaffected. - Add the Stacked Rows built-in theme: each provider's logo beside joined rows of four-section bars, one row per limit the account reports, with a magenta pace marker. Bars follow the Usage direction setting, and hovering a provider opens a flyout with each limit's usage, reset time and pace, or a waiting, error or no-usage message. - Add a Provider logo layer type (`provider_mark`) to themes and Theme Studio. It draws a provider's brand mark from the dashboard's icon font, tinted and fitted to the layer, so themes need no image assets to show a provider. +- Render themes to PNG without starting the app: `--render-theme --out `, with `--surface`, `--appearance`, `--fixture`, `--now`, `--utc-offset` and `--scale`. The clock, time zone and appearance are fixed, so the same input gives the same image. See [CONTRIBUTING.md](CONTRIBUTING.md#theme-changes). +- Test every surface of every built-in theme in dark and light mode against reference images in `tests/snapshots/themes`. CI uploads the renders as the `theme-snapshots` artifact, so a theme pull request can be reviewed as pictures. - Add a provider contract test: every provider needs a redacted response fixture that its parser reads, usage that survives the usage cache and reaches themes, translated setting text, and unique identifiers. See [CONTRIBUTING.md](CONTRIBUTING.md#provider-changes). - Auto-merge Dependabot pull requests with patch-level Cargo updates once `CI passed` succeeds. `scripts/New-Release.ps1` adds changelog entries for them and refuses to prepare a release when `origin/main` has commits that local `main` lacks. See [docs/releasing.md](docs/releasing.md#dependabot-updates). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a7a1f62e..687f5163 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -61,6 +61,39 @@ check the affected dashboard or taskbar behavior and include redacted screenshot when helpful. For documentation-only changes, check links and formatting; compiling the application is not necessary. +### Theme changes + +Every surface of every theme in `src/themes/` is rendered in dark and light mode +from the sample usage in `tests/fixtures/theme-usage.json`, with the clock, +time zone and appearance fixed, and compared with the reference images in +`tests/snapshots/themes/`. `cargo test` fails when a render changes, writes the +new renders to `target/theme-snapshots/` (with a `-diff.png` beside each changed +image), and CI uploads that folder as the `theme-snapshots` artifact, so a theme +pull request can be reviewed as pictures. + +When the change is intended, update the references, look at them, and commit +them with the change: + +```powershell +$env:CCUM_UPDATE_SNAPSHOTS = 1; cargo test --locked theme_render; Remove-Item Env:CCUM_UPDATE_SNAPSHOTS +``` + +To render any theme file or built-in theme id without starting the app, for +example to attach screenshots to a pull request: + +```powershell +cargo build --locked +./target/debug/claude-code-usage-monitor.exe --render-theme my-theme.json --out renders | Out-Host +``` + +`--out` is a folder (one `--.png` per surface and +appearance) or a `.png` file when one image is rendered. Options: +`--surface `, `--appearance dark | light | both`, +`--fixture `, `--now `, `--utc-offset ` and +`--scale `. The executable is a Windows GUI program, so in PowerShell +pipe it to `Out-Host` (or use `Start-Process -Wait -NoNewWindow`) to wait for it +and see its output. + ### Provider changes `every_provider_meets_the_contract` in `src/poller/tests.rs` checks every diff --git a/Cargo.toml b/Cargo.toml index 0fa496d1..9ece9e35 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,6 +42,7 @@ features = [ "Win32_Graphics_Gdi", "Win32_System_LibraryLoader", "Win32_System_Com", + "Win32_System_Console", "Win32_System_Diagnostics_Debug", "Win32_System_Diagnostics_ToolHelp", "Win32_UI_Shell", diff --git a/src/main.rs b/src/main.rs index dcf6029d..48edf224 100644 --- a/src/main.rs +++ b/src/main.rs @@ -19,6 +19,7 @@ mod studio_app; mod theme; mod theme_engine; mod theme_package; +mod theme_render; mod tray_icon; mod ui; mod updater; @@ -50,6 +51,10 @@ fn main() { return; } + if let Some(exit_code) = theme_render::handle_cli_mode(&args) { + std::process::exit(exit_code); + } + if let Some(exit_code) = updater::handle_cli_mode(&args) { if diagnose_enabled { diagnose::log(format!("cli mode exited with code {exit_code}")); diff --git a/src/theme_engine.rs b/src/theme_engine.rs index 8a295db0..f12dd07c 100644 --- a/src/theme_engine.rs +++ b/src/theme_engine.rs @@ -1531,7 +1531,7 @@ impl DataContext { context.insert("app.version.major", version_parts.next().unwrap_or(0.0)); context.insert("app.version.minor", version_parts.next().unwrap_or(0.0)); context.insert("app.version.patch", version_parts.next().unwrap_or(0.0)); - context.insert("system.dark", crate::theme::is_dark_mode() as u8 as f64); + context.insert("system.dark", render_dark_mode() as u8 as f64); context.insert("data.poll_ok", runtime.poll_ok as u8 as f64); context.insert("data.has_error", runtime.has_error as u8 as f64); context.insert( @@ -1550,10 +1550,7 @@ impl DataContext { context.insert_string("i18n.minute_suffix", strings.minute_suffix); context.insert_string("i18n.second_suffix", strings.second_suffix); context.insert("providers.count", runtime.provider_count() as f64); - let now = std::time::SystemTime::now() - .duration_since(std::time::UNIX_EPOCH) - .map(|value| value.as_secs_f64()) - .unwrap_or(0.0); + let now = render_now_unix(); context.insert("time.now.unix", now); context.insert("time.now.milliseconds", now * 1000.0); for (zone, local) in [("local", true), ("utc", false)] { @@ -1843,7 +1840,7 @@ impl DataContext { .map(|value| value.as_secs_f64()) .unwrap_or(0.0); let seconds = reset - .and_then(|value| value.duration_since(std::time::SystemTime::now()).ok()) + .and_then(|value| value.duration_since(render_now()).ok()) .map(|value| value.as_secs_f64()) .unwrap_or(0.0); (unix, seconds) @@ -2980,7 +2977,10 @@ pub use theme_expression::*; mod theme_datetime; mod theme_limits; +mod theme_render_environment; use theme_datetime::*; +use theme_render_environment::{render_dark_mode, render_now, render_now_unix}; +pub use theme_render_environment::{with_fixed_render_environment, FixedRenderEnvironment}; fn schema_version() -> u32 { THEME_SCHEMA_VERSION } diff --git a/src/theme_engine/theme_datetime.rs b/src/theme_engine/theme_datetime.rs index 725e62f7..abcd90ac 100644 --- a/src/theme_engine/theme_datetime.rs +++ b/src/theme_engine/theme_datetime.rs @@ -146,6 +146,20 @@ fn timestamp_system_time(unix: f64, local: bool) -> Option { if !unix.is_finite() || unix <= 0.0 { return None; } + // A pinned render environment fixes the offset, so local times do not + // depend on the machine's time zone. + let fixed_offset = if local { + super::theme_render_environment::fixed_utc_offset_seconds() + } else { + None + }; + let (unix, local) = match fixed_offset { + Some(offset) => (unix + offset as f64, false), + None => (unix, local), + }; + if unix <= 0.0 { + return None; + } let seconds = unix.floor() as u64; let milliseconds = ((unix - seconds as f64) * 1000.0).floor() as u64; let ticks = seconds diff --git a/src/theme_engine/theme_limits.rs b/src/theme_engine/theme_limits.rs index 1277ee11..8c4144d1 100644 --- a/src/theme_engine/theme_limits.rs +++ b/src/theme_engine/theme_limits.rs @@ -83,7 +83,7 @@ impl DataContext { let seconds = limit .usage .resets_at - .and_then(|at| at.duration_since(std::time::SystemTime::now()).ok()) + .and_then(|at| at.duration_since(render_now()).ok()) .map(|duration| duration.as_secs_f64()) .unwrap_or(0.0); for (unit, value) in [ diff --git a/src/theme_engine/theme_render_environment.rs b/src/theme_engine/theme_render_environment.rs new file mode 100644 index 00000000..9ba3f326 --- /dev/null +++ b/src/theme_engine/theme_render_environment.rs @@ -0,0 +1,73 @@ +//! A pinned environment for reproducible renders. +//! +//! The live widget reads the wall clock, the machine's time zone, the Windows +//! appearance and the managed themes folder. Snapshot tests and +//! `--render-theme` pin all four, so one theme and one usage fixture always +//! produce the same pixels on any machine. + +use std::cell::RefCell; +use std::path::PathBuf; +use std::time::{Duration, SystemTime, UNIX_EPOCH}; + +#[derive(Clone, Debug, PartialEq)] +pub struct FixedRenderEnvironment { + /// Seconds since the Unix epoch for `time.now.*` and reset countdowns. + pub now_unix: u64, + /// Offset from UTC used for local times, so output does not depend on the + /// machine's time zone. + pub utc_offset_minutes: i32, + /// Windows appearance reported to themes (`system.dark`) and floating cards. + pub dark: bool, + /// Folder that relative image paths resolve against instead of the managed + /// themes folder, normally the folder holding the theme file. + pub asset_root: Option, +} + +thread_local! { + static FIXED_ENVIRONMENT: RefCell> = const { RefCell::new(None) }; +} + +/// Run `f` with this thread's theme renders using `environment` instead of +/// the live clock, time zone, appearance and themes folder. +pub fn with_fixed_render_environment( + environment: FixedRenderEnvironment, + f: impl FnOnce() -> T, +) -> T { + struct Restore(Option); + impl Drop for Restore { + fn drop(&mut self) { + let previous = self.0.take(); + FIXED_ENVIRONMENT.with(|cell| *cell.borrow_mut() = previous); + } + } + let _restore = Restore(FIXED_ENVIRONMENT.with(|cell| cell.replace(Some(environment)))); + f() +} + +fn fixed(read: impl FnOnce(&FixedRenderEnvironment) -> T) -> Option { + FIXED_ENVIRONMENT.with(|cell| cell.borrow().as_ref().map(read)) +} + +pub(super) fn render_now() -> SystemTime { + fixed(|environment| UNIX_EPOCH + Duration::from_secs(environment.now_unix)) + .unwrap_or_else(SystemTime::now) +} + +pub(super) fn render_now_unix() -> f64 { + render_now() + .duration_since(UNIX_EPOCH) + .map(|value| value.as_secs_f64()) + .unwrap_or(0.0) +} + +pub(super) fn fixed_utc_offset_seconds() -> Option { + fixed(|environment| i64::from(environment.utc_offset_minutes) * 60) +} + +pub(super) fn render_dark_mode() -> bool { + fixed(|environment| environment.dark).unwrap_or_else(crate::theme::is_dark_mode) +} + +pub(super) fn fixed_asset_root() -> Option { + fixed(|environment| environment.asset_root.clone()).flatten() +} diff --git a/src/theme_engine/theme_rendering.rs b/src/theme_engine/theme_rendering.rs index bee38989..d93f5a58 100644 --- a/src/theme_engine/theme_rendering.rs +++ b/src/theme_engine/theme_rendering.rs @@ -128,7 +128,7 @@ pub fn render_theme_surface_with_runtime_at_scale( let alpha = ((runtime.floating_card_opacity.min(100) as u32 * 255) / 100) as u8; // Match the card to the system theme: a fixed dark card under // light-mode content destroys contrast when the widget floats. - let dark = crate::theme::is_dark_mode(); + let dark = render_dark_mode(); let card_color = if dark { Rgba { r: 24, @@ -1123,7 +1123,9 @@ pub(super) fn resolve_asset_path(path: &str) -> PathBuf { if expanded.is_absolute() { expanded } else { - themes_directory().join(expanded) + theme_render_environment::fixed_asset_root() + .unwrap_or_else(themes_directory) + .join(expanded) } } diff --git a/src/theme_engine/theme_storage.rs b/src/theme_engine/theme_storage.rs index 3019932c..11929d5f 100644 --- a/src/theme_engine/theme_storage.rs +++ b/src/theme_engine/theme_storage.rs @@ -274,7 +274,12 @@ pub fn delete_theme(path: &Path) -> Result<(), String> { pub fn load_theme(path: &Path) -> Result { let content = std::fs::read_to_string(path).map_err(|e| e.to_string())?; - let mut theme: ThemeDocument = serde_json::from_str(&content).map_err(|e| e.to_string())?; + parse_theme(&content) +} + +/// Parse, normalize and validate a theme document, as `load_theme` does for a file. +pub fn parse_theme(content: &str) -> Result { + let mut theme: ThemeDocument = serde_json::from_str(content).map_err(|e| e.to_string())?; theme.prepare_runtime(); let errors = theme.validate(); if errors.is_empty() { @@ -284,6 +289,23 @@ pub fn load_theme(path: &Path) -> Result { } } +/// Ids of the themes compiled into the executable, including editable starters. +pub fn bundled_theme_ids() -> impl Iterator { + BUILTIN_THEME_SOURCES + .iter() + .chain(BUNDLED_EDITABLE_THEME_SOURCES) + .map(|(id, _)| *id) +} + +/// A theme compiled into the executable, parsed and validated. +pub fn bundled_theme(id: &str) -> Option> { + BUILTIN_THEME_SOURCES + .iter() + .chain(BUNDLED_EDITABLE_THEME_SOURCES) + .find(|(theme_id, _)| *theme_id == id) + .map(|(_, source)| parse_theme(source)) +} + pub fn ensure_starter_theme() -> Result { let directory = themes_directory(); for (expected_id, source) in BUILTIN_THEME_SOURCES { diff --git a/src/theme_render.rs b/src/theme_render.rs new file mode 100644 index 00000000..055d6ffc --- /dev/null +++ b/src/theme_render.rs @@ -0,0 +1,364 @@ +//! Render theme surfaces to PNG files without starting the widget. +//! +//! `--render-theme` lets a theme pull request show what it draws, and the +//! snapshot tests in `tests` compare every theme in `src/themes` with the +//! reference images in `tests/snapshots/themes`. Both pin the clock, time zone, +//! appearance and asset folder through `FixedRenderEnvironment`, so a theme +//! and a usage fixture always give the same pixels. + +#![allow(unsafe_code, reason = "attaches to the parent console through Win32")] + +use std::path::{Path, PathBuf}; + +use crate::models::AppUsageData; +use crate::providers::{ProviderId, ProviderSet}; +use crate::theme_engine::{ + bundled_theme, bundled_theme_ids, load_theme, render_theme_surface_with_runtime_at_scale, + with_fixed_render_environment, FixedRenderEnvironment, RenderedTheme, SurfaceNest, + ThemeDocument, ThemeRuntime, +}; + +/// Usage figures for Claude Code and Codex, timed against `DEFAULT_NOW_UNIX`. +pub const SAMPLE_USAGE: &str = include_str!("../tests/fixtures/theme-usage.json"); +/// 2027-01-15 08:00:00 UTC. +pub const DEFAULT_NOW_UNIX: u64 = 1_800_000_000; + +/// Host sizes used for layout expressions: a 1080p monitor with a 48 px taskbar. +const MONITOR_SIZE: (u32, u32) = (1920, 1080); +const TASKBAR_SIZE: (u32, u32) = (1920, 48); + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum Appearance { + Dark, + Light, +} + +impl Appearance { + pub const BOTH: [Self; 2] = [Self::Dark, Self::Light]; + + pub fn name(self) -> &'static str { + match self { + Self::Dark => "dark", + Self::Light => "light", + } + } +} + +#[derive(Clone, Debug, PartialEq)] +pub struct RenderSettings { + pub appearance: Appearance, + pub now_unix: u64, + pub utc_offset_minutes: i32, + pub scale: f64, + /// Folder for relative image paths; `None` uses the managed themes folder. + pub asset_root: Option, +} + +impl Default for RenderSettings { + fn default() -> Self { + Self { + appearance: Appearance::Dark, + now_unix: DEFAULT_NOW_UNIX, + utc_offset_minutes: 0, + scale: 1.0, + asset_root: None, + } + } +} + +pub fn parse_usage(json: &str) -> Result { + serde_json::from_str(json).map_err(|error| format!("invalid usage fixture: {error}")) +} + +/// Render one surface the way the widget would, with the providers that have +/// data in `usage` enabled. +pub fn render_surface( + theme: &ThemeDocument, + surface_index: usize, + usage: &AppUsageData, + settings: &RenderSettings, +) -> RenderedTheme { + let environment = FixedRenderEnvironment { + now_unix: settings.now_unix, + utc_offset_minutes: settings.utc_offset_minutes, + dark: settings.appearance == Appearance::Dark, + asset_root: settings.asset_root.clone(), + }; + with_fixed_render_environment(environment, || { + let runtime = runtime_for_surface(theme, surface_index, usage); + render_theme_surface_with_runtime_at_scale( + theme, + surface_index, + Some(usage), + runtime, + settings.scale, + ) + }) +} + +fn runtime_for_surface( + theme: &ThemeDocument, + surface_index: usize, + usage: &AppUsageData, +) -> ThemeRuntime { + let providers = ProviderSet::from_enabled( + ProviderId::ALL + .into_iter() + .filter(|provider| usage.get(*provider).is_some()), + ); + let runtime = if providers.is_empty() { + ThemeRuntime::default() + } else { + ThemeRuntime::from_providers(providers) + }; + let Some(surface) = theme.surfaces.get(surface_index) else { + return runtime; + }; + let nest = surface + .placement + .nest + .resolve(surface.placement.reference.region); + let runtime = runtime.with_nest(nest); + // Mirrors `window::host_geometry::runtime_with_geometry`. + let (width, height) = match (nest, surface.placement.host_dimensions) { + (SurfaceNest::Floating, Some(size)) => size, + (SurfaceNest::Taskbar | SurfaceNest::TrayIcon, _) => TASKBAR_SIZE, + _ => MONITOR_SIZE, + }; + runtime.with_host_dimensions(width, height) +} + +/// Convert premultiplied 0xAARRGGBB pixels to straight-alpha RGBA. +pub fn to_rgba_image(rendered: &RenderedTheme) -> image::RgbaImage { + let mut bytes = Vec::with_capacity(rendered.pixels.len() * 4); + for pixel in &rendered.pixels { + let [blue, green, red, alpha] = pixel.to_le_bytes(); + let straight = |channel: u8| { + if alpha == 0 { + 0 + } else { + ((u32::from(channel) * 255 + u32::from(alpha) / 2) / u32::from(alpha)).min(255) + as u8 + } + }; + bytes.extend([straight(red), straight(green), straight(blue), alpha]); + } + image::RgbaImage::from_raw(rendered.width, rendered.height, bytes) + .expect("a rendered theme has width * height pixels") +} + +/// `--render-theme`: returns an exit code, or `None` when the flag is absent. +pub fn handle_cli_mode(args: &[String]) -> Option { + if !args.iter().any(|arg| arg == "--render-theme") { + return None; + } + attach_parent_console(); + Some(match parse_args(args).and_then(|request| run(&request)) { + Ok(written) => { + for path in written { + println!("{}", path.display()); + } + 0 + } + Err(error) => { + eprintln!("--render-theme: {error}"); + eprintln!("{USAGE}"); + 2 + } + }) +} + +const USAGE: &str = "\ +usage: claude-code-usage-monitor --render-theme --out + [--fixture ] [--surface ] [--appearance dark | light | both] + [--now ] [--utc-offset ] [--scale ]"; + +#[derive(Debug, PartialEq)] +struct RenderRequest { + theme: String, + out: PathBuf, + fixture: Option, + surface: Option, + appearances: Vec, + now_unix: u64, + utc_offset_minutes: i32, + scale: f64, +} + +fn parse_args(args: &[String]) -> Result { + let mut request = RenderRequest { + theme: String::new(), + out: PathBuf::new(), + fixture: None, + surface: None, + appearances: Appearance::BOTH.to_vec(), + now_unix: DEFAULT_NOW_UNIX, + utc_offset_minutes: 0, + scale: 1.0, + }; + let mut theme = None; + let mut out = None; + let mut values = args.iter().skip(1); + while let Some(flag) = values.next() { + let mut value = || { + values + .next() + .cloned() + .ok_or_else(|| format!("{flag} needs a value")) + }; + match flag.as_str() { + "--render-theme" => theme = Some(value()?), + "--out" => out = Some(PathBuf::from(value()?)), + "--fixture" => request.fixture = Some(PathBuf::from(value()?)), + "--surface" => { + let surface = value()?; + request.surface = (surface != "all").then_some(surface); + } + "--appearance" => { + request.appearances = match value()?.as_str() { + "dark" => vec![Appearance::Dark], + "light" => vec![Appearance::Light], + "both" => Appearance::BOTH.to_vec(), + other => return Err(format!("unknown appearance '{other}'")), + } + } + "--now" => { + request.now_unix = value()? + .parse() + .map_err(|_| "--now takes Unix seconds".to_string())?; + } + "--utc-offset" => { + request.utc_offset_minutes = value()? + .parse() + .ok() + .filter(|minutes: &i32| minutes.abs() <= 14 * 60) + .ok_or_else(|| "--utc-offset takes minutes from -840 to 840".to_string())?; + } + "--scale" => { + request.scale = value()? + .parse() + .ok() + .filter(|scale: &f64| (0.5..=4.0).contains(scale)) + .ok_or_else(|| "--scale takes a factor from 0.5 to 4".to_string())?; + } + "--diagnose" | "--diagnose-append" => {} + other => return Err(format!("unknown argument '{other}'")), + } + } + request.theme = theme.ok_or("--render-theme needs a theme file or built-in id")?; + request.out = out.ok_or("--out is required")?; + Ok(request) +} + +fn run(request: &RenderRequest) -> Result, String> { + let (theme, asset_root) = load_requested_theme(&request.theme)?; + let usage = match &request.fixture { + Some(path) => parse_usage( + &std::fs::read_to_string(path) + .map_err(|error| format!("cannot read {}: {error}", path.display()))?, + )?, + None => parse_usage(SAMPLE_USAGE)?, + }; + let surfaces = match &request.surface { + None => (0..theme.surfaces.len()).collect::>(), + Some(wanted) => vec![theme + .surfaces + .iter() + .position(|surface| surface.id == *wanted) + .or_else(|| { + wanted + .parse::() + .ok() + .filter(|index| *index < theme.surfaces.len()) + }) + .ok_or_else(|| { + let ids = theme + .surfaces + .iter() + .map(|surface| surface.id.as_str()) + .collect::>(); + format!("no surface '{wanted}'; this theme has {}", ids.join(", ")) + })?], + }; + let single_file = request + .out + .extension() + .is_some_and(|extension| extension.eq_ignore_ascii_case("png")); + let count = surfaces.len() * request.appearances.len(); + if single_file && count != 1 { + return Err(format!( + "this renders {count} images; pass a folder to --out, or one --surface and --appearance" + )); + } + if !single_file { + std::fs::create_dir_all(&request.out) + .map_err(|error| format!("cannot create {}: {error}", request.out.display()))?; + } + + let mut written = Vec::new(); + for &surface_index in &surfaces { + for &appearance in &request.appearances { + let settings = RenderSettings { + appearance, + now_unix: request.now_unix, + utc_offset_minutes: request.utc_offset_minutes, + scale: request.scale, + asset_root: asset_root.clone(), + }; + let rendered = render_surface(&theme, surface_index, &usage, &settings); + for warning in &rendered.warnings { + eprintln!("warning: {warning}"); + } + let path = if single_file { + request.out.clone() + } else { + request.out.join(format!( + "{}-{}-{}.png", + theme.id, + theme.surfaces[surface_index].id, + appearance.name() + )) + }; + to_rgba_image(&rendered) + .save(&path) + .map_err(|error| format!("cannot write {}: {error}", path.display()))?; + written.push(path); + } + } + Ok(written) +} + +/// A theme file renders with its images resolved next to it; a built-in id +/// uses the managed themes folder, where its assets are installed. +fn load_requested_theme(theme: &str) -> Result<(ThemeDocument, Option), String> { + let path = Path::new(theme); + if path.is_file() { + let document = + load_theme(path).map_err(|error| format!("invalid theme {theme}: {error}"))?; + let root = path + .parent() + .map(|parent| parent.to_path_buf()) + .filter(|parent| !parent.as_os_str().is_empty()) + .unwrap_or_else(|| PathBuf::from(".")); + return Ok((document, Some(root))); + } + match bundled_theme(theme) { + Some(document) => Ok((document?, None)), + None => Err(format!( + "'{theme}' is not a file or a built-in theme id ({})", + bundled_theme_ids().collect::>().join(", ") + )), + } +} + +/// The executable uses the Windows subsystem, so it has no console of its +/// own. Attach to the caller's console so messages reach the terminal. +fn attach_parent_console() { + use windows::Win32::System::Console::{AttachConsole, ATTACH_PARENT_PROCESS}; + // SAFETY: AttachConsole takes no pointers. It fails harmlessly when the + // parent has no console or this process already has one. + let _ = unsafe { AttachConsole(ATTACH_PARENT_PROCESS) }; +} + +#[cfg(test)] +mod tests; diff --git a/src/theme_render/tests.rs b/src/theme_render/tests.rs new file mode 100644 index 00000000..3bf5676a --- /dev/null +++ b/src/theme_render/tests.rs @@ -0,0 +1,367 @@ +use super::*; + +use std::collections::BTreeSet; + +/// Set to `1` to write the current renders as the new reference images. +const UPDATE_SNAPSHOTS: &str = "CCUM_UPDATE_SNAPSHOTS"; +/// A channel that moves by more than this counts as a changed pixel. +const CHANNEL_TOLERANCE: u8 = 48; +/// Share of pixels allowed to change, for small anti-aliasing differences +/// between Windows builds. A changed label or bar is well above this. +const CHANGED_PIXEL_RATIO: f64 = 0.005; + +fn manifest_dir() -> PathBuf { + PathBuf::from(env!("CARGO_MANIFEST_DIR")) +} + +fn theme_files(folder: &Path) -> Vec { + let mut files = std::fs::read_dir(folder) + .unwrap() + .map(|entry| entry.unwrap().path()) + .filter(|path| { + path.extension() + .is_some_and(|extension| extension == "json") + }) + .collect::>(); + files.sort(); + files +} + +fn reference_images(root: &Path) -> BTreeSet { + let mut images = BTreeSet::new(); + let Ok(themes) = std::fs::read_dir(root) else { + return images; + }; + for theme in themes { + let theme = theme.unwrap().path(); + if !theme.is_dir() { + continue; + } + for image in std::fs::read_dir(&theme).unwrap() { + let image = image.unwrap().path(); + if image + .extension() + .is_some_and(|extension| extension == "png") + { + images.insert(image.strip_prefix(root).unwrap().to_path_buf()); + } + } + } + images +} + +/// Returns why `actual` does not match `reference`, and writes a diff image +/// that shows changed pixels in red over a faded copy of the reference. +fn compare( + actual: &image::RgbaImage, + reference: &image::RgbaImage, + diff_path: &Path, +) -> Option { + if actual.dimensions() != reference.dimensions() { + return Some(format!( + "size changed from {:?} to {:?}", + reference.dimensions(), + actual.dimensions() + )); + } + let mut diff = image::RgbaImage::new(actual.width(), actual.height()); + let mut changed = 0_usize; + for ((actual, reference), out) in actual + .pixels() + .zip(reference.pixels()) + .zip(diff.pixels_mut()) + { + let moved = actual + .0 + .iter() + .zip(reference.0) + .any(|(a, r)| a.abs_diff(r) > CHANNEL_TOLERANCE); + if moved { + changed += 1; + *out = image::Rgba([255, 0, 0, 255]); + } else { + let [red, green, blue, alpha] = reference.0; + let grey = ((u16::from(red) + u16::from(green) + u16::from(blue)) / 3) as u8; + *out = image::Rgba([grey, grey, grey, alpha / 3]); + } + } + let total = actual.pixels().len().max(1); + let ratio = changed as f64 / total as f64; + if ratio <= CHANGED_PIXEL_RATIO { + return None; + } + diff.save(diff_path).unwrap(); + Some(format!( + "{changed} of {total} pixels changed ({:.2}%); see {}", + ratio * 100.0, + diff_path.display() + )) +} + +/// Renders every surface of every theme in `src/themes`, in dark and light +/// mode, with the sample usage fixture, and compares it with +/// `tests/snapshots/themes//-.png`. +/// +/// Every render is also written to `target/theme-snapshots`, which CI uploads +/// as an artifact, so a theme pull request can be reviewed as pictures. +#[test] +fn themes_match_reference_snapshots() { + let root = manifest_dir(); + let themes = root.join("src/themes"); + let references = root.join("tests/snapshots/themes"); + let actual_root = root.join("target/theme-snapshots"); + let update = std::env::var(UPDATE_SNAPSHOTS).is_ok_and(|value| value == "1"); + let usage = parse_usage(SAMPLE_USAGE).unwrap(); + + let mut failures = Vec::new(); + let mut expected = BTreeSet::new(); + for theme_path in theme_files(&themes) { + let stem = theme_path + .file_stem() + .unwrap() + .to_string_lossy() + .to_string(); + let theme = load_theme(&theme_path) + .unwrap_or_else(|error| panic!("{} does not load: {error}", theme_path.display())); + for (index, surface) in theme.surfaces.iter().enumerate() { + for appearance in Appearance::BOTH { + let settings = RenderSettings { + appearance, + asset_root: Some(themes.clone()), + ..RenderSettings::default() + }; + let rendered = render_surface(&theme, index, &usage, &settings); + let relative = + Path::new(&stem).join(format!("{}-{}.png", surface.id, appearance.name())); + for warning in &rendered.warnings { + failures.push(format!("{}: warning: {warning}", relative.display())); + } + let image = to_rgba_image(&rendered); + let actual_path = actual_root.join(&relative); + std::fs::create_dir_all(actual_path.parent().unwrap()).unwrap(); + image.save(&actual_path).unwrap(); + expected.insert(relative.clone()); + + let reference_path = references.join(&relative); + if update { + std::fs::create_dir_all(reference_path.parent().unwrap()).unwrap(); + image.save(&reference_path).unwrap(); + continue; + } + let Ok(reference) = image::open(&reference_path) else { + failures.push(format!("{}: no reference image", relative.display())); + continue; + }; + let diff_path = actual_path.with_file_name(format!( + "{}-{}-diff.png", + surface.id, + appearance.name() + )); + if let Some(problem) = compare(&image, &reference.to_rgba8(), &diff_path) { + failures.push(format!("{}: {problem}", relative.display())); + } + } + } + } + for stale in reference_images(&references).difference(&expected) { + if update { + std::fs::remove_file(references.join(stale)).unwrap(); + } else { + failures.push(format!( + "{}: reference image has no matching theme surface", + stale.display() + )); + } + } + + assert!( + failures.is_empty(), + "theme snapshots differ:\n {}\n\nRenders are in {}. If the change is intended, \ + run `$env:{UPDATE_SNAPSHOTS}=1; cargo test --locked theme_render` (PowerShell) or \ + `{UPDATE_SNAPSHOTS}=1 cargo test --locked theme_render` (bash), check the new images \ + in tests/snapshots/themes, and commit them.", + failures.join("\n "), + actual_root.display() + ); +} + +#[test] +fn renders_are_reproducible() { + let usage = parse_usage(SAMPLE_USAGE).unwrap(); + let theme = bundled_theme("classic-usage-widget").unwrap().unwrap(); + let settings = RenderSettings::default(); + let first = render_surface(&theme, 0, &usage, &settings); + let second = render_surface(&theme, 0, &usage, &settings); + assert_eq!(first.pixels, second.pixels); + assert!(first.width > 1 && first.height > 1); +} + +#[test] +fn appearance_reaches_the_theme() { + let usage = parse_usage(SAMPLE_USAGE).unwrap(); + let theme = bundled_theme("classic-usage-widget").unwrap().unwrap(); + let dark = render_surface(&theme, 0, &usage, &RenderSettings::default()); + let light = render_surface( + &theme, + 0, + &usage, + &RenderSettings { + appearance: Appearance::Light, + ..RenderSettings::default() + }, + ); + assert_ne!(dark.pixels, light.pixels); +} + +#[test] +fn premultiplied_pixels_become_straight_alpha() { + let rendered = RenderedTheme { + width: 3, + height: 1, + pixels: vec![0x0000_0000, 0xFF10_2030, 0x8040_2000], + warnings: Vec::new(), + }; + let image = to_rgba_image(&rendered); + assert_eq!(image.get_pixel(0, 0).0, [0, 0, 0, 0]); + assert_eq!(image.get_pixel(1, 0).0, [0x10, 0x20, 0x30, 0xFF]); + assert_eq!(image.get_pixel(2, 0).0, [0x80, 0x40, 0x00, 0x80]); +} + +fn args(values: &[&str]) -> Vec { + std::iter::once("claude-code-usage-monitor") + .chain(values.iter().copied()) + .map(String::from) + .collect() +} + +#[test] +fn cli_is_ignored_without_the_flag() { + assert_eq!(handle_cli_mode(&args(&["--studio"])), None); +} + +#[test] +fn cli_arguments_parse_with_defaults() { + let request = parse_args(&args(&[ + "--render-theme", + "classic-usage-widget", + "--out", + "out", + ])) + .unwrap(); + assert_eq!(request.theme, "classic-usage-widget"); + assert_eq!(request.out, PathBuf::from("out")); + assert_eq!(request.appearances, Appearance::BOTH.to_vec()); + assert_eq!(request.surface, None); + assert_eq!(request.now_unix, DEFAULT_NOW_UNIX); + + let request = parse_args(&args(&[ + "--render-theme", + "theme.json", + "--out", + "widget.png", + "--surface", + "main", + "--appearance", + "light", + "--fixture", + "usage.json", + "--now", + "1700000000", + "--utc-offset", + "-300", + "--scale", + "2", + ])) + .unwrap(); + assert_eq!(request.surface.as_deref(), Some("main")); + assert_eq!(request.appearances, vec![Appearance::Light]); + assert_eq!(request.fixture, Some(PathBuf::from("usage.json"))); + assert_eq!(request.now_unix, 1_700_000_000); + assert_eq!(request.utc_offset_minutes, -300); + assert_eq!(request.scale, 2.0); +} + +#[test] +fn cli_rejects_bad_arguments() { + for bad in [ + &["--render-theme"][..], + &["--render-theme", "classic-usage-widget"], + &[ + "--render-theme", + "classic-usage-widget", + "--out", + "x", + "--appearance", + "dim", + ], + &[ + "--render-theme", + "classic-usage-widget", + "--out", + "x", + "--scale", + "9", + ], + &[ + "--render-theme", + "classic-usage-widget", + "--out", + "x", + "--utc-offset", + "2000", + ], + &[ + "--render-theme", + "classic-usage-widget", + "--out", + "x", + "--colour", + ], + ] { + assert!( + parse_args(&args(bad)).is_err(), + "{bad:?} should be rejected" + ); + } +} + +#[test] +fn cli_writes_one_png_per_surface_and_appearance() { + let folder = tempfile::tempdir().unwrap(); + let request = parse_args(&args(&[ + "--render-theme", + "stacked-rows", + "--out", + folder.path().to_str().unwrap(), + ])) + .unwrap(); + let written = run(&request).unwrap(); + let theme = bundled_theme("stacked-rows").unwrap().unwrap(); + assert_eq!(written.len(), theme.surfaces.len() * 2); + let first = image::open(&written[0]).unwrap(); + assert!(first.width() > 1); + assert!(written[0] + .file_name() + .unwrap() + .to_string_lossy() + .starts_with(&format!("{}-{}-dark", theme.id, theme.surfaces[0].id))); + + let single = folder.path().join("one.png"); + let request = RenderRequest { + out: single.clone(), + ..request + }; + assert!(run(&request).is_err(), "many images cannot go to one file"); + let request = RenderRequest { + surface: Some("0".into()), + appearances: vec![Appearance::Light], + ..request + }; + assert_eq!(run(&request).unwrap(), vec![single]); +} + +#[test] +fn unknown_theme_lists_the_built_in_ids() { + let error = load_requested_theme("no-such-theme").unwrap_err(); + assert!(error.contains("classic-usage-widget"), "{error}"); +} diff --git a/tests/fixtures/theme-usage.json b/tests/fixtures/theme-usage.json new file mode 100644 index 00000000..f3d5b07f --- /dev/null +++ b/tests/fixtures/theme-usage.json @@ -0,0 +1,42 @@ +{ + "claude_code": { + "session": { + "available": true, + "percentage": 42.0, + "resets_at": { "secs_since_epoch": 1800008100, "nanos_since_epoch": 0 } + }, + "weekly": { + "available": true, + "percentage": 63.0, + "resets_at": { "secs_since_epoch": 1800273600, "nanos_since_epoch": 0 } + }, + "limits": [ + { + "key": "weekly_scoped_fable", + "kind": "weekly_scoped", + "label": "Fable", + "model": "Fable", + "model_id": null, + "scope": { "model": { "display_name": "Fable" } }, + "is_active": true, + "usage": { + "available": true, + "percentage": 18.0, + "resets_at": { "secs_since_epoch": 1800273600, "nanos_since_epoch": 0 } + } + } + ] + }, + "codex": { + "session": { + "available": true, + "percentage": 12.0, + "resets_at": { "secs_since_epoch": 1800014400, "nanos_since_epoch": 0 } + }, + "weekly": { + "available": true, + "percentage": 71.0, + "resets_at": { "secs_since_epoch": 1800432000, "nanos_since_epoch": 0 } + } + } +} diff --git a/tests/snapshots/themes/classic-usage-widget/antigravity-tray-icon-dark.png b/tests/snapshots/themes/classic-usage-widget/antigravity-tray-icon-dark.png new file mode 100644 index 0000000000000000000000000000000000000000..2982c586fd4212a342138ce9e06a8ee89922f745 GIT binary patch literal 1193 zcmZvceM}o=9LEnRP-vht#F4P1yr&DeoEc0KDU^4|$S5d|EoxaZ4FW;bxKUop;Z*`< zu(~bG3`eUrG9sjn{(+OVl##(;l$0$ZH4ANdk&^M!D-CdMk9&Nsus=*p?s+c1{O}ucP5>n ze!F|hc>l|yE1KFD!$((Dm-5azt@3nA+_wAL@70a{?ddi1T7NSgWXou+r7?5xsOWk7 z^j;bg{S=6-Ctoy;y#<6@Gs6x2+yhObNSE$5Y?dwrTggn0QvNhR;M`sXBYaDr0C@!J zSitZ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pc}ffSV$0>ElY?@bB-+fa^khSdXRs#&eMC_F0AoRNUz?qZ z9>(hz;S5yj`o!*Zbk@sxjNz*asMEsAJP;=}_H3_C=O^M_qXTUopD?;GQZyU;NEf*# z7i`7L@JNpe48k@I<%sQZI(S%7+CaOIO+SlXE+vZYSf%`-plI-Qh>~a(=t@G-)eaxY z2A(wtZ)!C#9>)TzT2Aot?|zLzGf;4;6BBB%$kQ17e+L?+6Ei5$IidURUHxre0)B;& ONLx0>MOUofcls~M4JNz* literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/classic-usage-widget/claude-tray-icon-light.png b/tests/snapshots/themes/classic-usage-widget/claude-tray-icon-light.png new file mode 100644 index 0000000000000000000000000000000000000000..8fe6fac38d9c9c04eb77c4054783756c9065cc36 GIT binary patch literal 1770 zcma)-X;4#F6vt!TVZ^Ex1TC} zY>SJTxrov3TO~F5i7bU7 zN=QankJj7E=XrAjbVJGc+B~jzFDjgY3Lmp|5l z4md-l&p{nuPp+F#GK1a z)xf7Tu*M$TFc05D)y*F|(8V8!wKXpU3nTmC{lM#%)#zQW0-D%YKH$cKXXj|xiQ0?Q_R-6w{M70Bo^Vl57uyMtaLMnP>duVeNx>q)=Ocm4 z{;9)~njF1eW5O;?uQdlVnryhd;IieIPia0sO(Z@8Vc{Y%CDTf?Nz&d&g1_!g39Hj> zYICHuz4Pm}gpZ={sW$P?ZP5DOs8-yg-yt2N*%*R`QO^rwq+cqPBY9<3N%SE5I)wU* zdfZZ)Q<6S9m{5S9X#rcIxrNx`9;z*9p&(0@h^u)HnAV6d+TG`lHhNmQT1MNL$$Bvb zdQ)yy=ZPGvS0OT{nb;X|M;%6JkEzr9x*g4b4lUD<)%4wpuqdhpe6RtxaH9^f!1bKRWe+Uw$RH864N6B0R zoCPHf5VA%jz8?T?MCZ>y=O5W^K}NB+CJVCHDHLm5cj9S?-~*9wM8Q3=0Q1?2&hKs_ z?`;9k<7~@TknNjEZUcAHJ|Z&&*`RPJ2?^ciVlC+CZI^8bd4YQ|5IeyLthEP2zMV>b zs+>J0?DDp-b&Q#~W7c7&#?^K5=>;2-0x39VB)3k_PsO{48A+jAmt_DGiX-1n7a*Y@ zBcX(QUo0B6sEH1c0pv9_8*mf6tJK^#))wlMwAYC;8J(YytxtMl@*~13^dpZa(W`48 zwQN}HGE7L~tpJPj4{ERH(*gh+ z#Z~=0u{{fR2PXVd2M%!pc}ffSV$0>ElY?@bB-+fa^khSdXRs#&eMC_F0AoRNUz?qZ z9>(hz;S5yj`o!*Zbk@sxjNz*asMEsAJP;=}_H3_C=O^M_qXTUopD?;GQZyU;NEf*# z7i`7L@JNpe48k@I<%sQZI(S%7+CaOIO+SlXE+vZYSf%`-plI-Qh>~a(=t@G-)eaxY z2A(wtZ)!C#9>)TzT2Aot?|zLzGf;4;6BBB%$kQ17e+L?+6Ei5$IidURUHxre0)B;& ONLx0>MOUofcls~M4JNz* literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/classic-usage-widget/codex-tray-icon-dark.png b/tests/snapshots/themes/classic-usage-widget/codex-tray-icon-dark.png new file mode 100644 index 0000000000000000000000000000000000000000..904f3382d9ba91ebe80119cd4025b7030edad59b GIT binary patch literal 1002 zcmaJ=e@t6d6n-#5%OGz`oW(yQ-~iVcmP}>$|>({%K6^z2}~D z&&_wgbHCGhpjKA6amPjof(qrYN#CSx6*JlS^m^^YX&(e_7?Ml(9n|MUZ*CYUd#l%- z0J>P$SL9agF4mW=T6!LzWLDF+Yd$bM&h0k~jM#k~)dF;jKLI6a7Hy zyi0$<<=>wuMia%Occw=l0iA>7b63QMPvEZdiirG5rKvB|FVc0db5bYGG@y~3fW=Ow zBP7{w1!eG>3?7fnI1K}QkmQHY876c_nJ-x3Yp-klwl0XWziF^XmZy418J=na&AwCv z*2_xIsmGP2{P52J!1nMK8qP$OE^0i4yFR%e3fPF?V-&>%+RXP&OGMAPYs5?y?Vn;9}L*i74je2`?NuOVq(<9Cs#civwb z(HPywjrm}QOeQ1eE!iiyt1oeH!@GIF>0Z$Y)3wU5NLeuoDu8PoA5y{`Tf(2BTmdCtN znlYJ1z+UE(u!Z>#fk2>dbYX2GaDfSR+Vll>hf|V`ko@Wu?EV&uKF{mj=D?*?(dWsg zwEwSU77^8>YZRN~|fHMn?SpYhwgoe=^J?H3WfSWS^)wA|CU_Wb~I)8Ut SwTSLvNWQ;TdcFGS*}nni+dohM literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/classic-usage-widget/codex-tray-icon-light.png b/tests/snapshots/themes/classic-usage-widget/codex-tray-icon-light.png new file mode 100644 index 0000000000000000000000000000000000000000..904f3382d9ba91ebe80119cd4025b7030edad59b GIT binary patch literal 1002 zcmaJ=e@t6d6n-#5%OGz`oW(yQ-~iVcmP}>$|>({%K6^z2}~D z&&_wgbHCGhpjKA6amPjof(qrYN#CSx6*JlS^m^^YX&(e_7?Ml(9n|MUZ*CYUd#l%- z0J>P$SL9agF4mW=T6!LzWLDF+Yd$bM&h0k~jM#k~)dF;jKLI6a7Hy zyi0$<<=>wuMia%Occw=l0iA>7b63QMPvEZdiirG5rKvB|FVc0db5bYGG@y~3fW=Ow zBP7{w1!eG>3?7fnI1K}QkmQHY876c_nJ-x3Yp-klwl0XWziF^XmZy418J=na&AwCv z*2_xIsmGP2{P52J!1nMK8qP$OE^0i4yFR%e3fPF?V-&>%+RXP&OGMAPYs5?y?Vn;9}L*i74je2`?NuOVq(<9Cs#civwb z(HPywjrm}QOeQ1eE!iiyt1oeH!@GIF>0Z$Y)3wU5NLeuoDu8PoA5y{`Tf(2BTmdCtN znlYJ1z+UE(u!Z>#fk2>dbYX2GaDfSR+Vll>hf|V`ko@Wu?EV&uKF{mj=D?*?(dWsg zwEwSU77^8>YZRN~|fHMn?SpYhwgoe=^J?H3WfSWS^)wA|CU_Wb~I)8Ut SwTSLvNWQ;TdcFGS*}nni+dohM literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/classic-usage-widget/copilot-tray-icon-dark.png b/tests/snapshots/themes/classic-usage-widget/cop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>(3*ppSGF_EH%Fqp-d3MN@sWm?yv^sG? z{<0;78qo(#u6A0o|4Qzmt8=+os6_8LTBszK8>pZVf?qt}t#h^uSLBj3aI==DbbqY0 zC94RH_$9R2LU-&HZ%7)5+hVbMa`P5y8hvQR_p7lMA*y+6bY%%U;%b5oqqsE@S-w)w z-zOv%e!GA)?Zzvd`~}_uAkicu5wF~H%SshRkKV9%e{cb`F!qdxJmC% z6Q*%0BAw);V>gSUyW7D09ek)BpjNkN^$^&nciR26Iuo$>;k(sXc`hvSR!G*@f^bh( zG=jK)NTeb%Nd820sMZVv;u=Vm#VThlrNcPWAFK=kjeDO(3DQZPLyqOw1wF{_dE_hF z!|0?V?}yM$?G$hAH+(iSV{TuRGco(Gzh;YkrgDqm(z8eg-Q|xE=87D;ajC{{vmJuvU z(XI!DAe*NuDE@U9Y-JwCNZnA}qD|~QZ|daeFK}Pfgq3Z1LwE5S6}m|00CJG@vPVe2 zzM#q8WV8Wn-3B{M9{M~d{@<`Z436NBm*JCg=u-t}!UozrkU<4-LmJeD`=FdN8UU|f fTCIQj3GmzF2|w8_{ifXe5kX1srY3Z}bEfQHI*zam literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/classic-usage-widget/grok-tray-icon-light.png b/tests/snapshots/themes/classic-usage-widget/grok-tray-icon-light.png new file mode 100644 index 0000000000000000000000000000000000000000..13125b43ce44211dcb1c4637dec87ca9dfc88ac6 GIT binary patch literal 1199 zcmai!ZA?>F7{@OvEfcVbQ*lmu6WL&c4~;PGW`WBF8!`wlO4d19>*5?iq(#{1EoHq3 z*%$+?z$(Fx7DEP1H=1k%=7e4vUaCw+W^kYdicks!DSZ*R7jExaui3YKFgY(d$#e3Y z=l}fvr!qY?F>vRBoe%^CCLK>W;oaky>BsV}H*zjcL(q<*q=dIKQJ*A zXe@*PH8X(!yhDo%exkN0hx)}o&J6^9H8<|-$(odY*f^!AtCAg|?c;3PCS=i?43gs- zmLhYV7KPDPIpe#uFnf(1)FID*oS}c@-h?NJa`+>s2{G947t{b+-C8q8ThAS%J1>ic z=&!1WR^kgI5A)OkRwmsPOPFQ9I}fWdl~B>(3*ppSGF_EH%Fqp-d3MN@sWm?yv^sG? z{<0;78qo(#u6A0o|4Qzmt8=+os6_8LTBszK8>pZVf?qt}t#h^uSLBj3aI==DbbqY0 zC94RH_$9R2LU-&HZ%7)5+hVbMa`P5y8hvQR_p7lMA*y+6bY%%U;%b5oqqsE@S-w)w z-zOv%e!GA)?Zzvd`~}_uAkicu5wF~H%SshRkKV9%e{cb`F!qdxJmC% z6Q*%0BAw);V>gSUyW7D09ek)BpjNkN^$^&nciR26Iuo$>;k(sXc`hvSR!G*@f^bh( zG=jK)NTeb%Nd820sMZVv;u=Vm#VThlrNcPWAFK=kjeDO(3DQZPLyqOw1wF{_dE_hF z!|0?V?}yM$?G$hAH+(iSV{TuRGco(Gzh;YkrgDqm(z8eg-Q|xE=87D;ajC{{vmJuvU z(XI!DAe*NuDE@U9Y-JwCNZnA}qD|~QZ|daeFK}Pfgq3Z1LwE5S6}m|00CJG@vPVe2 zzM#q8WV8Wn-3B{M9{M~d{@<`Z436NBm*JCg=u-t}!UozrkU<4-LmJeD`=FdN8UU|f fTCIQj3GmzF2|w8_{ifXe5kX1srY3Z}bEfQHI*zam literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/classic-usage-widget/main-dark.png b/tests/snapshots/themes/classic-usage-widget/main-dark.png new file mode 100644 index 0000000000000000000000000000000000000000..a20659fb66839d91c5f923b559ba2b23cf001905 GIT binary patch literal 6263 zcmb_h3sh5Ax(*;jrNX5?Vn-lVe2i8}ty6*~O|(@hKI&AZu`Lp7s%Q-a5J`CDAdZ4k ziG?b)C~1pA1r?D>LK4P@8H)Z=QdT9yt8V-xIIPmRa#jNo(^nc8p2ubT-A}&k~ppISQd!Nce>vjc3T*`P<4rMaI#nZ^Y+GZQ%?28$a~16<(sofxpMsy-q1=r#v#F5NyhoQ-R)G~d>S%O`I!*@f*u#F76@%-D*ay^tPwr;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A8b8p~ zPi#QC3#G;E2IplY(w~5jx*p)&I`3;#(0W3i`)4BZq0H@)nVH${iJp9~EI(WX1jaTD z!(gn4BvEp4fd2WBRNEkm@5*^vs&=T59VU zg`x;nPMJP0k0M9lW+vv8k(WsZ7ndtKQ&?t7Va3R3Ey4f`?d~+F?T3~kge$|Y$U2Pkn~g0+J^0rW zE##@u^@(m+z!Z;e^zm_x4L#b2K24Jn=eA5T%XPLttV@-)YFy(#&}Hf+77NXdOM3Dy zDV#@g8XtD>TA8k^HR55>eVS;WOSC2R#ILxViwo)r>pFxhzV4YtCgyghX@+Oi(JQ2I zJt5dS$&_fTy4{1GkNL!uqkq?wFCr{VK- z$PA(|0xSY4Z+cZQLj};86daC&<21XfqX$w5&Ey`9B1NL5d-f;WovypfbX9DsbwDF= zRT=#=>OA+OU(}zQB+;s+SR@r5O`cIZRrJQd++eV>R(idVZN1kiIs;Z|4Aeb@>sz6V z!RL*2UYR0JGIq=4f<{_1@|W@2&~8fLhr!zifk^X?cBX5I-LZm9#81ib#r{SZ09O+< z8gg7MgiK7=R!#04$#|&#wy|?>^s`SDaa8|ZlhdByusb*!u+EPJzjt60;l?j$@B{Qt z*;c_qP)7P#L;A{yg`V$xut+UDc+7&yoIdXRk3X*b;PVlG3`h#{cHOX&%b8(mnc z1z$?J-iBK(po5oX6u=h*whf)pKc>RgYNyXCq%Je;uJ-dE1ZwwVYk5w^&LOp(3KOlO7=1)i+Yujk^ESbLJ^AaD8avDv@T-KLU+~kaN)}PZC-pI~- z@^@8DSaDSUM1-S+#=$REunflP;AXzhIvHXrp6Y9d+d%C9o%KI98yeL_t8OQ4#ybUu zw^)bv*#o;sa20BDJ3*&=RugUO_P~7@Xo+zYoQfHP0^?0Z)ivL&IZOXV0#>g`PPp{d GcGW*@q{kHi literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/classic-usage-widget/opencode-tray-icon-light.png b/tests/snapshots/themes/classic-usage-widget/opencode-tray-icon-light.png new file mode 100644 index 0000000000000000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Is;Z|4Aeb@>sz6V z!RL*2UYR0JGIq=4f<{_1@|W@2&~8fLhr!zifk^X?cBX5I-LZm9#81ib#r{SZ09O+< z8gg7MgiK7=R!#04$#|&#wy|?>^s`SDaa8|ZlhdByusb*!u+EPJzjt60;l?j$@B{Qt z*;c_qP)7P#L;A{yg`V$xut+UDc+7&yoIdXRk3X*b;PVlG3`h#{cHOX&%b8(mnc z1z$?J-iBK(po5oX6u=h*whf)pKc>RgYNyXCq%Je;uJ-dE1ZwwVYk5w^&LOp(3KOlO7=1)i+Yujk^ESbLJ^AaD8avDv@T-KLU+~kaN)}PZC-pI~- z@^@8DSaDSUM1-S+#=$REunflP;AXzhIvHXrp6Y9d+d%C9o%KI98yeL_t8OQ4#ybUu zw^)bv*#o;sa20BDJ3*&=RugUO_P~7@Xo+zYoQfHP0^?0Z)ivL&IZOXV0#>g`PPp{d GcGW*@q{kHi literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/classic-vertical/antigravity-tray-icon-dark.png b/tests/snapshots/themes/classic-vertical/antigravity-tray-icon-dark.png new file mode 100644 index 0000000000000000000000000000000000000000..2982c586fd4212a342138ce9e06a8ee89922f745 GIT binary patch literal 1193 zcmZvceM}o=9LEnRP-vht#F4P1yr&DeoEc0KDU^4|$S5d|EoxaZ4FW;bxKUop;Z*`< zu(~bG3`eUrG9sjn{(+OVl##(;l$0$ZH4ANdk&^M!D-CdMk9&Nsus=*p?s+c1{O}ucP5>n ze!F|hc>l|yE1KFD!$((Dm-5azt@3nA+_wAL@70a{?ddi1T7NSgWXou+r7?5xsOWk7 z^j;bg{S=6-Ctoy;y#<6@Gs6x2+yhObNSE$5Y?dwrTggn0QvNhR;M`sXBYaDr0C@!J zSitZa1qujo;y*fmyG2KZ~vnf#~lk>dOgNof~7NOewgjXhMxuABNqc8p%HS2QqqwgO!er6gM51um&U=ug1uH%2f? zagyT4lcF8ylrc;RoSN0Iq3{kRcW>7)ruj3 zaPV2P)u9l~?H|xn)u|>^P38!p>aYn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+SlXE+vZYSf%`-plI-Qh>~a(=t@G-)eaxY z2A(wtZ)!C#9>)TzT2Aot?|zLzGf;4;6BBB%$kQ17e+L?+6Ei5$IidURUHxre0)B;& ONLx0>MOUofcls~M4JNz* literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/classic-vertical/claude-tray-icon-light.png b/tests/snapshots/themes/classic-vertical/claude-tray-icon-light.png new file mode 100644 index 0000000000000000000000000000000000000000..8fe6fac38d9c9c04eb77c4054783756c9065cc36 GIT binary patch literal 1770 zcma)-X;4#F6vt!TVZ^Ex1TC} zY>SJTxrov3TO~F5i7bU7 zN=QankJj7E=XrAjbVJGc+B~jzFDjgY3Lmp|5l z4md-l&p{nuPp+F#GK1a z)xf7Tu*M$TFc05D)y*F|(8V8!wKXpU3nTmC{lM#%)#zQW0-D%YKH$cKXXj|xiQ0?Q_R-6w{M70Bo^Vl57uyMtaLMnP>duVeNx>q)=Ocm4 z{;9)~njF1eW5O;?uQdlVnryhd;IieIPia0sO(Z@8Vc{Y%CDTf?Nz&d&g1_!g39Hj> zYICHuz4Pm}gpZ={sW$P?ZP5DOs8-yg-yt2N*%*R`QO^rwq+cqPBY9<3N%SE5I)wU* zdfZZ)Q<6S9m{5S9X#rcIxrNx`9;z*9p&(0@h^u)HnAV6d+TG`lHhNmQT1MNL$$Bvb zdQ)yy=ZPGvS0OT{nb;X|M;%6JkEzr9x*g4b4lUD<)%4wpuqdhpe6RtxaH9^f!1bKRWe+Uw$RH864N6B0R zoCPHf5VA%jz8?T?MCZ>y=O5W^K}NB+CJVCHDHLm5cj9S?-~*9wM8Q3=0Q1?2&hKs_ z?`;9k<7~@TknNjEZUcAHJ|Z&&*`RPJ2?^ciVlC+CZI^8bd4YQ|5IeyLthEP2zMV>b zs+>J0?DDp-b&Q#~W7c7&#?^K5=>;2-0x39VB)3k_PsO{48A+jAmt_DGiX-1n7a*Y@ zBcX(QUo0B6sEH1c0pv9_8*mf6tJK^#))wlMwAYC;8J(YytxtMl@*~13^dpZa(W`48 zwQN}HGE7L~tpJPj4{ERH(*gh+ z#Z~=0u{{fR2PXVd2M%!pc}ffSV$0>ElY?@bB-+fa^khSdXRs#&eMC_F0AoRNUz?qZ z9>(hz;S5yj`o!*Zbk@sxjNz*asMEsAJP;=}_H3_C=O^M_qXTUopD?;GQZyU;NEf*# z7i`7L@JNpe48k@I<%sQZI(S%7+CaOIO+SlXE+vZYSf%`-plI-Qh>~a(=t@G-)eaxY z2A(wtZ)!C#9>)TzT2Aot?|zLzGf;4;6BBB%$kQ17e+L?+6Ei5$IidURUHxre0)B;& ONLx0>MOUofcls~M4JNz* literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/classic-vertical/codex-tray-icon-dark.png b/tests/snapshots/themes/classic-vertical/codex-tray-icon-dark.png new file mode 100644 index 0000000000000000000000000000000000000000..904f3382d9ba91ebe80119cd4025b7030edad59b GIT binary patch literal 1002 zcmaJ=e@t6d6n-#5%OGz`oW(yQ-~iVcmP}>$|>({%K6^z2}~D z&&_wgbHCGhpjKA6amPjof(qrYN#CSx6*JlS^m^^YX&(e_7?Ml(9n|MUZ*CYUd#l%- z0J>P$SL9agF4mW=T6!LzWLDF+Yd$bM&h0k~jM#k~)dF;jKLI6a7Hy zyi0$<<=>wuMia%Occw=l0iA>7b63QMPvEZdiirG5rKvB|FVc0db5bYGG@y~3fW=Ow zBP7{w1!eG>3?7fnI1K}QkmQHY876c_nJ-x3Yp-klwl0XWziF^XmZy418J=na&AwCv z*2_xIsmGP2{P52J!1nMK8qP$OE^0i4yFR%e3fPF?V-&>%+RXP&OGMAPYs5?y?Vn;9}L*i74je2`?NuOVq(<9Cs#civwb z(HPywjrm}QOeQ1eE!iiyt1oeH!@GIF>0Z$Y)3wU5NLeuoDu8PoA5y{`Tf(2BTmdCtN znlYJ1z+UE(u!Z>#fk2>dbYX2GaDfSR+Vll>hf|V`ko@Wu?EV&uKF{mj=D?*?(dWsg zwEwSU77^8>YZRN~|fHMn?SpYhwgoe=^J?H3WfSWS^)wA|CU_Wb~I)8Ut SwTSLvNWQ;TdcFGS*}nni+dohM literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/classic-vertical/codex-tray-icon-light.png b/tests/snapshots/themes/classic-vertical/codex-tray-icon-light.png new file mode 100644 index 0000000000000000000000000000000000000000..904f3382d9ba91ebe80119cd4025b7030edad59b GIT binary patch literal 1002 zcmaJ=e@t6d6n-#5%OGz`oW(yQ-~iVcmP}>$|>({%K6^z2}~D z&&_wgbHCGhpjKA6amPjof(qrYN#CSx6*JlS^m^^YX&(e_7?Ml(9n|MUZ*CYUd#l%- z0J>P$SL9agF4mW=T6!LzWLDF+Yd$bM&h0k~jM#k~)dF;jKLI6a7Hy zyi0$<<=>wuMia%Occw=l0iA>7b63QMPvEZdiirG5rKvB|FVc0db5bYGG@y~3fW=Ow zBP7{w1!eG>3?7fnI1K}QkmQHY876c_nJ-x3Yp-klwl0XWziF^XmZy418J=na&AwCv z*2_xIsmGP2{P52J!1nMK8qP$OE^0i4yFR%e3fPF?V-&>%+RXP&OGMAPYs5?y?Vn;9}L*i74je2`?NuOVq(<9Cs#civwb z(HPywjrm}QOeQ1eE!iiyt1oeH!@GIF>0Z$Y)3wU5NLeuoDu8PoA5y{`Tf(2BTmdCtN znlYJ1z+UE(u!Z>#fk2>dbYX2GaDfSR+Vll>hf|V`ko@Wu?EV&uKF{mj=D?*?(dWsg zwEwSU77^8>YZRN~|fHMn?SpYhwgoe=^J?H3WfSWS^)wA|CU_Wb~I)8Ut SwTSLvNWQ;TdcFGS*}nni+dohM literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/classic-vertical/copilot-tray-icon-dark.png b/tests/snapshots/themes/classic-vertical/copilot-tray-icon-dark.png new file mode 100644 index 0000000000000000000000000000000000000000..f3cbac985cb837f0e3d9bbe2a00448ef4322fda1 GIT binary patch literal 1506 zcmah}eN<9s7{^HQROqaos4O|TI=Ho@<~e>$^4gS~xoKN%u91?OxiY1+1X8(WS&~|( z$ghI~r|V;N(s?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S-w)w z-zOv%e!GA)?Zzvd`~}_uAkicu5wF~H%SshRkKV9%e{cb`F!qdxJmC% z6Q*%0BAw);V>gSUyW7D09ek)BpjNkN^$^&nciR26Iuo$>;k(sXc`hvSR!G*@f^bh( zG=jK)NTeb%Nd820sMZVv;u=Vm#VThlrNcPWAFK=kjeDO(3DQZPLyqOw1wF{_dE_hF z!|0?V?}yM$?G$hAH+(iSV{TuRGco(Gzh;YkrgDqm(z8eg-Q|xE=87D;ajC{{vmJuvU z(XI!DAe*NuDE@U9Y-JwCNZnA}qD|~QZ|daeFK}Pfgq3Z1LwE5S6}m|00CJG@vPVe2 zzM#q8WV8Wn-3B{M9{M~d{@<`Z436NBm*JCg=u-t}!UozrkU<4-LmJeD`=FdN8UU|f fTCIQj3GmzF2|w8_{ifXe5kX1srY3Z}bEfQHI*zam literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/classic-vertical/grok-tray-icon-light.png b/tests/snapshots/themes/classic-vertical/grok-tray-icon-light.png new file mode 100644 index 0000000000000000000000000000000000000000..13125b43ce44211dcb1c4637dec87ca9dfc88ac6 GIT binary patch literal 1199 zcmai!ZA?>F7{@OvEfcVbQ*lmu6WL&c4~;PGW`WBF8!`wlO4d19>*5?iq(#{1EoHq3 z*%$+?z$(Fx7DEP1H=1k%=7e4vUaCw+W^kYdicks!DSZ*R7jExaui3YKFgY(d$#e3Y z=l}fvr!qY?F>vRBoe%^CCLK>W;oaky>BsV}H*zjcL(q<*q=dIKQJ*A zXe@*PH8X(!yhDo%exkN0hx)}o&J6^9H8<|-$(odY*f^!AtCAg|?c;3PCS=i?43gs- zmLhYV7KPDPIpe#uFnf(1)FID*oS}c@-h?NJa`+>s2{G947t{b+-C8q8ThAS%J1>ic z=&!1WR^kgI5A)OkRwmsPOPFQ9I}fWdl~B>(3*ppSGF_EH%Fqp-d3MN@sWm?yv^sG? z{<0;78qo(#u6A0o|4Qzmt8=+os6_8LTBszK8>pZVf?qt}t#h^uSLBj3aI==DbbqY0 zC94RH_$9R2LU-&HZ%7)5+hVbMa`P5y8hvQR_p7lMA*y+6bY%%U;%b5oqqsE@S-w)w z-zOv%e!GA)?Zzvd`~}_uAkicu5wF~H%SshRkKV9%e{cb`F!qdxJmC% z6Q*%0BAw);V>gSUyW7D09ek)BpjNkN^$^&nciR26Iuo$>;k(sXc`hvSR!G*@f^bh( zG=jK)NTeb%Nd820sMZVv;u=Vm#VThlrNcPWAFK=kjeDO(3DQZPLyqOw1wF{_dE_hF z!|0?V?}yM$?G$hAH+(iSV{TuRGco(Gzh;YkrgDqm(z8eg-Q|xE=87D;ajC{{vmJuvU z(XI!DAe*NuDE@U9Y-JwCNZnA}qD|~QZ|daeFK}Pfgq3Z1LwE5S6}m|00CJG@vPVe2 zzM#q8WV8Wn-3B{M9{M~d{@<`Z436NBm*JCg=u-t}!UozrkU<4-LmJeD`=FdN8UU|f fTCIQj3GmzF2|w8_{ifXe5kX1srY3Z}bEfQHI*zam literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/classic-vertical/main-dark.png b/tests/snapshots/themes/classic-vertical/main-dark.png new file mode 100644 index 0000000000000000000000000000000000000000..a74a58dd2fb8248a4affc0e874393aa46b569cdd GIT binary patch literal 3555 zcma)94Ny~87Je}*{#3H5wbDX}0+lUV7-R}ckgOF8C`y&Ow89eCsAvsDi#6f*A$A5R zN))A-iA&m|=#*MeFoFgW%1;2nNNm|aFbSaiSY!S$B;@72y)THXo$budgmCYhch5QZ zobP&y@l!5ACnbL8^ZB>! zMvU|9bVv7zzGB0~_Io825#>845aWY)cu^&wO^Sx?DA9cf%BKVPv8~%!IE$x?wRdpAV zHjlS?K5wHV{ZOp+5@*`-rj5e0{y?=?_+~3;j;liyDQ5wCA~{3h+xUR@u9}b)S)W-N znKeNgY?e@(CFh>XDy@M@xy~oXs{yuN0rmNNbg#EGy?Zm3CFS~NnP`nfX+_hc$hV#) z&8uIiT_{Ah>-S6?a3b{m@)qc@$ci!Ot;dub3|ptrkxH9Mm$sB}3R~G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HQ~}hKwO_!7#Ym>ktoa2D{|QRx0SDK{6RW&zD@}OV&)#thYA3 zI;!kQ_h;Ldvh7pv*!ChM^9))fI}WE{VDvGgdC3)~#I>e2E4}jkjh-|wuK!sh386mN ntr}au^5qYzS&U$X@Z1shq8}>mt!08AZ&38+?GZnJv?uRBpA52D literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/classic-vertical/main-light.png b/tests/snapshots/themes/classic-vertical/main-light.png new file mode 100644 index 0000000000000000000000000000000000000000..2cc90ff5cab29340f16d904bb0e22c7fa7a8b3a1 GIT binary patch literal 3703 zcmbtX4OA0X7ETNmwUo$Oe<+41Vy)Dg1w5h~$VkxxD3mI-tXK&vbyEu(-BuHRl1ZiA zXt6{Tb*tOpsfbpJ6j?wiWP%_Fs8nbp7|aZWA6bYQLI{%(GW%w*?QYL@&z{|L_?yR@ zcklb|cfarE*qd)ezA)#dISdBlh3Ke_+rV!D_*TrC34X>iAB8g*o`UF&;crQqCN1lN z|Bf?_qom~NXLs&i{?nF}Yy0$-&%X8^SD)EjstyYFdul&i^?pW?lArnmk06g>k3FQhckJ!k{ZLnLn zTX$YhLSFj(^+_Z1QlXh zunt82S=fI{KDknYiz9KfzceiXKE4p6SF&!I1@?hB;_-^-t(>6JThHT{O2=^tgZLPg zT@P{w{3e8%MJMK=nxvLapn-S!7IQ>D+KjJTpX5OVs#UynlM;RLD`>|48LXORJjG(( znHDaKC`9Eg9HH%;%9-+RpEM8`$+}Vnz2(21HMNKoxRFUMLMCE9TdS)VeloZ$$bed! zXFe8kXjm=)oYB`Hlko+c;el z`Sg?_59T(&3SMT35}BjpvG|M&ZDkfNi2EuTu2WfJ&Y%Z1y$QPDsUSQ+%h5th;QMK} zp|3@bJ=k_d*fITQP;zB2cl!T~GwA4aRS-_^FKYdZ!h5n|qFz$8clsE;*ki7jdBS=b znwqjN41E&L&X^yKzMU#dQ5;-MMzzOkxj!VL(#1^+Pgz?Tl_=reCT-+~5p`@=S~Q7M z?==xs%ZQ0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B7PW1%t%VcTO&KWp@*5U|1K0 z3q}|})Q25gz+udV4i8RrJ96nmSG8JOwZ)5U3jHTg@`Gyl_h*LAew4t}W<=gH zFB!YR*G%ZzG(%xPLKdiMsfdv-+1#IG@Mn?%O`Lw%YL`ffdafoowu8qioiWlSPf;9| zA{3|1Z3sr$kZQA|jOMtF7M%anPm|neN9w0eUXGQ8cC3lz&8#t&R2c%WT-_s|O%0PE z2jJ&5Ex3mG}eu>x#dTEbJltCMqwv0A~d%=(Y zXLHSYLTNX@(~wS|__>`DYhr8k%>CS^Q57YVLSU!9)&Qs8%gLve1lXyx@gA_ZVucXM zTnf{F>hIG^PK${1;KuHT92!TFUakc4IL={G=H`3=uAK4paCHK6f8}c!XCHEKV-1%) z>_$dRn>r<>z@*cFNZVBrxOsYln9c*JWg7NEYKgEJ$uliv35I_ZoJk5=(KF}% zZ}g_7Kd#1viu!U!-$`TTpTJ%crCso^puHTeJ%4et>1VIrHz`fV1$N^I~qfk6Y?Qeshe#a;2Qul zVE(ipT`A;dIzZ`DXufO$gH5O0C<5aPOic@v>(@UcMlP^o0H&i$3vNx@5O$mLr0zNd z`=xgp*BL-!5W!XG(~AJn?`EZ3n;zk!s)s0{7L9=!8`4sf4DivUOFBmvgGv&9QR=Rj zbh_M=rcI+`O)c=w@&d~Hm`&5S(eBOT^$W1s-cJtw*+|?jy$p<}ue1(M8KULBQvrqWtUkKJb&S&KqSrxgCl6 k!Szdj`jGdthrw<({!2Z}Grg7I10^GR(;FMFy`FsJAMU{mBLDyZ literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/classic-vertical/opencode-tray-icon-dark.png b/tests/snapshots/themes/classic-vertical/opencode-tray-icon-dark.png new file mode 100644 index 0000000000000000000000000000000000000000..00f77a5e33c6d974e5efbacda43b99a9645925ce GIT binary patch literal 1644 zcmZ8i2~ZPP7>0sG&1j@fo3=qWN-b^GhBnitZGb>QQBmT>P<2Q=W=g#XLTkd6)i9lC zQ4{S5gD9bO3bl-;iWPw+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$@B{Qt z*;c_qP)7P#L;A{yg`V$xut+UDc+7&yoIdXRk3X*b;PVlG3`h#{cHOX&%b8(mnc z1z$?J-iBK(po5oX6u=h*whf)pKc>RgYNyXCq%Je;uJ-dE1ZwwVYk5w^&LOp(3KOlO7=1)i+Yujk^ESbLJ^AaD8avDv@T-KLU+~kaN)}PZC-pI~- z@^@8DSaDSUM1-S+#=$REunflP;AXzhIvHXrp6Y9d+d%C9o%KI98yeL_t8OQ4#ybUu zw^)bv*#o;sa20BDJ3*&=RugUO_P~7@Xo+zYoQfHP0^?0Z)ivL&IZOXV0#>g`PPp{d GcGW*@q{kHi literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/classic-vertical/opencode-tray-icon-light.png b/tests/snapshots/themes/classic-vertical/opencode-tray-icon-light.png new file mode 100644 index 0000000000000000000000000000000000000000..00f77a5e33c6d974e5efbacda43b99a9645925ce GIT binary patch literal 1644 zcmZ8i2~ZPP7>0sG&1j@fo3=qWN-b^GhBnitZGb>QQBmT>P<2Q=W=g#XLTkd6)i9lC zQ4{S5gD9bO3bl-;iWPw+0TBa6OuYsx$8sbfa^zSryJWMko7mB5XZG#xd;8D-|L=R> z_wCX3$%%7jzcV`^AYjhwRS6sEXRL3`459D8?>^8Q5D>y&oe;NK5jfryRPpYX;#*E2 zpE%xjrz$IH*QNbk*Z#eBA1g0jqc8u2zj%T;Si2{;QZ3y3NdMYnDx@#^(0&Sj%rJ=W ztJ|Lo0-)PKjK1HM*Yp_>jhnCKRLZ@@ZYwlFGALf&WsdY1L{`{srN2criMk0EDRr~t zR1hoH0XWS-77UD`Bv|=!vVq_^hImtz$gOZ`VVSu1<}XsmUwl@7UG(_agSyPj!|7+? z5Tg@E2Uz8#nq)9wb1bQOa^>hx%5(Apn|w$#>onMoI%Ck= zW|7r~YqIF1y2(miQ&JDPG5@}%U^Zx;Nd*;{Jo!s`KwB~>YT+1fa$F1S*hP{Nj1iaA8b8p~ zPi#QC3#G;E2IplY(w~5jx*p)&I`3;#(0W3i`)4BZq0H@)nVH${iJp9~EI(WX1jaTD z!(gn4BvEp4fd2WBRNEkm@5*^vs&=T59VU zg`x;nPMJP0k0M9lW+vv8k(WsZ7ndtKQ&?t7Va3R3Ey4f`?d~+F?T3~kge$|Y$U2Pkn~g0+J^0rW zE##@u^@(m+z!Z;e^zm_x4L#b2K24Jn=eA5T%XPLttV@-)YFy(#&}Hf+77NXdOM3Dy zDV#@g8XtD>TA8k^HR55>eVS;WOSC2R#ILxViwo)r>pFxhzV4YtCgyghX@+Oi(JQ2I zJt5dS$&_fTy4{1GkNL!uqkq?wFCr{VK- z$PA(|0xSY4Z+cZQLj};86daC&<21XfqX$w5&Ey`9B1NL5d-f;WovypfbX9DsbwDF= zRT=#=>OA+OU(}zQB+;s+SR@r5O`cIZRrJQd++eV>R(idVZN1kiIs;Z|4Aeb@>sz6V z!RL*2UYR0JGIq=4f<{_1@|W@2&~8fLhr!zifk^X?cBX5I-LZm9#81ib#r{SZ09O+< z8gg7MgiK7=R!#04$#|&#wy|?>^s`SDaa8|ZlhdByusb*!u+EPJzjt60;l?j$@B{Qt z*;c_qP)7P#L;A{yg`V$xut+UDc+7&yoIdXRk3X*b;PVlG3`h#{cHOX&%b8(mnc z1z$?J-iBK(po5oX6u=h*whf)pKc>RgYNyXCq%Je;uJ-dE1ZwwVYk5w^&LOp(3KOlO7=1)i+Yujk^ESbLJ^AaD8avDv@T-KLU+~kaN)}PZC-pI~- z@^@8DSaDSUM1-S+#=$REunflP;AXzhIvHXrp6Y9d+d%C9o%KI98yeL_t8OQ4#ybUu zw^)bv*#o;sa20BDJ3*&=RugUO_P~7@Xo+zYoQfHP0^?0Z)ivL&IZOXV0#>g`PPp{d GcGW*@q{kHi literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/compact-fluent-quad/antigravity-tray-icon-dark.png b/tests/snapshots/themes/compact-fluent-quad/antigravity-tray-icon-dark.png new file mode 100644 index 0000000000000000000000000000000000000000..2982c586fd4212a342138ce9e06a8ee89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NB+CJVCHDHLm5cj9S?-~*9wM8Q3=0Q1?2&hKs_ z?`;9k<7~@TknNjEZUcAHJ|Z&&*`RPJ2?^ciVlC+CZI^8bd4YQ|5IeyLthEP2zMV>b zs+>J0?DDp-b&Q#~W7c7&#?^K5=>;2-0x39VB)3k_PsO{48A+jAmt_DGiX-1n7a*Y@ zBcX(QUo0B6sEH1c0pv9_8*mf6tJK^#))wlMwAYC;8J(YytxtMl@*~13^dpZa(W`48 zwQN}HGE7L~tpJPj4{ERH(*gh+ z#Z~=0u{{fR2PXVd2M%!pc}ffSV$0>ElY?@bB-+fa^khSdXRs#&eMC_F0AoRNUz?qZ z9>(hz;S5yj`o!*Zbk@sxjNz*asMEsAJP;=}_H3_C=O^M_qXTUopD?;GQZyU;NEf*# z7i`7L@JNpe48k@I<%sQZI(S%7+CaOIO+SlXE+vZYSf%`-plI-Qh>~a(=t@G-)eaxY z2A(wtZ)!C#9>)TzT2Aot?|zLzGf;4;6BBB%$kQ17e+L?+6Ei5$IidURUHxre0)B;& ONLx0>MOUofcls~M4JNz* literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/compact-fluent-quad/claude-tray-icon-light.png b/tests/snapshots/themes/compact-fluent-quad/claude-tray-icon-light.png new file mode 100644 index 0000000000000000000000000000000000000000..8fe6fac38d9c9c04eb77c4054783756c9065cc36 GIT binary patch literal 1770 zcma)-X;4#F6vt!TVZ^Ex1TC} zY>SJTxrov3TO~F5i7bU7 zN=QankJj7E=XrAjbVJGc+B~jzFDjgY3Lmp|5l z4md-l&p{nuPp+F#GK1a z)xf7Tu*M$TFc05D)y*F|(8V8!wKXpU3nTmC{lM#%)#zQW0-D%YKH$cKXXj|xiQ0?Q_R-6w{M70Bo^Vl57uyMtaLMnP>duVeNx>q)=Ocm4 z{;9)~njF1eW5O;?uQdlVnryhd;IieIPia0sO(Z@8Vc{Y%CDTf?Nz&d&g1_!g39Hj> zYICHuz4Pm}gpZ={sW$P?ZP5DOs8-yg-yt2N*%*R`QO^rwq+cqPBY9<3N%SE5I)wU* zdfZZ)Q<6S9m{5S9X#rcIxrNx`9;z*9p&(0@h^u)HnAV6d+TG`lHhNmQT1MNL$$Bvb zdQ)yy=ZPGvS0OT{nb;X|M;%6JkEzr9x*g4b4lUD<)%4wpuqdhpe6RtxaH9^f!1bKRWe+Uw$RH864N6B0R zoCPHf5VA%jz8?T?MCZ>y=O5W^K}NB+CJVCHDHLm5cj9S?-~*9wM8Q3=0Q1?2&hKs_ z?`;9k<7~@TknNjEZUcAHJ|Z&&*`RPJ2?^ciVlC+CZI^8bd4YQ|5IeyLthEP2zMV>b zs+>J0?DDp-b&Q#~W7c7&#?^K5=>;2-0x39VB)3k_PsO{48A+jAmt_DGiX-1n7a*Y@ zBcX(QUo0B6sEH1c0pv9_8*mf6tJK^#))wlMwAYC;8J(YytxtMl@*~13^dpZa(W`48 zwQN}HGE7L~tpJPj4{ERH(*gh+ z#Z~=0u{{fR2PXVd2M%!pc}ffSV$0>ElY?@bB-+fa^khSdXRs#&eMC_F0AoRNUz?qZ z9>(hz;S5yj`o!*Zbk@sxjNz*asMEsAJP;=}_H3_C=O^M_qXTUopD?;GQZyU;NEf*# z7i`7L@JNpe48k@I<%sQZI(S%7+CaOIO+SlXE+vZYSf%`-plI-Qh>~a(=t@G-)eaxY z2A(wtZ)!C#9>)TzT2Aot?|zLzGf;4;6BBB%$kQ17e+L?+6Ei5$IidURUHxre0)B;& ONLx0>MOUofcls~M4JNz* literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/compact-fluent-quad/codex-tray-icon-dark.png b/tests/snapshots/themes/compact-fluent-quad/codex-tray-icon-dark.png new file mode 100644 index 0000000000000000000000000000000000000000..904f3382d9ba91ebe80119cd4025b7030edad59b GIT binary patch literal 1002 zcmaJ=e@t6d6n-#5%OGz`oW(yQ-~iVcmP}>$|>({%K6^z2}~D z&&_wgbHCGhpjKA6amPjof(qrYN#CSx6*JlS^m^^YX&(e_7?Ml(9n|MUZ*CYUd#l%- z0J>P$SL9agF4mW=T6!LzWLDF+Yd$bM&h0k~jM#k~)dF;jKLI6a7Hy zyi0$<<=>wuMia%Occw=l0iA>7b63QMPvEZdiirG5rKvB|FVc0db5bYGG@y~3fW=Ow zBP7{w1!eG>3?7fnI1K}QkmQHY876c_nJ-x3Yp-klwl0XWziF^XmZy418J=na&AwCv z*2_xIsmGP2{P52J!1nMK8qP$OE^0i4yFR%e3fPF?V-&>%+RXP&OGMAPYs5?y?Vn;9}L*i74je2`?NuOVq(<9Cs#civwb z(HPywjrm}QOeQ1eE!iiyt1oeH!@GIF>0Z$Y)3wU5NLeuoDu8PoA5y{`Tf(2BTmdCtN znlYJ1z+UE(u!Z>#fk2>dbYX2GaDfSR+Vll>hf|V`ko@Wu?EV&uKF{mj=D?*?(dWsg zwEwSU77^8>YZRN~|fHMn?SpYhwgoe=^J?H3WfSWS^)wA|CU_Wb~I)8Ut SwTSLvNWQ;TdcFGS*}nni+dohM literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/compact-fluent-quad/codex-tray-icon-light.png b/tests/snapshots/themes/compact-fluent-quad/codex-tray-icon-light.png new file mode 100644 index 0000000000000000000000000000000000000000..904f3382d9ba91ebe80119cd4025b7030edad59b GIT binary patch literal 1002 zcmaJ=e@t6d6n-#5%OGz`oW(yQ-~iVcmP}>$|>({%K6^z2}~D z&&_wgbHCGhpjKA6amPjof(qrYN#CSx6*JlS^m^^YX&(e_7?Ml(9n|MUZ*CYUd#l%- z0J>P$SL9agF4mW=T6!LzWLDF+Yd$bM&h0k~jM#k~)dF;jKLI6a7Hy zyi0$<<=>wuMia%Occw=l0iA>7b63QMPvEZdiirG5rKvB|FVc0db5bYGG@y~3fW=Ow zBP7{w1!eG>3?7fnI1K}QkmQHY876c_nJ-x3Yp-klwl0XWziF^XmZy418J=na&AwCv z*2_xIsmGP2{P52J!1nMK8qP$OE^0i4yFR%e3fPF?V-&>%+RXP&OGMAPYs5?y?Vn;9}L*i74je2`?NuOVq(<9Cs#civwb z(HPywjrm}QOeQ1eE!iiyt1oeH!@GIF>0Z$Y)3wU5NLeuoDu8PoA5y{`Tf(2BTmdCtN znlYJ1z+UE(u!Z>#fk2>dbYX2GaDfSR+Vll>hf|V`ko@Wu?EV&uKF{mj=D?*?(dWsg zwEwSU77^8>YZRN~|fHMn?SpYhwgoe=^J?H3WfSWS^)wA|CU_Wb~I)8Ut SwTSLvNWQ;TdcFGS*}nni+dohM literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/compact-fluent-quad/copilot-tray-icon-dark.png b/tests/snapshots/themes/compact-fluent-quad/copilot-tray-icon-dark.png new file mode 100644 index 0000000000000000000000000000000000000000..f3cbac985cb837f0e3d9bbe2a00448ef4322fda1 GIT binary patch literal 1506 zcmah}eN<9s7{^HQROqaos4O|TI=Ho@<~e>$^4gS~xoKN%u91?OxiY1+1X8(WS&~|( z$ghI~r|V;N(s?#D2YNL>N;J(pjuP~01Z0B9#{?3%iW+74{Zrv2r;dW1P!`e@)* zR!mBLhOGI&b)-a4zPmy2S%B}XHK*n1>6;fr(?=VYJaf2B?l_a-0H5L7!L;!7nGy7)f#MI1w`}hVMJrLyb?@vDrt4^ymVD3VqbI8p1AQR^qK8JXB zB8;U7cHkF)g?O81gc6<_ zP`7WDG4xNnYt>dRHO@(WMa;qT8|**D<~^A?K3fb5>fqd!NW=#=?{UL&Vt*qukD5Ge ztbOgIN%OU$?AN@B5@e&h1Mg$v3%_zIu(T9Whqz`o{&L&Hy9NML2Hv1?rc$Oeg9o!| zPA}Ix{#LYFN}*1BY~HJxM*CqhY9T9=1iU=eYRU&6fdK_z;a;KXu*p+&L7k%)aju{d zT9m;i*m~i~=Aeb${v4@JFPHRf9n71R8Q>BL^k9(Iwqi*8^orwSHT06eN*Vz(`_edV&uK#_%|{iG)3_%7)8(`gc@1lBCC>QFy%5FeDtblC7=| z{B3bjGi*rpBek$ZH78>vx#fdqGfg;`m}1S+%ZL_MN1tLSGZsrzD&&B^`q zVWNS4M4Voc3+SU*k~*MD6g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5?iq(#{1EoHq3 z*%$+?z$(Fx7DEP1H=1k%=7e4vUaCw+W^kYdicks!DSZ*R7jExaui3YKFgY(d$#e3Y z=l}fvr!qY?F>vRBoe%^CCLK>W;oaky>BsV}H*zjcL(q<*q=dIKQJ*A zXe@*PH8X(!yhDo%exkN0hx)}o&J6^9H8<|-$(odY*f^!AtCAg|?c;3PCS=i?43gs- zmLhYV7KPDPIpe#uFnf(1)FID*oS}c@-h?NJa`+>s2{G947t{b+-C8q8ThAS%J1>ic z=&!1WR^kgI5A)OkRwmsPOPFQ9I}fWdl~B>(3*ppSGF_EH%Fqp-d3MN@sWm?yv^sG? z{<0;78qo(#u6A0o|4Qzmt8=+os6_8LTBszK8>pZVf?qt}t#h^uSLBj3aI==DbbqY0 zC94RH_$9R2LU-&HZ%7)5+hVbMa`P5y8hvQR_p7lMA*y+6bY%%U;%b5oqqsE@S-w)w z-zOv%e!GA)?Zzvd`~}_uAkicu5wF~H%SshRkKV9%e{cb`F!qdxJmC% z6Q*%0BAw);V>gSUyW7D09ek)BpjNkN^$^&nciR26Iuo$>;k(sXc`hvSR!G*@f^bh( zG=jK)NTeb%Nd820sMZVv;u=Vm#VThlrNcPWAFK=kjeDO(3DQZPLyqOw1wF{_dE_hF z!|0?V?}yM$?G$hAH+(iSV{TuRGco(Gzh;YkrgDqm(z8eg-Q|xE=87D;ajC{{vmJuvU z(XI!DAe*NuDE@U9Y-JwCNZnA}qD|~QZ|daeFK}Pfgq3Z1LwE5S6}m|00CJG@vPVe2 zzM#q8WV8Wn-3B{M9{M~d{@<`Z436NBm*JCg=u-t}!UozrkU<4-LmJeD`=FdN8UU|f fTCIQj3GmzF2|w8_{ifXe5kX1srY3Z}bEfQHI*zam literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/compact-fluent-quad/grok-tray-icon-light.png b/tests/snapshots/themes/compact-fluent-quad/grok-tray-icon-light.png new file mode 100644 index 0000000000000000000000000000000000000000..13125b43ce44211dcb1c4637dec87ca9dfc88ac6 GIT binary patch literal 1199 zcmai!ZA?>F7{@OvEfcVbQ*lmu6WL&c4~;PGW`WBF8!`wlO4d19>*5?iq(#{1EoHq3 z*%$+?z$(Fx7DEP1H=1k%=7e4vUaCw+W^kYdicks!DSZ*R7jExaui3YKFgY(d$#e3Y z=l}fvr!qY?F>vRBoe%^CCLK>W;oaky>BsV}H*zjcL(q<*q=dIKQJ*A zXe@*PH8X(!yhDo%exkN0hx)}o&J6^9H8<|-$(odY*f^!AtCAg|?c;3PCS=i?43gs- zmLhYV7KPDPIpe#uFnf(1)FID*oS}c@-h?NJa`+>s2{G947t{b+-C8q8ThAS%J1>ic z=&!1WR^kgI5A)OkRwmsPOPFQ9I}fWdl~B>(3*ppSGF_EH%Fqp-d3MN@sWm?yv^sG? z{<0;78qo(#u6A0o|4Qzmt8=+os6_8LTBszK8>pZVf?qt}t#h^uSLBj3aI==DbbqY0 zC94RH_$9R2LU-&HZ%7)5+hVbMa`P5y8hvQR_p7lMA*y+6bY%%U;%b5oqqsE@S-w)w z-zOv%e!GA)?Zzvd`~}_uAkicu5wF~H%SshRkKV9%e{cb`F!qdxJmC% z6Q*%0BAw);V>gSUyW7D09ek)BpjNkN^$^&nciR26Iuo$>;k(sXc`hvSR!G*@f^bh( zG=jK)NTeb%Nd820sMZVv;u=Vm#VThlrNcPWAFK=kjeDO(3DQZPLyqOw1wF{_dE_hF z!|0?V?}yM$?G$hAH+(iSV{TuRGco(Gzh;YkrgDqm(z8eg-Q|xE=87D;ajC{{vmJuvU z(XI!DAe*NuDE@U9Y-JwCNZnA}qD|~QZ|daeFK}Pfgq3Z1LwE5S6}m|00CJG@vPVe2 zzM#q8WV8Wn-3B{M9{M~d{@<`Z436NBm*JCg=u-t}!UozrkU<4-LmJeD`=FdN8UU|f fTCIQj3GmzF2|w8_{ifXe5kX1srY3Z}bEfQHI*zam literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/compact-fluent-quad/main-dark.png b/tests/snapshots/themes/compact-fluent-quad/main-dark.png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pKc>RgYNyXCq%Je;uJ-dE1ZwwVYk5w^&LOp(3KOlO7=1)i+Yujk^ESbLJ^AaD8avDv@T-KLU+~kaN)}PZC-pI~- z@^@8DSaDSUM1-S+#=$REunflP;AXzhIvHXrp6Y9d+d%C9o%KI98yeL_t8OQ4#ybUu zw^)bv*#o;sa20BDJ3*&=RugUO_P~7@Xo+zYoQfHP0^?0Z)ivL&IZOXV0#>g`PPp{d GcGW*@q{kHi literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/compact-fluent-quad/opencode-tray-icon-light.png b/tests/snapshots/themes/compact-fluent-quad/opencode-tray-icon-light.png new file mode 100644 index 0000000000000000000000000000000000000000..00f77a5e33c6d974e5efbacda43b99a9645925ce GIT binary patch literal 1644 zcmZ8i2~ZPP7>0sG&1j@fo3=qWN-b^GhBnitZGb>QQBmT>P<2Q=W=g#XLTkd6)i9lC zQ4{S5gD9bO3bl-;iWPw+0TBa6OuYsx$8sbfa^zSryJWMko7mB5XZG#xd;8D-|L=R> z_wCX3$%%7jzcV`^AYjhwRS6sEXRL3`459D8?>^8Q5D>y&oe;NK5jfryRPpYX;#*E2 zpE%xjrz$IH*QNbk*Z#eBA1g0jqc8u2zj%T;Si2{;QZ3y3NdMYnDx@#^(0&Sj%rJ=W ztJ|Lo0-)PKjK1HM*Yp_>jhnCKRLZ@@ZYwlFGALf&WsdY1L{`{srN2criMk0EDRr~t zR1hoH0XWS-77UD`Bv|=!vVq_^hImtz$gOZ`VVSu1<}XsmUwl@7UG(_agSyPj!|7+? z5Tg@E2Uz8#nq)9wb1bQOa^>hx%5(Apn|w$#>onMoI%Ck= zW|7r~YqIF1y2(miQ&JDPG5@}%U^Zx;Nd*;{Jo!s`KwB~>YT+1fa$F1S*hP{Nj1iaA8b8p~ zPi#QC3#G;E2IplY(w~5jx*p)&I`3;#(0W3i`)4BZq0H@)nVH${iJp9~EI(WX1jaTD z!(gn4BvEp4fd2WBRNEkm@5*^vs&=T59VU zg`x;nPMJP0k0M9lW+vv8k(WsZ7ndtKQ&?t7Va3R3Ey4f`?d~+F?T3~kge$|Y$U2Pkn~g0+J^0rW zE##@u^@(m+z!Z;e^zm_x4L#b2K24Jn=eA5T%XPLttV@-)YFy(#&}Hf+77NXdOM3Dy zDV#@g8XtD>TA8k^HR55>eVS;WOSC2R#ILxViwo)r>pFxhzV4YtCgyghX@+Oi(JQ2I zJt5dS$&_fTy4{1GkNL!uqkq?wFCr{VK- z$PA(|0xSY4Z+cZQLj};86daC&<21XfqX$w5&Ey`9B1NL5d-f;WovypfbX9DsbwDF= zRT=#=>OA+OU(}zQB+;s+SR@r5O`cIZRrJQd++eV>R(idVZN1kiIs;Z|4Aeb@>sz6V z!RL*2UYR0JGIq=4f<{_1@|W@2&~8fLhr!zifk^X?cBX5I-LZm9#81ib#r{SZ09O+< z8gg7MgiK7=R!#04$#|&#wy|?>^s`SDaa8|ZlhdByusb*!u+EPJzjt60;l?j$@B{Qt z*;c_qP)7P#L;A{yg`V$xut+UDc+7&yoIdXRk3X*b;PVlG3`h#{cHOX&%b8(mnc z1z$?J-iBK(po5oX6u=h*whf)pKc>RgYNyXCq%Je;uJ-dE1ZwwVYk5w^&LOp(3KOlO7=1)i+Yujk^ESbLJ^AaD8avDv@T-KLU+~kaN)}PZC-pI~- z@^@8DSaDSUM1-S+#=$REunflP;AXzhIvHXrp6Y9d+d%C9o%KI98yeL_t8OQ4#ybUu zw^)bv*#o;sa20BDJ3*&=RugUO_P~7@Xo+zYoQfHP0^?0Z)ivL&IZOXV0#>g`PPp{d GcGW*@q{kHi literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/compact-fluent-quad/shared-tray-icon-dark.png b/tests/snapshots/themes/compact-fluent-quad/shared-tray-icon-dark.png new file mode 100644 index 0000000000000000000000000000000000000000..89a39c3378500ea2c1f3733e8c24c57448f90f6a GIT binary patch literal 2137 zcmbtWX;f3!77i)}K~%u5RDlHLQDw0t4o``T$Q4i#v0%|BEkhz=ODSpq2SP}=7DYs* z-~d!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ai5Mx| zkR>N#=;iTw2WOM4qfL6WGXkgIi}^fLsPqmT=$$t@^TT)wRWPCO+c^qVHoM&?kS?FN zjd)Zd<`AfdNVD{$O(zgUMwwUbJ@{;UF?~F_3se*O%sPsC%Sp2GJ$V2V3!3Y>zDLzx zH!x4I_vNczn3@ujio95oD?(KL<*&0Efx}?<8NWu z)<&xKUtMDES18V~me6iTaP%=?+WH$V%N51F^*fX@vrAfvb!g?wdZYOSyAgO2x{MvM zBSJ^(06)}bGz)s#(ILNC3yN{dgo$LIQpUSFvM-i$SpD?o>Gu+bvMwW8EHDBt}vP^&1+^fHwy z)@x^#c%s+Zi?K0_d$A7N14zKQYpe=*V-{S@4I8V^(c$YPbgVcwz!5WXHifoilk_MF zaEi71BYr-l=}KCdif^cdBd?&{6g_NAb~-+s{yG6!{G72`4LvpXNISjPSp{^WAr&+Xk%yE z5qe>SV)A*nT-wf$w6VQWfkx)oH`qI;b^{oNVZ(RX)BB?q@HM>0-Z-4T;QzZDHphdC zD;eE;Edd~0#5XuQ*jqxo@KPKv+k5L&vmpi{a7Np`M$Nx|=occRcvKQ!oJLp1Gbe#^ zT475IvzrBo(Ji-QuI@`q^Qrvfoft_HJTAqP3-ROUSI3I zM^vhCaSk}350Zi)zU*DyF7J?I^NxSeGZ9#fXtB)&g4u() z!nKI%lo$2sx@D5=_2Z3=PoqTpy(9l_Rs9(aDXFOrD-uOB&|3f*(hT=46bnVXiNKa@ zfWoM^y^-hII)+~_y{9~r;+z|$?jGj*>Oc_ Q`!Zmnw#0012;W=qZyn>ccK`qY literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/compact-fluent-quad/shared-tray-icon-light.png b/tests/snapshots/themes/compact-fluent-quad/shared-tray-icon-light.png new file mode 100644 index 0000000000000000000000000000000000000000..89a39c3378500ea2c1f3733e8c24c57448f90f6a GIT binary patch literal 2137 zcmbtWX;f3!77i)}K~%u5RDlHLQDw0t4o``T$Q4i#v0%|BEkhz=ODSpq2SP}=7DYs* z-~d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$Ai5Mx| zkR>N#=;iTw2WOM4qfL6WGXkgIi}^fLsPqmT=$$t@^TT)wRWPCO+c^qVHoM&?kS?FN zjd)Zd<`AfdNVD{$O(zgUMwwUbJ@{;UF?~F_3se*O%sPsC%Sp2GJ$V2V3!3Y>zDLzx zH!x4I_vNczn3@ujio95oD?(KL<*&0Efx}?<8NWu z)<&xKUtMDES18V~me6iTaP%=?+WH$V%N51F^*fX@vrAfvb!g?wdZYOSyAgO2x{MvM zBSJ^(06)}bGz)s#(ILNC3yN{dgo$LIQpUSFvM-i$SpD?o>Gu+bvMwW8EHDBt}vP^&1+^fHwy z)@x^#c%s+Zi?K0_d$A7N14zKQYpe=*V-{S@4I8V^(c$YPbgVcwz!5WXHifoilk_MF zaEi71BYr-l=}KCdif^cdBd?&{6g_NAb~-+s{yG6!{G72`4LvpXNISjPSp{^WAr&+Xk%yE z5qe>SV)A*nT-wf$w6VQWfkx)oH`qI;b^{oNVZ(RX)BB?q@HM>0-Z-4T;QzZDHphdC zD;eE;Edd~0#5XuQ*jqxo@KPKv+k5L&vmpi{a7Np`M$Nx|=occRcvKQ!oJLp1Gbe#^ zT475IvzrBo(Ji-QuI@`q^Qrvfoft_HJTAqP3-ROUSI3I zM^vhCaSk}350Zi)zU*DyF7J?I^NxSeGZ9#fXtB)&g4u() z!nKI%lo$2sx@D5=_2Z3=PoqTpy(9l_Rs9(aDXFOrD-uOB&|3f*(hT=46bnVXiNKa@ zfWoM^y^-hII)+~_y{9~r;+z|$?jGj*>Oc_ Q`!Zmnw#0012;W=qZyn>ccK`qY literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/minecraft-codex/layer-62744-2-dark.png b/tests/snapshots/themes/minecraft-codex/layer-62744-2-dark.png new file mode 100644 index 0000000000000000000000000000000000000000..507206537f13684fc98bfad2da98e645edb102bc GIT binary patch literal 2306 zcmcgu4NMbf7{0bZ5r3)(LuFE#Mds=#6EhTV)Tu1+DZn%2dD;CM(zs&YDqiRIV#jO8<8K!7NLb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oh%hL6E`EbWA6S?#M6?N|2Ay#JB z$mTu&c(HGOl&ufE=UTnHDfhl_3?K?Erhd;S2lDrvxNG&*y&dgR_5dBTVtB0riP^o` zXJ?!NryIPoY|E(!x`ep~4O4S$^`0MZAKIG~2)Jo}_D+4EW8<%$`&x6?@~A2EnmwQU z)a^ItQO;~g9IWgXmiLdz?VqmQx3Xi-w;t>(d{IMd^~nB)5B=~D%eM5Rnb|#i>ATy1 z4==oB;h#3uU32-YwucvQ3(E|b9(}oQ{(_x1edn)B16UlL*)^lroq2Nj&5!Ilwke@M OpIEf`)?K%(+WJq(=b7*T literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/stacked-rows/claude-popup-light.png b/tests/snapshots/themes/stacked-rows/claude-popup-light.png new file mode 100644 index 0000000000000000000000000000000000000000..8816d170c56ae651a41778a79275b35184613fd1 GIT binary patch literal 39855 zcmd?S3wTp?wl};>fpQTth*A-0R76w;qB2mmm*8QX>M+njR7MMlh)@-13k8z2X;MI_ zSRo2Rl|sV|gQyIIds><%g#rai8w8<1)28=8FS)i&(p>hp)=C>-WSn!}bKdX$zUO@& zv2C*VfB!G*zJ6=%4S${)H)PPGgBXSx^2Y1Gf0JQC-hzK~2lR(ea!&r?I>Y3ydgJ%6 zz9kN6FAm-H)Vtfx+E|f!ko>P--1cVP<(1WQlrN_?SBa;b4mGT- zoX1{zFTL&T+5QgqjyDHw&Tsi~-+>c@mRxyn!Lj$2tyuBz&)Un$)*dfJ15QH$O`Ua;c!gZq!A;#DIvnf%rRh5o;Oy}a9HYk0jL2W$B;eCC6t z3hrL`@IaxtJ1q01^sctBqt_zR+pfQW-|sunUHS5=wnz3KE6s~Z?+RT}IZxy(Su!QP z?b@{wf#>*IM?d!1L4k@JzW-R3-jv#NoBCV52?i1*ES~r5I(pVV|I$A`d-U3gL9h4B z&{y?(pFgL-2EZ=J`>yG^Xv}Zs;-<{&U>wkMSXY8dquxa=zn6S)>dep8mC|fe>6NUzB}Q#u&&dk=*rf) zvZ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ATe2lL$h)9lhHQc4OKQKsDat|d zLE8ujjsg@o>$uE$2_xUVVCW!C=;l=jNRM@u*|}JiPp| L2dY2+jc5N2MV|LZ literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/stacked-rows/claude-tray-icon-dark.png b/tests/snapshots/themes/stacked-rows/claude-tray-icon-dark.png new file mode 100644 index 0000000000000000000000000000000000000000..8fe6fac38d9c9c04eb77c4054783756c9065cc36 GIT binary patch literal 1770 zcma)-X;4#F6vt!TVZ^Ex1TC} zY>SJTxrov3TO~F5i7bU7 zN=QankJj7E=XrAjbVJGc+B~jzFDjgY3Lmp|5l z4md-l&p{nuPp+F#GK1a z)xf7Tu*M$TFc05D)y*F|(8V8!wKXpU3nTmC{lM#%)#zQW0-D%YKH$cKXXj|xiQ0?Q_R-6w{M70Bo^Vl57uyMtaLMnP>duVeNx>q)=Ocm4 z{;9)~njF1eW5O;?uQdlVnryhd;IieIPia0sO(Z@8Vc{Y%CDTf?Nz&d&g1_!g39Hj> zYICHuz4Pm}gpZ={sW$P?ZP5DOs8-yg-yt2N*%*R`QO^rwq+cqPBY9<3N%SE5I)wU* zdfZZ)Q<6S9m{5S9X#rcIxrNx`9;z*9p&(0@h^u)HnAV6d+TG`lHhNmQT1MNL$$Bvb zdQ)yy=ZPGvS0OT{nb;X|M;%6JkEzr9x*g4b4lUD<)%4wpuqdhpe6RtxaH9^f!1bKRWe+Uw$RH864N6B0R zoCPHf5VA%jz8?T?MCZ>y=O5W^K}NB+CJVCHDHLm5cj9S?-~*9wM8Q3=0Q1?2&hKs_ z?`;9k<7~@TknNjEZUcAHJ|Z&&*`RPJ2?^ciVlC+CZI^8bd4YQ|5IeyLthEP2zMV>b zs+>J0?DDp-b&Q#~W7c7&#?^K5=>;2-0x39VB)3k_PsO{48A+jAmt_DGiX-1n7a*Y@ zBcX(QUo0B6sEH1c0pv9_8*mf6tJK^#))wlMwAYC;8J(YytxtMl@*~13^dpZa(W`48 zwQN}HGE7L~tpJPj4{ERH(*gh+ z#Z~=0u{{fR2PXVd2M%!pc}ffSV$0>ElY?@bB-+fa^khSdXRs#&eMC_F0AoRNUz?qZ z9>(hz;S5yj`o!*Zbk@sxjNz*asMEsAJP;=}_H3_C=O^M_qXTUopD?;GQZyU;NEf*# z7i`7L@JNpe48k@I<%sQZI(S%7+CaOIO+SlXE+vZYSf%`-plI-Qh>~a(=t@G-)eaxY z2A(wtZ)!C#9>)TzT2Aot?|zLzGf;4;6BBB%$kQ17e+L?+6Ei5$IidURUHxre0)B;& ONLx0>MOUofcls~M4JNz* literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/stacked-rows/claude-tray-icon-light.png b/tests/snapshots/themes/stacked-rows/claude-tray-icon-light.png new file mode 100644 index 0000000000000000000000000000000000000000..8fe6fac38d9c9c04eb77c4054783756c9065cc36 GIT binary patch literal 1770 zcma)-X;4#F6vt!TVZ^Ex1TC} zY>SJTxrov3TO~F5i7bU7 zN=QankJj7E=XrAjbVJGc+B~jzFDjgY3Lmp|5l z4md-l&p{nuPp+F#GK1a z)xf7Tu*M$TFc05D)y*F|(8V8!wKXpU3nTmC{lM#%)#zQW0-D%YKH$cKXXj|xiQ0?Q_R-6w{M70Bo^Vl57uyMtaLMnP>duVeNx>q)=Ocm4 z{;9)~njF1eW5O;?uQdlVnryhd;IieIPia0sO(Z@8Vc{Y%CDTf?Nz&d&g1_!g39Hj> zYICHuz4Pm}gpZ={sW$P?ZP5DOs8-yg-yt2N*%*R`QO^rwq+cqPBY9<3N%SE5I)wU* zdfZZ)Q<6S9m{5S9X#rcIxrNx`9;z*9p&(0@h^u)HnAV6d+TG`lHhNmQT1MNL$$Bvb zdQ)yy=ZPGvS0OT{nb;X|M;%6JkEzr9x*g4b4lUD<)%4wpuqdhpe6RtxaH9^f!1bKRWe+Uw$RH864N6B0R zoCPHf5VA%jz8?T?MCZ>y=O5W^K}NB+CJVCHDHLm5cj9S?-~*9wM8Q3=0Q1?2&hKs_ z?`;9k<7~@TknNjEZUcAHJ|Z&&*`RPJ2?^ciVlC+CZI^8bd4YQ|5IeyLthEP2zMV>b zs+>J0?DDp-b&Q#~W7c7&#?^K5=>;2-0x39VB)3k_PsO{48A+jAmt_DGiX-1n7a*Y@ zBcX(QUo0B6sEH1c0pv9_8*mf6tJK^#))wlMwAYC;8J(YytxtMl@*~13^dpZa(W`48 zwQN}HGE7L~tpJPj4{ERH(*gh+ z#Z~=0u{{fR2PXVd2M%!pc}ffSV$0>ElY?@bB-+fa^khSdXRs#&eMC_F0AoRNUz?qZ z9>(hz;S5yj`o!*Zbk@sxjNz*asMEsAJP;=}_H3_C=O^M_qXTUopD?;GQZyU;NEf*# z7i`7L@JNpe48k@I<%sQZI(S%7+CaOIO+SlXE+vZYSf%`-plI-Qh>~a(=t@G-)eaxY z2A(wtZ)!C#9>)TzT2Aot?|zLzGf;4;6BBB%$kQ17e+L?+6Ei5$IidURUHxre0)B;& ONLx0>MOUofcls~M4JNz* literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/stacked-rows/codex-popup-dark.png b/tests/snapshots/themes/stacked-rows/codex-popup-dark.png new file mode 100644 index 0000000000000000000000000000000000000000..6ebb4bf53d9b408bbf2b43f5641a4b6b4222a10a GIT binary patch literal 25526 zcmd6Q30Tzi_V*7_(OjmYqC}axW>j7s%My)c>~CEwQYuq!p);B(mCFdI3=GVm)+HmQ zG(|%g%WLE{9hVf483sf_L>SElk!6NmWtk0_8D{yt=bQo5^4|abFYo)j&yxl-zva7} z^Eun+eBJ!c+}WcZ81n$bFr(glqXYPDUk@@1(KXuyHXMYy|Q*z*ns|wRXLC-Q_ zkLRhw_M2ad#jma1c4mI~qIFm2Uthm`>u%e3QDfD;Jl4chZ;6~0R4`HX+eGKA=bDeU zb$`F)@pEq$TZY{P}!QzJW{&#s9svutS;FaQ1-_fUE(x4%}oj+64G*g9oo-yNc?d<@YNu}V2Nk*(gnejO z-}R|8*SMb}8@!PwcF;Bc!M>MqH~gEA>J6}8YT# z{P@FaSG?cNMcVE~wu9>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OFC&kIiaSn zC$dXrLv$c6aW0$_+1E}PN=S5A00#K;qkjKq{>6|tYkH5=n;%v7@}Ebir1yTlFlYD2 zPyT6Q%S2FgJ*kpK5Nmw-@t!{#mWy(hEqiYf%@_U^m4nrAVEa5n&S3`B*nalmFXOvm zCwm6^0^Gz`oW(yQ-~iVcmP}>$|>({%K6^z2}~D z&&_wgbHCGhpjKA6amPjof(qrYN#CSx6*JlS^m^^YX&(e_7?Ml(9n|MUZ*CYUd#l%- z0J>P$SL9agF4mW=T6!LzWLDF+Yd$bM&h0k~jM#k~)dF;jKLI6a7Hy zyi0$<<=>wuMia%Occw=l0iA>7b63QMPvEZdiirG5rKvB|FVc0db5bYGG@y~3fW=Ow zBP7{w1!eG>3?7fnI1K}QkmQHY876c_nJ-x3Yp-klwl0XWziF^XmZy418J=na&AwCv z*2_xIsmGP2{P52J!1nMK8qP$OE^0i4yFR%e3fPF?V-&>%+RXP&OGMAPYs5?y?Vn;9}L*i74je2`?NuOVq(<9Cs#civwb z(HPywjrm}QOeQ1eE!iiyt1oeH!@GIF>0Z$Y)3wU5NLeuoDu8PoA5y{`Tf(2BTmdCtN znlYJ1z+UE(u!Z>#fk2>dbYX2GaDfSR+Vll>hf|V`ko@Wu?EV&uKF{mj=D?*?(dWsg zwEwSU77^8>YZRN~|fHMn?SpYhwgoe=^J?H3WfSWS^)wA|CU_Wb~I)8Ut SwTSLvNWQ;TdcFGS*}nni+dohM literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/stacked-rows/codex-tray-icon-light.png b/tests/snapshots/themes/stacked-rows/codex-tray-icon-light.png new file mode 100644 index 0000000000000000000000000000000000000000..904f3382d9ba91ebe80119cd4025b7030edad59b GIT binary patch literal 1002 zcmaJ=e@t6d6n-#5%OGz`oW(yQ-~iVcmP}>$|>({%K6^z2}~D z&&_wgbHCGhpjKA6amPjof(qrYN#CSx6*JlS^m^^YX&(e_7?Ml(9n|MUZ*CYUd#l%- z0J>P$SL9agF4mW=T6!LzWLDF+Yd$bM&h0k~jM#k~)dF;jKLI6a7Hy zyi0$<<=>wuMia%Occw=l0iA>7b63QMPvEZdiirG5rKvB|FVc0db5bYGG@y~3fW=Ow zBP7{w1!eG>3?7fnI1K}QkmQHY876c_nJ-x3Yp-klwl0XWziF^XmZy418J=na&AwCv z*2_xIsmGP2{P52J!1nMK8qP$OE^0i4yFR%e3fPF?V-&>%+RXP&OGMAPYs5?y?Vn;9}L*i74je2`?NuOVq(<9Cs#civwb z(HPywjrm}QOeQ1eE!iiyt1oeH!@GIF>0Z$Y)3wU5NLeuoDu8PoA5y{`Tf(2BTmdCtN znlYJ1z+UE(u!Z>#fk2>dbYX2GaDfSR+Vll>hf|V`ko@Wu?EV&uKF{mj=D?*?(dWsg zwEwSU77^8>YZRN~|fHMn?SpYhwgoe=^J?H3WfSWS^)wA|CU_Wb~I)8Ut SwTSLvNWQ;TdcFGS*}nni+dohM literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/stacked-rows/main-dark.png b/tests/snapshots/themes/stacked-rows/main-dark.png new file mode 100644 index 0000000000000000000000000000000000000000..50dcd3608e6f364068b61f8d1f658663058c8692 GIT binary patch literal 2267 zcmZuzYg7|w8cqmQP-ws#NF^g6rOIlwE(#Ket(VB6&{i?6LSmQIs4OPd(-I;ifC?zJ zsZfnBnpm-g4NG#|ZUJpf0&-JgqiCcyO2S1VSei*lFqg^9ehEE$_J`-p{hN8e_kEt{ zeZD#MK_)F^cI0dv4i}QXb<;=S{21)30^b0~0`$an94_!``lk1Ga`BUD!j+|;obR?^ zg}Oj`UokmFR@e z?qGgoJI!ESy{q_p%@Hx=K2x+(;E_UbAK6oBnC`|2rlgP~fo!idxV9iE$h{`MQLcCd z@n61WF~jTRt}>PNBY~rt-KpCAP1$0x4Lpi2wEo>6+fk+6wEkx-Z{e+!)EX@AUyf}T zM-ajJ=6Dy)dZ`h~ijFcZ{}T@teVzPs_Sem( z4+Se0azZ!|oKmB_*o6M@K~WfGyw+ejUQn`r)iD6bNTS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s}raGG6ZZUxV{=0Wi_y zpi0DDTy;$}CKV9N!`o}qoKe&WL~L~XlI*AGSGRBWhOoxU{ghc80KDb05;@DX)=MxT zt_S%yCRF_*LOxo6Zs}ilRHq7WuU7xFlAz^!`}jx7L*ECN`ijM~LW?gCtvxB}$i|*8 zEm2-ehU?UE;(~i~3MJm@vA~@S|Cut3BSpAs+G&%$7fhg?l_qII_W;$3t0!4N!HUDR zHn5lo--p>VZsgB*fc)y^J=s{oR$eH)NX_a+oqR_tPGm366j t-mtU@WU_^$%cgs1v9Ap|^DBXdMTJxmnVxGq!A}b=eRJj}+53CT{|k=F*~kC@ literal 0 HcmV?d00001 diff --git a/tests/snapshots/themes/stacked-rows/main-light.png b/tests/snapshots/themes/stacked-rows/main-light.png new file mode 100644 index 0000000000000000000000000000000000000000..c1b8e23dfdcc24d229130f997f59b441d494b978 GIT binary patch literal 2406 zcmZuz4Ny~88hr>FL?NO@6kM{1$V3)GMGS2M(N@e-EUaxA`~jkMx7Mm8h?)dRo`wQa zl@uMsE=oE@rAxL+>r5qJ%#VnmD5cd?;&=?BKxl+0VYyjpsj*H?B=y`D*%T>ldY0t7!Z66vc}cskbRK|A;;p zdl)Edf6;<{9*|dXL=UeMNx>~6LYtdc;3S>7hb>Y&qvXFnJe!_1l8VifJJZziVZJ<% zO8Jg#ck&YDE&=RrP+Ozqo_2cQq;Qyo-eIe{q&K6mp#L31BcDVZ8zIZ5XVhFOw%~y9 zZk6D0sATR6({%UaLb2%@Mjm!V4zL{2astOf9!48>vK(4@kGezKTxMq%2_6#EiC73h zVtb%&b7qjxb~Lg(qG90Un)H`Dr^cTKdaJ&6Y+u|p4R1L_{hDZkt5>EkNbSY;oWJp% zjnlZK4vSt@QxbNT=5?j^=5Bk%%l`j(Pnk0%jv7gk<5RKcEQud3^RUM5M6%Ic1M<1~ z{)2H7+*e9_FMGTN`%?f#6eqCJgg-uP_Mbv;=ahC0BW-l+xgqONT-hU9TDjEQ)n=%S z^gjEQ>NmAenP};~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!oA##z9T0@hGOuYp;t z^y8f|o%YgEV38(&i7prW0e75!V;kP*I;hCNe|{9Ol6DfD8Wy3EX`U?MXu=7S(C4Ye zdMpSJTE0p!&(Z)AsmT+`_L>nnX<8_I7*U$Gq&5 iZyZ+MjP=GD2e{1g+Bz Date: Thu, 26 Nov 2026 08:11:42 +1000 Subject: [PATCH 10/12] docs: add a feature map docs/feature-map.md names each part of the app (widget, tray icon, context menu, dashboard pages, Theme Studio panels, themes, providers and command-line flags) and where its code lives, so issues, pull requests and agent prompts use the same names. CONTRIBUTING.md links it. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 1 + CONTRIBUTING.md | 5 ++- docs/feature-map.md | 103 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 docs/feature-map.md diff --git a/CHANGELOG.md b/CHANGELOG.md index b5998a75..f3873334 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ changes grouped into Added, Changed, Fixed, and Removed where applicable. - Render themes to PNG without starting the app: `--render-theme --out `, with `--surface`, `--appearance`, `--fixture`, `--now`, `--utc-offset` and `--scale`. The clock, time zone and appearance are fixed, so the same input gives the same image. See [CONTRIBUTING.md](CONTRIBUTING.md#theme-changes). - Test every surface of every built-in theme in dark and light mode against reference images in `tests/snapshots/themes`. CI uploads the renders as the `theme-snapshots` artifact, so a theme pull request can be reviewed as pictures. - Add a provider contract test: every provider needs a redacted response fixture that its parser reads, usage that survives the usage cache and reaches themes, translated setting text, and unique identifiers. See [CONTRIBUTING.md](CONTRIBUTING.md#provider-changes). +- Add a [feature map](docs/feature-map.md) naming each part of the app and where its code lives. - Auto-merge Dependabot pull requests with patch-level Cargo updates once `CI passed` succeeds. `scripts/New-Release.ps1` adds changelog entries for them and refuses to prepare a release when `origin/main` has commits that local `main` lacks. See [docs/releasing.md](docs/releasing.md#dependabot-updates). ### Changed diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 687f5163..ea8c2816 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -40,7 +40,10 @@ accounts. Keep credentials and local configuration out of commits and fixtures. See the [user guide](USER_GUIDE.md) for application behavior, [localization guide](src/localization/README.md) for translations, and -[updater documentation](docs/updater.md) for update verification changes. +[updater documentation](docs/updater.md) for update verification changes. The +[feature map](docs/feature-map.md) names each part of the app (widget, tray icon, +context menu, dashboard pages, Theme Studio panels) and where its code lives; use +those names in issues and pull requests. ## Checks diff --git a/docs/feature-map.md b/docs/feature-map.md new file mode 100644 index 00000000..5381eb48 --- /dev/null +++ b/docs/feature-map.md @@ -0,0 +1,103 @@ +# Feature map + +The names below are the ones to use in issues, pull requests, commit messages and +agent prompts, so everyone means the same part of the app. Each entry lists where +the code lives. The [user guide](../USER_GUIDE.md) describes the behavior. + +## Widget + +The always-visible usage display drawn by the active theme. One process owns +one widget window. + +- **Theme surface `main`**: the widget itself. A theme's other surfaces are + flyouts or tray icons (below). +- **Host**: where the widget is placed. Theme Studio calls the choices Automatic, + Taskbar, Tray Icon, Desktop and Floating (`SurfaceNest` in the theme format). + Placement, taskbar fitting and window lifetime are in `src/window/` (`positioning.rs`, + `host_geometry.rs`, `taskbar_collision.rs`, `lifecycle.rs`); desktop hosting is + `src/desktop_compositor.rs`; the message loop is `src/window.rs` and + `src/window/message_loop.rs`. +- **Widget tooltip**: the hover summary, shown when a surface sets + `"tooltip": "usage_summary"` (`src/window/widget_tooltip.rs`). +- **Widget actions**: what clicks, double-clicks, right-clicks and hovering do, as + set by the theme (show or toggle the dashboard, open a URL, show the context + menu, change a theme variable), in `src/window/mouse.rs`. Left-drag moves the + widget (`src/window/message_loop.rs`). +- **Flyout**: an extra surface a theme opens on hover, such as Stacked Rows' + `claude-popup` and `codex-popup`. + +## Tray icon + +The notification-area icon (`src/tray_icon.rs`, `src/tray_icon/`). Left-click +shows or hides the widget; right-click opens the context menu. The app icon is the +fallback; a theme can draw per-provider tray icons from `-tray-icon` +surfaces (`provider_artwork.rs`). + +## Context menu + +The right-click menu on the widget and tray icon. Menus are documents +(`src/context_menu.rs`) shown natively by `src/window/window_context_menu.rs`. The +built-in menus are: + +- **Classic v1**: Refresh, Update frequency, Providers, Settings (Start with + Windows, Lock in taskbar, Language, Check for updates), Show widget, Open + Dashboard, Exit. +- **Dashboard v2**: Open Dashboard, Exit. + +## Dashboard + +The settings and editing window, a separate process started with +`--studio --owner ` (`src/dashboard.rs`, `src/studio_app.rs`). Its pages, +in navigation order (`Page` in `src/studio_app.rs`): + +| Page | Contents | Code | +| --- | --- | --- | +| Settings | General, Providers, Display and Appearance sections | `studio_app/studio_settings.rs` | +| Theme Studio | The theme editor (below) | `studio_app/studio_theme_workspace.rs` | +| Context Menus | Menu documents and their editor | `studio_app/studio_context_menus.rs`, `studio_context_menu_editor.rs`, `studio_native_menu.rs` | +| Assets | Images available to themes | `studio_app/studio_assets.rs` | +| Diagnostics | Diagnostic logging and the live event log | `studio_app/studio_diagnostics.rs` | + +`--dashboard-warp` opens an alternative WARP-rendered dashboard +(`studio_app/warp.rs`); see [dashboard rendering](dashboard-rendering.md). + +### Theme Studio + +- **Toolbar**: theme picker, New, Save, Duplicate, Import, Export, Delete, Live + apply, undo and redo. +- **Layers panel**: the surface and layer tree (`studio_scene_helpers.rs`). +- **Preview**: the rendered surface (`studio_theme_workspace.rs`). +- **Inspector**: properties of the selected surface or layer (`studio_inspectors.rs`). +- **Asset library**: images the theme can use. +- **Helper panel**: contextual help (`studio_helper.rs`, `studio_helper_panels.rs`). + +## Themes + +A theme is a JSON document of surfaces and layers. The engine is `src/theme_engine.rs` +and `src/theme_engine/`; built-in themes are in `src/themes/`: Classic v1, Classic +Vertical, Compact Fluent Quad, Minecraft (Codex) and Stacked Rows. Render any theme +to PNG without starting the app with `--render-theme`; see +[CONTRIBUTING.md](../CONTRIBUTING.md#theme-changes). + +## Providers + +A provider is a usage source: Claude Code, Codex, Antigravity, OpenCode, Cursor, +Grok and Copilot. Each has a descriptor in `src/providers.rs` (its key, as used +in theme expressions such as `codex.available`, its usage-cache key, setting +text and menu command id) and a poller in `src/poller/`. See +[CONTRIBUTING.md](../CONTRIBUTING.md#provider-changes) for what a new provider +needs. + +## Other windows and modes + +- **Message boxes**: update prompts, update failures, provider sign-in errors and + dashboard start-up failures. +- **Updater**: `src/updater.rs`; `--apply-update` is the internal helper mode. + See [updater](updater.md). +- **Command-line flags**: + - `--dashboard` opens the dashboard on start. + - `--studio --theme-studio` opens the dashboard on Theme Studio. + - `--allow-multiple` skips the single-instance check. + - `--no-poll` starts without polling providers. + - `--diagnose` and `--diagnose-append` write a diagnostic log. + - `--render-theme` renders a theme to PNG and exits. From f9f641dd666cae802b5ebe21148e9be47a083a4d Mon Sep 17 00:00:00 2001 From: Craig Constable Date: Thu, 26 Nov 2026 08:12:57 +1000 Subject: [PATCH 11/12] feat(themes): define the theme language once and generate a theme reference src/theme_engine/theme_language.rs is now the single description of the theme language: every field, value, operator, function, number and date format, mouse action and window. The expression evaluator, Theme Studio's helper and docs/theme-reference.md all read it, and `cargo test` fails when the generated reference is out of date. `--theme-reference` prints the reference; src/themes/README.md points agents and theme authors to it. `--render-theme` now warns about each unknown theme field with the likely fix, and failing expressions name the closest field. Also reject a layer background that is not a colour or gradient, and validate surface offset expressions instead of silently falling back to offset_x or offset_y. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 4 + CONTRIBUTING.md | 10 +- docs/feature-map.md | 8 +- docs/theme-reference.md | 301 +++++ src/studio_app/studio_helper.rs | 181 +-- src/theme_engine.rs | 88 +- src/theme_engine/theme_datetime.rs | 36 +- src/theme_engine/theme_expression.rs | 88 +- src/theme_engine/theme_language.rs | 1521 ++++++++++++++++++++++ src/theme_engine/theme_language/tests.rs | 421 ++++++ src/theme_render.rs | 23 +- src/theme_render/reference.rs | 424 ++++++ src/theme_render/tests.rs | 48 + src/themes/README.md | 15 + 14 files changed, 2907 insertions(+), 261 deletions(-) create mode 100644 docs/theme-reference.md create mode 100644 src/theme_engine/theme_language.rs create mode 100644 src/theme_engine/theme_language/tests.rs create mode 100644 src/theme_render/reference.rs create mode 100644 src/themes/README.md diff --git a/CHANGELOG.md b/CHANGELOG.md index f3873334..9c4b846d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,8 @@ changes grouped into Added, Changed, Fixed, and Removed where applicable. - Test every surface of every built-in theme in dark and light mode against reference images in `tests/snapshots/themes`. CI uploads the renders as the `theme-snapshots` artifact, so a theme pull request can be reviewed as pictures. - Add a provider contract test: every provider needs a redacted response fixture that its parser reads, usage that survives the usage cache and reaches themes, translated setting text, and unique identifiers. See [CONTRIBUTING.md](CONTRIBUTING.md#provider-changes). - Add a [feature map](docs/feature-map.md) naming each part of the app and where its code lives. +- Add a generated [theme reference](docs/theme-reference.md) listing every theme field, expression value, operator, function, template format and mouse action, with results computed from the sample usage. It is generated from the definitions the theme engine and Theme Studio use, `cargo test` fails when it is out of date, and `--theme-reference` prints it. +- Report theme mistakes with the likely fix: `--render-theme` warns about fields the engine does not know (`'widht' is not a theme field; did you mean 'width'?`), and theme validation suggests the closest value, function, mouse action or template format for an unknown one. - Auto-merge Dependabot pull requests with patch-level Cargo updates once `CI passed` succeeds. `scripts/New-Release.ps1` adds changelog entries for them and refuses to prepare a release when `origin/main` has commits that local `main` lacks. See [docs/releasing.md](docs/releasing.md#dependabot-updates). ### Changed @@ -38,6 +40,8 @@ changes grouped into Added, Changed, Fixed, and Removed where applicable. - Update the transitive `url` dependency from 2.5.8 to 2.5.9, with `form_urlencoded` from 1.2.2 to 1.2.3, to resolve RUSTSEC-2026-0592 found by the release dependency checks. - Update the transitive `cookie` dependency from 0.18.2 to 0.18.3 to resolve RUSTSEC-2026-0594 found by the release dependency checks. - Translate the Cursor and OpenCode Go provider setting descriptions, which showed in English in every other language. +- Reject a theme layer background with an invalid value, such as an unknown image `fit`, instead of silently replacing it with a default colour. +- Validate a surface's `placement.offset_x_expression` and `placement.offset_y_expression` when a theme loads, so a broken offset is reported instead of silently falling back to `offset_x` or `offset_y`. ## [2.25.3] - 2026-11-21 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ea8c2816..f5d0a400 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -66,6 +66,13 @@ compiling the application is not necessary. ### Theme changes +Theme fields are mostly expressions, not fixed numbers; see the generated +[theme reference](docs/theme-reference.md) for every field, value, function, +format and mouse action. The language is defined once in +`src/theme_engine/theme_language.rs`: the evaluator, Theme Studio and the +reference read it, and `cargo test` fails when the reference is out of date or a +built-in theme uses a field the engine does not know. + Every surface of every theme in `src/themes/` is rendered in dark and light mode from the sample usage in `tests/fixtures/theme-usage.json`, with the clock, time zone and appearance fixed, and compared with the reference images in @@ -95,7 +102,8 @@ appearance) or a `.png` file when one image is rendered. Options: `--fixture `, `--now `, `--utc-offset ` and `--scale `. The executable is a Windows GUI program, so in PowerShell pipe it to `Out-Host` (or use `Start-Process -Wait -NoNewWindow`) to wait for it -and see its output. +and see its output. It prints a warning for each unknown field and failing +expression. ### Provider changes diff --git a/docs/feature-map.md b/docs/feature-map.md index 5381eb48..8d200d1d 100644 --- a/docs/feature-map.md +++ b/docs/feature-map.md @@ -75,8 +75,11 @@ in navigation order (`Page` in `src/studio_app.rs`): A theme is a JSON document of surfaces and layers. The engine is `src/theme_engine.rs` and `src/theme_engine/`; built-in themes are in `src/themes/`: Classic v1, Classic -Vertical, Compact Fluent Quad, Minecraft (Codex) and Stacked Rows. Render any theme -to PNG without starting the app with `--render-theme`; see +Vertical, Compact Fluent Quad, Minecraft (Codex) and Stacked Rows. Most fields are +expressions (`"width": "canvas.width - 8"`) and text uses `{expression:format}` +templates; [theme-reference.md](theme-reference.md) lists every field, value, +function, format and mouse action, generated from `src/theme_engine/theme_language.rs`. +Render any theme to PNG without starting the app with `--render-theme`; see [CONTRIBUTING.md](../CONTRIBUTING.md#theme-changes). ## Providers @@ -101,3 +104,4 @@ needs. - `--no-poll` starts without polling providers. - `--diagnose` and `--diagnose-append` write a diagnostic log. - `--render-theme` renders a theme to PNG and exits. + - `--theme-reference` prints [theme-reference.md](theme-reference.md) and exits. diff --git a/docs/theme-reference.md b/docs/theme-reference.md new file mode 100644 index 00000000..1aefd9dd --- /dev/null +++ b/docs/theme-reference.md @@ -0,0 +1,301 @@ +# Theme reference + + + +Theme files are JSON (see the [built-in themes](../src/themes/)). Most fields are **expressions**, not fixed numbers: `"width": "canvas.width - 8"` sizes a layer from its surface, and `"render": "claude.session.percentage > 80"` shows it only near the limit. Text layers use **templates** with `{expression}` tokens, and mouse events run **actions**. The [Fields](#fields) section says what each field takes. + +Results below are computed with `tests/fixtures/theme-usage.json` on Stacked Rows' `main` surface, in dark mode, at 2027-01-15 08:00 UTC: the same inputs `--render-theme` uses. Check a theme with `claude-code-usage-monitor --render-theme --out `; it prints unknown fields and failing expressions. + +## Expressions + +Expressions combine values, numbers and text with operators and functions. A condition is true when it is not 0. + +| Literal | Meaning | Example | Result | +| --- | --- | --- | --- | +| number | Decimal number | `0.5` | `0.5` | +| text | Text in double or single quotes; `\"` escapes a quote | `"#E5484D"` | `"#E5484D"` | +| true, false | 1 and 0; any non-zero value counts as true | `true` | `1` | +| pi, e | Constants | `pi` | `3.1416` | +| value name | A value from the lists below; names ignore case | `claude.session.percentage` | `42` | + +### Operators + +| Operator | Meaning | Example | Result | +| --- | --- | --- | --- | +| `&&` | And | `claude.available && codex.available` | `1` | +| `\|\|` | Or | `claude.available \|\| codex.available` | `1` | +| `!` | Not | `!data.has_error` | `1` | +| `==` | Equal | `providers.count == 2` | `1` | +| `!=` | Not equal | `claude.session.label != "5h"` | `0` | +| `>` | Greater than | `claude.session.percentage > 80` | `0` | +| `<` | Less than | `claude.session.reset.hours < 1` | `0` | +| `>=` | Greater or equal | `claude.weekly.percentage >= 50` | `1` | +| `<=` | Less or equal | `host.height <= 40` | `0` | +| `+` | Add | `canvas.width + 8` | `113` | +| `-` | Subtract | `canvas.width - 8` | `97` | +| `*` | Multiply | `canvas.width * claude.session.percentage / 100` | `44.1` | +| `/` | Divide | `canvas.height / 2` | `24` | +| `%` | Remainder | `time.local.second % 2` | `0` | +| `()` | Grouping | `(canvas.width - 8) / 2` | `48.5` | + +### Functions + +`get(owner, field)` reads `owner.field`; `get(self, width)` reads the current layer. + +| Function | Meaning | Example | Result | +| --- | --- | --- | --- | +| `get(this, property)` | Value expression | `get(claude.session, percentage)` | `42` | +| `min(a, b)` | Smaller value | `min(claude.session.percentage, codex.session.percentage)` | `12` | +| `max(a, b)` | Larger value | `max(claude.session.percentage, claude.weekly.percentage)` | `63` | +| `clamp(value, min, max)` | Constrain a value | `clamp(claude.weekly.percentage * 2, 0, 100)` | `100` | +| `round(value)` | Nearest integer | `round(claude.session.reset.hours)` | `2` | +| `floor(value)` | Round down | `floor(claude.session.reset.hours)` | `2` | +| `ceil(value)` | Round up | `ceil(claude.session.reset.hours)` | `3` | +| `abs(value)` | Absolute value | `abs(claude.session.percentage - codex.session.percentage)` | `30` | +| `sqrt(value)` | Square root | `sqrt(claude.session.percentage)` | `6.4807` | +| `pow(base, power)` | Exponent | `pow(claude.session.percentage / 100, 2)` | `0.1764` | +| `if(condition, yes, no)` | Conditional value | `if(claude.session.percentage > 80, "#E5484D", "#46A758")` | `"#46A758"` | +| `lerp(start, end, amount)` | Linear interpolation | `lerp(4, canvas.width - 4, claude.session.percentage / 100)` | `44.74` | + +## Templates + +A text layer's `template` is literal text with `{expression}` or `{expression:format}` tokens, such as `"{claude.session.percentage:0}% used"`. `{{` writes a literal `{`. A token that cannot be evaluated shows `--`. + +## Formats + +| Format | Meaning | Example | Result | +| --- | --- | --- | --- | +| `0.##` | Default: two fixed decimals. With a `0`, each `0` or `#` after the point is a fixed decimal | `{canvas.width / 2}` | `52.50` | +| `#.##` | Without a `0`, decimals are optional: up to one per `#`, trailing zeros dropped | `{canvas.width / 2:#.##}` | `52.5` | +| `0` | Whole number | `{claude.session.reset.hours:0}` | `2` | +| `0.0` | Fixed decimals: one `0` per decimal place | `{canvas.width / 2:0.0}` | `52.5` | +| `#,##0` | Any format containing `,` groups thousands | `{host.width * 1000:#,##0}` | `1,920,000` | +| `percent` | Whole number followed by `%` | `{claude.session.display:percent}` | `42%` | +| `duration` | Seconds as the two largest units, such as `3d 4h` | `{claude.weekly.reset.seconds:duration}` | `3d 4h` | +| `duration_short` | Seconds as the largest unit | `{claude.weekly.reset.seconds:duration_short}` | `3d` | +| `usage_line` | A window's shown percentage and time to reset. Use the window name, or `.display` after it to follow the Usage direction setting | `{claude.session:usage_line}` | `42% · 2.5h` | +| `usage_badge` | A window's shown percentage only | `{claude.session:usage_badge}` | `42%` | +| `utc_` | Prefix for any timestamp format to use UTC instead of local time | `{claude.weekly.reset.unix:utc_iso_datetime}` | `2027-01-18T12:00:00Z` | +| `weekday_2` | Weekday, two letters | `{claude.weekly.reset.unix:weekday_2}` | `Mo` | +| `weekday_short` | Weekday, short | `{claude.weekly.reset.unix:weekday_short}` | `Mon` | +| `weekday_long` | Weekday, full | `{claude.weekly.reset.unix:weekday_long}` | `Monday` | +| `day` | Day of the month | `{claude.weekly.reset.unix:day}` | `18` | +| `day_2` | Day of the month, two digits | `{claude.weekly.reset.unix:day_2}` | `18` | +| `month` | Month number | `{claude.weekly.reset.unix:month}` | `1` | +| `month_2` | Month number, two digits | `{claude.weekly.reset.unix:month_2}` | `01` | +| `month_short` | Month name, short | `{claude.weekly.reset.unix:month_short}` | `Jan` | +| `month_long` | Month name, full | `{claude.weekly.reset.unix:month_long}` | `January` | +| `year_2` | Year, two digits | `{claude.weekly.reset.unix:year_2}` | `27` | +| `year` | Year | `{claude.weekly.reset.unix:year}` | `2027` | +| `date_short`, `date` | Short date in the app language | `{claude.weekly.reset.unix:date_short}` | `1/18/2027` | +| `date_long` | Long date in the app language | `{claude.weekly.reset.unix:date_long}` | `Monday, January 18, 2027` | +| `time_short`, `time` | Time in the app language | `{claude.weekly.reset.unix:time_short}` | `12:00 PM` | +| `time_seconds` | Time with seconds in the app language | `{claude.weekly.reset.unix:time_seconds}` | `12:00:00 PM` | +| `time_24` | 24-hour time | `{claude.weekly.reset.unix:time_24}` | `12:00` | +| `time_24_seconds` | 24-hour time with seconds | `{claude.weekly.reset.unix:time_24_seconds}` | `12:00:00` | +| `time_12` | 12-hour time | `{claude.weekly.reset.unix:time_12}` | `12:00 PM` | +| `time_12_seconds` | 12-hour time with seconds | `{claude.weekly.reset.unix:time_12_seconds}` | `12:00:00 PM` | +| `am_pm` | AM or PM | `{claude.weekly.reset.unix:am_pm}` | `PM` | +| `datetime_short`, `datetime` | Short date and time | `{claude.weekly.reset.unix:datetime_short}` | `1/18/2027 12:00 PM` | +| `datetime_long` | Long date and time with seconds | `{claude.weekly.reset.unix:datetime_long}` | `Monday, January 18, 2027 12:00:00 PM` | +| `iso_date` | ISO 8601 date | `{claude.weekly.reset.unix:iso_date}` | `2027-01-18` | +| `iso_time` | ISO 8601 time | `{claude.weekly.reset.unix:iso_time}` | `12:00:00` | +| `iso_datetime` | ISO 8601 date and time | `{claude.weekly.reset.unix:iso_datetime}` | `2027-01-18T12:00:00` | + +## Mouse actions + +`mouse_events` fields hold scripts of one or more actions separated by `;` or new lines. A layer is `self` or its quoted id; layer properties are `render`, `visibility`, `x`, `y`, `width`, `height`, `rotation`. `set`, `increase` and `decrease` take an expression. + +| Action | Meaning | Example | +| --- | --- | --- | +| `show_dashboard()` | Show dashboard | `show_dashboard()` | +| `toggle_dashboard()` | Toggle dashboard | `toggle_dashboard()` | +| `open_url("https://…")` | Open URL | `open_url("https://claude.ai/settings/usage")` | +| `show_context_menu("menu")` | Show context menu | `show_context_menu()` | +| `set(layer, property, value)` | Set property | `set("claude-popup", render, true)` | +| `toggle(layer, render)` | Toggle Render | `toggle("details", render)` | +| `reset(layer, property)` | Reset property | `reset(self, height)` | +| `increase(layer, property, amount)` | Increase value | `increase(self.height, 10)` | +| `decrease(layer, property, amount)` | Decrease value | `decrease(self, width, 5)` | + +## Fields + +`placement` and `tooltip` apply to surfaces; `parent`, `anchor`, `x` and `y` to layers. Other object fields apply to both. `background(gradient).angle` is the `angle` key of a `background` whose `type` is `gradient`. Fields not listed here are ignored, so `--render-theme` reports them. + +### Theme + +| Field | Takes | Meaning | +| --- | --- | --- | +| `schema_version` | integer | Theme format version; currently 1 | +| `id` | text | Unique theme id, lowercase with dashes | +| `name` | text | Name shown in Theme Studio | +| `surfaces` | objects | Root objects. Each is a native window: `main` is the widget; others are flyouts or `-tray-icon` tray artwork | + +### Surfaces and layers + +| Field | Takes | Meaning | +| --- | --- | --- | +| `id` | text | Unique id. Mouse actions and `parent` refer to objects by id | +| `name` | text | Name shown in the Layers panel | +| `render` | condition | Draw the object and its children while true. Default `true` | +| `visibility` | expression | Opacity percentage for the object and its children, 0 to 100. Default `100` | +| `parent` | text | Layers only: the id of the containing object. A surface's layers are stored as one flat list in drawing order; `parent` builds the tree | +| `placement` | group | Surfaces only: where the window goes on screen | +| `placement.reference` | group | What the surface is placed against | +| `placement.reference.region` | `monitor`, `taskbar`, `system_tray` | Screen area the anchors refer to | +| `placement.reference.display` | integer | Monitor index; 0 is the primary monitor | +| `placement.nest` | `auto`, `taskbar`, `tray_icon`, `desktop`, `floating` | Window host. `auto` is only for themes saved before hosts existed | +| `placement.horizontal` | `left`, `center`, `right` | Point of the reference region to align to | +| `placement.vertical` | `top`, `center`, `bottom` | Point of the reference region to align to | +| `placement.surface_horizontal` | `left`, `center`, `right` | Point of the surface placed there | +| `placement.surface_vertical` | `top`, `center`, `bottom` | Point of the surface placed there | +| `placement.offset_x` | integer | Horizontal offset in pixels | +| `placement.offset_x_expression` | expression | Replaces `offset_x` with an expression | +| `placement.offset_y` | integer | Vertical offset in pixels | +| `placement.offset_y_expression` | expression | Replaces `offset_y` with an expression | +| `anchor` | group | Layers only: the parent corner `x` and `y` start from | +| `anchor.horizontal` | `left`, `center`, `right` | Horizontal anchor | +| `anchor.vertical` | `top`, `center`, `bottom` | Vertical anchor | +| `x` | expression | Layers only: horizontal offset from the anchor, in pixels | +| `y` | expression | Layers only: vertical offset from the anchor, in pixels | +| `width` | expression | Width in pixels. A surface's width and height size its window | +| `height` | expression | Height in pixels | +| `rotation` | expression | Clockwise rotation in degrees | +| `background(none)` | type | No background | +| `background(colour)` | type | A solid colour | +| `background(colour).colour` | paint | The colour | +| `background(gradient)` | type | A linear gradient | +| `background(gradient).start` | paint | Start colour | +| `background(gradient).end` | paint | End colour | +| `background(gradient).angle` | expression | Direction in degrees; 0 runs left to right | +| `background(image)` | type | An image | +| `background(image).path` | text | Image file name in the theme's asset folder | +| `background(image).fit` | `contain`, `cover`, `stretch`, `original` | How the image fills the object | +| `border` | group | Optional outline | +| `border.color` | paint | Outline colour | +| `border.width` | expression | Outline width in pixels | +| `mouse_events` | group | Action scripts run by the mouse | +| `mouse_events.click` | actions | Left click | +| `mouse_events.double_click` | actions | Double click | +| `mouse_events.right_click` | actions | Right click | +| `mouse_events.mouse_enter` | actions | Pointer enters the object | +| `mouse_events.mouse_leave` | actions | Pointer leaves the object | +| `tooltip` | `usage_summary` | Surfaces only: hover popup listing every provider's usage | +| `corner_radius` | expression | Corner radius in pixels | +| `layout` | `freeform`, `row`, `column` | How children are arranged. `freeform` uses each child's anchor, `x` and `y` | +| `align` | `start`, `center`, `end` | Cross-axis alignment of children in a row or column | +| `gap` | expression | Space between children in a row or column | +| `content(none)` | type | Nothing drawn beyond the background | +| `content(text)` | type | Text | +| `content(text).template` | template | The text, with `{expression}` and `{expression:format}` tokens | +| `content(text).font_family` | text | Installed font family name | +| `content(text).font_size` | expression | Size in pixels | +| `content(text).weight` | `light`, `regular`, `medium`, `semibold`, `bold` | Font weight | +| `content(text).rendering` | `antialiased`, `clear_type`, `aliased` | Glyph smoothing | +| `content(text).contrast` | expression | Glyph contrast; higher is crisper. Default `1.4` | +| `content(text).align` | `left`, `center`, `right` | Alignment within the object | +| `content(text).color` | paint | Text colour | +| `content(progress)` | type | A progress bar | +| `content(progress).value` | expression | Filled percentage, 0 to 100, such as `claude.session.display` | +| `content(progress).direction` | `left_to_right`, `right_to_left`, `bottom_to_top`, `top_to_bottom` | Fill direction | +| `content(progress).fill` | paint | Filled part | +| `content(progress).track` | paint | Unfilled part | +| `content(progress).corner_radius` | expression | Bar corner radius | +| `content(progress).segments` | integer | Number of segments; 0 draws a continuous bar | +| `content(progress).segments_expression` | expression | Replaces `segments` with an expression | +| `content(progress).segment_gap` | expression | Space between segments in pixels | +| `content(provider_mark)` | type | A provider's logo, tinted and fitted into the object | +| `content(provider_mark).provider` | text | Provider key, such as `claude` or `codex` | +| `content(provider_mark).color` | paint | Logo colour | +| `children` | objects | Surfaces only: every layer of the surface, in drawing order | + +### Paints + +| Field | Takes | Meaning | +| --- | --- | --- | +| `color` | colour | The colour, or the dark-mode colour when `light_color` is set | +| `light_color` | colour | Optional colour used while Windows is in light mode | +| `opacity` | expression | Opacity multiplier, 0 to 1. Default `1` | + +## Values + +Names an expression can read. Text values work in templates and comparisons. + +| Name | Meaning | Sample values | +| --- | --- | --- | +| `canvas.*` | Size of the surface being drawn | `canvas.height` = `48`
`canvas.width` = `105` | +| `parent.*` | Size of the object's parent; the surface at the root | `parent.height` = `48`
`parent.width` = `105` | +| `host.*` | Size of the area hosting the surface: the taskbar or the monitor | `host.height` = `48`
`host.width` = `1920` | +| `this.*` | Inside a layer: its own `x`, `y`, `width`, `height` and `gap`; `self` is a synonym in `get(self, ...)` and actions | (inside layers) | +| `object.*` | Inside a layer: its `x`, `y`, `width` and `height` | (inside layers) | +| `pi` | π | `pi` = `3.1416` | +| `e` | Euler's number | `e` = `2.7183` | +| `true` | 1 | `true` = `1` | +| `false` | 0 | `false` = `0` | +| `app.*` | App version as text (`app.version`) and numbers | `app.version` = `"X.Y.Z"`
`app.version.major` = `…`
`app.version.minor` = `…`
`app.version.patch` = `…` | +| `system.dark` | 1 while Windows uses dark mode; prefer `light_color` on paints | `system.dark` = `1` | +| `display.countdown` | 1 when the Usage direction setting is Remaining | `display.countdown` = `0` | +| `data.*` | Polling state: `poll_ok`, `has_error` and `loading` are 1 or 0 | `data.has_error` = `0`
`data.loading` = `0`
`data.poll_ok` = `1` | +| `i18n.*` | Labels and unit suffixes in the app language | `i18n.cursor_api_window` = `"API"`
`i18n.cursor_auto_window` = `"Auto"`
`i18n.day_suffix` = `"d"`
`i18n.hour_suffix` = `"h"`
`i18n.locale` = `"en"`
`i18n.minute_suffix` = `"m"`
`i18n.now` = `"now"`
`i18n.second_suffix` = `"s"`
`i18n.session_window` = `"5h"`
`i18n.weekly_window` = `"7d"` | +| `providers.*` | `providers.count` enabled providers; `providers..enabled` is 1 or 0 | `providers.antigravity.enabled` = `0`
`providers.claude.enabled` = `1`
`providers.codex.enabled` = `1`
`providers.copilot.enabled` = `0`
`providers.count` = `2`
`providers.cursor.enabled` = `0`
`providers.grok.enabled` = `0`
`providers.opencode.enabled` = `0` | +| `time.now.*` | Current time as Unix seconds and milliseconds | `time.now.milliseconds` = `1800000000000`
`time.now.unix` = `1800000000` | +| `time.local.*` | Current local date and time parts; `weekday` is 0 for Monday | `time.local.day` = `15`
`time.local.hour` = `8`
`time.local.minute` = `0`
`time.local.month` = `1`
`time.local.second` = `0`
`time.local.weekday` = `4`
`time.local.year` = `2027` | +| `time.utc.*` | Current UTC date and time parts | `time.utc.day` = `15`
`time.utc.hour` = `8`
`time.utc.minute` = `0`
`time.utc.month` = `1`
`time.utc.second` = `0`
`time.utc.weekday` = `4`
`time.utc.year` = `2027` | +| `antigravity.*` | Antigravity pools: `gemini.*` and `external.*` have the window fields below; `dual_mode`, `crossfade_opacity`, `reported` | `antigravity.crossfade_opacity` = `1`
`antigravity.dual_mode` = `0`
`antigravity.external.enabled` = `0`
`antigravity.gemini.enabled` = `0` | +| `accounts.*` | Named Claude Code and Codex accounts: `accounts...` followed by the window fields below, plus `name`, `selected` and `has_error` | (inside layers) | + +### Usage values + +Usage values are `..`, such as `claude.session.percentage`, or `.` for the provider itself, such as `claude.available`. Missing values make an expression fail, so check `available` before using a window a provider may not report. + +| Owner | Meaning | +| --- | --- | +| `claude` | Claude Code | +| `codex` | Codex | +| `antigravity` | Antigravity | +| `opencode` | OpenCode | +| `cursor` | Cursor | +| `grok` | Grok | +| `copilot` | Copilot | +| `antigravity.gemini` | Antigravity's Gemini pool | +| `antigravity.external` | Antigravity's external-model pool | +| `active` | The first enabled provider with data | + +| Window | Meaning | In the sample | +| --- | --- | --- | +| (none) | The provider itself | every owner | +| `account` | The selected account | `antigravity`, `claude`, `codex`, `copilot`, `cursor`, `grok`, `opencode` | +| `session` | Short window: Claude Code and Codex 5 hours; Cursor Auto | every owner | +| `weekly` | Long window: 7 days; Cursor API; OpenCode's long window | every owner | +| `five_hour` | The five-hour window where the provider has one | every owner | +| `monthly` | Monthly window where reported | every owner | +| `credits` | Credit balance where reported | every owner | +| `headline` | Whichever allowance is closest to its limit; best for a single badge | every owner | +| `limits` | Every reported quota | every owner | +| `limits.` | One reported quota by key, such as `weekly_scoped_fable` | `active`, `claude` | +| `model.` | A model's weekly quota, when exactly one matches | `active`, `claude` | +| `scoped` | The single scoped quota the provider marks active | `active`, `claude` | + +| Field | Meaning | Example | Sample value | +| --- | --- | --- | --- | +| `available` | 1 when reported; gate optional layers on it | `claude.session.available` | `1` | +| `stale` | 1 while showing earlier figures after a failed poll | `claude.stale` | `0` | +| `has_error` | 1 when the selected account's last poll failed | `claude.has_error` | (not in the sample) | +| `name` | Account name (text) | `claude.account.name` | `""` | +| `count` | Number of reported quotas | `claude.limits.count` | `1` | +| `percentage` | Used, 0 to 100 | `claude.session.percentage` | `42` | +| `remaining` | Remaining, 0 to 100 | `claude.session.remaining` | `58` | +| `display` | Used or remaining, following the Usage direction setting; prefer it for what the widget shows | `claude.session.display` | `42` | +| `label` | Short window name (text) | `claude.session.label` | `"5h"` | +| `balance` | Credits left | `claude.credits.balance` | `0` | +| `total` | Credits granted | `claude.credits.total` | `0` | +| `is_active` | 1 when the provider marks this quota active | `active.limits.weekly_scoped_fable.is_active` | `1` | +| `key` | Quota key (text) | `active.limits.weekly_scoped_fable.key` | `"weekly_scoped_fable"` | +| `kind` | Quota kind (text) | `active.limits.weekly_scoped_fable.kind` | `"weekly_scoped"` | +| `model_id` | Model id (text) | `active.limits.weekly_scoped_fable.model_id` | `""` | +| `scope` | Scope as JSON (text) | `active.limits.weekly_scoped_fable.scope` | `"{"model":{"display_name":"Fable"}}"` | +| `reset.unix` | Reset time as Unix seconds; use a timestamp format | `claude.session.reset.unix` | `1800008100` | +| `reset.seconds` | Seconds until reset; use `duration` or `duration_short` | `claude.session.reset.seconds` | `8100` | +| `reset.minutes` | Minutes until reset | `claude.session.reset.minutes` | `135` | +| `reset.hours` | Hours until reset | `claude.session.reset.hours` | `2.25` | +| `reset.days` | Days until reset | `claude.session.reset.days` | `0.0938` | diff --git a/src/studio_app/studio_helper.rs b/src/studio_app/studio_helper.rs index 52941113..06f379a5 100644 --- a/src/studio_app/studio_helper.rs +++ b/src/studio_app/studio_helper.rs @@ -69,60 +69,9 @@ const MENU_ACTION_CATEGORIES: &[&str] = &[ OPERATORS, ]; -/// `(name, signature, insertion, description)` -const EXPRESSION_FUNCTIONS: &[(&str, &str, &str, &str)] = &[ - ( - "get", - "get(this, property)", - "get(this, gap)", - "Value expression", - ), - ("min", "min(a, b)", "min(0, 0)", "Smaller value"), - ("max", "max(a, b)", "max(0, 0)", "Larger value"), - ( - "clamp", - "clamp(value, min, max)", - "clamp(0, 0, 100)", - "Constrain a value", - ), - ("round", "round(value)", "round(0)", "Nearest integer"), - ("floor", "floor(value)", "floor(0)", "Round down"), - ("ceil", "ceil(value)", "ceil(0)", "Round up"), - ("abs", "abs(value)", "abs(0)", "Absolute value"), - ("sqrt", "sqrt(value)", "sqrt(0)", "Square root"), - ("pow", "pow(base, power)", "pow(0, 2)", "Exponent"), - ( - "if", - "if(condition, yes, no)", - "if(true, 1, 0)", - "Conditional value", - ), - ( - "lerp", - "lerp(start, end, amount)", - "lerp(0, 100, 0.5)", - "Linear interpolation", - ), -]; - -/// `(operator, description)` -const EXPRESSION_OPERATORS: &[(&str, &str)] = &[ - ("&&", "And"), - ("||", "Or"), - ("!", "Not"), - ("==", "Equal"), - ("!=", "Not equal"), - (">", "Greater than"), - ("<", "Less than"), - (">=", "Greater or equal"), - ("<=", "Less or equal"), - ("+", "Add"), - ("-", "Subtract"), - ("*", "Multiply"), - ("/", "Divide"), - ("%", "Remainder"), - ("()", "Grouping"), -]; +// Functions, operators and mouse actions are defined by the theme engine +// (`theme_engine::EXPRESSION_FUNCTIONS` and friends) so the helper, the +// evaluator and docs/theme-reference.md cannot disagree. /// An action the helper can build: `(id, category, label, code, token)`. type ActionSpec = ( @@ -133,72 +82,6 @@ type ActionSpec = ( &'static str, ); -const MOUSE_ACTIONS: &[ActionSpec] = &[ - ( - "show_dashboard", - DASHBOARD, - "Show dashboard", - "show_dashboard()", - "show_dashboard", - ), - ( - "toggle_dashboard", - DASHBOARD, - "Toggle dashboard", - "toggle_dashboard()", - "toggle_dashboard", - ), - ( - "open_url", - LINKS_AND_MENUS, - "Open URL", - "open_url(\"https://…\")", - "open_url", - ), - ( - "show_context_menu", - LINKS_AND_MENUS, - "Show context menu", - "show_context_menu(\"menu\")", - "show_context_menu", - ), - ( - "set", - LAYERS, - "Set property", - "set(layer, property, value)", - "set", - ), - ( - "toggle", - LAYERS, - "Toggle Render", - "toggle(layer, render)", - "toggle", - ), - ( - "reset", - LAYERS, - "Reset property", - "reset(layer, property)", - "reset", - ), - ( - "increase", - LAYERS, - "Increase value", - "increase(layer, property, amount)", - "increase", - ), - ( - "decrease", - LAYERS, - "Decrease value", - "decrease(layer, property, amount)", - "decrease", - ), -]; - const MENU_ACTIONS: &[ActionSpec] = &[ ( "open_dashboard", @@ -435,12 +318,11 @@ impl HelperSession { } return; } - let actions = match self.target { - HelperTarget::MouseAction { .. } => MOUSE_ACTIONS, - HelperTarget::MenuAction { .. } => MENU_ACTIONS, - _ => &[], + let mut entries = match self.target { + HelperTarget::MouseAction { .. } => mouse_action_entries(language), + HelperTarget::MenuAction { .. } => action_entries(MENU_ACTIONS, language), + _ => Vec::new(), }; - let mut entries = action_entries(actions, language); entries.extend(value_entries(context, language, syntax)); self.catalogue = Some(HelperCatalogue { context: context.clone(), @@ -919,30 +801,30 @@ pub(super) fn value_entries( let mut entries = list.entries; let functions = language.text("Functions"); entries.extend( - EXPRESSION_FUNCTIONS + theme_engine::EXPRESSION_FUNCTIONS .iter() - .map(|(name, signature, _, detail)| HelperEntry { - id: format!("fn:{name}"), + .map(|function| HelperEntry { + id: format!("fn:{}", function.name), category: FUNCTIONS, scope: None, group: functions.into(), - label: language.text(detail).into(), - code: (*signature).into(), - token: (*name).into(), + label: language.text(function.description).into(), + code: function.signature.into(), + token: function.name.into(), value: None, }), ); let operators = language.text("Operators"); entries.extend( - EXPRESSION_OPERATORS + theme_engine::EXPRESSION_OPERATORS .iter() - .map(|(operator, detail)| HelperEntry { - id: format!("op:{operator}"), + .map(|operator| HelperEntry { + id: format!("op:{}", operator.symbol), category: OPERATORS, scope: None, group: operators.into(), - label: language.text(detail).into(), - code: (*operator).into(), + label: language.text(operator.description).into(), + code: operator.symbol.into(), token: String::new(), value: None, }), @@ -950,6 +832,22 @@ pub(super) fn value_entries( entries } +fn mouse_action_entries(language: LanguageId) -> Vec { + theme_engine::MOUSE_ACTIONS + .iter() + .map(|action| HelperEntry { + id: action.name.into(), + category: action.category, + scope: None, + group: language.text(action.category).into(), + label: language.text(action.label).into(), + code: action.signature.into(), + token: action.name.into(), + value: None, + }) + .collect() +} + fn action_entries(actions: &[ActionSpec], language: LanguageId) -> Vec { actions .iter() @@ -1059,16 +957,19 @@ pub(super) fn value_details( }; HelperInsertion::new(text, InsertMode::Spaced) }; - let (expression, kind) = if let Some((_, _, insertion, _)) = entry + let (expression, kind) = if let Some(function) = entry .id .strip_prefix("fn:") - .and_then(|name| EXPRESSION_FUNCTIONS.iter().find(|item| item.0 == name)) + .and_then(theme_engine::expression_function) { note( ui, language.text("Replace each argument with a value from the list or a number."), ); - ((*insertion).to_string(), TextTemplateValueKind::Number) + ( + function.insertion.to_string(), + TextTemplateValueKind::Number, + ) } else if let Some(operator) = entry.id.strip_prefix("op:") { note( ui, @@ -1689,7 +1590,7 @@ impl StudioApp { }, None, |ui, entry, caret| { - if MOUSE_ACTIONS.iter().any(|action| action.0 == entry.id) { + if theme_engine::mouse_action(&entry.id).is_some() { mouse_action_details(ui, entry, forms, &targets, &self_name, language) } else { let syntax = ValueSyntax::Action; diff --git a/src/theme_engine.rs b/src/theme_engine.rs index f12dd07c..0eb1eb19 100644 --- a/src/theme_engine.rs +++ b/src/theme_engine.rs @@ -646,7 +646,7 @@ pub fn parse_mouse_actions(source: &str) -> Result, String> { actions.push(MouseAction::Reset { target, property }); } } - _ => return Err(format!("Unknown action: {name}")), + _ => return Err(theme_language::unknown_action_message(&name)), } } Ok(actions) @@ -1017,13 +1017,6 @@ impl LayerBackground { } } -#[derive(Deserialize)] -#[serde(untagged)] -enum LayerBackgroundWire { - Current(LayerBackgroundCurrent), - Legacy(Paint), -} - #[derive(Deserialize)] #[serde(tag = "type", rename_all = "snake_case")] enum LayerBackgroundCurrent { @@ -1049,21 +1042,26 @@ impl<'de> Deserialize<'de> for LayerBackground { where D: serde::Deserializer<'de>, { - Ok(match LayerBackgroundWire::deserialize(deserializer)? { - LayerBackgroundWire::Current(LayerBackgroundCurrent::None) => Self::None, - LayerBackgroundWire::Current(LayerBackgroundCurrent::Colour { colour }) => { - Self::Colour { colour } - } - LayerBackgroundWire::Current(LayerBackgroundCurrent::Gradient { - start, - end, - angle, - }) => Self::Gradient { start, end, angle }, - LayerBackgroundWire::Current(LayerBackgroundCurrent::Image { path, fit }) => { - Self::Image { path, fit } - } - LayerBackgroundWire::Legacy(paint) => Self::from_legacy_paint(paint), - }) + use serde::de::Error as _; + // A background with a `type` is the current format, and its errors are + // reported. Only an untyped paint is the legacy format; trying it after + // a failed typed background would hide the error behind a default paint. + let value = serde_json::Value::deserialize(deserializer)?; + if value.get("type").is_none() { + return serde_json::from_value(value) + .map(Self::from_legacy_paint) + .map_err(D::Error::custom); + } + Ok( + match serde_json::from_value(value).map_err(D::Error::custom)? { + LayerBackgroundCurrent::None => Self::None, + LayerBackgroundCurrent::Colour { colour } => Self::Colour { colour }, + LayerBackgroundCurrent::Gradient { start, end, angle } => { + Self::Gradient { start, end, angle } + } + LayerBackgroundCurrent::Image { path, fit } => Self::Image { path, fit }, + }, + ) } } @@ -1288,6 +1286,10 @@ impl Default for Paint { } } +/// A formula stored as text, such as `"canvas.width - 8"` or +/// `"claude.session.percentage > 80"`. Most theme fields are expressions; the +/// values, operators and functions they can use are in `theme_language.rs` and +/// the generated `docs/theme-reference.md`. #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] #[serde(transparent)] pub struct Expression(pub String); @@ -1926,6 +1928,20 @@ impl DataContext { }) } + /// Every number and text name set in this context, sorted. Names that only + /// resolve through defaults (offline accounts and quotas) are not listed. + pub fn names(&self) -> Vec<&str> { + let mut names: Vec<_> = self + .values + .keys() + .chain(self.strings.keys()) + .map(String::as_str) + .collect(); + names.sort_unstable(); + names.dedup(); + names + } + pub fn insert_string(&mut self, name: &str, value: impl Into) { self.strings.insert(name.to_ascii_lowercase(), value.into()); } @@ -2521,6 +2537,15 @@ impl ThemeDocument { }; let context = DataContext::from_usage(None, &canvas); validate_scene_object(&mut errors, &context, root); + for (field, expression) in [ + ("offset_x_expression", &root.placement.offset_x_expression), + ("offset_y_expression", &root.placement.offset_y_expression), + ] { + if let Some(expression) = expression { + let label = format!("{}.placement.{field}", root.name); + validate_expression(&mut errors, &context, &label, expression); + } + } validate_scene_mouse_events(&mut errors, &context, self, surface_index, root); let mut ids = std::collections::HashSet::new(); @@ -2840,10 +2865,21 @@ fn validate_expression( expression: &Expression, ) { if let Err(error) = evaluate(&expression.0, context) { - errors.push(format!("{label}: {error}")); + errors.push(format!("{label}: {}", explain_error(error, context))); } } +/// Adds the closest known name to an unknown-value error. Only validation does +/// this; evaluation runs every frame and keeps the short message. +fn explain_error(error: String, context: &DataContext) -> String { + error + .strip_prefix("Unknown value '") + .and_then(|rest| rest.strip_suffix('\'')) + .map_or(error.clone(), |name| { + theme_language::unknown_value_message(name, context) + }) +} + fn validate_paint(errors: &mut Vec, context: &DataContext, label: &str, paint: &Paint) { if parse_color(&paint.color).is_none() { errors.push(format!( @@ -2888,6 +2924,8 @@ pub fn validate_template(template: &str, context: &DataContext) -> Vec { continue; } if let Err(error) = evaluate_value(expression, context) { + errors.push(explain_error(error, context)); + } else if let Some(error) = theme_language::unknown_format_message(format) { errors.push(error); } remaining = &remaining[end + 1..]; @@ -2976,6 +3014,8 @@ mod theme_expression; pub use theme_expression::*; mod theme_datetime; +mod theme_language; +pub use theme_language::*; mod theme_limits; mod theme_render_environment; use theme_datetime::*; diff --git a/src/theme_engine/theme_datetime.rs b/src/theme_engine/theme_datetime.rs index abcd90ac..7ce9e818 100644 --- a/src/theme_engine/theme_datetime.rs +++ b/src/theme_engine/theme_datetime.rs @@ -47,7 +47,7 @@ pub(super) fn format_timestamp(unix: f64, format: &str, context: &DataContext) - let (utc, format) = normalized .strip_prefix("utc_") .map_or((false, normalized.as_str()), |format| (true, format)); - if !is_timestamp_format(format) { + if !super::theme_language::is_timestamp_format(format) { return None; } let Some(value) = timestamp_system_time(unix, !utc) else { @@ -108,40 +108,6 @@ pub(super) fn format_timestamp(unix: f64, format: &str, context: &DataContext) - Some(result.unwrap_or_else(|| "--".into())) } -fn is_timestamp_format(format: &str) -> bool { - matches!( - format, - "weekday_2" - | "weekday_short" - | "weekday_long" - | "day" - | "day_2" - | "month" - | "month_2" - | "month_short" - | "month_long" - | "year_2" - | "year" - | "date" - | "date_short" - | "date_long" - | "time" - | "time_short" - | "time_seconds" - | "time_24" - | "time_24_seconds" - | "time_12" - | "time_12_seconds" - | "am_pm" - | "datetime" - | "datetime_short" - | "datetime_long" - | "iso_date" - | "iso_time" - | "iso_datetime" - ) -} - fn timestamp_system_time(unix: f64, local: bool) -> Option { if !unix.is_finite() || unix <= 0.0 { return None; diff --git a/src/theme_engine/theme_expression.rs b/src/theme_engine/theme_expression.rs index 21fb22f9..c4bb333b 100644 --- a/src/theme_engine/theme_expression.rs +++ b/src/theme_engine/theme_expression.rs @@ -391,28 +391,24 @@ pub(super) fn call_function( name: &str, args: &[ExpressionValue], ) -> Result { - let arity = |count: usize| { - if args.len() == count { - Ok(()) - } else { - Err(format!("{name} expects {count} argument(s)")) - } + // EXPRESSION_FUNCTIONS is the list of functions; this only runs them. + let Some(function) = super::expression_function(name) else { + return Err(super::theme_language::unknown_function_message(name)); }; - match name.to_ascii_lowercase().as_str() { - "min" => { - arity(2)?; - Ok(ExpressionValue::Number( - args[0].number()?.min(args[1].number()?), - )) - } - "max" => { - arity(2)?; - Ok(ExpressionValue::Number( - args[0].number()?.max(args[1].number()?), - )) - } + if args.len() != function.arguments { + return Err(format!( + "{} expects {} argument(s): {}", + function.name, function.arguments, function.signature + )); + } + match function.name { + "min" => Ok(ExpressionValue::Number( + args[0].number()?.min(args[1].number()?), + )), + "max" => Ok(ExpressionValue::Number( + args[0].number()?.max(args[1].number()?), + )), "clamp" => { - arity(3)?; let value = args[0].number()?; let minimum = args[1].number()?; let maximum = args[2].number()?; @@ -421,49 +417,29 @@ pub(super) fn call_function( } Ok(ExpressionValue::Number(value.clamp(minimum, maximum))) } - "round" => { - arity(1)?; - Ok(ExpressionValue::Number(args[0].number()?.round())) - } - "floor" => { - arity(1)?; - Ok(ExpressionValue::Number(args[0].number()?.floor())) - } - "ceil" => { - arity(1)?; - Ok(ExpressionValue::Number(args[0].number()?.ceil())) - } - "abs" => { - arity(1)?; - Ok(ExpressionValue::Number(args[0].number()?.abs())) - } - "sqrt" => { - arity(1)?; - Ok(ExpressionValue::Number(args[0].number()?.sqrt())) - } - "pow" => { - arity(2)?; - Ok(ExpressionValue::Number( - args[0].number()?.powf(args[1].number()?), - )) - } - "if" => { - arity(3)?; - Ok(if args[0].number()? != 0.0 { - args[1].clone() - } else { - args[2].clone() - }) - } + "round" => Ok(ExpressionValue::Number(args[0].number()?.round())), + "floor" => Ok(ExpressionValue::Number(args[0].number()?.floor())), + "ceil" => Ok(ExpressionValue::Number(args[0].number()?.ceil())), + "abs" => Ok(ExpressionValue::Number(args[0].number()?.abs())), + "sqrt" => Ok(ExpressionValue::Number(args[0].number()?.sqrt())), + "pow" => Ok(ExpressionValue::Number( + args[0].number()?.powf(args[1].number()?), + )), + "if" => Ok(if args[0].number()? != 0.0 { + args[1].clone() + } else { + args[2].clone() + }), "lerp" => { - arity(3)?; let start = args[0].number()?; let end = args[1].number()?; Ok(ExpressionValue::Number( start + (end - start) * args[2].number()?, )) } - _ => Err(format!("Unknown function '{name}'")), + listed => Err(format!( + "{listed} is in EXPRESSION_FUNCTIONS but call_function does not run it" + )), } } diff --git a/src/theme_engine/theme_language.rs b/src/theme_engine/theme_language.rs new file mode 100644 index 00000000..38e32a36 --- /dev/null +++ b/src/theme_engine/theme_language.rs @@ -0,0 +1,1521 @@ +//! The theme language in one place. +//! +//! Most theme fields are expressions rather than fixed values: `"width": +//! "canvas.width - 8"`, `"render": "claude.available && !data.has_error"`. +//! Text layers use templates such as `"{claude.session.percentage:0}%"`, and +//! mouse events run action scripts. The tables here define that language: +//! +//! - `call_function` only runs functions listed in `EXPRESSION_FUNCTIONS`, +//! `parse_mouse_actions` only accepts actions in `MOUSE_ACTIONS`, and the +//! timestamp formats come from `TEMPLATE_FORMATS`. +//! - `DOCUMENT_FIELDS`, `OBJECT_FIELDS` and `PAINT_FIELDS` name every field a +//! theme can save and what it holds. Tests fail when a field is added to the +//! theme types but not here, and `unknown_theme_fields` reports fields a +//! theme file sets that do not exist. +//! - `VALUE_GROUPS`, `PROVIDER_WINDOWS` and `PROVIDER_FIELDS` describe the +//! values expressions can read. +//! +//! Theme Studio's helper and `docs/theme-reference.md` (generated by +//! `theme_render::reference`) read the same tables, so whatever the engine +//! accepts is documented. + +use super::*; + +/// The generated reference, relative to the repository root. +pub const THEME_REFERENCE: &str = "docs/theme-reference.md"; + +/// A function expressions can call. +pub struct ExpressionFunction { + pub name: &'static str, + pub signature: &'static str, + pub arguments: usize, + /// What Theme Studio's helper inserts. + pub insertion: &'static str, + /// A realistic use, evaluated against the sample usage in the reference. + pub example: &'static str, + pub description: &'static str, +} + +pub const EXPRESSION_FUNCTIONS: &[ExpressionFunction] = &[ + ExpressionFunction { + name: "get", + signature: "get(this, property)", + arguments: 2, + insertion: "get(this, gap)", + example: "get(claude.session, percentage)", + description: "Value expression", + }, + ExpressionFunction { + name: "min", + signature: "min(a, b)", + arguments: 2, + insertion: "min(0, 0)", + example: "min(claude.session.percentage, codex.session.percentage)", + description: "Smaller value", + }, + ExpressionFunction { + name: "max", + signature: "max(a, b)", + arguments: 2, + insertion: "max(0, 0)", + example: "max(claude.session.percentage, claude.weekly.percentage)", + description: "Larger value", + }, + ExpressionFunction { + name: "clamp", + signature: "clamp(value, min, max)", + arguments: 3, + insertion: "clamp(0, 0, 100)", + example: "clamp(claude.weekly.percentage * 2, 0, 100)", + description: "Constrain a value", + }, + ExpressionFunction { + name: "round", + signature: "round(value)", + arguments: 1, + insertion: "round(0)", + example: "round(claude.session.reset.hours)", + description: "Nearest integer", + }, + ExpressionFunction { + name: "floor", + signature: "floor(value)", + arguments: 1, + insertion: "floor(0)", + example: "floor(claude.session.reset.hours)", + description: "Round down", + }, + ExpressionFunction { + name: "ceil", + signature: "ceil(value)", + arguments: 1, + insertion: "ceil(0)", + example: "ceil(claude.session.reset.hours)", + description: "Round up", + }, + ExpressionFunction { + name: "abs", + signature: "abs(value)", + arguments: 1, + insertion: "abs(0)", + example: "abs(claude.session.percentage - codex.session.percentage)", + description: "Absolute value", + }, + ExpressionFunction { + name: "sqrt", + signature: "sqrt(value)", + arguments: 1, + insertion: "sqrt(0)", + example: "sqrt(claude.session.percentage)", + description: "Square root", + }, + ExpressionFunction { + name: "pow", + signature: "pow(base, power)", + arguments: 2, + insertion: "pow(0, 2)", + example: "pow(claude.session.percentage / 100, 2)", + description: "Exponent", + }, + ExpressionFunction { + name: "if", + signature: "if(condition, yes, no)", + arguments: 3, + insertion: "if(true, 1, 0)", + example: "if(claude.session.percentage > 80, \"#E5484D\", \"#46A758\")", + description: "Conditional value", + }, + ExpressionFunction { + name: "lerp", + signature: "lerp(start, end, amount)", + arguments: 3, + insertion: "lerp(0, 100, 0.5)", + example: "lerp(4, canvas.width - 4, claude.session.percentage / 100)", + description: "Linear interpolation", + }, +]; + +pub fn expression_function(name: &str) -> Option<&'static ExpressionFunction> { + EXPRESSION_FUNCTIONS + .iter() + .find(|function| function.name.eq_ignore_ascii_case(name)) +} + +/// An operator or literal expressions can use. +pub struct ExpressionSyntax { + pub symbol: &'static str, + pub example: &'static str, + pub description: &'static str, +} + +/// Operators, loosest binding first within each group. +pub const EXPRESSION_OPERATORS: &[ExpressionSyntax] = &[ + ExpressionSyntax { + symbol: "&&", + example: "claude.available && codex.available", + description: "And", + }, + ExpressionSyntax { + symbol: "||", + example: "claude.available || codex.available", + description: "Or", + }, + ExpressionSyntax { + symbol: "!", + example: "!data.has_error", + description: "Not", + }, + ExpressionSyntax { + symbol: "==", + example: "providers.count == 2", + description: "Equal", + }, + ExpressionSyntax { + symbol: "!=", + example: "claude.session.label != \"5h\"", + description: "Not equal", + }, + ExpressionSyntax { + symbol: ">", + example: "claude.session.percentage > 80", + description: "Greater than", + }, + ExpressionSyntax { + symbol: "<", + example: "claude.session.reset.hours < 1", + description: "Less than", + }, + ExpressionSyntax { + symbol: ">=", + example: "claude.weekly.percentage >= 50", + description: "Greater or equal", + }, + ExpressionSyntax { + symbol: "<=", + example: "host.height <= 40", + description: "Less or equal", + }, + ExpressionSyntax { + symbol: "+", + example: "canvas.width + 8", + description: "Add", + }, + ExpressionSyntax { + symbol: "-", + example: "canvas.width - 8", + description: "Subtract", + }, + ExpressionSyntax { + symbol: "*", + example: "canvas.width * claude.session.percentage / 100", + description: "Multiply", + }, + ExpressionSyntax { + symbol: "/", + example: "canvas.height / 2", + description: "Divide", + }, + ExpressionSyntax { + symbol: "%", + example: "time.local.second % 2", + description: "Remainder", + }, + ExpressionSyntax { + symbol: "()", + example: "(canvas.width - 8) / 2", + description: "Grouping", + }, +]; + +pub const EXPRESSION_LITERALS: &[ExpressionSyntax] = &[ + ExpressionSyntax { + symbol: "number", + example: "0.5", + description: "Decimal number", + }, + ExpressionSyntax { + symbol: "text", + example: "\"#E5484D\"", + description: "Text in double or single quotes; `\\\"` escapes a quote", + }, + ExpressionSyntax { + symbol: "true, false", + example: "true", + description: "1 and 0; any non-zero value counts as true", + }, + ExpressionSyntax { + symbol: "pi, e", + example: "pi", + description: "Constants", + }, + ExpressionSyntax { + symbol: "value name", + example: "claude.session.percentage", + description: "A value from the lists below; names ignore case", + }, +]; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum FormatKind { + Number, + Duration, + Usage, + Timestamp, + /// `utc_` before a timestamp format. + UtcPrefix, +} + +/// A format after `:` in a template token, as in `{claude.session.reset.unix:time_24}`. +pub struct TemplateFormat { + pub code: &'static str, + /// Other spellings with the same result. + pub aliases: &'static [&'static str], + pub kind: FormatKind, + /// A template token, rendered against the sample usage in the reference. + pub example: &'static str, + pub description: &'static str, +} + +const fn template_format( + code: &'static str, + kind: FormatKind, + example: &'static str, + description: &'static str, +) -> TemplateFormat { + TemplateFormat { + code, + aliases: &[], + kind, + example, + description, + } +} + +pub const TEMPLATE_FORMATS: &[TemplateFormat] = &[ + template_format( + "0.##", + FormatKind::Number, + "{canvas.width / 2}", + "Default: two fixed decimals. With a `0`, each `0` or `#` after the point is a fixed decimal", + ), + template_format( + "#.##", + FormatKind::Number, + "{canvas.width / 2:#.##}", + "Without a `0`, decimals are optional: up to one per `#`, trailing zeros dropped", + ), + template_format( + "0", + FormatKind::Number, + "{claude.session.reset.hours:0}", + "Whole number", + ), + template_format( + "0.0", + FormatKind::Number, + "{canvas.width / 2:0.0}", + "Fixed decimals: one `0` per decimal place", + ), + template_format( + "#,##0", + FormatKind::Number, + "{host.width * 1000:#,##0}", + "Any format containing `,` groups thousands", + ), + template_format( + "percent", + FormatKind::Number, + "{claude.session.display:percent}", + "Whole number followed by `%`", + ), + template_format( + "duration", + FormatKind::Duration, + "{claude.weekly.reset.seconds:duration}", + "Seconds as the two largest units, such as `3d 4h`", + ), + template_format( + "duration_short", + FormatKind::Duration, + "{claude.weekly.reset.seconds:duration_short}", + "Seconds as the largest unit", + ), + template_format( + "usage_line", + FormatKind::Usage, + "{claude.session:usage_line}", + "A window's shown percentage and time to reset. Use the window name, \ + or `.display` after it to follow the Usage direction setting", + ), + template_format( + "usage_badge", + FormatKind::Usage, + "{claude.session:usage_badge}", + "A window's shown percentage only", + ), + template_format( + "utc_", + FormatKind::UtcPrefix, + "{claude.weekly.reset.unix:utc_iso_datetime}", + "Prefix for any timestamp format to use UTC instead of local time", + ), + template_format( + "weekday_2", + FormatKind::Timestamp, + "{claude.weekly.reset.unix:weekday_2}", + "Weekday, two letters", + ), + template_format( + "weekday_short", + FormatKind::Timestamp, + "{claude.weekly.reset.unix:weekday_short}", + "Weekday, short", + ), + template_format( + "weekday_long", + FormatKind::Timestamp, + "{claude.weekly.reset.unix:weekday_long}", + "Weekday, full", + ), + template_format( + "day", + FormatKind::Timestamp, + "{claude.weekly.reset.unix:day}", + "Day of the month", + ), + template_format( + "day_2", + FormatKind::Timestamp, + "{claude.weekly.reset.unix:day_2}", + "Day of the month, two digits", + ), + template_format( + "month", + FormatKind::Timestamp, + "{claude.weekly.reset.unix:month}", + "Month number", + ), + template_format( + "month_2", + FormatKind::Timestamp, + "{claude.weekly.reset.unix:month_2}", + "Month number, two digits", + ), + template_format( + "month_short", + FormatKind::Timestamp, + "{claude.weekly.reset.unix:month_short}", + "Month name, short", + ), + template_format( + "month_long", + FormatKind::Timestamp, + "{claude.weekly.reset.unix:month_long}", + "Month name, full", + ), + template_format( + "year_2", + FormatKind::Timestamp, + "{claude.weekly.reset.unix:year_2}", + "Year, two digits", + ), + template_format( + "year", + FormatKind::Timestamp, + "{claude.weekly.reset.unix:year}", + "Year", + ), + TemplateFormat { + aliases: &["date"], + ..template_format( + "date_short", + FormatKind::Timestamp, + "{claude.weekly.reset.unix:date_short}", + "Short date in the app language", + ) + }, + template_format( + "date_long", + FormatKind::Timestamp, + "{claude.weekly.reset.unix:date_long}", + "Long date in the app language", + ), + TemplateFormat { + aliases: &["time"], + ..template_format( + "time_short", + FormatKind::Timestamp, + "{claude.weekly.reset.unix:time_short}", + "Time in the app language", + ) + }, + template_format( + "time_seconds", + FormatKind::Timestamp, + "{claude.weekly.reset.unix:time_seconds}", + "Time with seconds in the app language", + ), + template_format( + "time_24", + FormatKind::Timestamp, + "{claude.weekly.reset.unix:time_24}", + "24-hour time", + ), + template_format( + "time_24_seconds", + FormatKind::Timestamp, + "{claude.weekly.reset.unix:time_24_seconds}", + "24-hour time with seconds", + ), + template_format( + "time_12", + FormatKind::Timestamp, + "{claude.weekly.reset.unix:time_12}", + "12-hour time", + ), + template_format( + "time_12_seconds", + FormatKind::Timestamp, + "{claude.weekly.reset.unix:time_12_seconds}", + "12-hour time with seconds", + ), + template_format( + "am_pm", + FormatKind::Timestamp, + "{claude.weekly.reset.unix:am_pm}", + "AM or PM", + ), + TemplateFormat { + aliases: &["datetime"], + ..template_format( + "datetime_short", + FormatKind::Timestamp, + "{claude.weekly.reset.unix:datetime_short}", + "Short date and time", + ) + }, + template_format( + "datetime_long", + FormatKind::Timestamp, + "{claude.weekly.reset.unix:datetime_long}", + "Long date and time with seconds", + ), + template_format( + "iso_date", + FormatKind::Timestamp, + "{claude.weekly.reset.unix:iso_date}", + "ISO 8601 date", + ), + template_format( + "iso_time", + FormatKind::Timestamp, + "{claude.weekly.reset.unix:iso_time}", + "ISO 8601 time", + ), + template_format( + "iso_datetime", + FormatKind::Timestamp, + "{claude.weekly.reset.unix:iso_datetime}", + "ISO 8601 date and time", + ), +]; + +/// Whether `format` (already lowercase, without `utc_`) is a timestamp format. +pub(super) fn is_timestamp_format(format: &str) -> bool { + TEMPLATE_FORMATS.iter().any(|candidate| { + candidate.kind == FormatKind::Timestamp + && (candidate.code == format || candidate.aliases.contains(&format)) + }) +} + +/// The error for a template format the engine does not know, which would +/// otherwise render as a plain number. +pub(super) fn unknown_format_message(format: &str) -> Option { + let format = format.trim().to_ascii_lowercase(); + let number_pattern = format.chars().all(|c| matches!(c, '0' | '#' | '.' | ',')); + if format.is_empty() || number_pattern { + return None; + } + let known = |format: &str| { + TEMPLATE_FORMATS.iter().any(|candidate| { + candidate.kind != FormatKind::UtcPrefix + && (candidate.code == format || candidate.aliases.contains(&format)) + }) + }; + match format.strip_prefix("utc_") { + Some(timestamp) if is_timestamp_format(timestamp) => return None, + None if known(&format) => return None, + _ => {} + } + let codes = TEMPLATE_FORMATS.iter().flat_map(|candidate| { + std::iter::once(candidate.code).chain(candidate.aliases.iter().copied()) + }); + let suggestion = closest(&format, codes) + .map(|best| format!("; did you mean '{best}'?")) + .unwrap_or_else(|| ".".into()); + Some(format!( + "Unknown format '{format}'{suggestion} Formats are listed in {THEME_REFERENCE}#formats" + )) +} + +/// An action a mouse event script can run. +pub struct MouseActionSpec { + pub name: &'static str, + /// Theme Studio helper category. + pub category: &'static str, + pub label: &'static str, + pub signature: &'static str, + /// A complete script, checked by `parse_mouse_actions` in tests. + pub example: &'static str, +} + +pub const MOUSE_ACTIONS: &[MouseActionSpec] = &[ + MouseActionSpec { + name: "show_dashboard", + category: "Dashboard", + label: "Show dashboard", + signature: "show_dashboard()", + example: "show_dashboard()", + }, + MouseActionSpec { + name: "toggle_dashboard", + category: "Dashboard", + label: "Toggle dashboard", + signature: "toggle_dashboard()", + example: "toggle_dashboard()", + }, + MouseActionSpec { + name: "open_url", + category: "Links and menus", + label: "Open URL", + signature: "open_url(\"https://…\")", + example: "open_url(\"https://claude.ai/settings/usage\")", + }, + MouseActionSpec { + name: "show_context_menu", + category: "Links and menus", + label: "Show context menu", + signature: "show_context_menu(\"menu\")", + example: "show_context_menu()", + }, + MouseActionSpec { + name: "set", + category: "Layers", + label: "Set property", + signature: "set(layer, property, value)", + example: "set(\"claude-popup\", render, true)", + }, + MouseActionSpec { + name: "toggle", + category: "Layers", + label: "Toggle Render", + signature: "toggle(layer, render)", + example: "toggle(\"details\", render)", + }, + MouseActionSpec { + name: "reset", + category: "Layers", + label: "Reset property", + signature: "reset(layer, property)", + example: "reset(self, height)", + }, + MouseActionSpec { + name: "increase", + category: "Layers", + label: "Increase value", + signature: "increase(layer, property, amount)", + example: "increase(self.height, 10)", + }, + MouseActionSpec { + name: "decrease", + category: "Layers", + label: "Decrease value", + signature: "decrease(layer, property, amount)", + example: "decrease(self, width, 5)", + }, +]; + +pub fn mouse_action(name: &str) -> Option<&'static MouseActionSpec> { + MOUSE_ACTIONS.iter().find(|action| action.name == name) +} + +/// What a theme field holds. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum FieldKind { + /// A number expression, such as `canvas.width - 8`. + Expression, + /// An expression that counts as true when non-zero. + Condition, + /// Text with `{expression}` or `{expression:format}` tokens. + Template, + /// A mouse action script, such as `toggle("details", render)`. + Actions, + /// `#RRGGBB` or `#AARRGGBB`. + Color, + /// A colour object; see `PAINT_FIELDS`. + Paint, + /// One of the listed words. + Choice(&'static [&'static str]), + /// Literal text. + Text, + /// A whole number, not an expression. + Integer, + /// A list of objects with `OBJECT_FIELDS`. + Objects, + /// An object chosen by its `type`; the listed fields follow. + Typed, + /// A group of the fields listed after it. + Group, +} + +impl FieldKind { + pub fn label(self) -> &'static str { + match self { + Self::Expression => "expression", + Self::Condition => "condition", + Self::Template => "template", + Self::Actions => "actions", + Self::Color => "colour", + Self::Paint => "paint", + Self::Choice(_) => "choice", + Self::Text => "text", + Self::Integer => "integer", + Self::Objects => "objects", + Self::Typed => "type", + Self::Group => "group", + } + } +} + +/// One field of a theme file. `content(text).template` is the `template` key +/// of a `content` object whose `type` is `text`. +pub struct ThemeField { + pub path: &'static str, + pub kind: FieldKind, + pub description: &'static str, +} + +const fn field(path: &'static str, kind: FieldKind, description: &'static str) -> ThemeField { + ThemeField { + path, + kind, + description, + } +} + +use FieldKind::{ + Actions, Choice, Color, Condition, Expression as Expr, Group, Integer, Objects, Paint as Fill, + Template, Text, Typed, +}; + +const HORIZONTAL: &[&str] = &["left", "center", "right"]; +const VERTICAL: &[&str] = &["top", "center", "bottom"]; + +pub const DOCUMENT_FIELDS: &[ThemeField] = &[ + field( + "schema_version", + Integer, + "Theme format version; currently 1", + ), + field("id", Text, "Unique theme id, lowercase with dashes"), + field("name", Text, "Name shown in Theme Studio"), + field( + "surfaces", + Objects, + "Root objects. Each is a native window: `main` is the widget; others are \ + flyouts or `-tray-icon` tray artwork", + ), +]; + +pub const OBJECT_FIELDS: &[ThemeField] = &[ + field( + "id", + Text, + "Unique id. Mouse actions and `parent` refer to objects by id", + ), + field("name", Text, "Name shown in the Layers panel"), + field( + "render", + Condition, + "Draw the object and its children while true. Default `true`", + ), + field( + "visibility", + Expr, + "Opacity percentage for the object and its children, 0 to 100. Default `100`", + ), + field( + "parent", + Text, + "Layers only: the id of the containing object. A surface's layers are stored \ + as one flat list in drawing order; `parent` builds the tree", + ), + field( + "placement", + Group, + "Surfaces only: where the window goes on screen", + ), + field( + "placement.reference", + Group, + "What the surface is placed against", + ), + field( + "placement.reference.region", + Choice(&["monitor", "taskbar", "system_tray"]), + "Screen area the anchors refer to", + ), + field( + "placement.reference.display", + Integer, + "Monitor index; 0 is the primary monitor", + ), + field( + "placement.nest", + Choice(&["auto", "taskbar", "tray_icon", "desktop", "floating"]), + "Window host. `auto` is only for themes saved before hosts existed", + ), + field( + "placement.horizontal", + Choice(HORIZONTAL), + "Point of the reference region to align to", + ), + field( + "placement.vertical", + Choice(VERTICAL), + "Point of the reference region to align to", + ), + field( + "placement.surface_horizontal", + Choice(HORIZONTAL), + "Point of the surface placed there", + ), + field( + "placement.surface_vertical", + Choice(VERTICAL), + "Point of the surface placed there", + ), + field("placement.offset_x", Integer, "Horizontal offset in pixels"), + field( + "placement.offset_x_expression", + Expr, + "Replaces `offset_x` with an expression", + ), + field("placement.offset_y", Integer, "Vertical offset in pixels"), + field( + "placement.offset_y_expression", + Expr, + "Replaces `offset_y` with an expression", + ), + field( + "anchor", + Group, + "Layers only: the parent corner `x` and `y` start from", + ), + field("anchor.horizontal", Choice(HORIZONTAL), "Horizontal anchor"), + field("anchor.vertical", Choice(VERTICAL), "Vertical anchor"), + field( + "x", + Expr, + "Layers only: horizontal offset from the anchor, in pixels", + ), + field( + "y", + Expr, + "Layers only: vertical offset from the anchor, in pixels", + ), + field( + "width", + Expr, + "Width in pixels. A surface's width and height size its window", + ), + field("height", Expr, "Height in pixels"), + field("rotation", Expr, "Clockwise rotation in degrees"), + field("background(none)", Typed, "No background"), + field("background(colour)", Typed, "A solid colour"), + field("background(colour).colour", Fill, "The colour"), + field("background(gradient)", Typed, "A linear gradient"), + field("background(gradient).start", Fill, "Start colour"), + field("background(gradient).end", Fill, "End colour"), + field( + "background(gradient).angle", + Expr, + "Direction in degrees; 0 runs left to right", + ), + field("background(image)", Typed, "An image"), + field( + "background(image).path", + Text, + "Image file name in the theme's asset folder", + ), + field( + "background(image).fit", + Choice(&["contain", "cover", "stretch", "original"]), + "How the image fills the object", + ), + field("border", Group, "Optional outline"), + field("border.color", Fill, "Outline colour"), + field("border.width", Expr, "Outline width in pixels"), + field("mouse_events", Group, "Action scripts run by the mouse"), + field("mouse_events.click", Actions, "Left click"), + field("mouse_events.double_click", Actions, "Double click"), + field("mouse_events.right_click", Actions, "Right click"), + field( + "mouse_events.mouse_enter", + Actions, + "Pointer enters the object", + ), + field( + "mouse_events.mouse_leave", + Actions, + "Pointer leaves the object", + ), + field( + "tooltip", + Choice(&["usage_summary"]), + "Surfaces only: hover popup listing every provider's usage", + ), + field("corner_radius", Expr, "Corner radius in pixels"), + field( + "layout", + Choice(&["freeform", "row", "column"]), + "How children are arranged. `freeform` uses each child's anchor, `x` and `y`", + ), + field( + "align", + Choice(&["start", "center", "end"]), + "Cross-axis alignment of children in a row or column", + ), + field("gap", Expr, "Space between children in a row or column"), + field( + "content(none)", + Typed, + "Nothing drawn beyond the background", + ), + field("content(text)", Typed, "Text"), + field( + "content(text).template", + Template, + "The text, with `{expression}` and `{expression:format}` tokens", + ), + field( + "content(text).font_family", + Text, + "Installed font family name", + ), + field("content(text).font_size", Expr, "Size in pixels"), + field( + "content(text).weight", + Choice(&["light", "regular", "medium", "semibold", "bold"]), + "Font weight", + ), + field( + "content(text).rendering", + Choice(&["antialiased", "clear_type", "aliased"]), + "Glyph smoothing", + ), + field( + "content(text).contrast", + Expr, + "Glyph contrast; higher is crisper. Default `1.4`", + ), + field( + "content(text).align", + Choice(&["left", "center", "right"]), + "Alignment within the object", + ), + field("content(text).color", Fill, "Text colour"), + field("content(progress)", Typed, "A progress bar"), + field( + "content(progress).value", + Expr, + "Filled percentage, 0 to 100, such as `claude.session.display`", + ), + field( + "content(progress).direction", + Choice(&[ + "left_to_right", + "right_to_left", + "bottom_to_top", + "top_to_bottom", + ]), + "Fill direction", + ), + field("content(progress).fill", Fill, "Filled part"), + field("content(progress).track", Fill, "Unfilled part"), + field("content(progress).corner_radius", Expr, "Bar corner radius"), + field( + "content(progress).segments", + Integer, + "Number of segments; 0 draws a continuous bar", + ), + field( + "content(progress).segments_expression", + Expr, + "Replaces `segments` with an expression", + ), + field( + "content(progress).segment_gap", + Expr, + "Space between segments in pixels", + ), + field( + "content(provider_mark)", + Typed, + "A provider's logo, tinted and fitted into the object", + ), + field( + "content(provider_mark).provider", + Text, + "Provider key, such as `claude` or `codex`", + ), + field("content(provider_mark).color", Fill, "Logo colour"), + field( + "children", + Objects, + "Surfaces only: every layer of the surface, in drawing order", + ), +]; + +pub const PAINT_FIELDS: &[ThemeField] = &[ + field( + "color", + Color, + "The colour, or the dark-mode colour when `light_color` is set", + ), + field( + "light_color", + Color, + "Optional colour used while Windows is in light mode", + ), + field("opacity", Expr, "Opacity multiplier, 0 to 1. Default `1`"), +]; + +fn object_field(path: &str) -> Option<&'static ThemeField> { + OBJECT_FIELDS.iter().find(|field| field.path == path) +} + +/// Fields set in a theme file that the theme format does not have, each with +/// the object it is on and the closest real field. Serde ignores unknown +/// fields, so without this a misspelt or invented field silently does nothing. +pub fn unknown_theme_fields(json: &serde_json::Value) -> Vec { + let mut problems = Vec::new(); + visit_theme_fields(json, &mut |owner, path, table, found| { + if found.is_none() { + // Suggest fields at the same level; paint keys and misplaced + // fields have none, so they are compared with the whole table. + let mut siblings: Vec<_> = table + .iter() + .map(|field| field.path) + .filter(|candidate| parent_path(candidate) == parent_path(path)) + .collect(); + if siblings.is_empty() { + siblings = table.iter().map(|field| field.path).collect(); + } + problems.push(unknown_field_message(owner, path, siblings.into_iter())); + } + }); + problems +} + +/// Calls `visit` with every field a theme file sets: the object id (or +/// `theme`), the field's path, the table it belongs in, and its entry there. +pub fn visit_theme_fields(json: &serde_json::Value, visit: &mut Visitor<'_>) { + let Some(document) = json.as_object() else { + return; + }; + for (key, value) in document { + let found = DOCUMENT_FIELDS.iter().find(|field| field.path == key); + visit("theme", key, DOCUMENT_FIELDS, found); + if key == "surfaces" { + for surface in value.as_array().into_iter().flatten() { + visit_object(surface, visit); + } + } + } +} + +/// The callback `visit_theme_fields` calls: owner, path, table and entry. +pub type Visitor<'a> = + dyn FnMut(&str, &str, &'static [ThemeField], Option<&'static ThemeField>) + 'a; + +fn visit_object(object: &serde_json::Value, visit: &mut Visitor<'_>) { + let id = object + .get("id") + .and_then(serde_json::Value::as_str) + .unwrap_or("(no id)"); + visit_object_fields(object, "", id, visit); +} + +fn visit_object_fields(value: &serde_json::Value, prefix: &str, id: &str, visit: &mut Visitor<'_>) { + let Some(map) = value.as_object() else { + return; + }; + for (key, child) in map { + if key == "type" && prefix.ends_with(')') { + continue; + } + let mut path = if prefix.is_empty() { + key.clone() + } else { + format!("{prefix}.{key}") + }; + if let Some(kind) = child.get("type").and_then(serde_json::Value::as_str) { + path = format!("{path}({kind})"); + } + // Older themes saved these; loading converts them. + if matches!( + path.as_str(), + "content(image)" | "content(shape)" | "placement.layer" + ) { + continue; + } + let found = object_field(&path); + visit(id, &path, OBJECT_FIELDS, found); + match found.map(|field| field.kind) { + Some(Objects) => { + for object in child.as_array().into_iter().flatten() { + visit_object(object, visit); + } + } + Some(Fill) => { + for (key, _) in child.as_object().into_iter().flatten() { + let found = PAINT_FIELDS.iter().find(|field| field.path == key); + visit(id, &format!("{path}.{key}"), PAINT_FIELDS, found); + } + } + Some(Group | Typed) => visit_object_fields(child, &path, id, visit), + _ => {} + } + } +} + +fn parent_path(path: &str) -> &str { + path.rsplit_once('.').map_or("", |(parent, _)| parent) +} + +fn unknown_field_message<'a>( + owner: &str, + path: &str, + candidates: impl Iterator, +) -> String { + let last = |path: &'a str| path.rsplit('.').next().unwrap_or(path); + let name = path.rsplit('.').next().unwrap_or(path); + let candidates: Vec<_> = candidates.collect(); + let suggestion = closest(name, candidates.iter().map(|candidate| last(candidate))) + .and_then(|best| candidates.iter().find(|candidate| last(candidate) == best)) + .map(|best| format!("; did you mean '{best}'?")) + .unwrap_or_else(|| ".".into()); + format!( + "{owner}: '{path}' is not a theme field{suggestion} Fields are listed in \ + {THEME_REFERENCE}#fields" + ) +} + +/// A value group expressions can read. +pub struct ValueGroup { + /// A value name, or a prefix ending in `.`. + pub pattern: &'static str, + pub description: &'static str, +} + +/// Values outside the per-provider usage fields. +pub const VALUE_GROUPS: &[ValueGroup] = &[ + ValueGroup { + pattern: "canvas.", + description: "Size of the surface being drawn", + }, + ValueGroup { + pattern: "parent.", + description: "Size of the object's parent; the surface at the root", + }, + ValueGroup { + pattern: "host.", + description: "Size of the area hosting the surface: the taskbar or the monitor", + }, + ValueGroup { + pattern: "this.", + description: "Inside a layer: its own `x`, `y`, `width`, `height` and `gap`; \ + `self` is a synonym in `get(self, ...)` and actions", + }, + ValueGroup { + pattern: "object.", + description: "Inside a layer: its `x`, `y`, `width` and `height`", + }, + ValueGroup { + pattern: "pi", + description: "π", + }, + ValueGroup { + pattern: "e", + description: "Euler's number", + }, + ValueGroup { + pattern: "true", + description: "1", + }, + ValueGroup { + pattern: "false", + description: "0", + }, + ValueGroup { + pattern: "app.", + description: "App version as text (`app.version`) and numbers", + }, + ValueGroup { + pattern: "system.dark", + description: "1 while Windows uses dark mode; prefer `light_color` on paints", + }, + ValueGroup { + pattern: "display.countdown", + description: "1 when the Usage direction setting is Remaining", + }, + ValueGroup { + pattern: "data.", + description: "Polling state: `poll_ok`, `has_error` and `loading` are 1 or 0", + }, + ValueGroup { + pattern: "i18n.", + description: "Labels and unit suffixes in the app language", + }, + ValueGroup { + pattern: "providers.", + description: "`providers.count` enabled providers; `providers..enabled` is 1 or 0", + }, + ValueGroup { + pattern: "time.now.", + description: "Current time as Unix seconds and milliseconds", + }, + ValueGroup { + pattern: "time.local.", + description: "Current local date and time parts; `weekday` is 0 for Monday", + }, + ValueGroup { + pattern: "time.utc.", + description: "Current UTC date and time parts", + }, + ValueGroup { + pattern: "antigravity.", + description: "Antigravity pools: `gemini.*` and `external.*` have the window \ + fields below; `dual_mode`, `crossfade_opacity`, `reported`", + }, + ValueGroup { + pattern: "accounts.", + description: "Named Claude Code and Codex accounts: \ + `accounts...` followed by the window fields below, \ + plus `name`, `selected` and `has_error`", + }, +]; + +/// Owners of usage windows besides the provider keys, longest first. +pub const USAGE_OWNERS: &[(&str, &str)] = &[ + ("antigravity.gemini", "Antigravity's Gemini pool"), + ("antigravity.external", "Antigravity's external-model pool"), + ("active", "The first enabled provider with data"), +]; + +/// Usage windows after a provider key or other owner. `` and `` +/// stand for names the provider reports. +pub const PROVIDER_WINDOWS: &[ValueGroup] = &[ + ValueGroup { + pattern: "", + description: "The provider itself", + }, + ValueGroup { + pattern: "account", + description: "The selected account", + }, + ValueGroup { + pattern: "session", + description: "Short window: Claude Code and Codex 5 hours; Cursor Auto", + }, + ValueGroup { + pattern: "weekly", + description: "Long window: 7 days; Cursor API; OpenCode's long window", + }, + ValueGroup { + pattern: "five_hour", + description: "The five-hour window where the provider has one", + }, + ValueGroup { + pattern: "monthly", + description: "Monthly window where reported", + }, + ValueGroup { + pattern: "credits", + description: "Credit balance where reported", + }, + ValueGroup { + pattern: "headline", + description: "Whichever allowance is closest to its limit; best for a single badge", + }, + ValueGroup { + pattern: "limits", + description: "Every reported quota", + }, + ValueGroup { + pattern: "limits.", + description: "One reported quota by key, such as `weekly_scoped_fable`", + }, + ValueGroup { + pattern: "model.", + description: "A model's weekly quota, when exactly one matches", + }, + ValueGroup { + pattern: "scoped", + description: "The single scoped quota the provider marks active", + }, +]; + +/// Fields of a usage window or provider. +pub const PROVIDER_FIELDS: &[ValueGroup] = &[ + ValueGroup { + pattern: "available", + description: "1 when reported; gate optional layers on it", + }, + ValueGroup { + pattern: "stale", + description: "1 while showing earlier figures after a failed poll", + }, + ValueGroup { + pattern: "has_error", + description: "1 when the selected account's last poll failed", + }, + ValueGroup { + pattern: "name", + description: "Account name (text)", + }, + ValueGroup { + pattern: "count", + description: "Number of reported quotas", + }, + ValueGroup { + pattern: "percentage", + description: "Used, 0 to 100", + }, + ValueGroup { + pattern: "remaining", + description: "Remaining, 0 to 100", + }, + ValueGroup { + pattern: "display", + description: "Used or remaining, following the Usage direction setting; \ + prefer it for what the widget shows", + }, + ValueGroup { + pattern: "label", + description: "Short window name (text)", + }, + ValueGroup { + pattern: "balance", + description: "Credits left", + }, + ValueGroup { + pattern: "total", + description: "Credits granted", + }, + ValueGroup { + pattern: "is_active", + description: "1 when the provider marks this quota active", + }, + ValueGroup { + pattern: "key", + description: "Quota key (text)", + }, + ValueGroup { + pattern: "kind", + description: "Quota kind (text)", + }, + ValueGroup { + pattern: "model_id", + description: "Model id (text)", + }, + ValueGroup { + pattern: "scope", + description: "Scope as JSON (text)", + }, + ValueGroup { + pattern: "reset.unix", + description: "Reset time as Unix seconds; use a timestamp format", + }, + ValueGroup { + pattern: "reset.seconds", + description: "Seconds until reset; use `duration` or `duration_short`", + }, + ValueGroup { + pattern: "reset.minutes", + description: "Minutes until reset", + }, + ValueGroup { + pattern: "reset.hours", + description: "Hours until reset", + }, + ValueGroup { + pattern: "reset.days", + description: "Days until reset", + }, +]; + +/// The owner (`claude`, `antigravity.gemini`, `active`, ...) a value name +/// starts with, and the rest after it. +pub fn split_usage_owner(name: &str) -> Option<(&str, &str)> { + let owners = USAGE_OWNERS + .iter() + .map(|(owner, _)| *owner) + .chain(PROVIDER_DESCRIPTORS.iter().map(|descriptor| descriptor.key)); + for owner in owners { + if let Some(rest) = name + .strip_prefix(owner) + .and_then(|rest| rest.strip_prefix('.')) + { + return Some((&name[..owner.len()], rest)); + } + } + None +} + +/// Splits the part after an owner into its window pattern and field: +/// `limits.weekly_scoped_fable.reset.unix` gives `("limits.", "reset.unix")`. +pub fn split_usage_window(rest: &str) -> (String, &str) { + let (window, field) = match rest.find(".reset.") { + Some(index) => (&rest[..index], &rest[index + 1..]), + None => rest.rsplit_once('.').unwrap_or(("", rest)), + }; + let window = if let Some(key) = window.strip_prefix("limits.") { + if key.is_empty() { + window.to_string() + } else { + "limits.".to_string() + } + } else if window.starts_with("model.") { + "model.".to_string() + } else { + window.to_string() + }; + (window, field) +} + +/// The message for an unknown expression value, with the closest name the +/// context has. +pub(super) fn unknown_value_message(name: &str, context: &DataContext) -> String { + let suggestion = closest(name, context.names().into_iter()) + .map(|best| format!("; did you mean '{best}'?")) + .unwrap_or_else(|| ".".into()); + format!("Unknown value '{name}'{suggestion} Values are listed in {THEME_REFERENCE}#values") +} + +pub(super) fn unknown_function_message(name: &str) -> String { + let names: Vec<_> = EXPRESSION_FUNCTIONS + .iter() + .map(|function| function.name) + .collect(); + let suggestion = closest(name, names.iter().copied()) + .map(|best| format!(" Did you mean '{best}'?")) + .unwrap_or_default(); + format!( + "Unknown function '{name}'.{suggestion} Functions: {}", + names.join(", ") + ) +} + +pub(super) fn unknown_action_message(name: &str) -> String { + let names: Vec<_> = MOUSE_ACTIONS.iter().map(|action| action.name).collect(); + let suggestion = closest(name, names.iter().copied()) + .map(|best| format!(" Did you mean '{best}'?")) + .unwrap_or_default(); + format!( + "Unknown action: {name}.{suggestion} Actions: {}", + names.join(", ") + ) +} + +/// What an expression gives, written the way the reference shows it: text in +/// quotes, numbers with up to four decimals. +pub fn describe_result(expression: &str, context: &DataContext) -> Result { + Ok( + match super::theme_expression::evaluate_value(expression, context)? { + ExpressionValue::Number(value) => describe_number(value), + ExpressionValue::Text(text) => format!("\"{text}\""), + }, + ) +} + +pub fn describe_number(value: f64) -> String { + let text = format!("{value:.4}"); + let text = text.trim_end_matches('0').trim_end_matches('.'); + if text == "-0" { + "0".into() + } else { + text.into() + } +} + +/// Whether `name` is a usage value: an owner, a window from +/// `PROVIDER_WINDOWS` and a field from `PROVIDER_FIELDS`. +pub fn is_usage_value(name: &str) -> bool { + split_usage_owner(name).is_some_and(|(_, rest)| { + let (window, field) = split_usage_window(rest); + PROVIDER_WINDOWS.iter().any(|known| known.pattern == window) + && PROVIDER_FIELDS.iter().any(|known| known.pattern == field) + }) +} + +/// The value group describing a name that is not a usage value. +pub fn value_group(name: &str) -> Option<&'static ValueGroup> { + VALUE_GROUPS.iter().find(|group| { + if group.pattern.ends_with('.') { + name.starts_with(group.pattern) + } else { + name == group.pattern + } + }) +} + +/// The candidate closest to `name` by edit distance, when it is close enough +/// to be a likely typo. +pub fn closest<'a>(name: &str, candidates: impl Iterator) -> Option<&'a str> { + let name = name.to_ascii_lowercase(); + let limit = (name.chars().count() / 3).max(1); + candidates + .map(|candidate| { + ( + edit_distance(&name, &candidate.to_ascii_lowercase()), + candidate, + ) + }) + .filter(|(distance, _)| *distance <= limit) + .min_by_key(|(distance, _)| *distance) + .map(|(_, candidate)| candidate) +} + +/// Edits (insert, delete, replace, swap neighbours) turning `left` into `right`. +fn edit_distance(left: &str, right: &str) -> usize { + let left: Vec = left.chars().collect(); + let right: Vec = right.chars().collect(); + let width = right.len() + 1; + let mut table = vec![0usize; (left.len() + 1) * width]; + for row in 0..=left.len() { + for column in 0..=right.len() { + table[row * width + column] = if row == 0 || column == 0 { + row + column + } else { + let cost = usize::from(left[row - 1] != right[column - 1]); + let mut best = (table[(row - 1) * width + column] + 1) + .min(table[row * width + column - 1] + 1) + .min(table[(row - 1) * width + column - 1] + cost); + if row > 1 + && column > 1 + && left[row - 1] == right[column - 2] + && left[row - 2] == right[column - 1] + { + best = best.min(table[(row - 2) * width + column - 2] + 1); + } + best + }; + } + } + table[left.len() * width + right.len()] +} + +#[cfg(test)] +mod tests; diff --git a/src/theme_engine/theme_language/tests.rs b/src/theme_engine/theme_language/tests.rs new file mode 100644 index 00000000..9a397b5f --- /dev/null +++ b/src/theme_engine/theme_language/tests.rs @@ -0,0 +1,421 @@ +use super::*; +use std::collections::BTreeSet; + +fn e(source: &str) -> Expression { + Expression(source.into()) +} + +fn paint(color: &str) -> Paint { + Paint { + color: color.into(), + light_color: Some("#202020".into()), + opacity: e("0.5"), + } +} + +/// A layer with every object field set to something other than its default. +/// Struct literals without `..Default::default()` make adding a field to +/// `SceneObject` fail to compile here until the test, and so +/// `OBJECT_FIELDS`, is updated. +fn layer(id: &str, background: LayerBackground, content: SceneContent) -> SceneObject { + SceneObject { + id: id.into(), + name: id.into(), + render: e("claude.available"), + visibility: e("80"), + parent: Some("main".into()), + placement: Placement::default(), + anchor: ObjectAnchor { + horizontal: ObjectHorizontalAnchor::Right, + vertical: ObjectVerticalAnchor::Bottom, + }, + x: e("4"), + y: e("2"), + width: e("parent.width - 8"), + height: e("12"), + rotation: e("5"), + background, + border: Some(Stroke { + color: paint("#FFFFFF"), + width: e("1"), + }), + mouse_events: Some(MouseEvents { + click: "show_dashboard()".into(), + double_click: "toggle_dashboard()".into(), + right_click: "show_context_menu()".into(), + mouse_enter: "set(self, visibility, 100)".into(), + mouse_leave: "reset(self, visibility)".into(), + }), + tooltip: Some(SurfaceTooltip::UsageSummary), + corner_radius: e("3"), + layout: ChildLayout::Row, + align: ChildAlignment::Center, + gap: e("2"), + content, + children: Vec::new(), + } +} + +fn maximal_theme() -> serde_json::Value { + let layers = vec![ + layer( + "text", + LayerBackground::Colour { + colour: paint("#101010"), + }, + SceneContent::Text { + template: "{claude.session.percentage:0}%".into(), + font_family: "Segoe UI".into(), + font_size: e("12"), + weight: FontWeight::Bold, + rendering: FontRendering::ClearType, + contrast: e("1.2"), + align: TextAlign::Center, + color: paint("#FFFFFF"), + }, + ), + layer( + "bar", + LayerBackground::Gradient { + start: paint("#000000"), + end: paint("#FFFFFF"), + angle: e("90"), + }, + SceneContent::Progress { + value: e("claude.session.display"), + direction: ProgressDirection::RightToLeft, + fill: paint("#46A758"), + track: paint("#333333"), + corner_radius: e("2"), + segments: 4, + segments_expression: Some(e("4")), + segment_gap: e("1"), + }, + ), + layer( + "mark", + LayerBackground::Image { + path: "logo.png".into(), + fit: ImageFit::Cover, + }, + SceneContent::ProviderMark { + provider: "codex".into(), + color: paint("#FFFFFF"), + }, + ), + layer("empty", LayerBackground::None, SceneContent::None), + ]; + let mut surface = layer("main", LayerBackground::None, SceneContent::None); + surface.parent = None; + // Surfaces are placed on screen, not anchored in a parent. + surface.anchor = ObjectAnchor::default(); + surface.x = e("0"); + surface.y = e("0"); + surface.children = layers; + surface.placement = Placement { + host_dimensions: None, + clamp_taskbar_drag: false, + reference: ReferenceTarget { + region: ReferenceRegion::Monitor, + display: 1, + }, + nest: SurfaceNest::Floating, + horizontal: HorizontalAnchor::Right, + vertical: VerticalAnchor::Bottom, + surface_horizontal: Some(HorizontalAnchor::Center), + surface_vertical: Some(VerticalAnchor::Center), + offset_x: 3, + offset_x_expression: Some(e("host.width / 2")), + offset_y: 4, + offset_y_expression: Some(e("8")), + }; + let document = ThemeDocument { + schema_version: THEME_SCHEMA_VERSION, + id: "maximal".into(), + name: "Maximal".into(), + canvas: Canvas::default(), + placement: Placement::default(), + children: Vec::new(), + surfaces: vec![surface], + }; + serde_json::to_value(&document).expect("a theme serializes") +} + +#[test] +fn field_tables_list_exactly_what_themes_save() { + let json = maximal_theme(); + let mut seen = BTreeSet::new(); + let mut unknown = Vec::new(); + visit_theme_fields(&json, &mut |owner, path, _, found| match found { + Some(field) => { + seen.insert(field.path); + } + None => unknown.push(format!("{owner}: {path}")), + }); + assert!( + unknown.is_empty(), + "saved theme fields missing from DOCUMENT_FIELDS, OBJECT_FIELDS or PAINT_FIELDS \ + in theme_language.rs: {unknown:?}" + ); + let missing: Vec<_> = DOCUMENT_FIELDS + .iter() + .chain(OBJECT_FIELDS) + .chain(PAINT_FIELDS) + .map(|field| field.path) + .filter(|path| !seen.contains(path)) + .collect(); + assert!( + missing.is_empty(), + "listed fields a theme never saves; remove them or set them in maximal_theme: {missing:?}" + ); +} + +/// The words serde accepts for a choice field, read from its error. +fn accepted_words(json: &serde_json::Value) -> Vec { + let error = match serde_json::from_value::(json.clone()) { + Ok(_) => return Vec::new(), + Err(error) => error.to_string(), + }; + let expected = error.split("expected").nth(1).unwrap_or_default(); + expected + .split('`') + .skip(1) + .step_by(2) + .map(str::to_string) + .collect() +} + +fn set_path(json: &mut serde_json::Value, object: usize, path: &str, value: serde_json::Value) { + let target = if object == 0 { + &mut json["surfaces"][0] + } else { + &mut json["surfaces"][0]["children"][object - 1] + }; + let mut target = target; + let segments: Vec<&str> = path.split('.').collect(); + for segment in &segments[..segments.len() - 1] { + let key = segment.split('(').next().unwrap_or(segment); + target = &mut target[key]; + } + let last = segments[segments.len() - 1]; + target[last.split('(').next().unwrap_or(last)] = value; +} + +/// Which object in `maximal_theme` has a field: 0 is the surface, 1.. the layers. +fn object_with(path: &str) -> usize { + match path.split('.').next().unwrap_or(path) { + "content(text)" | "background(colour)" => 1, + "content(progress)" | "background(gradient)" => 2, + "content(provider_mark)" | "background(image)" => 3, + _ => 0, + } +} + +#[test] +fn choice_fields_list_every_accepted_word() { + let base = maximal_theme(); + for field in OBJECT_FIELDS { + let FieldKind::Choice(words) = field.kind else { + continue; + }; + let mut json = base.clone(); + set_path( + &mut json, + object_with(field.path), + field.path, + "bogus".into(), + ); + let accepted = accepted_words(&json); + let listed: Vec = words.iter().map(|word| (*word).to_string()).collect(); + assert_eq!( + accepted, listed, + "{} in OBJECT_FIELDS must list the words serde accepts, in order", + field.path + ); + } +} + +#[test] +fn expression_and_template_fields_are_checked() { + let base = maximal_theme(); + let mut unchecked = Vec::new(); + for field in OBJECT_FIELDS.iter().chain(PAINT_FIELDS) { + let value = match field.kind { + FieldKind::Expression | FieldKind::Condition => "bogus_name_xyz", + FieldKind::Template => "{bogus_name_xyz}", + _ => continue, + }; + let paths: Vec = if PAINT_FIELDS.iter().any(|paint| paint.path == field.path) { + vec!["content(text).color.opacity".into()] + } else { + vec![field.path.to_string()] + }; + for path in paths { + let mut json = base.clone(); + let object = object_with(&path); + // Layers do not have placement; set it on the surface. + set_path(&mut json, object, &path, value.into()); + let theme: ThemeDocument = match serde_json::from_value(json) { + Ok(theme) => theme, + Err(error) => panic!("{path}: {error}"), + }; + let errors = theme.validate(); + if !errors.iter().any(|error| error.contains("bogus_name_xyz")) { + unchecked.push(format!("{path} ({:?})", field.kind)); + } + } + } + assert!( + unchecked.is_empty(), + "fields listed as expressions or templates that validate() does not check: {unchecked:?}" + ); +} + +#[test] +fn integer_fields_reject_expressions() { + let base = maximal_theme(); + for field in OBJECT_FIELDS { + if field.kind != FieldKind::Integer { + continue; + } + let mut json = base.clone(); + set_path( + &mut json, + object_with(field.path), + field.path, + "1 + 1".into(), + ); + assert!( + serde_json::from_value::(json).is_err(), + "{} is listed as an integer but accepts an expression; list it as an expression", + field.path + ); + } +} + +#[test] +fn unknown_fields_are_reported_with_a_suggestion() { + let mut json = maximal_theme(); + json["surfaces"][0]["children"][0]["widht"] = "10".into(); + json["surfaces"][0]["children"][0]["content"]["font_sise"] = "10".into(); + json["surfaces"][0]["children"][1]["content"]["fill"]["colour"] = "#FFFFFF".into(); + json["surfaces"][0]["placement"]["horizontl"] = "left".into(); + let problems = unknown_theme_fields(&json); + let expected = [ + "text: 'widht' is not a theme field; did you mean 'width'?", + "text: 'content(text).font_sise' is not a theme field; did you mean 'content(text).font_size'?", + "bar: 'content(progress).fill.colour' is not a theme field; did you mean 'color'?", + "main: 'placement.horizontl' is not a theme field; did you mean 'placement.horizontal'?", + ]; + for expected in expected { + assert!( + problems.iter().any(|problem| problem.starts_with(expected)), + "missing {expected:?} in {problems:?}" + ); + } + assert_eq!(problems.len(), expected.len(), "{problems:?}"); + assert!(problems[0].contains(THEME_REFERENCE)); +} + +#[test] +fn legacy_fields_are_not_reported() { + let json = serde_json::json!({ + "schema_version": 1, "id": "old", "name": "Old", + "surfaces": [{"id": "main", "name": "Main", "placement": {"layer": "taskbar"}, + "content": {"type": "shape", "fill": {"color": "#FFFFFF"}}}] + }); + assert_eq!(unknown_theme_fields(&json), Vec::::new()); +} + +#[test] +fn every_listed_function_runs_with_its_argument_count() { + for function in EXPRESSION_FUNCTIONS { + if function.name == "get" { + // `get` reads a value by name, so the parser handles it. + continue; + } + let args = vec![ExpressionValue::Number(1.0); function.arguments]; + if let Err(error) = super::super::theme_expression::call_function(function.name, &args) { + panic!("{} is listed but does not run: {error}", function.name); + } + let wrong = vec![ExpressionValue::Number(1.0); function.arguments + 1]; + let error = super::super::theme_expression::call_function(function.name, &wrong) + .expect_err("too many arguments fail"); + assert!(error.contains(function.signature), "{error}"); + } +} + +#[test] +fn unknown_names_suggest_the_closest_known_name() { + let mut context = DataContext::from_usage(None, &Canvas::default()); + context.insert("claude.session.percentage", 42.0); + + let error = evaluate("clmap(1, 0, 2)", &context).expect_err("unknown function"); + assert!(error.contains("Did you mean 'clamp'?"), "{error}"); + + let error = parse_mouse_actions("toggle_dashbord()").expect_err("unknown action"); + assert!( + error.contains("Did you mean 'toggle_dashboard'?"), + "{error}" + ); + + let errors = validate_template("{claude.sesion.percentage:0}", &context); + assert!( + errors[0].contains("did you mean 'claude.session.percentage'?") + && errors[0].contains(THEME_REFERENCE), + "{errors:?}" + ); + + let errors = validate_template("{claude.session.percentage:percnt}", &context); + assert!(errors[0].contains("did you mean 'percent'?"), "{errors:?}"); +} + +#[test] +fn every_listed_format_is_accepted() { + let mut context = DataContext::from_usage(None, &Canvas::default()); + context.insert("claude.session.percentage", 42.0); + for format in TEMPLATE_FORMATS { + for code in std::iter::once(format.code).chain(format.aliases.iter().copied()) { + let code = if format.kind == FormatKind::UtcPrefix { + "utc_iso_date".to_string() + } else { + code.to_string() + }; + assert_eq!(unknown_format_message(&code), None, "{code}"); + if format.kind == FormatKind::Timestamp { + assert!( + super::super::theme_datetime::format_timestamp(1.8e9, &code, &context) + .is_some(), + "{code} is listed as a timestamp format but format_timestamp ignores it" + ); + } + } + } + for number in ["0", "0.000", "#,##0.0"] { + assert_eq!(unknown_format_message(number), None, "{number}"); + } +} + +#[test] +fn every_action_example_parses_as_that_action() { + for action in MOUSE_ACTIONS { + assert!( + action.example.starts_with(action.name) && action.signature.starts_with(action.name), + "{}", + action.name + ); + if let Err(error) = parse_mouse_actions(action.example) { + panic!("{} example fails: {error}", action.name); + } + } +} + +#[test] +fn closest_only_suggests_likely_typos() { + assert_eq!( + closest("widht", ["width", "height"].into_iter()), + Some("width") + ); + assert_eq!(closest("colour", ["color"].into_iter()), Some("color")); + assert_eq!(closest("banana", ["width", "height"].into_iter()), None); +} diff --git a/src/theme_render.rs b/src/theme_render.rs index 055d6ffc..9df2c8fb 100644 --- a/src/theme_render.rs +++ b/src/theme_render.rs @@ -14,8 +14,8 @@ use crate::models::AppUsageData; use crate::providers::{ProviderId, ProviderSet}; use crate::theme_engine::{ bundled_theme, bundled_theme_ids, load_theme, render_theme_surface_with_runtime_at_scale, - with_fixed_render_environment, FixedRenderEnvironment, RenderedTheme, SurfaceNest, - ThemeDocument, ThemeRuntime, + unknown_theme_fields, with_fixed_render_environment, FixedRenderEnvironment, RenderedTheme, + SurfaceNest, ThemeDocument, ThemeRuntime, }; /// Usage figures for Claude Code and Codex, timed against `DEFAULT_NOW_UNIX`. @@ -147,8 +147,14 @@ pub fn to_rgba_image(rendered: &RenderedTheme) -> image::RgbaImage { .expect("a rendered theme has width * height pixels") } -/// `--render-theme`: returns an exit code, or `None` when the flag is absent. +/// `--render-theme` and `--theme-reference`: returns an exit code, or `None` +/// when neither flag is present. pub fn handle_cli_mode(args: &[String]) -> Option { + if args.iter().any(|arg| arg == "--theme-reference") { + attach_parent_console(); + print!("{}", reference::theme_reference()); + return Some(0); + } if !args.iter().any(|arg| arg == "--render-theme") { return None; } @@ -335,6 +341,15 @@ fn load_requested_theme(theme: &str) -> Result<(ThemeDocument, Option), if path.is_file() { let document = load_theme(path).map_err(|error| format!("invalid theme {theme}: {error}"))?; + // Serde ignores fields the format does not have; say which ones. + if let Some(json) = std::fs::read_to_string(path) + .ok() + .and_then(|text| serde_json::from_str(&text).ok()) + { + for warning in unknown_theme_fields(&json) { + eprintln!("warning: {warning}"); + } + } let root = path .parent() .map(|parent| parent.to_path_buf()) @@ -360,5 +375,7 @@ fn attach_parent_console() { let _ = unsafe { AttachConsole(ATTACH_PARENT_PROCESS) }; } +pub mod reference; + #[cfg(test)] mod tests; diff --git a/src/theme_render/reference.rs b/src/theme_render/reference.rs new file mode 100644 index 00000000..1cfefb9e --- /dev/null +++ b/src/theme_render/reference.rs @@ -0,0 +1,424 @@ +//! Builds `docs/theme-reference.md` from the theme language tables in +//! `theme_engine::theme_language`, evaluating every example against the +//! sample usage. `theme_reference_is_current` fails when the checked-in file +//! differs; `--theme-reference` prints it. + +use std::fmt::Write as _; + +use super::{parse_usage, runtime_for_surface, DEFAULT_NOW_UNIX, SAMPLE_USAGE}; +use crate::providers::PROVIDER_DESCRIPTORS; +use crate::theme_engine::{ + bundled_theme, describe_number, describe_result, format_template, is_usage_value, + split_usage_owner, split_usage_window, value_group, DataContext, FieldKind, + FixedRenderEnvironment, MouseActionProperty, ThemeField, DOCUMENT_FIELDS, EXPRESSION_FUNCTIONS, + EXPRESSION_LITERALS, EXPRESSION_OPERATORS, MOUSE_ACTIONS, OBJECT_FIELDS, PAINT_FIELDS, + PROVIDER_FIELDS, PROVIDER_WINDOWS, STACKED_ROWS_THEME_ID, TEMPLATE_FORMATS, THEME_REFERENCE, + USAGE_OWNERS, VALUE_GROUPS, +}; + +/// The values every example is evaluated with: the sample usage, drawn on +/// Stacked Rows' widget surface in dark mode at `DEFAULT_NOW_UNIX`. +pub fn sample_context() -> DataContext { + let usage = parse_usage(SAMPLE_USAGE).expect("the sample usage fixture parses"); + let theme = bundled_theme(STACKED_ROWS_THEME_ID) + .expect("Stacked Rows is built in") + .expect("Stacked Rows parses"); + let environment = FixedRenderEnvironment { + now_unix: DEFAULT_NOW_UNIX, + utc_offset_minutes: 0, + dark: true, + asset_root: None, + }; + crate::theme_engine::with_fixed_render_environment(environment, || { + let runtime = runtime_for_surface(&theme, 0, &usage); + DataContext::from_usage_with_runtime(Some(&usage), &theme.canvas, runtime) + }) +} + +pub fn theme_reference() -> String { + let context = sample_context(); + let environment = FixedRenderEnvironment { + now_unix: DEFAULT_NOW_UNIX, + utc_offset_minutes: 0, + dark: true, + asset_root: None, + }; + crate::theme_engine::with_fixed_render_environment(environment, || write_reference(&context)) +} + +fn write_reference(context: &DataContext) -> String { + let mut out = String::new(); + let o = &mut out; + line(o, "# Theme reference"); + line(o, ""); + line( + o, + "", + ); + line(o, ""); + line( + o, + "Theme files are JSON (see the [built-in themes](../src/themes/)). Most fields are \ + **expressions**, not fixed numbers: `\"width\": \"canvas.width - 8\"` sizes a layer \ + from its surface, and `\"render\": \"claude.session.percentage > 80\"` shows it only \ + near the limit. Text layers use **templates** with `{expression}` tokens, and mouse \ + events run **actions**. The [Fields](#fields) section says what each field takes.", + ); + line(o, ""); + line( + o, + "Results below are computed with `tests/fixtures/theme-usage.json` on Stacked Rows' \ + `main` surface, in dark mode, at 2027-01-15 08:00 UTC: the same inputs \ + `--render-theme` uses. Check a theme with `claude-code-usage-monitor --render-theme \ + --out `; it prints unknown fields and failing expressions.", + ); + line(o, ""); + + line(o, "## Expressions"); + line(o, ""); + line( + o, + "Expressions combine values, numbers and text with operators and functions. A \ + condition is true when it is not 0.", + ); + line(o, ""); + line(o, "| Literal | Meaning | Example | Result |"); + line(o, "| --- | --- | --- | --- |"); + for literal in EXPRESSION_LITERALS { + let result = example_result(literal.example, context); + line( + o, + &format!( + "| {} | {} | `{}` | {} |", + literal.symbol, literal.description, literal.example, result + ), + ); + } + line(o, ""); + line(o, "### Operators"); + line(o, ""); + line(o, "| Operator | Meaning | Example | Result |"); + line(o, "| --- | --- | --- | --- |"); + for operator in EXPRESSION_OPERATORS { + line( + o, + &format!( + "| `{}` | {} | `{}` | {} |", + cell(operator.symbol), + operator.description, + cell(operator.example), + example_result(operator.example, context) + ), + ); + } + line(o, ""); + line(o, "### Functions"); + line(o, ""); + line( + o, + "`get(owner, field)` reads `owner.field`; `get(self, width)` reads the current layer.", + ); + line(o, ""); + line(o, "| Function | Meaning | Example | Result |"); + line(o, "| --- | --- | --- | --- |"); + for function in EXPRESSION_FUNCTIONS { + line( + o, + &format!( + "| `{}` | {} | `{}` | {} |", + function.signature, + function.description, + cell(function.example), + example_result(function.example, context) + ), + ); + } + line(o, ""); + + line(o, "## Templates"); + line(o, ""); + line( + o, + "A text layer's `template` is literal text with `{expression}` or \ + `{expression:format}` tokens, such as `\"{claude.session.percentage:0}% used\"`. \ + `{{` writes a literal `{`. A token that cannot be evaluated shows `--`.", + ); + line(o, ""); + line(o, "## Formats"); + line(o, ""); + line(o, "| Format | Meaning | Example | Result |"); + line(o, "| --- | --- | --- | --- |"); + for format in TEMPLATE_FORMATS { + let code = std::iter::once(format.code) + .chain(format.aliases.iter().copied()) + .map(|code| format!("`{code}`")) + .collect::>() + .join(", "); + line( + o, + &format!( + "| {code} | {} | `{}` | {} |", + format.description, + cell(format.example), + text_result(&format_template(format.example, context)) + ), + ); + } + line(o, ""); + + let properties = MouseActionProperty::ALL + .iter() + .map(|property| format!("`{}`", property.name())) + .collect::>() + .join(", "); + line(o, "## Mouse actions"); + line(o, ""); + line( + o, + &format!( + "`mouse_events` fields hold scripts of one or more actions separated by `;` or new lines. A layer is `self` or its quoted id; layer properties are {properties}. `set`, `increase` and `decrease` take an expression." + ), + ); + line(o, ""); + line(o, "| Action | Meaning | Example |"); + line(o, "| --- | --- | --- |"); + for action in MOUSE_ACTIONS { + line( + o, + &format!( + "| `{}` | {} | `{}` |", + action.signature, action.label, action.example + ), + ); + } + line(o, ""); + + line(o, "## Fields"); + line(o, ""); + line( + o, + "`placement` and `tooltip` apply to surfaces; `parent`, `anchor`, `x` and `y` to \ + layers. Other object fields apply to both. `background(gradient).angle` is the \ + `angle` key of a `background` whose `type` is `gradient`. Fields not listed here \ + are ignored, so `--render-theme` reports them.", + ); + line(o, ""); + field_table(o, "Theme", DOCUMENT_FIELDS); + field_table(o, "Surfaces and layers", OBJECT_FIELDS); + field_table(o, "Paints", PAINT_FIELDS); + + line(o, "## Values"); + line(o, ""); + line( + o, + "Names an expression can read. Text values work in templates and comparisons.", + ); + line(o, ""); + line(o, "| Name | Meaning | Sample values |"); + line(o, "| --- | --- | --- |"); + let names: Vec<&str> = context + .names() + .into_iter() + .filter(|name| !is_usage_value(name)) + .collect(); + for group in VALUE_GROUPS { + let samples = names + .iter() + .filter(|name| value_group(name).is_some_and(|found| found.pattern == group.pattern)) + .map(|name| format!("`{name}` = {}", value_text(name, context))) + .collect::>() + .join("
"); + let samples = if samples.is_empty() { + "(inside layers)".to_string() + } else { + samples + }; + let pattern = if group.pattern.ends_with('.') { + format!("`{}*`", group.pattern) + } else { + format!("`{}`", group.pattern) + }; + line( + o, + &format!("| {pattern} | {} | {samples} |", group.description), + ); + } + line(o, ""); + + line(o, "### Usage values"); + line(o, ""); + line( + o, + "Usage values are `..`, such as `claude.session.percentage`, or \ + `.` for the provider itself, such as `claude.available`. Missing \ + values make an expression fail, so check `available` before using a window a \ + provider may not report.", + ); + line(o, ""); + line(o, "| Owner | Meaning |"); + line(o, "| --- | --- |"); + for descriptor in PROVIDER_DESCRIPTORS { + line( + o, + &format!("| `{}` | {} |", descriptor.key, descriptor.display_name), + ); + } + for (owner, description) in USAGE_OWNERS { + line(o, &format!("| `{owner}` | {description} |")); + } + line(o, ""); + let usage_names: Vec<&str> = context + .names() + .into_iter() + .filter(|name| is_usage_value(name) && !name.starts_with("accounts.")) + .collect(); + let mut all_owners: Vec<&str> = usage_names + .iter() + .filter_map(|name| split_usage_owner(name)) + .map(|(owner, _)| owner) + .collect(); + all_owners.sort_unstable(); + all_owners.dedup(); + line(o, "| Window | Meaning | In the sample |"); + line(o, "| --- | --- | --- |"); + for window in PROVIDER_WINDOWS { + let mut owners: Vec<&str> = usage_names + .iter() + .filter_map(|name| split_usage_owner(name)) + .filter(|(_, rest)| split_usage_window(rest).0 == window.pattern) + .map(|(owner, _)| owner) + .collect(); + owners.sort_unstable(); + owners.dedup(); + let name = if window.pattern.is_empty() { + "(none)".to_string() + } else { + format!("`{}`", window.pattern) + }; + line( + o, + &format!( + "| {name} | {} | {} |", + window.description, + if owners.len() == all_owners.len() { + "every owner".to_string() + } else { + owners + .iter() + .map(|owner| format!("`{owner}`")) + .collect::>() + .join(", ") + } + ), + ); + } + line(o, ""); + line(o, "| Field | Meaning | Example | Sample value |"); + line(o, "| --- | --- | --- | --- |"); + for field in PROVIDER_FIELDS { + let example = [ + "claude.session.", + "claude.", + "claude.account.", + "claude.credits.", + "claude.limits.", + ] + .iter() + .map(|prefix| format!("{prefix}{}", field.pattern)) + .chain( + usage_names + .iter() + .filter(|name| { + split_usage_owner(name) + .is_some_and(|(_, rest)| split_usage_window(rest).1 == field.pattern) + }) + .map(|name| (*name).to_string()), + ) + .find(|name| context.get(name).is_some() || context.get_string(name).is_some()); + let (example, value) = example.map_or_else( + || { + ( + format!("`claude.{}`", field.pattern), + "(not in the sample)".into(), + ) + }, + |name| { + let value = value_text(&name, context); + (format!("`{name}`"), value) + }, + ); + line( + o, + &format!( + "| `{}` | {} | {example} | {value} |", + field.pattern, field.description + ), + ); + } + out +} + +fn field_table(o: &mut String, title: &str, fields: &[ThemeField]) { + line(o, &format!("### {title}")); + line(o, ""); + line(o, "| Field | Takes | Meaning |"); + line(o, "| --- | --- | --- |"); + for field in fields { + let kind = match field.kind { + FieldKind::Choice(values) => values + .iter() + .map(|value| format!("`{value}`")) + .collect::>() + .join(", "), + kind => kind.label().to_string(), + }; + line( + o, + &format!("| `{}` | {kind} | {} |", field.path, field.description), + ); + } + line(o, ""); +} + +fn example_result(expression: &str, context: &DataContext) -> String { + match describe_result(expression, context) { + Ok(result) => format!("`{}`", cell(&result)), + Err(error) => panic!("{THEME_REFERENCE} example `{expression}` fails: {error}"), + } +} + +fn text_result(text: &str) -> String { + assert!( + !text.contains("--"), + "{THEME_REFERENCE} format example renders as {text}" + ); + format!("`{}`", cell(text)) +} + +fn value_text(name: &str, context: &DataContext) -> String { + // The version changes with every release; the reference must not. + if name.starts_with("app.version") { + return if name == "app.version" { + "`\"X.Y.Z\"`".into() + } else { + "`…`".into() + }; + } + if let Some(text) = context.get_string(name) { + return format!("`\"{}\"`", cell(text)); + } + context + .get(name) + .map(|value| format!("`{}`", describe_number(value))) + .unwrap_or_default() +} + +/// Escapes a table cell. +fn cell(text: &str) -> String { + text.replace('|', "\\|") +} + +fn line(out: &mut String, text: &str) { + let _ = writeln!(out, "{text}"); +} diff --git a/src/theme_render/tests.rs b/src/theme_render/tests.rs index 3bf5676a..96f2ce61 100644 --- a/src/theme_render/tests.rs +++ b/src/theme_render/tests.rs @@ -365,3 +365,51 @@ fn unknown_theme_lists_the_built_in_ids() { let error = load_requested_theme("no-such-theme").unwrap_err(); assert!(error.contains("classic-usage-widget"), "{error}"); } + +#[test] +fn theme_reference_is_current() { + let path = manifest_dir().join(crate::theme_engine::THEME_REFERENCE); + let generated = reference::theme_reference(); + if std::env::var(UPDATE_SNAPSHOTS).is_ok_and(|value| value == "1") { + std::fs::write(&path, &generated).unwrap(); + return; + } + let current = std::fs::read_to_string(&path).unwrap_or_default(); + assert!( + current.replace("\r\n", "\n") == generated, + "{} is out of date with src/theme_engine/theme_language.rs; regenerate it with \ + `CCUM_UPDATE_SNAPSHOTS=1 cargo test --locked theme_reference` and commit the result", + crate::theme_engine::THEME_REFERENCE + ); +} + +#[test] +fn every_sample_value_is_described() { + let context = reference::sample_context(); + let undescribed: Vec<_> = context + .names() + .into_iter() + .filter(|name| { + !crate::theme_engine::is_usage_value(name) + && crate::theme_engine::value_group(name).is_none() + }) + .collect(); + assert!( + undescribed.is_empty(), + "values themes can read but the reference does not describe; add them to \ + VALUE_GROUPS, PROVIDER_WINDOWS or PROVIDER_FIELDS in theme_language.rs: {undescribed:?}" + ); +} + +#[test] +fn built_in_themes_use_only_theme_fields() { + let mut problems = Vec::new(); + for path in theme_files(&manifest_dir().join("src/themes")) { + let json: serde_json::Value = + serde_json::from_str(&std::fs::read_to_string(&path).unwrap()).unwrap(); + for problem in crate::theme_engine::unknown_theme_fields(&json) { + problems.push(format!("{}: {problem}", path.display())); + } + } + assert!(problems.is_empty(), "{}", problems.join("\n")); +} diff --git a/src/themes/README.md b/src/themes/README.md new file mode 100644 index 00000000..1de138d6 --- /dev/null +++ b/src/themes/README.md @@ -0,0 +1,15 @@ +# Built-in themes + +Each `.json` file here is a built-in theme; `assets/` holds their images. + +- Most fields are **expressions**, not fixed numbers: `"width": "canvas.width - 8"`, + `"render": "claude.session.percentage > 80"`. Text layers use templates such as + `"{claude.session.percentage:0}% used"`. +- [docs/theme-reference.md](../../docs/theme-reference.md) lists every field, value, + operator, function, format and mouse action, with results computed from the sample + usage. It is generated from `src/theme_engine/theme_language.rs`; `cargo test` fails + when it is out of date, and `--theme-reference` prints it. +- Check a theme with `claude-code-usage-monitor --render-theme --out `. + It renders PNGs and prints unknown fields and failing expressions. +- Changing a built-in theme changes its snapshots in `tests/snapshots/themes/`; see + [CONTRIBUTING.md](../../CONTRIBUTING.md#theme-changes). From b37b9b03c47b5c62f3f1cddd34f86f08bc244da3 Mon Sep 17 00:00:00 2001 From: Craig Constable Date: Thu, 26 Nov 2026 08:20:27 +1000 Subject: [PATCH 12/12] test(poller): age retry-after cooldowns without instants before boot Two retry-after tests moved a cooldown's `received` 15 minutes into the past with `Instant::now() - MAX_RETRY_AFTER`. On Windows `Instant` counts from boot, so on a CI runner up for less than 15 minutes the subtraction panicked with "overflow when subtracting duration from instant". Age cooldowns by shortening their delay instead, which gives the same remaining time. Co-Authored-By: Claude Opus 5.5 --- src/poller/retry_after.rs | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/src/poller/retry_after.rs b/src/poller/retry_after.rs index a0c66335..aeca46de 100644 --- a/src/poller/retry_after.rs +++ b/src/poller/retry_after.rs @@ -240,6 +240,14 @@ mod tests { response.body(ureq::Body::builder().data(b"{}")).unwrap() } + /// Makes `cooldown` behave as if it were received `age` ago. `Instant` + /// cannot go back past boot on Windows, and CI runners may have been up + /// for less than `MAX_RETRY_AFTER`, so shorten the delay instead of + /// moving `received` back; `remaining` gives the same result. + fn age(cooldown: &mut Cooldown, age: Duration) { + cooldown.delay = cooldown.delay.saturating_sub(age); + } + #[test] fn parses_seconds_dates_and_invalid_values() { let now = httpdate::parse_http_date("Wed, 23 Sep 2026 00:00:00 GMT").unwrap(); @@ -305,11 +313,10 @@ mod tests { )); // Advance the cooldown's age without sleeping or restarting. - { - let mut cooldowns = state.cooldowns.lock().unwrap(); - cooldowns.get_mut(&key).unwrap().received = - Instant::now() - Duration::from_secs(900); - } + age( + state.cooldowns.lock().unwrap().get_mut(&key).unwrap(), + Duration::from_secs(900), + ); let mut sent = false; state .handle(request("first"), |_| { @@ -453,13 +460,10 @@ mod tests { state.cooldowns.lock().unwrap()[&key].received, original.received ); - state - .cooldowns - .lock() - .unwrap() - .get_mut(&key) - .unwrap() - .received = Instant::now() - MAX_RETRY_AFTER; + age( + state.cooldowns.lock().unwrap().get_mut(&key).unwrap(), + MAX_RETRY_AFTER, + ); assert!(state .handle(request("first"), |_| Ok(response(200, None))) .is_ok()); @@ -567,13 +571,10 @@ mod tests { assert!(state .handle(request("second"), |_| Ok(response(200, None))) .is_ok()); - state - .cooldowns - .lock() - .unwrap() - .get_mut(&key) - .unwrap() - .received = Instant::now() - DEFAULT_RATE_LIMIT_DELAY; + age( + state.cooldowns.lock().unwrap().get_mut(&key).unwrap(), + DEFAULT_RATE_LIMIT_DELAY, + ); assert!(state .handle(request("first"), |_| Ok(response(200, None))) .is_ok());