Skip to content

Commit fcdb686

Browse files
committed
chore: version packages
1 parent 75de1bf commit fcdb686

10 files changed

Lines changed: 39 additions & 59 deletions

.changeset/exercise-card-and-folder-convention.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.changeset/extract-ui-components.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

.changeset/frontend-page-components.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

.changeset/refactor-date-metrics.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

.changeset/share-links-phase-1-2.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/share-links-phase-3.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/share-links-phase-4.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/spec-writing-payload-compliance.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,43 @@
11
# training-app
22

3+
## 1.1.0
4+
5+
### Minor Changes
6+
7+
- 143180b: Add Share Links feature (Phase 1 & 2): new `share-links` Payload collection with token auto-generation, expiry date, and per-link permissions (plan preview / results). Custom admin UI component shows the full share URL with a one-click copy button.
8+
- 60adf5f: Add Share Links — Phase 3: readOnly mode across component chain and share page refactor. Adds `readOnly` prop to `SeriesRow`, `ExerciseCard`, `WorkoutTracker`, and `WorkoutPlansAccordion` — hides all mutation controls when true. Replaces the hardcoded `PlanSection` on the share page with `WorkoutPlansAccordion readOnly={true}`. Bug fixes: microcycles and workouts collections now expose `read: isAuthenticated`; `training-plan-loader` calls `loadPlansItems` with `overrideAccess: true`. Refactoring: `fmtMinSec`, `isValidValue`, `buildExerciseMeta`, and `workoutGroupLabel` extracted to `lib/date.ts` / `lib/metrics.ts`; loader renamed to `load-plans-items.ts`.
9+
- 275c280: Add Share Links — Phase 4: results (logs) via share-token cookie. Middleware sets an HttpOnly `share-token` cookie on `/share/*` routes. New `canReadViaShareToken` access function validates the cookie and gates read access to `workout-logs` and `set-logs` for the plan owner's data. `WorkoutTracker` and `WorkoutPlansAccordion` gain a `showResults` prop — when true, logs are fetched client-side in read-only mode using the cookie for authorization.
10+
11+
### Patch Changes
12+
13+
- 9ec4638: Split `ExerciseCard` into sub-components (`ExerciseHeader`, `MetaLine`, `SeriesList`, `AddSetActions`), rename its `ex` prop to `exercise`, and use `sets.at(-1)`.
14+
15+
Adopt a one-folder-per-component convention for feature components: every sub-component now lives in its own `components/{name}/` folder with an `index.ts` barrel (no flat sub-component files). Restructured `exercise-card`, `series-form`, and `workout-plans` accordingly. This is documented in the new `frontend-build-components` skill.
16+
17+
- 1375bb9: Extract reusable UI components and split large workout components.
18+
19+
Add two generic primitives in `components/ui`: `Alert` (error banner with an optional dismiss button, replacing inline `errorBannerClass` usage in login, series-form, and workout-tracker) and `Field` (label + control wrapper, replacing the inline label pattern in series-form, session-times, and the metric field router).
20+
21+
Split `MetricFieldInput` into focused files (`DurationInput`, `BodyweightField`) so it becomes a thin branch router, and extract `ActiveContextBanner`, `MicrocyclePicker`, and `WorkoutPicker` out of `WorkoutPlansAccordion`. No behavior changes - markup and classes are preserved.
22+
23+
- c695fab: Extract shared page-level UI components and tidy the frontend pages.
24+
25+
Add `PageContainer`, `Logo`, and `PageHeader` (with `inline`/`stacked` layouts and a `right` slot) to `components/ui`, and use them across the home, login, and share pages. Extend `Field` to render a real `<label htmlFor>` and use it for the login inputs.
26+
27+
Make the share page date locale-aware via `getFormatter` (instead of a hardcoded `pl-PL`), add an empty state with a new `share.noPlan` message, simplify the login submit cleanup with `finally`, and use a single conditional for the home empty state.
28+
29+
Rename `WorkoutPlansAccordion` to `WorkoutPlans` (component, file, and folder) since it is no longer an accordion-specific abstraction.
30+
31+
- 275c280: Refactor `lib/date` and `lib/metrics` for readability and consistency.
32+
33+
`lib/date`: rename `fmt*` helpers to `format*` (`formatDuration`, `formatMinSec`, `formatSec`), document the local-timezone behavior of the ISO/input helpers, and make `pad2` accept `string | number`. Behavior changes: `combineDateTime` now returns `null` for an invalid date/time instead of throwing, and `formatDuration` returns `null` for a zero-length duration instead of `"0min"`. The seconds label in `formatMinSec` is now `"s"` to match `formatSec`.
34+
35+
`lib/metrics`: extract a `unitFactor` helper to remove duplicated unit lookups, dedupe the bodyweight check in `metricBody`, add a clarifying note for the `'x'` placeholder in `isValidValue`, and reuse `PROTOCOL_LABEL` (with a new `Protocol` type) in `workoutGroupLabel` instead of hardcoded protocol names.
36+
37+
Introduce `lib/metric-keys` with shared composite-field key helpers (`minKey`, `secKey`, `unitKey`, `BODYWEIGHT_KEY`) used by `metrics`, `series-form`, and `metric-field-input`, so the write and read sides of the form cannot drift apart.
38+
39+
- f71ee34: Extend spec-writing skill with stack-specific compliance reviews. Split the Medusa-only compliance matrix into a universal dispatcher plus separate `compliance-review-medusa.md` and `compliance-review-payload.md` reference files. Update `SKILL.md` and `spec-template.md` to point to the correct file per project stack.
40+
341
## 1.0.1
442

543
### Patch Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "training-app",
3-
"version": "1.0.1",
3+
"version": "1.1.0",
44
"description": "Aplikacja treningowa na Payload 3",
55
"license": "MIT",
66
"type": "module",

0 commit comments

Comments
 (0)