Apps built with the iOS 26+ SDK must adopt the UIScene-based app
lifecycle; the AppDelegate-only lifecycle this project's iOS shell
uses is no longer supported and crashes on launch:
Application failed to launch: UIScene life cycle is required for
apps built with this SDK.
This adds a SceneDelegate (window/root VC still come from
Main.storyboard, it just forwards deep links / Universal Links to
Capacitor's ApplicationDelegateProxy, since AppDelegate's own
open-url/continue-activity callbacks aren't invoked under the scene
lifecycle), wires AppDelegate's
application(_:configurationForConnecting:) to use it, and adds the
UIApplicationSceneManifest to Info.plist.
No deployment target, bundle id, or signing settings changed — apps
built with older Xcode/SDKs are unaffected.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
A push to main or a v* tag on GitHub is forwarded to gitlab.com by a workflow, fast-forward
only, main before the tags so the tag pipeline finds its commit on main. Pull mirroring on
gitlab.com is paid, so the push runs from this side; it needs a project token with the single
scope write_repository (Maintainer role, for the protected main and v*) as the secret
GITLAB_MIRROR_TOKEN, handed to git through a credential helper rather than a URL.
README, CONTRIBUTING, MOBILE and the changelog now say what the site says: issues and pull
requests on GitHub, the GitLab mirror only for the CI that builds the release artefacts, the
merge requests still open there reviewed until they are through.
Nav, footer, the Elsewhere pads and every deep link point at github.com; GitLab keeps a pad
and a footer link as the mirror whose CI signs the APK. Stars, forks, issues and the About
timeline come from api.github.com again (new cache keys so a warm GitLab-era entry is not
misread). The dead-pad rules from the suspension weeks are gone. Cache-bust 17.
The api job ran npm test on a bare checkout. That was fine while the Coach tests needed
nothing, but api/coach/node-fetch.js imports undici now, so the first run after the return
to GitHub failed on ERR_MODULE_NOT_FOUND. Same install as test:api on GitLab.
docker-publish used to put latest on every main push, and — because a release run also
evaluated is_default_branch as true — on every release too; publishing thirteen releases at
once left latest on whichever build finished last. Now a release publishes X.Y.Z, X.Y and
latest, a main push publishes edge only, exactly like registry.gitlab.com.
The README, CONTRIBUTING, MOBILE and SELF_HOSTING pages said the GitHub repo was offline and
GitLab was the only home. The account is back: GitHub gets the tags, the releases v1.2.9 to
v1.3.5 with APK and checksum, the GHCR images and the Pages demo; GitLab keeps its CI, issues
and merge requests. Links now name both, the pages.yml comment no longer calls itself dormant.
build:apk was a manual job on main since it cost ~8 shared-runner minutes; the project runner
on the VM pays for it now, so every main push produces the APK (same key as the release,
artifact at /-/jobs/artifacts/main/browse?job=build:apk) and a broken Android build is caught
before the tag. Merge requests keep the manual button.
build:ios: mobile bundle + xcodebuild archive without a signing identity → unsigned .ipa
(AltStore/Sideloadly), tag builds also into the generic package registry opengym-ios/<ver>/.
Only exists once IOS_RUNNER_TAG names a registered Mac runner; untested until then.
Same capability, other direction. The child writes as `coach`, so its own
directories come out coach-owned -- and this process cannot unlink inside them
without CAP_DAC_OVERRIDE. fs.rmSync then throws EACCES from a `finally`,
which turns a run that actually succeeded into a failed one:
EACCES: permission denied, rmdir '/tmp/coach-test-XXXX/.claude/backups'
The child's user now clears its own files (argv array, no shell, paths from
this module's own mkdtemp) and the server removes the directory it still owns.
Best effort on both halves: a leaked temp directory beats a failed job.
Every Coach run failed instantly on Kubernetes -- "Claude Code native binary
... exists but failed to launch. This usually means the binary does not match
this system's libc" -- with a musl binary on a musl host, which the SDK's own
--version printed happily one shell command earlier.
The message is the Agent SDK's guess at any spawn failure. The real errno was
EACCES, and the cause is the job directory rather than the binary: libuv
chdir()s into cwd BEFORE dropping to the child's uid, so handing the directory
to `coach` locks out the very process that has to enter it first. mkdtemp
creates 0700, and `drop: [ALL]` leaves root without CAP_DAC_OVERRIDE to
ignore that with -- so the child never starts.
cf7e4cc fixed the same class of bug for the fixture provider by skipping the
chown when the child stays root. It does not help here: claude and codex do
drop, and the chdir still happens before they do.
The directory now stays owned by the server and `coach\' reaches it through
the group (0770, coach gid). The child writes, the parent still chdirs and
still cleans up, nothing else on the container can read it. chmod before
chown, while the server is still the owner: CAP_FOWNER is not in the set
either, so the other order fails with EPERM.
Verified in the running container: chown -> EACCES, group handover -> exit 0,
child writes, parent removes.
- Apply progression targets to each unfinished side
- Convert per-side weights and drops between kg and lb
- Preserve partially completed sets when finishing early
- Calculate volume from each side's actual completed work
- Keep L/R tracking for planned rest-pause sets
- Auto-complete the rated side when logging RIR/RPE
- Add regression tests for these flows
Validation: 1341 frontend tests passed; production build passed.
Reproduces issue #71 in the exercise picker: pick lower arms + dumbbell,
switch to upper arms, and assert the dumbbell filter stays selected since
both body parts have dumbbell exercises.
Selecting a body part after choosing an equipment type reset the
equipment filter to 'all equipment', even when the new muscle group
still had exercises for that equipment. The body-part chips called
setEq('') unconditionally.
Remove those resets from the per-body-part chips in the exercise picker
and the library. The existing eqOn fallback (eqOpts.includes(eq) ? eq : '')
already drops the filter for the current view when the new body part has
nothing under it, without discarding the user's choice. The 'All',
Favourites and Chosen chips still clear it, since they span every body part.
Fixes#71
The body-part and equipment filters in the Library (and the exercise
picker, the muscle explorer) are `.chips` rows that overflow sideways.
On a phone you swipe them; index.css hides the scrollbar. On a desktop
browser there was no way to reach the chips past the right edge — a
mouse wheel scrolls the page, and there's no visible handle.
lib/hchips.js adds a click-drag: press anywhere on a strip and pull it
along, the way a swipe does on a phone. One delegated pointerdown
listener on the document.
- 6px slop before a press becomes a drag, so a click still selects a chip
- the click the browser fires after a drag is swallowed, so releasing
over a chip doesn't toggle that filter
- mouse only (pointerType 'touch'/'pen' already scroll natively);
primary button only; non-overflowing rows are left alone
- grab / grabbing cursor as the hint, on rows that actually overflow
(data-xscroll, set on hover), gated to (hover:hover) and (pointer:fine)
Closes#68
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DBkhHLqWtSYrPdsNE11PiP
The printable one-page plan layout (lib/plan-share.js planPrintHTML) was
web-only: printPlan() renders it into a hidden iframe and calls
window.print(), which Android's WebView does not implement.
On mobile the same HTML is handed to the OS print flow via a small
first-party `Print` Capacitor plugin (one method, printHtml), which is
where the user picks "Save as PDF" / "Save to Files" or a real printer.
Web is unchanged.
- Android (PrintPlugin.java): load the HTML into an off-screen WebView and,
once loaded, drive it through the system PrintManager. A strong ref keeps
the WebView alive until the job spools. Registered in MainActivity next
to InstallPlugin.
- iOS (PrintPlugin.swift + .m): UIPrintInteractionController with a
UIMarkupTextPrintFormatter. Files added to App.xcodeproj.
- lib/mobile.js: printHtml() wrapper (registerPlugin('Print')).
- sheets.jsx: the MOBILE branch of "Print / Save as PDF" calls printHtml;
the web branch still calls printPlan.
No new dependency — the OS renders the PDF. Native code is not exercised by
the pipeline; run the manual APK job and check on device.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DBkhHLqWtSYrPdsNE11PiP
The /api location re-resolves BACKEND on every request, which needs a resolver
address, and that address was hardcoded to 127.0.0.11 — Docker's embedded DNS.
Nothing listens there on another runtime, and an unreachable resolver does not
fail fast: every /api request hangs until it times out, with nothing in the
error log to say why. On Kubernetes that means the app shell loads and the whole
API is dead.
RESOLVER now carries it, defaulting to 127.0.0.11 so Docker and every existing
compose file are unchanged. Kubernetes sets it to the kube-dns service address;
Podman to whatever its network provides. Documented next to the four other
render-time settings in SELF_HOSTING.md, since it belongs to the same "fitting
it into an existing stack" problem.
- Phone with own key: the provider's or validator's reason reaches the chat line and toast
(BYOK_ERRORS + jobErrorText); no more "instance owner" wording where there is none (#58)
- CoachChat: a message with no routines refines/creates instead of reviewing an empty window;
menu entry "Start a new plan" (Discord "Coach reset" thread)
- payload: refine without a previous plan becomes a create with userNote; the last six chat
lines travel as `conversation` (documented in common.md, prompts.js regenerated)
- OpenAI model list cut to Chat-Completions models (isChatModel); Gemini placeholder names AQ. keys
- 3 new strings in 14 packs, pt-BR guard 626/616/3db560d7; tests for all of it
Drops and rest-pause bursts on a one-sided exercise are now logged per limb, matching the L/R main sets: each side carries its own {type, drops, clusters}, edited independently but kept symmetric, while the row's aggregate (type + summed extra volume) stays correct for volume/1RM/history. Also restores the Drop/Burst set-menu options that were wrongly hidden on per-side exercises. Refs #60.
The L/R rep steppers stepped by two (the whole-set rule that keeps a combined total evenly splittable); per side each tap is one rep. Also removes the old '{n} per side' chip, which halved the aggregate total for display and was both redundant and wrong under asymmetry now that each side is entered directly. New 'Per side' tag localised across all languages.
One-sided (reps-per-side) exercises now log weight, reps, RIR/RPE and done individually per side, shown as two L/R rows per set. The per-side data rides on the set row while its scalar w/r/done/effort stay a correct aggregate, so volume, 1RM, PRs, progression, recovery, history and the coach read it unchanged. Side badges localised for all languages. Closes#60.
- removed ability to manually enter code to be displayed as QR code. Codes can only be scanned via camera or imported from an image on the device
- Cards can be edited once they are created. E.g. changing the description, re-scanning the code
- You can change the order of code-cards via long-press
- Last selected code-card will be shown when selecting "check in" on home screen
- Optics: Correctly centered titles of code-cards
- Plan → Week schedule: inline per-day management. A populated weekday
shows always-visible routine sub-rows with an inline ✕ (removes; drops
the day key on the last one) and a + Add routine action (single-pick
append; already-added routines disabled). An empty day stays one
tappable row → the first-routine picker. Day header shows an "N
routines" hint. DayAssign is now the empty-day / single-pick sheet only;
new dayAddRoutineSheet does the append.
- Workout header ⋮: "Add routine" is the first item; Cards / List /
Compact move to a nested "Layout" sheet. addRoutineToSessionSheet
appends the picked routine's entries (each stamped with its rid),
extends s.active.routineIds, re-derives the name, toasts; a routine
already in the session or with no exercises is disabled + tagged.
s.active.cur is left where it is.
- History WorkoutDetail: a combined workout's entries are grouped into
per-routine sections in merge order, each with a glyph+name /
"N sets · volume" subheader. A legacy single-routine workout renders
flat, exactly as before.
- Home today card: title is the derived session name (done in phase 3).
Tests: Plan inline management (week-start.test.jsx), the ⋮ Add-routine /
nested Layout menu (Workout.test.jsx), addRoutineToSessionSheet +
WorkoutDetail grouping (sheets.combine-ui.test.jsx). Six new UI strings
render English in translated packs — flagged by check-source-strings
(report-only) for a translation follow-up, as docs/COMBINE_ROUTINES.md
notes.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JVbWJtoyQU4WgwFR4eAKgy
startFlow / beginWorkout now take string | string[] | null and route
through buildCombinedEntries; callers pass [r.id], effectiveRoutineIds(...)
or [] as appropriate. Every effectiveRoutine(S,iso) render site that
showed one routine now iterates effectiveRoutines / checks
effectiveRoutineIds.
- sheets.jsx: beginWorkout / beginBackfill write s.active.routineIds +
derived name, no routineId / excludeFromProgression; swapTo resolves the
slot's routine from its entry rid and carries rid onto the replacement;
DayOverride / Calendar use the plural resolver (dayPlan stays scalar —
overriding a combined date collapses it, per spec §8); DayAssign writes a
one-element list.
- active-exercise-swap.js: split-insert carries current.rid like it carries sg.
- Workout.jsx: StartChooser id-set exclusion + startFlow(list); add-exercise
and progression-settings resolve the routine from the current entry's rid
and stamp rid on a freehand add.
- TabBar / Home: onStart(effectiveRoutineIds(...)); Home plannedPerWeek
counts scheduled days not routines; today card name joins the day's
routines.
- mobile.js buildReminderNotifications: names all of a combined day's
routines, or a count past two.
- RoutineEdit delete-cleanup pulls the id from each week list, drops an
emptied key. api/server.js effectiveRoutineId reads the first of the list.
Tests: sheets.combine.test.jsx (beginWorkout with a routine-id list);
mobile.test.js combined-day reminder. Existing suites stay green on the
tolerant-reader path.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JVbWJtoyQU4WgwFR4eAKgy
The plan fingerprint is computed in two runtimes that share no build step
(frontend/src/lib/coach.js and api/coach/core/) and must stay byte-for-byte
matched. Both now normalise every weekday to a routine-id list:
- canonicalPlan / cleanPlan: day value -> [].concat(S.week[d]); filter
S.week?.[d]?.length. A legacy bare string and a one-element list are
indistinguishable downstream.
- hashPlan (both): week join -> k + '=' + list.join('+'). A single-routine
plan's fingerprint is byte-identical to pre-upgrade — no false-stale storm.
- aggregates.plannedDays counts scheduled days, not routines.
- coach.js currentValue/markStale compare `week` by canonical join;
CHANGE_APPLY.week writes [c.after] (single-routine op, collapses a
combined day — same limitation as DayOverride); changeValues.fmt renders
a week array as " + "-joined routine names before the generic branch.
- prompts/common.md + review.md: plan.week is a list; a `week` change names
exactly one routine and replaces the day. core/prompts.js regenerated.
Tests: shared combined-day fixture (client hashPlan === server hashPlan),
legacy scalar vs one-element array identical, canonicalPlan order,
CHANGE_APPLY.week, markStale canonical compare, changeValues rendering.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JVbWJtoyQU4WgwFR4eAKgy
Model A, no new entity. Per-entry noProg replaces the whole-workout
excludeFromProgression flag; the planner day slot and the active/saved
session widen to routine-id lists. No migration — every reader tolerates
the old scalar shape.
- session-start.js: buildSessionEntries returns a bare array, stamps
entry.noProg (only when true) instead of an { entries, excluded } wrapper.
- session-merge.js (new): buildCombinedEntries(st, routineIds) concatenates
N routines' entries in order and stamps entry.rid; deriveSessionName.
- history.js: entryExcluded(w, entry) predicate; effectiveRoutineIds /
effectiveRoutines plural primaries with thin singular wrappers;
lastEntryFor skips excluded entries (retires the buildWorkSets `regular`
wrapper); nextTrainingDay iterates the day's routines.
- progression.js: sessionsFor drops the whole-workout return for a
per-entry entryExcluded check — the file's only exclusion path.
- finish-workout.js: carries rid/noProg onto saved entries; writes
routineIds + routineId mirror; excludeFromProgression mirror iff every
completed entry is noProg.
- plan-share.js: week schedule is a routine-id list through build / parse /
merge / print; [].concat tolerates a legacy scalar bundle value.
- mcp/tools.js, sheets.jsx loadStarterPlan: adjust to the new shapes.
Unit tests for every changed helper (session-merge new; progression cases
1-7; history 8-16; finish-workout 17-19; plan-share 20-22). Fixtures in
sheets.starter / coach migrated to the list shape.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JVbWJtoyQU4WgwFR4eAKgy
Move/Swap/Remove and the "marked Current" hint are gated by
S.wc.exerciseButtons (off by default) — the lean default keeps them in
each exercise's ⋯ menu. Also note compact hides the pair buttons and that
list/compact blocks use the compact ExerciseBlock prop.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016QqZBhX7PVNsRqLhkTt9y3
S.workoutView gains a third value, 'compact': the list layout with each
ExerciseBlock rendered `dense` — no media, tag chips ("Best:" included),
note lines, "Last time" recap, bar/plates chip or progression-guidance
line. Just the name, the ⋯ menu and the set rows. Everything stripped is
still on the ⋯ menu or is display-only.
- Settings → During a workout → Workout view is now a 3-way Segmented
(Cards / List / Compact).
- The workout header gains a ⋮ button (menuSheet) that writes
s.active.workoutView, overriding the layout for the running session.
- beginWorkout / beginBackfill snapshot S.workoutView onto s.active, and
the render prefers A.workoutView || S.workoutView — so changing the
saved default never disturbs a workout already in progress.
- 'Compact' added to all 14 locales; pt-BR inheritance fingerprint
regenerated (inherited 613 → 614).
cards / list behaviour is unchanged. Component tests in Workout.test.jsx,
Settings.workoutview.test.jsx and a new sheets.workoutview.test.jsx;
docs/LIST_VIEW.md rewritten to the shipped model.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016QqZBhX7PVNsRqLhkTt9y3