Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Rules:
## Motion

- Subtle only (`human-motion-motion.css`). Everything is disabled under `prefers-reduced-motion` (see the media query at the end of `human-motion.css`).
- **Exception, owner decision 19 Nov 2026:** the Personal body map (`src/components/personal/body-map/`) may use expressive motion because it is a signature feature. The limits still hold: every animation must communicate something (what is loaded, what changed, what is selected), stay inside the warm sage, terracotta and cocoa palette, and sit entirely inside `@media (prefers-reduced-motion: no-preference)`. With reduced motion the map must remain fully usable and static, and no information may exist only in motion.

## Theme switching

Expand Down Expand Up @@ -110,7 +111,8 @@ The separate Personal health experience (see [DELIVERY_PLAN.md](DELIVERY_PLAN.md
- Regions are keyboard-focusable buttons (Enter/Space); the mirrored half is hidden from assistive tech.
- Colour transitions run only under `prefers-reduced-motion: no-preference`.
- Illustration is decorative anatomy, not medical imagery, and never implies diagnosis or injury.
- The map is interactive (Planned / Logged / Preview, with a 7, 28 or 90 day period): see [P1_MUSCLE_EXPLORER.md](P1_MUSCLE_EXPLORER.md). Segmented controls reuse the Front/Back tab styling with 44px targets; the figure never moves when controls change.
- The map is interactive (Planned / Logged / Preview, a 7, 28 or 90 day period, colour by how much or last worked, and a four-week replay): see [P1_MUSCLE_EXPLORER.md](P1_MUSCLE_EXPLORER.md). Segmented controls reuse the Front/Back tab styling with 44px targets.
- **Colour coding** uses five bands (none, light, moderate, high, peak) on a sage, amber, terracotta, deep terracotta ramp. Colour is never the only signal: each band has a text label, its own hatch pattern, and appears in the text list.

## History: Luxe (superseded)

Expand Down
12 changes: 12 additions & 0 deletions docs/P1_MUSCLE_EXPLORER.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,15 @@ Built to avoid Codex's in-flight work: it imports P1-B code but edits none of it
## Known limits
- The exercise catalogue covers common lifts and cardio only; unusual names go to "not counted". A user-editable mapping is a possible follow-up.
- Set-equivalents are a descriptive volume count, not a validated training-load model.

## Illustration v2 (19 Nov 2026)
- **Art:** shaded, outlined front and back figure with fibre lines and anatomical landmarks. Five muscles added (neck, serratus, rhomboids, hip abductors, soleus), 25 in all. Existing ids are never renamed or split, and no stored data refers to muscle ids, so nothing needed migrating.
- **Colour coding:** five load bands (none, light, moderate, high, peak) with hatch patterns and text labels, so colour is never the only signal. A second mode colours by **last worked** (today, 1–2, 3–6, 7+ days, not in period). Both are descriptive; neither says anything about recovery or readiness. Pure rules: `src/lib/personal/load-bands.ts`.
- **Motion** (all inside `prefers-reduced-motion: no-preference`): muscles fill in head to feet; colour glides between bands; the figure turns in 3D between front and back (tap or swipe); the heaviest muscles breathe a slow warm glow; selecting a muscle pulses once; hover or focus shows a caption chip. With reduced motion everything is static and the turn is instant.
- **Replay:** a scrubbable, playable time-lapse of the last four weeks. Each day shows the trailing seven days of the user's own training, on one shared scale (`muscle-timeline.ts`). Dates are UTC.
- **Same privacy as before:** own rows only, behind P1-B's wellness gate and adult rule; absent when the gate is off. No schema change.

### Known limits
- Replay day labels are UTC calendar dates, so they can differ by a day from the user's local date.
- Hatch patterns and glow are tuned for the two shipped themes; a third theme would need re-tuning `--bm-*`.
- Saving or sharing the map as an image is not built (CSS-variable styling needs inlining first); a possible follow-up.
9 changes: 7 additions & 2 deletions src/app/me/body/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { MuscleExplorer } from "@/components/personal/body-map/muscle-explorer";

export default async function BodyPage() {
const session = await requireSession();
const { overview: o, logged } = await getMuscleExplorer(prisma, session.user.id);
const { overview: o, logged, timeline } = await getMuscleExplorer(prisma, session.user.id);

// Latest logged girth per muscle, across left and right.
const notes: Partial<Record<MuscleId, string>> = {};
Expand All @@ -31,7 +31,12 @@ export default async function BodyPage() {
<h1 style={{ margin: 0, fontFamily: "var(--font-hm-display, inherit)" }}>My muscle map</h1>
<p className="hm-small">Tap a muscle to see what trains it.</p>
</header>
<MuscleExplorer planned={o.load} logged={logged} measurementNotes={notes} />
<MuscleExplorer
planned={o.load}
logged={logged}
timeline={timeline}
measurementNotes={notes}
/>
</>
);
}
Loading
Loading