Sidebar Counts & Local-Today
The sidebar shows per-View and per-List Task counts, computed entirely on the client from the cached data and refreshed as data changes.
Counts
Section titled “Counts”src/lib/offline/sidebar-counts.ts—computeCounts(...)derivesSidebarCounts(perView+perList);emptyPerView()/EMPTY_COUNTSare the zero state.src/lib/sidebar/counts-store.ts— an observable store:getSidebarCounts(),useSidebarCounts()(React hook),_resetSidebarCounts(). TheCountBadge.tsxisland renders the numbers and re-renders on change.- Counts respect the authorization boundary and the View definitions (owned + member Lists; “Important”/“Planned”/“Assigned to me”/“My Day”; see My Day & Owner-Scoped Views).
Local-today
Section titled “Local-today”src/lib/date/local-today.ts—localTodayISO(d = new Date())returns the user’s local calendar day (YYYY-MM-DD). This is the boundary that resets “My Day” each local midnight and that “Planned”/due-date logic compares against, so day-sensitive counts and views follow the user’s timezone, not UTC (Product Brief §5.2).
Related: My Day & Owner-Scoped Views, List Sidebar & Drag-Drop, Date/Number Format Utils.