Conversation
Introduces an entry-type selector so the app supports rest-day logging (wellness metrics + free-form journal) and non-cycling activities (MFR, yoga, strength, mobility) alongside the existing cycling form. Cycling output is unchanged; rest and other entries get dedicated markdown formats. Old drafts without entryType are migrated to cycling on restore. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Greptile SummaryThis PR adds Confidence Score: 5/5Safe to merge — all findings are P2 style/cleanup suggestions with no impact on correctness or data integrity. Both remaining comments are P2: dead null-checks in superRefine (Zod rejects null before superRefine runs) and test helpers being local copies instead of imports. Neither affects runtime behaviour, the existing cycling path is unchanged, backward-compat migration is in place, and 92 tests pass. client/src/test/utils.test.ts — local copies of markdown helpers won't catch future divergence from production implementations. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User selects Entry Type] --> B{entryType}
B -->|cycling| C[Core Metrics\nFueling\nPerformance\nRecovery\nReflection]
B -->|rest| D[Recovery Metrics\nauto-expanded\nRest Day]
B -->|other| E[Activity Section]
C --> F[generateCyclingMarkdown\nG/R/F + metrics + WWW/WCBI/Planned]
D --> G[generateRestMarkdown\nRest Day + HRV/rMSSD/RHR/TR-LGT/W + bullets]
E --> H[generateOtherMarkdown\nG: activity + bullets]
F --> I[generateMarkdown\n--- date header ---]
G --> I
H --> I
I --> J[Clipboard copy]
K[Draft restored from localStorage] --> L{has entryType?}
L -->|no - old draft| M[Migrate: set entryType=cycling]
L -->|yes| N[Use stored entryType]
M --> O[form.reset]
N --> O
|
The two tests that asserted exact date strings in markdown output
(startsWith '24.03.2026' and exact-match '13.04.2026') depended on
the machine's timezone because new Date('YYYY-MM-DD') parses as UTC
midnight. Switch to regex matches on the shape of the date header
so the tests pass regardless of local timezone.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
With Rest and Other entry types the old label reads as misleading — a rest day isn't a workout. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Summary
generateMarkdownsplit into three type-specific generators; cycling output is unchangedgoal/rpe/feelrequired for cycling only (enforced viasuperRefine); old drafts withoutentryTypeare migrated tocyclingon restoreMarkdown output
Rest Daymarker + present-only recovery metrics (HRV, rMSSD, RHR, TR-LGT) +W: <kg>+ bulleted notesG: <activity>+ bulleted notes; no metricsTest plan
npm run checkcleannpm run test:run— 92/92 passing (includes new schema + per-type markdown tests)🤖 Generated with Claude Code