Repository navigation
fix(app-shared): parse glanceable session times with parseTimestamp - #8418
Conversation
The Home widget details and the glanceable snapshot read session status and wake times through the shared Hermes-safe parser, and the snapshot reports the selected instants as ISO 8601, the form its schema declares. The mobile parsers of the same fields use the same helper.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryBoth prior findings are fixed at Files Reviewed (3 files)
Previously raised findings on Previous Review Summary (commit 42e3a5b)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 42e3a5b)Status: 2 Issues Found | Recommendation: Address before merge Executive SummaryThe parse/normalize fix is sound and well covered at the policy layer; the one contract gap is that Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (7 files)
Notes outside the changed lines (not counted above): Reviewed by deepseek-v4.1-flash-1017 · Input: 40.9K · Output: 3.5K · Cached: 266.1K Review guidance: REVIEW.md from base branch |
…tation The presentation reports the parsed wake as ISO 8601 instead of echoing a restored snapshot value, so every consumer parses one canonical form. The date-only fixture now pins the canonical form rather than success.
|
bot: Android card drawn from the glanceable snapshot built on the device, with the session wake time in PostgreSQL timestamp text.
Both frames come from the dev client on the emulator against Metro and the local dev stack on the same VM. The row was entered through the app's dev-only glanceable fixture harness as a local catalog entry that is not part of this branch. |


Change
packages/app-shared/src/glanceable-agents-snapshot.ts:oldestNeedsInputSince,soonestScheduledAtandnewestGlanceableResultread each session time through the sharedparseTimestamphelper and report the selected instant as ISO 8601, the form the snapshotschema already declares. One
sessionTimeMshelper holds that parse so all three agree.packages/app-shared/src/home-widget.ts:usableTimeparses throughparseTimestamp; thescheduled-agent time, the presented wake and
awaitingUpdateread that one parsed instant, andthe presentation reports the wake as ISO 8601, instead of re-parsing the raw string with
Date.parse/new Date.toIsoStatusTime(apps/mobile/src/lib/active-sessions-live.ts), the Android Homescheduled-agent time (
apps/mobile/src/glanceable-android/home-copy.ts), andisOlderThanCard(
apps/mobile/src/glanceable-ios/session-card-facts.ts).Unparseable and absent values keep their current behavior: the row is skipped for the wait,
wake and newest-result facts, and
nullreaches the presentation.Verification
pnpm --filter @kilocode/app-shared run test: 503 tests pass. New PostgreSQL-format fixtures(
2026-03-16 15:21:40.957+00,2026-10-09 11:00:00+00) cover the waiting order, the soonestwake, the newest result, a restored snapshot wake,
awaitingUpdateand the snapshot fields.Failing before the fix: with the previous source files restored, the same suites fail 6 tests
(the snapshot fields returned the producer's raw form). After the fix they pass.
pnpm --filter kilo-app exec vitest run --project mobile-pure: 877 files, 14469 tests pass;the glanceable, Home and active-session suites rerun after the review fix: 81 files, 1285
tests pass.
The web producer that builds the same snapshot reads the changed helpers:
pnpm --filter web exec jest src/lib/glanceable-agents-snapshot-server.test.ts: 17 tests pass.pnpm --filter @kilocode/app-shared run typecheckandpnpm --filter kilo-app run typecheckpass; oxlint on the changed sources reports no findings; oxfmt applied.
Behavior smoke on the pure functions with PostgreSQL-format rows and
Date.parsepatched toreject non-ISO input (a parser with the Hermes limitation):
The same run with the unpatched parser reports identical values, so the policy reads the same
instants under both parsers.
Device execution: Android emulator running the dev client, Metro, the local dev stack and a local
test account on the same machine. The glanceable builder received one scheduled
row whose wake time is PostgreSQL timestamp text (
2099-03-16 15:21:40.957+00). The ongoingnotification card drew
1 Scheduledwith the wake lineNext run 3/16/99, 3:21 PM. With the samerow and
home-widget.tsplusglanceable-agents-snapshot.tsat their base revision, the same carddrew
1 Scheduledand no wake line, because the device parser returns no instant for that textform. The row came from the app's dev-only glanceable fixture harness, entered as a local catalog
entry that is not part of this branch; the harness, the shared builder, the render path and the
native card are the shipped ones. Captures are attached to this pull request. The waiting order,
the newest-result fact and
awaitingUpdateread the same parser and are covered by the fixturesabove; the card renders the wake only, not the wait order.
Review follow-up
producer value still reaches the iOS widget's date formatting in canonical form.
which keeps it correct under the pending date-only rule in fix(app-shared): parse date-only strings as calendar days #8181.
Proxy answers
The owner's proxy gave these answers in the owner's place.
Answer: Parse with parseTimestamp + normalize snapshot timestamps to ISO
Confidence: 0.72 · Precedent: Proof and verification: require valid end-to-end proof on every PR (session 55c9c80332a7, "logs and/or screenshots are mandatory proof"). Autonomy: fix the root cause and the class (session 7f3470e0ba6f, "fix class of issue").
Answer: Yes, convert the same-field mobile parsers too
Confidence: 0.60 · Precedent: Autonomy: fix the class of the issue on every affected surface (session 75f8833fe8c1, "fix this for all shared services model pickers on all surfaces (web, app)"). Also: if you see a gap, fix it (session 89824a222897, "if you saw a gap, fix it").