Initial plan commit

This commit is contained in:
Craig
2026-07-26 11:16:10 +01:00
parent e047d884b6
commit 419f8d1e26
29 changed files with 4454 additions and 1 deletions
+14
View File
@@ -0,0 +1,14 @@
/**
* Shared state lives in stores, not prop-drilling (spec §8.2 rule 3).
* Mutation flow: component → api.js → update store from the response.
* Svelte 5 runes style only (spec §8.2 rule 8).
*/
// Current date as a YYYY-MM-DD string — the server never decides "today" (spec §8.1 rule 8)
export const currentDate = $state({
value: new Date().toISOString().slice(0, 10),
})
// Today's log entries and current target, refreshed from the API after any mutation
export const todayLog = $state({ entries: [], loading: false, error: null })
export const currentTarget = $state({ target: null, loading: false, error: null })