Repository navigation
feat(overview): add a Today card with today's sessions and memory - #11092
jingchaodev wants to merge 1 commit into
Conversation
189a98d to
7ddad4b
Compare
|
Brand Name Gate on |
Design Review (Fable 5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Verify the documented midnight seam (browser-local date naming a server-local file) reads acceptably on remote-gateway installs; everything else is evidenced and tested. [DESIGN-REVIEWED] 6a37061 |
UX Review (Fable 5, fork) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS No first-time reader has cold-read the Today card or drill-in; the two side-by-side "today" session counts rest on one unvalidated scope sentence. Watch
[UX-REVIEWED] 6a37061 |
First Principles Review (Fable 5, fork) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The memory half's named cause — the MemoryTab hide — is left untouched; a permanent one-consumer Not justified as shipped
What this change shipsInventory (9 items) — 8 justifiedIntent: give the dashboard an answer to "what did I do today, and where was I?" — an ADDITION.
[FIRST-PRINCIPLES-REVIEWED] 6a37061 |
GPT 5.6 Review (fork) — ✅ no blocking findingsReviewed Review detailsFINDING -- website/src/pages/OverviewPage.tsx:216 -- a failed history refetch retains cached entries, so |
Opus 5 Review (fork) — ✅ no blocking findingsReviewed Review detailsOne advisory finding: the Today card's closed-session walk omits FINDING — website/src/pages/overview/useTodayActivity.ts:46 — [OPUS-REVIEWED] 6a37061 |
7ddad4b to
6113600
Compare
|
|
|
|
|
6113600 to
df70b98
Compare
|
|
|
Round on |
|
|
Round 10 on This head is the review head: one commit on main |
|
Is this the "todo" feature? If so, why not build it as an App? |
iamwhatever
left a comment
There was a problem hiding this comment.
I think this shall be the "to do" App. Actually there are multiple versions of to do Apps.
|
Maintainer note: PR #11780 (merged 2026-09-19, Already conflicting; when rebasing note that |
The dashboard has no view of what was worked on today. The memory
pipeline writes a dated daily-history file, but its only surface, the
Daily history card on Overview > Memory, is hidden whenever vector
memory is active (the gate hides the three editable text documents once
the store migrates), so a migrated install shows nothing. The Usage card
counts sessions started today and the sidebar lists sessions, but
neither is a recap of the day.
Add a fourth summary card, Today, to the Overview 2x2 grid with a
URL-backed `?view=today` drill-in, the same pattern as Usage, WakaTime
and Memory. Zero model calls: the card is a view over data the dashboard
already holds. It counts sessions active in the browser's local day
(live slots from redux plus archived rows from /api/sessions, the live
slot winning on a shared key; a slot with a turn in flight counted as
active now; incognito and temporary sessions never listed), states the
running count, the entries already saved to memory
and the last activity time, and shows one chip per folder. The drill-in
lists the sessions grouped by folder, newest folder first and unfiled
last, with a click that opens the session (switchSlot for a live slot,
resumeFromHistory for an archived one), beside the day's memory entries
split on the `#### HH:MM TZ` blocks append_history writes. The memory
half lags by design, so its empty state names the consolidation window
from memory settings and its Open Memory action switches to the Memory
view, where Summarize now already lives. The MemoryTab hide is untouched.
Backend: GET /api/memory/history accepts `?date=YYYY-MM-DD` (canonical
form only, else 400 invalid_history_date) and returns that one day's
file through the same guarded reader in both memory versions; a missing
file is an empty day. The path is rebuilt from the parsed date, so query
text never becomes a path component. The date names a server-local day,
the clock that names the files.
Copy: the Usage card's fragment now reads "sessions started" so its
today count and the Today card's "sessions active today" read as two
sets rather than a disagreement; every new string ships in the 12
catalogs with per-locale plural forms.
Tests: dated read for global v1 and member v2, empty day, five malformed
date shapes; vitest for the pure helpers (local date key, today filter
with live-wins dedupe and incognito exclusion, folder ordering, entry
parsing), the drill-in states and both open doors, and the Overview
shell round trip including the interpolated running count.
Error notices: when either half's read fails, the notice leads with a
plain sentence naming the failed half ("Today's memory entries could not
be read") and carries the gateway's text as monospace detail, on the card
and in the drill-in, so a raw error string never stands alone in the UI.
Bundle: the card's 24 keys across the 13 catalogs (+337 lines) land in
the eager i18n chunk `all`, 11755 KB on this branch against the 12240 KB
ceiling main set on 2026-09-16; no dependency is added and the gate is
untouched.
14a6fe4 to
6a37061
Compare
|
Rebased onto main Conflicts resolved in:
Semantic fixes: Verified locally: Shared files with sibling PRs being rebased in the same wave: |
|
Kiro Crew [operator: chenmingwei23#de330d0c]: This PR has been inactive for 7+ days. I reviewed the blockers but they require your input:
When you've addressed these, the pipeline will re-assess on its next cycle. |
|
Thank you @jingchaodev for the Today card idea. Closing this because of a maintainer design decision. The 2026-09-17 review asked for this to be a "to do" App rather than built into Overview, and the PR has not changed since. Your branch is kept. If you build it as an App, please open a new PR or reopen this one. |
Problem / Motivation
The dashboard cannot show what you worked on today. The memory pipeline writes a dated daily-history file, but its only view, the Daily history card on Overview > Memory, is hidden whenever vector memory is active (
website/src/pages/overview/MemoryTab.tsxhides the three editable text documents once the store migrates). A migrated install therefore shows nothing about the day, even thoughmemory/history/YYYY-MM-DD.mdis still written. The Usage card counts sessions started today and the sidebar lists sessions, but neither is a recap.Why it matters
Coming back after a break, or at the end of the day, the question "what did I do today, and where was I?" has no answer on the dashboard. Every install that migrated to semantic memory has no dashboard view of its own daily history at all.
What changed (motivation → approach → change)
A fourth summary card, Today, joins the Overview 2×2 grid, with a URL-backed
?view=todaydrill-in. Same pattern as Usage, WakaTime and Memory. Zero model calls: it is a view over data the dashboard already holds.TodaySummaryCard(website/src/pages/OverviewPage.tsx)?view=todayon click.website/src/pages/overview/TodayTab.tsxwebsite/src/pages/overview/todayActivity.ts,useTodayActivity.tsGET /api/sessions?exclude_open=1, walked newest-first in 200-row pages until a page ends before today, the endpoint reports no more rows, or a 10-page bound stops it, so the count does not truncate at one page on a busy day;GET /api/chat/folders(the['chat-folders']cache the sidebar shares); the day file;GET /api/memory/settings.GET /api/memory/history?date=YYYY-MM-DD(src/kiro_crew/dashboard/handlers/memory.py,src/kiro_crew/memory.py; client methodapi.memoryHistory(store?, date?)inwebsite/src/api/client.ts)invalid_history_date; a missing file is an empty day.website/src/i18n/locales/*.json,pluralKeys.json)pages.overview.todayCard.*in all 12 languages with per-locale plural forms. The Usage card's fragment reads "sessions started" so its today count and this card's "sessions active today" read as two sets, not a disagreement; the scope sentence ("Sessions with any activity today, including ones started earlier.",sessions_active_scope) is visible text on the card and in the drill-in header, so it reads without a hover and reaches keyboard and touch readers; each card names only its own basis, since the Usage card already states "started". Folder chips carry a pluralfolder_sessionslabel for assistive tech.docs/feature-map/README.md,docs/system-specs/modules/learn-cron-dashboard.md,memory-skills-hooks.md,src/kiro_crew/docs/memory-and-learning.md)Which sessions count. A session is "active today" when its last activity falls in the browser's local day. A slot with a turn in flight is active now:
last_turn_tsmoves only when a prompt arrives or a turn ends, so a turn that started yesterday and is still streaming would otherwise date the session to yesterday. Live slots and archived rows are merged; a key present in both counts once and the live slot wins, because it carries the exact message count and the running state. Incognito and temporary sessions are never listed. This is a different set from the Usage card's sessions started today, which is why that card now says "started".Why the memory half lags, and what the user sees. A session is saved to memory only after the consolidation idle window, so early in the day the right column is empty on purpose. Its empty state says "Sessions are summarized into memory after 3 hours of inactivity" (the number comes from
history_idle_hours) and its Open Memory action switches to?view=memory, where Summarize now already lives. No second summarize control, and the MemoryTab hide is untouched.🟩 added · 🟨 changed · 🟥 removed · 🟦 unchanged
Date seam, stated. The card asks for the browser-local date; the files are named by the server-local clock. On a local install they are the same clock. When a remote gateway and the browser straddle midnight, the card shows the server's file of that name. Documented in
memory-skills-hooks.md.Declared follow-up, not built. A per-session recap line (goal, position, next step) needs a model call; it belongs to the opt-in session-summary panel machinery (
docs/system-specs/modules/session-summary.md) and is cross-referenced, not added here.Bundle budget. The card's 24 keys and their translations across the 13 catalogs (+337 lines) land in the eager i18n chunk
all, which builds at 12,037,472 B (11755 KB) on this branch against the 12240 KB ceiling main set on 2026-09-16; no change towebsite/scripts/check-bundle-size.mjs, no dependency added.Tests
test/test_memory_history_edit.py:?date=returns exactly the named day's file for the global v1 store and a member v2 store; a day with no file returns empty content; five malformed shapes (today,2026-13-01,2026-9-1,../preferences,2026-09-01/../x) return 400invalid_history_date.website/src/test/todayActivity.test.ts: local date key from local parts; today filter with newest-first order, live-wins dedupe on a shared key, a running slot whose last turn started yesterday counted as active now, incognito/temporary exclusion, key fallback for an untitled session; folder grouping order with unfiled last and an unknownfolder_idtreated as unfiled; day-file parsing into newest-first entries, empty and header-only files.website/src/test/useTodayActivity.walk.test.ts: the closed-row walk reads a second page when the first is all today and more rows exist, stops when a page ends before today orhas_moreis false, accepts a bare array as the only page, and stops at the 10-page bound.website/src/test/TodayTab.test.tsx: grouped rows under folder headers with exact counts only for live slots; the running row's indicator is ringed and filled while idle rows' are hollow; the history request carries the browser-local date; a live row dispatchesswitchSlot, an archived rowresumeFromHistory, both navigate to/chat; the no-sessions empty state and its Go to Chat action; the count basis rendered as visible text scoped to what is on screen (no Usage-card reference); the memory empty state renders the idle-hours sentence from settings; entries render newest first and Open Memory fires the handler; a failed sessions read shows anErrorNotice, not an empty list.switchSlotCallsiteClassification.test.tsregisters the drill-in's one announcedswitchSlotsite;playwright/overview.spec.tscounts four View details cards.website/src/test/OverviewPage.test.tsx: the card renders on the landing view and states "0 sessions active today" rather than hiding; View details opens the drill-in and Overview returns;?view=todayopens it from the URL; the running count and last-activity interpolate (no{{leaks); the count basis is visible text on the card, states this card's scope only, and no element hides it in a title attribute; the folder chip's visually hidden text reads "1 session in Unfiled"; a failed day-file read shows an error notice on the card, led by the plain sentence with the gateway's text under it, while the sessions half still counts.Manual verification
Built
website/distand drove the real SPA withwebsite/scripts/capture-overview-today-card.mjs(stubbed API) through four data shapes. Busy day: three live slots and one archived row active today plus one yesterday row, two folders, a day file with two entries; asserted in both themes that the card says "4 sessions active today", "1 running", "2 entries saved to memory", states its basis as visible text with no title attribute; the folder chips; exactly one ringed running indicator and three hollow ones in the drill-in; the drill-in's basis line is the scope sentence with no Usage-card reference; yesterday's row absent; the drill-in lists all four sessions under Website / Planner / Unfiled; entries newest first; the URL carriesview=today; the Usage card beside it says "2 sessions started". Quiet day (no sessions, empty day file): the card states "0 sessions active today" with no memory fragment, and the drill-in shows both empty states with the configured idle hours. Morning case (sessions live, empty day file): the sessions half is full while the memory half shows its empty state. Unreadable day file (GET /api/memory/history?date=answers 500): the card still counts the four sessions, shows an error notice where the memory count would sit, led by "Today's memory entries could not be read" with the gateway's message as the detail under it, and renders no memory count beside it. The screenshots below are those runs.Screenshots / video
Landing view, the Today card at the bottom right of the summary grid:
Drill-in, sessions grouped by folder beside the entries saved to memory:
Quiet day: the card's zero line, and the drill-in with both empty states (the memory one names the configured idle hours):
Morning case: sessions live, nothing folded into memory yet:
Unreadable day file: the sessions half still counts, and the gateway's message shows where the memory count would sit:
Light theme
Related Issues
N/A — no tracking issue; requested directly by the author.
Checklist
feat|fix|docs|refactor|perf|test|chore|ci|build|revert: ...)