diff --git a/desktop/src-tauri/src/lib.rs b/desktop/src-tauri/src/lib.rs index 6c6d410..018ed6a 100644 --- a/desktop/src-tauri/src/lib.rs +++ b/desktop/src-tauri/src/lib.rs @@ -64,10 +64,11 @@ pub fn run() { } fn build_tray(app: &AppHandle) -> tauri::Result<()> { + let dashboard = MenuItem::with_id(app, "dashboard", "Show Dashboard", true, None::<&str>)?; let refresh = MenuItem::with_id(app, "refresh", "Refresh", true, None::<&str>)?; let report = MenuItem::with_id(app, "report", "Open Full Report", true, None::<&str>)?; let quit = MenuItem::with_id(app, "quit", "Quit CodeBurn", true, None::<&str>)?; - let menu = Menu::with_items(app, &[&refresh, &report, &quit])?; + let menu = Menu::with_items(app, &[&dashboard, &refresh, &report, &quit])?; TrayIconBuilder::with_id("codeburn-tray") .tooltip("CodeBurn") @@ -75,6 +76,7 @@ fn build_tray(app: &AppHandle) -> tauri::Result<()> { .show_menu_on_left_click(false) .on_menu_event(|app, event| match event.id.as_ref() { "quit" => app.exit(0), + "dashboard" => toggle_popover(app), "refresh" => { // Nudge the webview so it re-requests the payload. The front-end listens for // this event and kicks off a new fetch_payload command. diff --git a/desktop/src/App.tsx b/desktop/src/App.tsx index d83e0c6..99e722d 100644 --- a/desktop/src/App.tsx +++ b/desktop/src/App.tsx @@ -124,22 +124,40 @@ export function App() { ))} -
-

Activity

- {payload.current.topActivities.length === 0 && ( -

No activity for this period.

- )} - {payload.current.topActivities.map(a => ( -
-
{a.name}
-
{formatCompactCurrency(a.cost, currency)}
-
{a.turns}
-
- {a.oneShotRate == null ? '—' : `${Math.round(a.oneShotRate * 100)}%`} + {!loading && payload.current.calls === 0 && payload.current.sessions === 0 ? ( +
+

No session data yet

+

+ CodeBurn reads local session logs from your AI coding tools. It looks like + none of the supported tools have written any sessions on this machine yet. +

+

Supported sources:

+
    +
  • ~/.claude/projects/ (Claude Code)
  • +
  • ~/.codex/sessions/ (Codex CLI)
  • +
  • Cursor IDE local database
  • +
  • GitHub Copilot session events
  • +
+

Run one of those tools for a session, then hit Refresh.

+
+ ) : ( +
+

Activity

+ {payload.current.topActivities.length === 0 && ( +

No activity for this period.

+ )} + {payload.current.topActivities.map(a => ( +
+
{a.name}
+
{formatCompactCurrency(a.cost, currency)}
+
{a.turns}
+
+ {a.oneShotRate == null ? '—' : `${Math.round(a.oneShotRate * 100)}%`} +
-
- ))} -
+ ))} + + )} {payload.optimize.findingCount > 0 && (
diff --git a/desktop/src/styles.css b/desktop/src/styles.css index 91e88ca..1423a82 100644 --- a/desktop/src/styles.css +++ b/desktop/src/styles.css @@ -157,6 +157,23 @@ html, body, #root { .empty { color: var(--text-tertiary); font-size: 10.5px; padding: var(--spacing-md) 0; } +.empty-state { + padding: var(--spacing-md) var(--spacing-lg) var(--spacing-lg); + color: var(--text-secondary); + font-size: 11.5px; + line-height: 1.55; +} +.empty-state p { margin: 0 0 8px 0; } +.empty-state ul { margin: 0 0 10px 0; padding-left: 18px; } +.empty-state li { margin-bottom: 2px; } +.empty-state code { + font-family: var(--font-mono); + font-size: 10.5px; + background: rgba(255, 255, 255, 0.04); + padding: 1px 4px; + border-radius: 3px; +} + /* ---- findings ---- */ .findings { padding: 0 var(--spacing-lg) var(--spacing-sm); } .findings-cta {