You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .ai/specs/2026-06-20-exercise-client-note.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Today a client can only add a note **per set** (`set-logs.note`). We add a new l
24
24
25
25
## Problem Statement
26
26
27
-
In the workout tracker a client logs exercise execution as sets (`set-logs`). Each set can have its own note (`set-logs.note`, the field in [SeriesForm](../../src/components/workout/series-form/series-form.tsx)). What is missing is a note **for the whole exercise** — an annotation like "shoulders felt weak today, lower the weight next time" that applies to the exercise as a whole, not to one specific set.
27
+
In the workout tracker a client logs exercise execution as sets (`set-logs`). Each set can have its own note (`set-logs.note`, the field in [SeriesForm](../../src/modules/training/components/series-form/series-form.tsx)). What is missing is a note **for the whole exercise** — an annotation like "shoulders felt weak today, lower the weight next time" that applies to the exercise as a whole, not to one specific set.
28
28
29
29
The note cannot live in the plan: `workout-exercise-rows` has `update: isAdmin` — clients do not write to the template. It must therefore be created in the log layer, tied to the **(session, exercise)** pair.
30
30
@@ -111,7 +111,7 @@ src/
111
111
│ │ └── index.ts # NEW collection
112
112
│ └── index.ts # + re-export ExerciseLogs
113
113
├── payload.config.ts # + register in collections[]
114
-
├── components/workout/
114
+
├── modules/training/components/
115
115
│ ├── workout-tracker/
116
116
│ │ ├── workout-tracker.tsx # pass note + onSaveNote to the card
117
117
│ │ └── hooks/
@@ -192,7 +192,7 @@ useWorkoutSession (hook)
192
192
└── update local state
193
193
```
194
194
195
-
UI: [workout-tracker.tsx](../../src/components/workout/workout-tracker/workout-tracker.tsx) passes `note` + `onSaveNote` to [exercise-card.tsx](../../src/components/workout/exercise-card/exercise-card.tsx), which renders the note in the exercise header (distinct from the plan note) and — when `!readOnly` — exposes an editable field.
195
+
UI: [workout-tracker.tsx](../../src/modules/training/components/workout-tracker/workout-tracker.tsx) passes `note` + `onSaveNote` to [exercise-card.tsx](../../src/modules/training/components/exercise-card/exercise-card.tsx), which renders the note in the exercise header (distinct from the plan note) and — when `!readOnly` — exposes an editable field.
196
196
197
197
---
198
198
@@ -220,13 +220,13 @@ Render and edit the note in `ExerciseCard`, strings in `pl.json`/`en.json`, visi
220
220
-[x]`yarn payload migrate` — run by the user (DB-mutating step).
221
221
222
222
### Phase 2 — Runtime
223
-
-[x][use-workout-session.ts](../../src/components/workout/workout-tracker/hooks/use-workout-session.ts): load `exercise-logs` by `session` (parallel with set-logs), add `exerciseNotes` state.
223
+
-[x][use-workout-session.ts](../../src/modules/training/components/workout-tracker/hooks/use-workout-session.ts): load `exercise-logs` by `session` (parallel with set-logs), add `exerciseNotes` state.
224
224
-[x] Add the `noteForRow(rowId)` selector and the `saveExerciseNote(ex, note)` mutation (upsert).
225
225
-[x] Expose both in the hook's returned API.
226
226
227
227
### Phase 3 — UI + i18n
228
-
-[x][workout-tracker.tsx](../../src/components/workout/workout-tracker/workout-tracker.tsx): pass `clientNote` + `onSaveNote` to `ExerciseCard`.
229
-
-[x][exercise-card.tsx](../../src/components/workout/exercise-card/exercise-card.tsx): render the client note in the header (new `exercise-note` subcomponent) + allow editing when `!readOnly`.
228
+
-[x][workout-tracker.tsx](../../src/modules/training/components/workout-tracker/workout-tracker.tsx): pass `clientNote` + `onSaveNote` to `ExerciseCard`.
229
+
-[x][exercise-card.tsx](../../src/modules/training/components/exercise-card/exercise-card.tsx): render the client note in the header (new `exercise-note` subcomponent) + allow editing when `!readOnly`.
230
230
-[x] Strings (`addNote`, `notePlaceholder`, `saveNote`, `cancelNote`) in `messages/pl.json` + `messages/en.json`.
231
231
-[x][export-seed.ts](../../src/scripts/export-seed.ts): comment updated (logs already excluded via the allow-list).
Reorganize training and sharing code into domain-oriented business modules. Move frontend components, server queries, and Payload Admin extensions behind explicit module boundaries without changing user-facing behavior.
Copy file name to clipboardExpand all lines: AGENTS.md
+77-10Lines changed: 77 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,11 @@ Operational guide for AI agents working in this repository.
7
7
## Before Writing Code
8
8
9
9
- Write everything in English: code, comments, variable names, documentation.
10
+
- Do not implement code, schema, migration, script, configuration, or documentation changes unless the user explicitly authorizes implementation with "wdrażamy" or an equivalent clear instruction. Analysis, investigation, and recommendations do not authorize changes.
10
11
- Check `.ai/specs/` before coding any non-trivial feature.
11
12
- Skills are installed in `.claude/skills/` (Claude Code) and `.agents/skills/` (Codex). `.agents/skills/` is the local source of truth — edit a skill **only** there, then run `ags push-skill` to propagate it to the source repo (it also syncs the `.claude/skills/` copy). See Installing skills.
12
13
- Prefer minimal, focused changes. Do not refactor code outside the task scope.
13
-
-Run `yarn build` after every implementation to catch type errors.
14
+
-Do not run `yarn build`automatically after implementation. Run it only when the user explicitly asks.
14
15
- Comment and naming conventions are defined in the `code-style` skill. Load it before writing or reviewing TypeScript.
15
16
16
17
---
@@ -23,7 +24,7 @@ Match the task to the table before starting. A single task often maps to multipl
23
24
|---|---|
24
25
| Creating a new collection or extending the schema | Load skill `payload-build-collections`|
25
26
| Adding a custom admin view, tab, or field UI | Load skill `payload-build-modules`|
26
-
| Building a front-end component or page (`src/components`, `(frontend)`) | Load skill `payload-frontend-build-components`|
27
+
| Building a front-end component or page (`src/components`, `src/modules/*/components`, `(frontend)`) | Load skill `payload-frontend-build-components`|
0 commit comments