Skip to content

feat(overview): add a Today card with today's sessions and memory - #11092

Closed
jingchaodev wants to merge 1 commit into
kirodotdev:mainfrom
jingchaodev:feat/overview-today-card
Closed

jingchaodev wants to merge 1 commit into
kirodotdev:mainfrom
jingchaodev:feat/overview-today-card

Conversation

@jingchaodev

@jingchaodev jingchaodev commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

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.tsx hides the three editable text documents once the store migrates). A migrated install therefore shows nothing about the day, even though memory/history/YYYY-MM-DD.md is 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=today drill-in. Same pattern as Usage, WakaTime and Memory. Zero model calls: it is a view over data the dashboard already holds.

Part What it does
TodaySummaryCard (website/src/pages/OverviewPage.tsx) "4 sessions active today · 1 running · 2 entries saved to memory · last active 12:21 PM", a visible line naming the count's scope ("Sessions with any activity today, including ones started earlier."), plus one chip per folder whose spoken label says what the number counts ("2 sessions in Website"), so the pill does not read as an identifier. The memory count names its noun so it cannot read as two sessions inside a sessions sentence; when the day file cannot be read, an error notice takes the memory count's place, so an error day does not look like a quiet day; 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 its monospace detail, never as the whole notice. The drill-in's two notices follow the same shape. ?view=today on click.
website/src/pages/overview/TodayTab.tsx Drill-in: sessions grouped by folder (newest folder first, unfiled last); a click opens the session; a running row's indicator is a filled ringed dot against hollow circles, so it differs in shape and not only in color. The sessions header states the count's scope as visible text ("Sessions with any activity today, including ones started earlier."); the card's comparison with the Usage card is left off here because that card is not on screen in the drill-in. The no-sessions empty state ends in a Go to Chat action, like the memory half's Open Memory. Beside it, the entries already saved to today's history file, newest first.
website/src/pages/overview/todayActivity.ts, useTodayActivity.ts Pure shaping plus the queries: live slots from redux; archived rows from GET /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 method api.memoryHistory(store?, date?) in website/src/api/client.ts) Returns one day's file through the existing guarded reader, in both memory versions. Canonical date only, else 400 invalid_history_date; a missing file is an empty day.
Catalogs (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 plural folder_sessions label for assistive tech.
Docs (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) Feature-map row, the Overview page spec, the endpoint contract and its date seam, the user page.

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_ts moves 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.

Install Before After
Vector memory active (migrated) 🟥 no dashboard view of today 🟩 Today card + drill-in
Text memory 🟦 read-only Daily history card on the Memory tab 🟩 Today card + drill-in, Memory tab unchanged
Session open now, not yet idle 🟥 absent from the day file 🟩 listed under Sessions today; memory half explains the wait

🟩 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 to website/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 400 invalid_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 unknown folder_id treated 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 or has_more is 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 dispatches switchSlot, an archived row resumeFromHistory, 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 an ErrorNotice, not an empty list. switchSlotCallsiteClassification.test.ts registers the drill-in's one announced switchSlot site; playwright/overview.spec.ts counts 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=today opens 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/dist and drove the real SPA with website/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 carries view=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:

Overview landing view, dark: Today card with 4 sessions active today, 1 running, 2 entries saved to memory, folder chips

Drill-in, sessions grouped by folder beside the entries saved to memory:

Today drill-in, dark: Sessions today grouped by Website, Planner and Unfiled; Saved to memory with two timestamped entries

Quiet day: the card's zero line, and the drill-in with both empty states (the memory one names the configured idle hours):

Overview landing view, dark, quiet day: Today card reads 0 sessions active today

Today drill-in, dark, quiet day: No sessions yet today with its Go to Chat action, beside Nothing saved to memory yet today with the 3-hours-of-inactivity sentence

Morning case: sessions live, nothing folded into memory yet:

Today drill-in, dark, morning: four sessions listed while Saved to memory shows its empty state

Unreadable day file: the sessions half still counts, and the gateway's message shows where the memory count would sit:

Overview landing view, dark, unreadable day file: Today card with 4 sessions active today and an error notice in place of the memory count, led by Today's memory entries could not be read with the gateway's memory_unavailable text beneath it

Light theme

Overview landing view, light: Today card

Today drill-in, light

Related Issues

N/A — no tracking issue; requested directly by the author.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@jingchaodev
jingchaodev requested review from a team and dwu96 September 15, 2026 19:53
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: checking Automated validation is still running labels Sep 15, 2026
@jingchaodev
jingchaodev force-pushed the feat/overview-today-card branch from 189a98d to 7ddad4b Compare September 15, 2026 20:37
@jingchaodev

Copy link
Copy Markdown
Contributor Author

Brand Name Gate on 189a98de8: attributable, fixed on 7ddad4b5b. Six added lines used the joined product name as a folder-name fixture (capture harness + two vitest files). The fixture folder is now a neutral Website, the gate and its self-test pass locally against the base, and the four screenshots were re-captured from the rebuilt SPA with the renamed fixture and re-attached so the evidence matches the committed harness. Tree otherwise unchanged.

@github-actions

github-actions Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5, fork) — ✅ PASS

Design-level review of 6a3706164de9b306d17fdcbd4ad61587994224bc via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

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

@github-actions

github-actions Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5, fork) — 🟡 CONCERNS

UX-level review of 6a3706164de9b306d17fdcbd4ad61587994224bc via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

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

  • Every control the diff adds is shown in the attachments, but no blind reader has read any of it (this lane reviews a fork in a single pass), so comprehension of "Today", "Saved to memory", the folder chips and the scope sentence is unverified — a maintainer can push the branch to this repository to get the blind read. Frequency: every Overview visit; impact: friction, not failure.
  • Usage says "Today: 2 sessions started" while the adjacent card says "4 sessions active today" (attachment-01); the only thing keeping two different numbers for "today's sessions" from reading as a bug is the one visible sentence "Sessions with any activity today, including ones started earlier." — verify that lands on a cold read before merge.
  • The sessions-read-failed state ("Today's sessions could not be read", card and drill-in) appears in no screenshot; only the history-error variant was captured (attachment-06). Same ErrorNotice mechanism, so evaluable, but a human should eyeball it or the author add one shot.

[UX-REVIEWED] 6a37061

@github-actions

github-actions Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5, fork) — 🟡 CONCERNS

Premise-level review of 6a3706164de9b306d17fdcbd4ad61587994224bc via the fork AI-review pipeline — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: CONCERNS

The memory half's named cause — the MemoryTab hide — is left untouched; a permanent one-consumer ?date= API param ships around it, unweighed against unhiding.

Not justified as shipped

  • Item 4 — symptom-level: the description itself names the cause ("its only view … is hidden whenever vector memory is active" — MemoryTab.tsx:306-333) and says "the MemoryTab hide is untouched", then ships a second surface instead: a public GET /api/memory/history?date= param plus MemoryStore.read_history_for_date and VectorMemoryStore.read_history_for_day, each with exactly one consumer (grep memoryHistory( with a date: 1, useTodayActivity.ts; read_history_for_date: 1, the handler). Unhiding the existing read-only Daily history render on migrated installs removes that half's harm by deletion, with zero new API surface, and the description never weighs it.
    Subtraction: delete ?date=, both store readers and the drill-in's memory column; drop the migrated-only hide of the read-only Daily history card in MemoryTab.tsx instead.
    Clears when: the subtraction is made, or a maintainer decides the one-view sessions-beside-memory pairing is worth the permanent param (the V1 aggregate read_recent_history cannot serve a single day, so the pairing does require it).

What this change ships

Inventory (9 items) — 8 justified

Intent: give the dashboard an answer to "what did I do today, and where was I?" — an ADDITION.

  1. A fourth "Today" card appears on the Overview grid for everyone — justified
  2. "View details" opens a URL-backed Today drill-in: today's sessions grouped by folder, a click opens the session — justified
  3. Today's memory entries render beside the sessions, with an idle-window empty state — justified
  4. Any day's history file is now fetchable via GET /api/memory/history?date= — symptom-level (cause named and left: the MemoryTab migrated-hide)
  5. The Usage card now reads "sessions started" in all 13 locales — justified
  6. Overview landing walks the archived-session list, up to 10×200 rows per 30 s — justified
  7. A failed day-file read shows an error notice instead of a quiet day — justified
  8. 24 new catalog keys ×13 locales with per-locale plural forms — justified
  9. A new screenshot capture script, not run by CI (609 sibling capture-*.mjs scripts) — justified

[FIRST-PRINCIPLES-REVIEWED] 6a37061

@github-actions

github-actions Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review (fork) — ✅ no blocking findings

Reviewed 6a3706164de9b306d17fdcbd4ad61587994224bc via the fork AI-review pipeline; updated in place on each push.

Review details

FINDING -- website/src/pages/OverviewPage.tsx:216 -- a failed history refetch retains cached entries, so "today.entries.length > 0" shows a stale count beside the error -> Fix: gate the count with !today.historyError.
[GPT-REVIEWED] 6a37061

@github-actions

github-actions Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5 Review (fork) — ✅ no blocking findings

Reviewed 6a3706164de9b306d17fdcbd4ad61587994224bc via the fork AI-review pipeline; updated in place on each push.

Review details

One advisory finding: the Today card's closed-session walk omits user_only, so machine transcripts are counted, listed and resumable.

FINDING — website/src/pages/overview/useTodayActivity.ts:46 — await list(CLOSED_PAGE_SIZE, page * CLOSED_PAGE_SIZE, false, true) leaves api.sessions' fifth argument (userOnly) at its false default, so GET /api/sessions?exclude_open=1 keeps the machine-only namespaces (subagent_*, wf-worker_*, channel_* — handlers/sessions.py:1264 only filters them on user_only), and todaySessions drops only incognito/temporary: on any day a subagent, workflow or channel run wrote a transcript, "N sessions active today" counts those runs, the drill-in renders them as rows titled by their raw storage key (title: row.title || row.key; history_search.list_sessions sets title only from a metadata line — the same reason chatSlice.ts:1566 passes user_only for the Older-sessions pane), and a click hands the key to resumeFromHistory as if it were a conversation → Fix: pass true as the fifth argument and widen the injected list signature with userOnly, updating the toHaveBeenNthCalledWith(1, 200, 0, false, true) assertions in useTodayActivity.walk.test.ts.

[OPUS-REVIEWED] 6a37061

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 15, 2026
@jingchaodev
jingchaodev force-pushed the feat/overview-today-card branch from 7ddad4b to 6113600 Compare September 15, 2026 21:53
@jingchaodev

Copy link
Copy Markdown
Contributor Author
  • Cannot evaluate: missing screenshots of the two empty states: fixed

The description now carries three more github.com/user-attachments captures from the PR's harness against the real built dashboard: the card on a quiet day ("0 sessions active today", no memory fragment), the drill-in on a quiet day with both empty states ("No sessions yet today" / "Nothing saved to memory yet today" plus "Sessions are summarized into memory after 3 hours of inactivity"), and the morning case with four live sessions beside the memory half's empty state. The harness gained quiet and morning data shapes and asserts each of those strings before shooting.

@jingchaodev

Copy link
Copy Markdown
Contributor Author
  • All four shown surfaces have had no cold read in this lane (span=e3d5eb3afe36): deferred

A fork PR cannot give this lane a blind read; a maintainer-side push of the branch would. Declared as a rider in the description. The one comprehension risk the lane names in the meantime, "Today" beside the Usage card's "Today:" line, is what the Usage fragment's "sessions started" wording and this card's "sessions active today" wording are for, and the new-user usability review recorded in the goal state read the pair the same way.

@jingchaodev

Copy link
Copy Markdown
Contributor Author
  • "2 saved to memory" reads as two sessions inside a sessions sentence (span=9ee7ef521e90): fixed

memory_entries now reads "{{count}} entry saved to memory" / "{{count}} entries saved to memory" in en.json, with the noun added in the ten translations that lacked it (ru already carried it) and the pseudolocale regenerated. The card sentence reads "4 sessions active today · 1 running · 2 entries saved to memory". The harness asserts the new wording; the description's table row and screenshots follow it.

@jingchaodev

Copy link
Copy Markdown
Contributor Author

E2E (stub ACP backend, offline) red on 7ddad4b5b is not this diff. The job's single failing step is "Require real private workflow MCP execution": test/e2e/test_private_workflow_memory.py::test_private_workflows_execute_over_real_projected_mcp fails with RuntimeError: memory_unavailable: cannot verify protected memory hardlinks (operation=entry_stat tree=sessions errno=2), the race tracked in #10919 (a concurrent transcript write renames a temp file away between the hardlink scan's enumeration and its stat). This PR touches no memory-store or spawn code: its backend change is a ?date= filter on the history GET handler, and the same step failed the same way twenty minutes earlier on an unrelated PR (#9314, tree=root_tmp). Both occurrences are recorded on #10919. The new head re-runs the job.

@jingchaodev

Copy link
Copy Markdown
Contributor Author
  • Two adjacent "today" session counts, reconciled only by "started" vs "active" (span=5d78b2f44915): fixed

Head df70b9874 adds the suggested basis title on the Today count: "Sessions with any activity today, including ones started earlier. The Usage card counts sessions started today." (all twelve catalogs). The side-by-side cold read stays a human step; the body's "Which sessions count" paragraph states the two sets for the reviewer who does it.

@jingchaodev

Copy link
Copy Markdown
Contributor Author
  • No blind reader has seen the surface in this fork lane (span=fc00d07a9983): accept-and-defer

A fork branch cannot feed the blind-read lane; a maintainer pushing the branch to this repository runs it. All added states are attached in both themes for the human read meanwhile.

@jingchaodev

Copy link
Copy Markdown
Contributor Author

Round on df70b9874 (rebased onto main 2520aa909, still one commit). The one CI red on 611360089, Frontend Tests (4), was attributable: UsageTab.cache.test.tsx renders the whole Overview page against an api mock that predates the Today card, so api.sessions was not a function and the card's ErrorNotice (role=alert) tripped that test's "no alert" assertion. The mock now answers the card's three reads (sessions, chatFolders, memoryHistory); the same three were added to OverviewPage.suppressBuiltin.test.tsx, whose mock had the same gap. No production code changed for that. This head also takes the UX lane's tooltip suggestion (basis title on the Today count, twelve catalogs). GPT's single finding (silent fallback when the folders or settings query rejects) was downgraded on adjudication as disproportionate; left as advisory, the shared chat-folders query self-corrects on refetch. Local: tsc, eslint, i18n, vitest (48 across the five Overview/Today files), build, brand gate green.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 15, 2026
@github-actions github-actions Bot added the readiness: passed Eligible automated validation passed for the current revision label Sep 17, 2026
@jingchaodev

Copy link
Copy Markdown
Contributor Author
  • Watch: the two adjacent "today" counts (Usage "sessions started" vs Today "sessions active") rest on one scope sentence no cold reader has tested; no added control has been read cold: deferred — standing rider of the fork lane, which has no blind read. The mitigations are in the tree (todayCard.sessions_active_scope on the card and in the drill-in header, the Usage fragment reads "sessions started"); a maintainer wanting the blind read can push the branch to this repository.
  • Suggestion: append the fetched date key to the drill-in's "Saved to memory" header so the remote-gateway midnight seam is visible on the surface: deferred — follow-up, not this round. The seam (browser-local date naming a server-local file) is documented in docs/system-specs/modules/memory-skills-hooks.md and affects only a remote gateway in another timezone around midnight; the header change is one copy key across 13 catalogs plus a capture, and it is queued with the per-session recap follow-up rather than spent on another approval-gated round here. Happy to fold it in on request.

@jingchaodev

Copy link
Copy Markdown
Contributor Author

Round 10 on 14a6fe4db settled 79 green / 0 red (86 checks: 79 pass, 6 conditional lanes skipped, UX Review neutral). Lanes: Design ✅ PASS, First Principles ✅ PASS, GPT 5.6 ✅ no blocking findings (all downgraded on adjudication), Opus 4.8 ✅ no findings, UX 🟡 CONCERNS — the blind-read rider and one suggestion (date key on the "Saved to memory" header), both recorded above as deferred.

This head is the review head: one commit on main 2a138cc4c, mergeable, all attached evidence taken from it. Open riders for a reviewer: the blind read the fork lane cannot run; the date-key header suggestion; the per-session recap line (goal / position / next), which is a separate follow-up because it costs a model call per session and this card is deliberately zero-model-call.

@iamwhatever

Copy link
Copy Markdown
Contributor

Is this the "todo" feature? If so, why not build it as an App?

@iamwhatever iamwhatever left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this shall be the "to do" App. Actually there are multiple versions of to do Apps.

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Sep 19, 2026
@bolichen97

Copy link
Copy Markdown
Contributor

Maintainer note: PR #11780 (merged 2026-09-19, bc0d2b0cf, "simplify member memory to one SQLite store") removed the protected-binding / private-execution member memory model. Two PRs written against the old model merged after it with a textually clean merge and broke main at import time (#11947, #11960); both are now reverted. This PR carries the same hazard.

Already conflicting; when rebasing note that memory.py:622 calls self._validated_private_read_store(), which no longer exists on main (AttributeError at runtime).

@NicholasRBowers NicholasRBowers added the needs-pr-triage PR scanner: awaiting automated triage label Sep 23, 2026
@dwu96 dwu96 removed the needs-pr-triage PR scanner: awaiting automated triage label Sep 23, 2026
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.
@bolichen97
bolichen97 force-pushed the feat/overview-today-card branch from 14a6fe4 to 6a37061 Compare September 23, 2026 23:32
@bolichen97

Copy link
Copy Markdown
Contributor

Rebased onto main fddab6f8 on the author's behalf (maintainer rebase, commit and authorship preserved; head 14a6fe4d → 6a370616).

Conflicts resolved in:

  • src/kiro_crew/dashboard/handlers/memory.py — main dropped import sys; kept only the PR's from datetime import datetime, and the ?date= read now also maps FileTooLargeError to the store-unavailable response like the editable read does on main.
  • src/kiro_crew/docs/memory-and-learning.md — kept main's rewritten history-tier paragraphs and placed the Today-card paragraph after them, before main's ### Lessons heading.
  • test/test_memory_history_edit.py — kept main's two new oversized/midnight tests and appended the PR's two ?date= tests.
  • 11 locale catalogs (bn, de, es, fr, hi, it, ja, ko, pt, ru, zh-CN) — main added agentTemplatesTab at the same spot; kept it and appended todayCard after it (end of the pages.overview section). All catalogs parse.

Semantic fixes: MemoryStore.read_history_for_date called _validated_private_read_store(), removed on main (#11780), and main's V2 stores history as database rows, not dated files. Re-expressed against the current API: V1 reads the dated file through _guarded_entry(path, require_readable=True); V2 calls a new thin VectorMemoryStore.read_history_for_day(day) wrapper around the existing _read_editable_history_for_day. The member-v2 test case now seeds rows with tier._write_history instead of writing files.

Verified locally: pytest test/test_memory_history_edit.py (20 passed), plus test_memory.py test_memory_edit_api.py test_memory_edit.py test_member_memory_api.py test_handlers_memory_coverage.py test_member_memory_database.py (583 passed); compileall and black --check clean. Frontend: vitest on the PR's 7 touched test files (58 passed) and the i18n gate tests (157 passed); tsc -p tsconfig.app.json --noEmit clean; check-i18n-keys.mjs and check-i18n-strings.mjs OK.

Shared files with sibling PRs being rebased in the same wave: website/src/api/client.ts and the 13 locale JSONs (#9367, #8599), docs/feature-map/README.md (#8599) — kept additions self-contained per file ordering.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision labels Sep 23, 2026
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Sep 23, 2026
@cruisercohen cruisercohen added the needs-pr-triage PR scanner: awaiting automated triage label Oct 1, 2026
@chenmingwei23 chenmingwei23 added needs-author-decision PR blocked on author input and removed needs-pr-triage PR scanner: awaiting automated triage labels Oct 1, 2026
@chenmingwei23

Copy link
Copy Markdown
Contributor

Kiro Crew [operator: chenmingwei23#de330d0c]: This PR has been inactive for 7+ days. I reviewed the blockers but they require your input:

  • @iamwhatever left CHANGES_REQUESTED (2026-09-17): "I think this shall be the 'to do' App" and asked why this is not built as an App. That is a direction question (Overview card vs. App) that the author and maintainers need to settle; automation should not pick a side.
  • The branch is conflicting with main again after the 2026-09-23 maintainer rebase. Note the maintainer warning about PR refactor(memory): simplify member memory to one SQLite store #11780 (single SQLite member memory) when rebasing memory.py.

When you've addressed these, the pipeline will re-assess on its next cycle.

@iamwhatever

Copy link
Copy Markdown
Contributor

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.

@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor) merge conflict Branch has merge conflicts with its base — author must resolve before merge needs-author-decision PR blocked on author input

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants