desktop/src/App.svelte:43
/** Today/two-calendar-day ranges use hourly data bounded by dates in the configured timezone. */
desktop/src/App.svelte:59
/** Separate today query (D8): summary first_day=last_day for the current-day section. */
desktop/src/App.svelte:70
// Theme: system/light/dark through data-theme and derived isDark for ECharts.
desktop/src/App.svelte:71
/** Track system dark-mode changes so system-theme charts update immediately. */
desktop/src/App.svelte:81
/** Explicit light/dark wins; other values, including unknown settings, use system. */
desktop/src/App.svelte:85
/** Effective dark mode supplied to ECharts: explicit dark or system with a dark preference. */
desktop/src/App.svelte:88
// For system theme, remove data-theme and let themes.css prefers-color-scheme apply.
desktop/src/App.svelte:95
// v6 users: header selection and creation.
desktop/src/App.svelte:104
/** Force child queries to reload after user switches/imports without a changed query. */
desktop/src/App.svelte:108
// E10/E11 panel order/visibility, persisted per page in localStorage.
desktop/src/App.svelte:163
/** Default panel column span in the six-column grid. */
desktop/src/App.svelte:194
/** Hide trend cost panels when estimates are disabled, without rewriting the saved layout. */
desktop/src/App.svelte:208
/** Prefer a resized edit-mode column span over the panel default. */
desktop/src/App.svelte:214
/** Panel height in pixels; unmodified panels size automatically. */
desktop/src/App.svelte:219
/** Persist span/height and layout when resize dragging ends. */
desktop/src/App.svelte:226
/** Reset current-page localStorage layout to default order, dimensions and visibility. */
desktop/src/App.svelte:241
/** Shared overview/trend edit mode enables dragging and visibility controls. */
desktop/src/App.svelte:247
* 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:264
// A target in another group/page falls back to this panel, leaving its order unchanged.
desktop/src/App.svelte:357
// One cost query feeds the summary, model rows and curve on the active page.
desktop/src/App.svelte:395
// Cost curves are daily when usage is hourly; include all visible hours of the day.
desktop/src/App.svelte:440
/** Overview history and trends share period selection; reselecting the same overview point clears it. */
desktop/src/App.svelte:453
// User options include a synthetic current entry when absent from the list, such as initial default.
desktop/src/App.svelte:462
// Today shares include known lower bounds without replacing complete stored totals.
desktop/src/App.svelte:475
// Trend shares use the same display bounds over the selected range.
desktop/src/App.svelte:515
/** Date label for the today section. */
desktop/src/App.svelte:518
* 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:578
/** 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:631
/** Reload summary, heatmap and sources after a user switch/import without a changed query. */
desktop/src/App.svelte:640
// Open user creation while keeping the dropdown on the current user.
desktop/src/App.svelte:660
// Backend summary/heatmap follow the current user and must reload after switching.
desktop/src/App.svelte:693
// Collection-status polling and automatic data refresh.
desktop/src/App.svelte:694
/** Last observed completed-collection timestamp; a change requires data reload. */
desktop/src/App.svelte:696
/** Loaded summary query key and data revision, used to skip identical assignments. */
desktop/src/App.svelte:699
* 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:705
// An accepted request may not have set the worker's running flag yet.
desktop/src/App.svelte:728
/* Retry a failed poll on the next interval. */
desktop/src/App.svelte:734
* 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:745
// Header query-refresh interval: localStorage persistence, default five minutes.
desktop/src/App.svelte:747
// The v2 key accompanies the default change from 60 to 300 seconds on 2026-09-26.
desktop/src/App.svelte:748
// Ignore the old stored default on first startup with this key.
desktop/src/App.svelte:766
/* Without storage access, keep the selection for this session only. */
desktop/src/App.svelte:807
// Today/two-calendar-day ranges select hourly data.
desktop/src/App.svelte:813
// Debounce changed queries by 200 ms and clear a selection whose period label may be stale.
desktop/src/App.svelte:834
// Preserve unchanged reactive fields and nested objects across autosave acknowledgements.
desktop/src/App.svelte:847
// F2: enabling pricing starts a background cost recomputation for retained details.
desktop/src/App.svelte:848
// Autosaving unrelated preferences must not start another cost recomputation.
desktop/src/App.svelte:878
// Collection ETA is empty when unavailable so the template hides it.
desktop/src/App.svelte:942
<!-- Query-refresh interval is independent of background collection; disabled means manual refresh. -->
desktop/src/App.svelte:1108
<!-- Put range/granularity inside history because today uses an independent query. -->
desktop/src/App.svelte:1131
<!-- Selecting a historical chart point shows period cards matching the today layout. -->
desktop/src/App.svelte:1158
<!-- 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:1220
<!-- Seven fixed range-summary cards above charts use summary.totals. -->
desktop/src/App.svelte:1375
/* Highlight the panel-layout edit toggle when active. */
desktop/src/App.svelte:1410
/* Header query-refresh selector shares a row with collection progress and refresh. */
desktop/src/App.svelte:1419
/* Collection progress width follows its percentage, alongside percentage/ETA text. */
desktop/src/App.svelte:1497
/* D8 today/history headings; history range/granularity filters affect that section only. */
desktop/src/App.svelte:1521
/* History range/granularity controls sit beside its heading, separate from today. */
desktop/src/App.svelte:1535
/* Selected-period heading and reused summary-cards grid inside history. */
desktop/src/App.svelte:1569
/* Model/Agent pies use two columns, stacking on narrow screens. */
desktop/src/App.svelte:1582
/* Match loading/empty-state height to reduce movement when changing selected periods. */
desktop/src/App.svelte:1590
/* Match the SharePie loading placeholder to its 190px chart height. */
desktop/src/App.svelte:1596
/* E10 six-column panel grid; Panel span classes set column widths. */
desktop/src/App.svelte:1604
/* Keep metric rows compact; account quota has an independent full-width strip. */