Session 48: Log out, History in #223

Closed
opened 2026-11-08 18:22:14 +00:00 by chris-kreidl · 0 comments
chris-kreidl commented 2026-11-08 18:22:14 +00:00 (Migrated from github.com)

48 · Log out, History in

Phase: UI polish · Branch: session/48-history-nav · Depends on: 46 (the roadbook redesign)

The Log page repeats what Plan shows for the current block. Its only actions are Log and Free ride, and the part with lasting value, the full history at /log/history, hides behind a "See all" link at the bottom that the owner never noticed. This session removes Log as a page, makes History a destination of its own, and finds a home for each thing Log did. Session 49 turns History into a calendar; this one keeps the current History list so the two land separately.

Read first

  • src/components/app-shell.tsx (the nav, the rail's foot), src/routes/_app/log/index.tsx (LogSheet, LOG_ACTIONS, the pending and failed rows), src/routes/_app/log/history.tsx
  • src/components/sync-status.tsx and src/lib/offline.tsx (queued and refused writes, retry, discard)
  • Everything that navigates to /log: grep -rn "'/log'\|\"/log\"" src (the strength logger, hand-logged ride, import, Today's "See it in Log", the ride page's back links)
  • DESIGN.md, src/styles/tokens.stylex.ts, .impeccable/surfaces/src-routes-app.md

Goal

  1. Navigation. The five destinations become Today, Plan, History, Progress, Settings, in the rail and the phone tab bar. History gets its own icon in the set's stroke.
  2. History at /history. Move the route from /log/history, unchanged in content for now (49 replaces it). Ride pages opened from it keep "Back to History". /log/history redirects to /history.
  3. Logging without a Log page.
    • Desk: the rail's foot drops the goal and "Week n of m" (Plan's stage strip says that) for two controls: Log (the same sheet: strength, import, by hand) and Free ride. They are white-outlined boxes on the black rail, not red: red stays the page's one primary action.
    • Every width: Today and History carry Log in their header actions. On a phone, Today is where you log from.
    • The form routes (/log/strength, /log/ride, /log/import) keep their URLs.
  4. Refused offline writes. The "Not saved" list moves out of Log. The sync bar names the problem and opens a sheet with each refused write's retry and discard, so it never points to a page that's gone ("Retry or discard it on the Log page" is replaced).
  5. Where things land. Saving a strength session or a hand-logged ride, and finishing an import, return to Today (or to the page the athlete came from, if the form was opened from History). Today's "See it in Log" becomes "See it in History". /log redirects to /today.

Rules

  • Nothing the Log page did is lost: check each of its sections (This week, Not saved, Recent, See all) has a home before deleting the route.
  • Offline still works end to end: a session logged offline queues, syncs, and a refused one can be retried or discarded from the sync bar's sheet.
  • 44 px targets on the rail's controls; the focus ring is visible on black (railFocus in the shell).

Tests

  • E2E: the nav has the five destinations in order, desk and phone. The rail's Log opens the sheet; Free ride starts a free ride. Today's header Log opens the sheet on a phone.
  • E2E: offline.e2e.ts and any flow that started from /log (import, a11y's Log sheet scan) move to their new entry points. A refused write is retried, and another discarded, from the sync bar.
  • E2E: /log and /log/history redirect. Axe and the keyboard tab-stop checks pass on every main page.

Out of scope

The History calendar (49). Note under Follow-ups whether the Log icon is still used anywhere and can go.

Done when

There is no Log page; History is one tap from anywhere; logging is one tap from the rail on a desk and from Today on a phone; a refused offline write is recoverable from the sync bar. Unit, typecheck, lint, format, audit and e2e pass. End-of-session ritual in CLAUDE.md.

Moved from prompts/48-log-out-history-in.md on 2026-11-08.

# 48 · Log out, History in **Phase:** UI polish · **Branch:** `session/48-history-nav` · **Depends on:** 46 (the roadbook redesign) The Log page repeats what Plan shows for the current block. Its only actions are Log and Free ride, and the part with lasting value, the full history at `/log/history`, hides behind a "See all" link at the bottom that the owner never noticed. This session removes Log as a page, makes History a destination of its own, and finds a home for each thing Log did. Session 49 turns History into a calendar; this one keeps the current History list so the two land separately. ## Read first - `src/components/app-shell.tsx` (the nav, the rail's foot), `src/routes/_app/log/index.tsx` (`LogSheet`, `LOG_ACTIONS`, the pending and failed rows), `src/routes/_app/log/history.tsx` - `src/components/sync-status.tsx` and `src/lib/offline.tsx` (queued and refused writes, retry, discard) - Everything that navigates to `/log`: `grep -rn "'/log'\|\"/log\"" src` (the strength logger, hand-logged ride, import, Today's "See it in Log", the ride page's back links) - `DESIGN.md`, `src/styles/tokens.stylex.ts`, `.impeccable/surfaces/src-routes-app.md` ## Goal 1. **Navigation.** The five destinations become Today, Plan, History, Progress, Settings, in the rail and the phone tab bar. History gets its own icon in the set's stroke. 2. **History at `/history`.** Move the route from `/log/history`, unchanged in content for now (49 replaces it). Ride pages opened from it keep "Back to History". `/log/history` redirects to `/history`. 3. **Logging without a Log page.** - Desk: the rail's foot drops the goal and "Week n of m" (Plan's stage strip says that) for two controls: Log (the same sheet: strength, import, by hand) and Free ride. They are white-outlined boxes on the black rail, not red: red stays the page's one primary action. - Every width: Today and History carry Log in their header actions. On a phone, Today is where you log from. - The form routes (`/log/strength`, `/log/ride`, `/log/import`) keep their URLs. 4. **Refused offline writes.** The "Not saved" list moves out of Log. The sync bar names the problem and opens a sheet with each refused write's retry and discard, so it never points to a page that's gone ("Retry or discard it on the Log page" is replaced). 5. **Where things land.** Saving a strength session or a hand-logged ride, and finishing an import, return to Today (or to the page the athlete came from, if the form was opened from History). Today's "See it in Log" becomes "See it in History". `/log` redirects to `/today`. ## Rules - Nothing the Log page did is lost: check each of its sections (This week, Not saved, Recent, See all) has a home before deleting the route. - Offline still works end to end: a session logged offline queues, syncs, and a refused one can be retried or discarded from the sync bar's sheet. - 44 px targets on the rail's controls; the focus ring is visible on black (`railFocus` in the shell). ## Tests - E2E: the nav has the five destinations in order, desk and phone. The rail's Log opens the sheet; Free ride starts a free ride. Today's header Log opens the sheet on a phone. - E2E: `offline.e2e.ts` and any flow that started from `/log` (import, a11y's Log sheet scan) move to their new entry points. A refused write is retried, and another discarded, from the sync bar. - E2E: `/log` and `/log/history` redirect. Axe and the keyboard tab-stop checks pass on every main page. ## Out of scope The History calendar (49). Note under Follow-ups whether the Log icon is still used anywhere and can go. ## Done when There is no Log page; History is one tap from anywhere; logging is one tap from the rail on a desk and from Today on a phone; a refused offline write is recoverable from the sync bar. Unit, typecheck, lint, format, audit and e2e pass. End-of-session ritual in `CLAUDE.md`. _Moved from `prompts/48-log-out-history-in.md` on 2026-11-08._
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ckreidl/trainer#223
No description provided.