- 2b1669d: Add plan and workout structure navigation in the admin panel and fix exercise catalog selection in the structure editor.
- 2d3214f: Allow workout exercises to use either repetition or duration targets.
- 4d7378b: Record left and right weights and repetitions separately for strength sets and exercise defaults.
- 8adc18d: Show group protocol details above exercises in workout tracking.
- 420d6b9: Support multiple CORS / CSRF-trusted origins via the optional
PAYLOAD_CORSenv var (comma-separated). Defaults toserverURL, so existing single-origin deployments are unaffected. Useful for permitting an extra origin (e.g. awww.variant) without code changes. - fd08425: 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.
- 66d61f7: Standardize rest duration labels as
Rest(s)in workout group configuration.
-
53b1f57: Workout tracker: client notes and colored blocks
- Exercise client note: unified add/edit UI (
NoteField) with lucide icons (Plus/Pencil), label-prefixed display, moved to the bottom of the exercise card. - Workout note: the per-session note (
workout-logs.notes) is now editable in the tracker footer; relabeled from "session" to "workout" to avoid ambiguity. - Colored blocks: groups can be merged into one colored band via the new
bundleWithPreviousfield onworkout-groups. The loader bundles consecutive groups intoblocks(index resets per section); the tracker renders one background per block. - Workout ID is shown in the tracker header for identification.
- Exercise client note: unified add/edit UI (
-
0b33cdd: Harden security across configuration, auth, and HTTP headers.
Requires running DB migrations on deploy (two migrations included).
Configuration & API surface:
- Explicit
authconfig onusersandclients(2h token expiration, 5 max login attempts, 10 min lockout,securecookies in production,sameSite: Lax) - Add
serverURL, CORS and CSRF whitelists scoped toNEXT_PUBLIC_BASE_URL - Disable the unused GraphQL API and remove its routes to shrink the public API surface
- Restrict Media uploads to images and cap file size at 5 MB
Auth & data:
- Enforce a minimum password length of 15 characters (NIST) on
usersandclients - Enable versioning/audit history on
plansandclients(migration20260618_162028_security_versioning) - Drop the
share-linksversion tables and type to avoid retaining live tokens in history (migration20260618_172305_drop_share_links_versions)
HTTP security headers (
next.config.ts):- HSTS (with preload),
X-Content-Type-Options,X-Frame-Options,Referrer-Policy,Permissions-Policy, and aframe-ancestors 'self'CSP
- Explicit
- d7d2235: Disable Postgres schema auto-push (
push: false). Schema changes now go exclusively through migrations (payload migrate:create+payload migrate), so runningyarn devcan no longer sync schema directly into a remote/production database. After this change a fresh database must be migrated before the app can run.
- 143180b: Add Share Links feature (Phase 1 & 2): new
share-linksPayload 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. - 60adf5f: Add Share Links — Phase 3: readOnly mode across component chain and share page refactor. Adds
readOnlyprop toSeriesRow,ExerciseCard,WorkoutTracker, andWorkoutPlansAccordion— hides all mutation controls when true. Replaces the hardcodedPlanSectionon the share page withWorkoutPlansAccordion readOnly={true}. Bug fixes: microcycles and workouts collections now exposeread: isAuthenticated;training-plan-loadercallsloadPlansItemswithoverrideAccess: true. Refactoring:fmtMinSec,isValidValue,buildExerciseMeta, andworkoutGroupLabelextracted tolib/date.ts/lib/metrics.ts; loader renamed toload-plans-items.ts. - 275c280: Add Share Links — Phase 4: results (logs) via share-token cookie. Middleware sets an HttpOnly
share-tokencookie on/share/*routes. NewcanReadViaShareTokenaccess function validates the cookie and gates read access toworkout-logsandset-logsfor the plan owner's data.WorkoutTrackerandWorkoutPlansAccordiongain ashowResultsprop — when true, logs are fetched client-side in read-only mode using the cookie for authorization.
-
9ec4638: Split
ExerciseCardinto sub-components (ExerciseHeader,MetaLine,SeriesList,AddSetActions), rename itsexprop toexercise, and usesets.at(-1).Adopt a one-folder-per-component convention for feature components: every sub-component now lives in its own
components/{name}/folder with anindex.tsbarrel (no flat sub-component files). Restructuredexercise-card,series-form, andworkout-plansaccordingly. This is documented in the newfrontend-build-componentsskill. -
1375bb9: Extract reusable UI components and split large workout components.
Add two generic primitives in
components/ui:Alert(error banner with an optional dismiss button, replacing inlineerrorBannerClassusage in login, series-form, and workout-tracker) andField(label + control wrapper, replacing the inline label pattern in series-form, session-times, and the metric field router).Split
MetricFieldInputinto focused files (DurationInput,BodyweightField) so it becomes a thin branch router, and extractActiveContextBanner,MicrocyclePicker, andWorkoutPickerout ofWorkoutPlansAccordion. No behavior changes - markup and classes are preserved. -
c695fab: Extract shared page-level UI components and tidy the frontend pages.
Add
PageContainer,Logo, andPageHeader(withinline/stackedlayouts and arightslot) tocomponents/ui, and use them across the home, login, and share pages. ExtendFieldto render a real<label htmlFor>and use it for the login inputs.Make the share page date locale-aware via
getFormatter(instead of a hardcodedpl-PL), add an empty state with a newshare.noPlanmessage, simplify the login submit cleanup withfinally, and use a single conditional for the home empty state.Rename
WorkoutPlansAccordiontoWorkoutPlans(component, file, and folder) since it is no longer an accordion-specific abstraction. -
275c280: Refactor
lib/dateandlib/metricsfor readability and consistency.lib/date: renamefmt*helpers toformat*(formatDuration,formatMinSec,formatSec), document the local-timezone behavior of the ISO/input helpers, and makepad2acceptstring | number. Behavior changes:combineDateTimenow returnsnullfor an invalid date/time instead of throwing, andformatDurationreturnsnullfor a zero-length duration instead of"0min". The seconds label informatMinSecis now"s"to matchformatSec.lib/metrics: extract aunitFactorhelper to remove duplicated unit lookups, dedupe the bodyweight check inmetricBody, add a clarifying note for the'x'placeholder inisValidValue, and reusePROTOCOL_LABEL(with a newProtocoltype) inworkoutGroupLabelinstead of hardcoded protocol names.Introduce
lib/metric-keyswith shared composite-field key helpers (minKey,secKey,unitKey,BODYWEIGHT_KEY) used bymetrics,series-form, andmetric-field-input, so the write and read sides of the form cannot drift apart. -
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.mdandcompliance-review-payload.mdreference files. UpdateSKILL.mdandspec-template.mdto point to the correct file per project stack.
- Add release automation and improve repository documentation and presentation