desktop/src/App.svelte:41
/** Today/two-calendar-day ranges use hourly data bounded by dates in the configured timezone. */
desktop/src/App.svelte:55
/** Separate today query (D8): summary first_day=last_day for the current-day section. */
desktop/src/App.svelte:66
// Theme: system/light/dark through data-theme and derived isDark for ECharts.
desktop/src/App.svelte:67
/** Track system dark-mode changes so system-theme charts update immediately. */
desktop/src/App.svelte:77
/** Explicit light/dark wins; other values, including unknown settings, use system. */
desktop/src/App.svelte:81
/** Effective dark mode supplied to ECharts: explicit dark or system with a dark preference. */
desktop/src/App.svelte:84
// For system theme, remove data-theme and let themes.css prefers-color-scheme apply.
desktop/src/App.svelte:91
// v6 users: header selection and creation.
desktop/src/App.svelte:100
/** Force child queries to reload after user switches/imports without a changed query. */
desktop/src/App.svelte:103
// E10/E11 panel order/visibility, persisted per page in localStorage.
desktop/src/App.svelte:158
/** Default panel column span in the six-column grid. */
desktop/src/App.svelte:189
/** Hide trend cost panels when estimates are disabled, without rewriting the saved layout. */
desktop/src/App.svelte:203
/** Prefer a resized edit-mode column span over the panel default. */
desktop/src/App.svelte:209
/** Panel height in pixels; unmodified panels size automatically. */
desktop/src/App.svelte:214
/** Persist span/height and layout when resize dragging ends. */
desktop/src/App.svelte:221
/** Reset current-page localStorage layout to default order, dimensions and visibility. */
desktop/src/App.svelte:236
/** Shared overview/trend edit mode enables dragging and visibility controls. */
desktop/src/App.svelte:242
* Pointer-based panel dragging fixed on 2026-09-26. With default dragDropEnabled=true,
* Tauri WebView2 intercepted HTML5 dragstart/drop. Use panel pointerdown and window
* pointermove/pointerup/pointercancel instead. elementsFromPoint identifies the target
* data-panel-group/-index during movement; releasing swaps and persists panel order.
desktop/src/App.svelte:259
// A target in another group/page falls back to this panel, leaving its order unchanged.
desktop/src/App.svelte:352
// One cost query feeds the summary, model rows and curve on the active page.
desktop/src/App.svelte:390
// Cost curves are daily when usage is hourly; include all visible hours of the day.
desktop/src/App.svelte:435
/** Overview history and trends share period selection; reselecting the same overview point clears it. */
desktop/src/App.svelte:448
// User options include a synthetic current entry when absent from the list, such as initial default.
desktop/src/App.svelte:457
// Today shares use total_tokens by model/Agent; group unknown names and exclude zero values.
desktop/src/App.svelte:474
// Trend shares use model/Agent total_tokens from the selected-range summary.
desktop/src/App.svelte:518
/** Date label for the today section. */
desktop/src/App.svelte:521
* Selected-period cards mirror today: calls, input/cache/uncached, output, total tokens,
* cache ratio and sessions; week/month selections also show active days.
desktop/src/App.svelte:581
/** Load the main and today queries together for one interaction/refresh.
* Preserve object references when query keys and data revisions are unchanged, avoiding
* idle chart redraws and flicker reported on 2026-09-26. */
desktop/src/App.svelte:634
/** Reload summary, heatmap and sources after a user switch/import without a changed query. */
desktop/src/App.svelte:643
// Open user creation while keeping the dropdown on the current user.
desktop/src/App.svelte:663
// Backend summary/heatmap follow the current user and must reload after switching.
desktop/src/App.svelte:696
// Collection-status polling and automatic data refresh.
desktop/src/App.svelte:697
/** Last observed completed-collection timestamp; a change requires data reload. */
desktop/src/App.svelte:699
/** Loaded summary query key and data revision, used to skip identical assignments. */
desktop/src/App.svelte:702
* Reload data when collection finishes or its completion timestamp changes, including
* scheduled/headless collection. Idle polling updates status without rebuilding charts,
* preventing periodic overview flicker.
desktop/src/App.svelte:708
// An accepted request may not have set the worker's running flag yet.
desktop/src/App.svelte:729
/* Retry a failed poll on the next interval. */
desktop/src/App.svelte:735
* Poll every 500 ms during collection and every 10 seconds when idle.
* Idle status checks detect system/scheduler collection without redrawing charts.
desktop/src/App.svelte:746
// Header query-refresh interval: localStorage persistence, default five minutes.
desktop/src/App.svelte:748
// The v2 key accompanies the default change from 60 to 300 seconds on 2026-09-26.
desktop/src/App.svelte:749
// Ignore the old stored default on first startup with this key.
desktop/src/App.svelte:767
/* Without storage access, keep the selection for this session only. */
desktop/src/App.svelte:808
// Today/two-calendar-day ranges select hourly data.
desktop/src/App.svelte:814
// Debounce changed queries by 200 ms and clear a selection whose period label may be stale.
desktop/src/App.svelte:833
// Timezone/week-start changes affect date ranges without changing the query key; force reload.
desktop/src/App.svelte:835
// F2: enabling pricing starts a background cost recomputation for retained details.
desktop/src/App.svelte:836
// Repeated recomputation is safe; skip when disabled, as collection does not backfill it.
desktop/src/App.svelte:854
// Collection ETA is empty when unavailable so the template hides it.
desktop/src/App.svelte:918
<!-- Query-refresh interval is independent of background collection; disabled means manual refresh. -->
desktop/src/App.svelte:1082
<!-- Put range/granularity inside history because today uses an independent query. -->
desktop/src/App.svelte:1105
<!-- Selecting a historical chart point shows period cards matching the today layout. -->
desktop/src/App.svelte:1132
<!-- Model/Agent pies use chart_series with the same selected-period filters.
Match loading/chart heights and retain the old chart while replacing data to reduce movement. -->
desktop/src/App.svelte:1194
<!-- Seven fixed range-summary cards above charts use summary.totals. -->
desktop/src/App.svelte:1345
/* Highlight the panel-layout edit toggle when active. */
desktop/src/App.svelte:1380
/* Header query-refresh selector shares a row with collection progress and refresh. */
desktop/src/App.svelte:1389
/* Collection progress width follows its percentage, alongside percentage/ETA text. */
desktop/src/App.svelte:1467
/* D8 today/history headings; history range/granularity filters affect that section only. */
desktop/src/App.svelte:1490
/* History range/granularity controls sit beside its heading, separate from today. */
desktop/src/App.svelte:1504
/* Selected-period heading and reused summary-cards grid inside history. */
desktop/src/App.svelte:1538
/* Model/Agent pies use two columns, stacking on narrow screens. */
desktop/src/App.svelte:1551
/* Match loading/empty-state height to reduce movement when changing selected periods. */
desktop/src/App.svelte:1559
/* Match the SharePie loading placeholder to its 190px chart height. */
desktop/src/App.svelte:1565
/* E10 six-column panel grid; Panel span classes set column widths. */
desktop/src/App.svelte:1573
/* Keep metric rows compact; account quota has an independent full-width strip. */