Skip to main content

max / goingson

Split the tracked-time panel's read from its drawing `summary` read the panel and answered with it, which left one shape in the file returning a fallible `Slot`. The read is `tracked` now, which is not a shape, and the day view asks for it the way it asks for its own plan. time_tracking is fully declared.
Author: Max Johnson <me@maxj.phd> · 2026-09-04 17:49 UTC
Signed with PGP, not checked
Commit: 34d047b7ecde71c4d9e69bcd6b1e1064744c72ed
Parent: a9e5b48
2 files changed, +20 insertions, -13 deletions
@@ -455,7 +455,11 @@
455 455 fn day(state: &AppState, request: quasi_router::Request) -> Result<Response, RouteError> {
456 456 let date = date_of(&request)?;
457 457 let read = read(state, date)?;
458 - Ok(screen(&read, super::time_tracking::summary(state)?).into())
458 + Ok(screen(
459 + &read,
460 + super::time_tracking::summary_panel(&super::time_tracking::tracked(state)?),
461 + )
462 + .into())
459 463 }
460 464
461 465 /// The axis alone, which is what stepping a day replaces.
@@ -128,7 +128,7 @@
128 128 use makeover_layout::Tone;
129 129 use quasi_declare::declare;
130 130 use quasi_router::screen::{Consult, Figure, Meter, Tag};
131 - use quasi_router::{Action, Chrome, Node, Response, Role, RouteError, Router, Slot};
131 + use quasi_router::{Action, Chrome, Node, Response, Role, RouteError, Router};
132 132
133 133 use crate::state::{AppState, DESKTOP_USER_ID};
134 134
@@ -920,7 +920,12 @@
920 920 ///
921 921 /// `time-summary.js`, which is the report's smaller sibling: the same shape
922 922 /// over a fixed window the app computes rather than one the reader picks.
923 - shape summary_panel(panel: &TimeSummaryPanel) -> Slot;
923 + ///
924 + /// Public because the day view places it: it is this module's region drawn
925 + /// on [`super::day_planning`]'s screen, the way `time-summary.js` renders
926 + /// into the day sidebar's container. The read that feeds it is
927 + /// [`tracked`], which that screen makes for itself.
928 + pub(super) shape summary_panel(panel: &TimeSummaryPanel) -> Slot;
924 929
925 930 region SUMMARY as Group {
926 931 fed_by Action::get("/timer/summary");
@@ -930,15 +935,10 @@
930 935 }
931 936 }
932 937
933 - /// The day view's tracked-time panel, read and drawn.
934 - ///
935 - /// Public because the day view places it: it is this module's region drawn on
936 - /// [`super::day_planning`]'s screen, the way `time-summary.js` renders into the
937 - /// day sidebar's container.
938 - pub fn summary(state: &AppState) -> Result<Slot, RouteError> {
939 - let panel = crate::commands::time_summary_panel(state)
940 - .map_err(|error| RouteError::internal(error.to_string()))?;
941 - Ok(summary_panel(&panel))
938 + /// What the day view's tracked-time panel is drawn from.
939 + pub(super) fn tracked(state: &AppState) -> Result<TimeSummaryPanel, RouteError> {
940 + crate::commands::time_summary_panel(state)
941 + .map_err(|error| RouteError::internal(error.to_string()))
942 942 }
943 943
944 944 declare! {
@@ -1005,7 +1005,10 @@
1005 1005
1006 1006 /// The day view's panel, as an answer.
1007 1007 fn summarised(state: &AppState, _request: quasi_router::Request) -> Result<Response, RouteError> {
1008 - Ok(Response::fragment(SUMMARY, Node::Region(summary(state)?)))
1008 + Ok(Response::fragment(
1009 + SUMMARY,
1010 + Node::Region(summary_panel(&tracked(state)?)),
1011 + ))
1009 1012 }
1010 1013
1011 1014 /// Start timing a task from the screen.