Complete TASK-016 dark theme and persistent testtask candidate

This commit is contained in:
rob
2026-11-11 13:17:24 +00:00
parent 922d1f6bd7
commit 0cf051560b
17 changed files with 618 additions and 102 deletions
+4 -1
View File
@@ -1,4 +1,4 @@
node_modules/
node_modules
dist/
coverage/
.vite/
@@ -6,3 +6,6 @@ coverage/
# Disposable Roborto task snapshots
.test-worktrees/
# Persistent implementation worktrees (not disposable test snapshots)
.task-worktrees/
+6 -3
View File
@@ -2,10 +2,12 @@
set -Eeuo pipefail
case "${1:-}" in
validate)
command -v node >/dev/null
node -e 'const [a,b]=process.versions.node.split(".").map(Number); if(a<20 || (a===20 && b<19)) process.exit(1)'
source "$ROBORTO_PROJECT_ROOT/scripts/testtask-node.sh"
command -v python3 >/dev/null
[[ -f "$ROBORTO_PROJECT_ROOT/node_modules/vite/bin/vite.js" ]]
[[ -f "$ROBORTO_PROJECT_ROOT/node_modules/vite/bin/vite.js" ]] || {
echo "testtask: missing local dependencies; run npm ci in $ROBORTO_PROJECT_ROOT" >&2
exit 1
}
;;
prepare)
python3 "$ROBORTO_PROJECT_ROOT/scripts/testtask_snapshot.py"
@@ -15,6 +17,7 @@ case "${1:-}" in
exec tail -f /dev/null
;;
start-frontend)
source "$ROBORTO_PROJECT_ROOT/scripts/testtask-node.sh"
cd "$ROBORTO_WORKTREE"
exec node node_modules/vite/bin/vite.js --host 127.0.0.1 --port 5187 --strictPort
;;
+11 -1
View File
@@ -57,4 +57,14 @@ Do not commit, push, switch branches, merge, rebase, reset, deploy, or expose se
**Captain runs `testtask`. Agents must not launch or restart it, open its browser windows, or stop Captain testing sessions unless explicitly instructed.** Agents run automated checks and provide the test command/handoff; wait for Captain to run the manual-test workflow. This explicit instruction supersedes any skill guidance to launch testtask automatically.
Use `PATH=/home/rob/.nvm/versions/node/v24.21.0/bin:$PATH scripts/testtask.sh 017` for TASK-017 (replace task ID for later tasks). Requires installed `roborto-testtask`, Python 3, Node >=20.19, installed node_modules, Firefox and a graphical display. The adapter copies an allowlisted, hash-verified source snapshot to `.test-worktrees/task-###`, including uncommitted/untracked task files and excluding secrets/local data. It shares node_modules and serves only loopback port 5187 with an isolated browser profile. Do not edit snapshots. Refresh refuses changed/unowned snapshots rather than overwriting their work. Ctrl-C stops only runner-owned processes and removes its disposable profile; snapshot evidence is retained.
From project home, use `PATH=/home/rob/.nvm/versions/node/v24.21.0/bin:$PATH scripts/testtask.sh 016` for the TASK-016/TASK-019 combined acceptance candidate (replace task ID for other tasks). The project wrapper selects and reports the matching checked-out `task/###-*` implementation worktree; missing or ambiguous matches fail without launching the runner. The global CLI alone does not perform this routing. Snapshots are created under the selected source worktree, including its uncommitted/untracked task files. Requires installed `roborto-testtask`, Python 3, Node >=20.19, installed node_modules, Firefox and a graphical display. The adapter copies an allowlisted, hash-verified source snapshot to `.test-worktrees/task-###`, including uncommitted/untracked task files and excluding secrets/local data. It shares node_modules and serves only loopback port 5187 with an isolated browser profile. Do not edit snapshots. Refresh refuses changed/unowned snapshots rather than overwriting their work. Ctrl-C stops only runner-owned processes and removes its disposable profile; snapshot evidence is retained.
### Testtask repair note — 2026-11-11
The `/tmp` candidates referenced above are currently missing. Do not offer 016 as a runnable candidate until restored/rebuilt. Use persistent project-home `.task-worktrees/task-###` for future implementation sources. The launcher now selects Node through nvm automatically; no hard-coded PATH prefix is needed. `scripts/testtask.sh --check TASK_ID` is a no-launch preflight, permitted for agents. Captain alone runs the real session. TASK-020 tooling source is `.task-worktrees/task-020`; its reviewed tooling is also installed at project home.
### TASK-016 reconstruction available — 2026-11-11
The missing-source note above is superseded for 016 only: a new dark-theme candidate is available in project-home `.task-worktrees/task-016` on `task/016-dark-theme-rebuild`. `scripts/testtask.sh 016` routes there; no PATH prefix needed. This rebuild includes compact-input requirements but does not include missing TASK-019 changes. Captain alone launches the runner. Check fresh validation/status in HANDOFF.
+31 -4
View File
@@ -1,11 +1,34 @@
# Exercise Tracker current state
- Last updated: 2026-11-07
- TASK-017: Complete following Captain's explicit acceptance and commit/local codex merge authorization on 2026-11-07.
- Source worktree: `/home/rob/projects/exercise-tracker`; task branch `task/017-emom-totals`, integration branch `codex`, base `9c0e820`. Use Git to verify resulting refs/HEAD after integration.
- Last updated: 2026-11-11
- TASK-016: Complete following Captain acceptance and explicit commit/local codex merge authorization on 2026-11-11. Includes reconstructed compact-input styling and testtask tooling prerequisites.
- Source worktree: `.task-worktrees/task-016`, branch `task/016-dark-theme-rebuild`; integration target `codex`, base `922d1f6`. Verify resulting refs with Git.
- TASK-017 remains Complete and integrated from 2026-11-07.
Code/configuration take precedence over this summary.
## TASK-016 rebuild — 2026-11-11
Captain reported that `scripts/testtask.sh 016` still failed after the tooling repair. Rebuilt TASK-016 in persistent `.task-worktrees/task-016`, branch `task/016-dark-theme-rebuild`, base `922d1f6`. It is new implementation from the accepted task, not a recovery of the lost candidate. Captain accepted this candidate and authorized its commit/local codex merge on 2026-11-11; the resulting integration includes these application changes at project home.
The candidate supplies a single dark document/Bootstrap/native-control palette and restores accepted TASK-018 compact 5.25rem numeric inputs. Existing layouts, workout behavior and storage remain. Missing TASK-019 availability work is not included. TASK-020 launcher/helper/hook are copied as a prerequisite. Home and candidate exclude `.task-worktrees` from tests/lint to avoid recursively checking independent implementation sources. Source preflight now selects the real persistent 016 candidate. Fresh checks pass: 143 tests with one worker (default-parallel run had two timing failures), lint/build, 10 routing tests, source preflight, context and whitespace review. Captain explicitly accepted TASK-016; full evidence is in HANDOFF. No independent agent browser review is claimed.
## Historical source loss and testtask repair — 2026-11-11
The `/tmp/exercise-tracker-task-016`, `018`, `019` and `020` implementation directories are absent; Git lists their registrations as prunable. Their branches all point at baseline `922d1f6`, with no candidate commits. Git unreachable-object inspection found only old routine/specification documents. The historical UI candidate descriptions below are not currently testable; do not claim those implementations are available or recovered. Captain does not know of a saved source copy. Only the older TASK-017 snapshot exists at project home.
TASK-020 launcher repair is in persistent `.task-worktrees/task-020` on `task/020-testtask-repair`, with tooling also installed in project home. Wrapper and hook select supported Node through nvm when needed, preserving the standalone runner used by PitchInvader. `scripts/testtask.sh --check 020` validates source/runtime/dependencies without running services, preparing snapshots or opening browsers. Missing tasks fail explicitly; live replacements can be selected despite an old missing registration. Ten stub-runner tests pass. Real Captain launch remains pending. This historical blocker is resolved for 016 by the accepted persistent reconstruction described above; TASK-019 remains missing.
## Historical active UI group (sources now missing)
Captain engaged TASK-019 and TASK-016 together on 2026-11-08. Both are implementation-ready / awaiting Captain validation. Original `/home/rob/projects/exercise-tracker` remains on codex `922d1f6` with context edits and TASK-020 home-routing tooling; it does not contain candidate application changes.
TASK-019 source: `/tmp/exercise-tracker-task-019`, branch `task/019-previous-availability`. TASK-016 and shared acceptance candidate: `/tmp/exercise-tracker-task-016`, branch `task/016-dark-theme`. Both use codex `922d1f6` with accepted TASK-018 CSS copied as an explicit uncommitted prerequisite. TASK-016 also contains identical TASK-019 source/tests for the shared pass; no commits or Git merges occurred. Preserve these implementation worktrees until Captain authorizes integration.
TASK-018 remains Complete following Captain acceptance, with its original source in `/tmp/exercise-tracker-task-018` on `task/018-compact-inputs`. Compact 5.25rem numeric widths, bounded columns and existing validation/storage semantics are retained in the group candidates.
TASK-019 now gates the previous-session action on compatible source availability, with async context protection and lookup-failure retry. TASK-016 supplies one dark green document/Bootstrap/native-control palette; the UI brief and contrast table are in its worktree. Full tests pass 155/155 in both candidates; a final parent-context race guard passes the 13-test focused suite, including an additional regression. Final lint/build, context validation and whitespace checks pass. Agent browser verification is not claimed; Captain's shared test command and checklist are in HANDOFF. Both tasks need Captain acceptance before Complete.
## Application
React/Vite/React-Bootstrap local workout app, seed v8 with 30 exercise definitions. Actual-date and Morning/Afternoon navigation, persistent wall clock, untimed recording, continuous daily-hang goal and attempts, equipment-specific load controls, partial drafts, explicit Save completion and compatible previous-session suggestions remain.
@@ -14,7 +37,7 @@ TASK-017 replaces normal EMOM minute tables with exactly Weight (kg) and Total r
Per-side exercises, including preacher curls and bird-dog holds, now use one Reps (each side) or Seconds (each side) input per set. Explicit edits write both stored side values together. Unequal/partial historical values remain intact on read and untouched Save, displayed as text until replaced. Equipment, prescribed side guidance and historical per-side calculation semantics remain compatible. Zero is explicit; blanks remain incomplete. No schema migration or programme change.
No timers/audio, dog walks, dark theme, full history/progress, routine editor, backup UI or offline-release work was added. TASK-015 remains Complete. TASK-016 is planning-only. TASK-005 and TASK-008 remain accepted future work; other task statuses are in TASKS.
TASK-016 integration adds the accepted dark theme and compact numeric inputs. No timers/audio, dog walks, full history/progress, routine editor, backup UI or offline-release work is added. TASK-015 remains Complete. Conditional previous-session visibility (TASK-019) is not included; its original candidate is missing. TASK-005 and TASK-008 remain accepted future work; other task statuses are in TASKS.
## Storage
@@ -29,3 +52,7 @@ The testtask wrapper/config/hook and hash-verified allowlisted snapshot capabili
TASK-017 implementation used the original worktree on a dedicated branch rather than a separate implementation worktree; this deviation was acknowledged. Manual-test snapshots are evidence environments, never implementation worktrees. Captain retains future commit/merge/release authority. No push or deployment is authorized.
Node minimum is 20.19; validation uses `/home/rob/.nvm/versions/node/v24.21.0/bin`. Baseline Vite/Vitest advisories were previously reported (1 high, 2 moderate); dependency versions are unchanged. No backend, authentication, remote or deployment target exists.
## TASK-020 home-folder testing
Project-home `scripts/testtask.sh TASK_ID` now resolves the corresponding checked-out `task/TASK_ID-*` branch/worktree and invokes the unchanged runner from that source. TASK-016 selects the combined acceptance candidate. Missing/ambiguous sources fail clearly. Authoritative tooling worktree is `/tmp/exercise-tracker-task-020`; matching wrapper/helper/tests are installed uncommitted at project home for immediate use. Five stub-runner routing tests and shell syntax pass; no actual runner/browser was launched. Captain real-launch verification remains pending. Global runner and snapshot behavior are unchanged.
+13 -15
View File
@@ -2,27 +2,25 @@
> Replaceable snapshot; repository code and maintained context take precedence.
- Updated: 2026-11-07
- Task: TASK-017 — Simplify EMOM and per-side inputs.
- Status: Complete — Captain explicitly said “task complete. commit all and merge to codex”.
- Source: `/home/rob/projects/exercise-tracker`, task branch `task/017-emom-totals`, integration branch `codex`, base `9c0e820`. Captain authorized committing all pending task changes and merging locally; verify resulting refs/HEAD using Git. No push or deployment authorized.
- Updated: 2026-11-11.
- TASK-016: Complete. Captain explicitly accepted the reconstruction and authorized commit/local codex merge: “task -016 complete commit and merge”.
- Source: `/home/rob/projects/exercise-tracker/.task-worktrees/task-016`, branch `task/016-dark-theme-rebuild`, integration base `922d1f6`; target local `codex`. Verify resulting commit/refs with Git.
- This integration contains the accepted dark theme, reconstructed TASK-018 compact-input prerequisite, TASK-020 launcher tooling prerequisite and associated context. No push/deployment or worktree/session cleanup authorized.
## Delivered
## Delivered and validated
EMOM uses Weight (kg) and Total reps, explicit Save and compatible aggregate suggestions, without minute table or format switch. New emom-total records use a separate key, preserving historical minute/aggregate records and original editors. JSON envelope v3 supports v1/v2/v3 import; IndexedDB remains v3. Do not combine coexisting representations in future history.
Single dark green document/Bootstrap/native-control theme, semantic palette, coordinated buttons, disabled/error/saved/focus states, selected-control underlines and 5.25rem numeric fields. Workout logic, storage/schema, programme and dependencies are unchanged. UI brief and 39 measured palette pairs: `docs/TASK-016_UI.md`.
Per-side sets use one Reps (each side) or Seconds (each side) input; explicit edits set both stored sides. Historical unequal/partial values are shown as text and preserved on browsing and untouched Save. Equipment, targets, hangs, navigation and clock remain compatible. No data was cleared or silently migrated.
143/143 tests in 13 files pass with `npm test -- --maxWorkers=1`; default-parallel run had two timing failures (hang-goal timeout and side-entry readiness). Final lint/build, 10 stub-runner routing tests, no-launch source preflight, context validation (0 warnings), whitespace checks and diff review against `922d1f6` pass. Captain acceptance is recorded without claiming an independent agent browser/console/network review. No testtask/browser/server is launched for integration, and no Captain session is stopped.
## Acceptance and validation
## Other pending state
Captain accepted all TASK-017 changes on 2026-11-07, including the per-side correction, and authorized commit/local codex merge. Final verification passes 143 tests across 13 files, lint, build, context validation (0 warnings) and whitespace checks. Review against base 9c0e820 covered tracked and untracked task files; no unresolved actionable correctness findings. No independent agent visual pass is claimed.
Project-home pending files before integration were byte-identical copies of the TASK-016 candidate's tooling/context. Save them in a named Git safety stash before fast-forwarding the dirty home checkout; retain that stash as a recoverable copy. Completion/context updates supersede its older task-state text.
Work used a dedicated branch in the original worktree, not a separate implementation worktree. This deviation was acknowledged to Captain; do not describe the test snapshot as an implementation worktree.
The separate persistent `.task-worktrees/task-020` on `task/020-testtask-repair` retains uncommitted tooling/context copies. Launch tooling is included as a TASK-016 prerequisite, but TASK-020 remains separately awaiting Captain validation. Do not silently commit, clean or remove that worktree. Compare with codex before any later integration to avoid reintroducing stale context.
## Manual-test ownership and next work
TASK-019 availability logic is NOT included; its original uncommitted `/tmp` source remains missing. Original 016/018/019/020 `/tmp` registrations remain prunable evidence, with no candidate commits. No pruning or recovery is claimed. TASK-018's compact styling requirements are reconstructed in the accepted 016 candidate; its old source remains missing.
Captain runs testtask. Agents must not launch/restart it, open its browser windows or stop Captain testing sessions unless explicitly instructed. Earlier agent launches were mistakes, not authority for future execution. Final integration does not invoke testtask or refresh its snapshot.
## Testing after integration
For future Captain testing: `PATH=/home/rob/.nvm/versions/node/v24.21.0/bin:$PATH scripts/testtask.sh 017`. The repository adapter prepares `.test-worktrees/task-017` from allowlisted source files with hash checks, shares node_modules and serves loopback port 5187 with an isolated Firefox profile. Snapshot is replaceable test evidence; do not edit it. It is historical after completion-context edits and should be refreshed by Captain if reused. No test session cleanup is inferred from the commit/merge request.
TASK-016 remains planning-only; await Captain's next selected task. No implementation task is in progress after TASK-017 integration.
From project home, `./scripts/testtask.sh 016` still selects the persistent source; no PATH prefix needed. Captain alone launches/stops sessions. Snapshot files are test evidence and must never be edited. Documentation changes made for completion can make a prior snapshot stale; let the supported runner refresh when Captain next invokes it. Preserve the implementation worktrees and installed home launcher.
+1 -1
View File
@@ -8,7 +8,7 @@ This is a newly initialized repository. The user calls the planned product "Work
Workout Tracker is a personal local workout app with actual-date navigation, exclusive Morning/Afternoon views, a persistent local-time clock and no workout timers. Seed v8 contains 30 versioned exercise definitions with equipment/measurement metadata. Reusable logging shows only relevant reps, durations and equipment-specific loads, with one shared measurement input for per-side work, supports completed rows, partial drafts and explicit previous-session suggestions, and records EMOM with one weight and one total-reps input. Earlier minute records remain separately accessible. Daily hangs have an editable continuous target, independent attempts, longest continuous and cumulative totals. Monday/Friday stretch routines have headings but no invented exercises. Dog walks remain excluded; their latest classification is bodyweight-only reference context.
Exercise definition, workout prescription and dated performance are independent. New performance retains definition/prescription snapshots, while original aggregate, rep-set and weight-only history stays readable separately. Exercise details expose available notes and placeholders; reviewed technique/muscle content and local illustrations remain future work. History/progress screens, routine editing, backup interface, offline reload and dark theming remain separate tasks. SPEC defines behavior and WORKOUT_ROUTINE the authoritative initial programme.
Exercise definition, workout prescription and dated performance are independent. New performance retains definition/prescription snapshots, while original aggregate, rep-set and weight-only history stays readable separately. Exercise details expose available notes and placeholders; reviewed technique/muscle content and local illustrations remain future work. The application uses a single dark green theme with coordinated Bootstrap/native controls and compact numeric inputs. History/progress screens, routine editing, backup interface and offline reload remain separate tasks. SPEC defines behavior and WORKOUT_ROUTINE the authoritative initial programme.
## Technology and architecture
+61
View File
@@ -0,0 +1,61 @@
# TASK-016 dark-theme reconstruction
Date: 2026-11-11. Rebuilt from codex `922d1f6`; the former uncommitted candidate is unavailable. This is not a byte-identical recovery.
## Composition and behavior
Retain the current header, clock, section navigation, date strip, routine cards, details disclosures and editor hierarchy. Use a single dark green theme at document level before React loads; OS preference does not change it. No theme switch or stored theme preference. Bootstrap uses `data-bs-theme="dark"`; custom/native controls use the same semantic tokens. A background on the HTML element avoids a light initial canvas while development CSS loads.
Page/panel/card/input surfaces are layered dark greens. Primary and secondary text remain readable; green actions keep the existing identity. Selected navigation/date/period controls have an inset underline as well as their surface change. Existing saved text, completion summaries and error messages remain the non-color cues. Disabled actions use legible muted text and dark surfaces; focus uses an offset lime outline. Existing explicit Save, suggestions and all persistence semantics remain unchanged.
Restore TASK-018's accepted compact-input requirement as an explicit prerequisite: shared 5.25rem numeric width, bounded desktop headings/columns and EMOM fields, existing control heights, responsive labels and row stacking. No numeric limits or data truncation. At <992px row labels become visible; <576px rows stack; <361px EMOM fields stack. No layout redesign. The rebuilt candidate does not contain missing TASK-019 availability behavior.
## Validation
Automated interaction suite, lint/build, context checks, source preflight and whitespace/diff review are required. Captain owns testtask launch and manual checks at desktop and 320px: every section, both periods, focus, number controls/decimals, disabled/loading/error/saved states, earlier records, initial/reload with OS light. No independent browser pass is claimed. Calculated token contrasts below do not substitute for browser verification or formal WCAG auditing.
## Measured palette contrast
sRGB relative luminance; normal text target >=4.5:1, essential input borders/focus >=3:1 on their adjacent surfaces. Decorative panel/card dividers use a lower-contrast token; they are not required to identify an input. Selected controls retain readable text and a high-contrast inset accent.
| Foreground | Background | Ratio |
|---|---|---:|
| primary `#e8f1e9` | page `#101914` | 15.53:1 |
| primary `#e8f1e9` | panel `#18251e` | 13.76:1 |
| primary `#e8f1e9` | card `#1d2d24` | 12.52:1 |
| primary `#e8f1e9` | input `#111c16` | 15.14:1 |
| primary `#e8f1e9` | selected `#294332` | 9.36:1 |
| primary `#e8f1e9` | hover `#304b39` | 8.30:1 |
| primary `#e8f1e9` | success `#253e2a` | 10.10:1 |
| secondary `#b5c8b9` | page `#101914` | 10.18:1 |
| secondary `#b5c8b9` | panel `#18251e` | 9.02:1 |
| secondary `#b5c8b9` | card `#1d2d24` | 8.21:1 |
| secondary `#b5c8b9` | input `#111c16` | 9.93:1 |
| secondary `#b5c8b9` | selected `#294332` | 6.14:1 |
| secondary `#b5c8b9` | hover `#304b39` | 5.44:1 |
| secondary `#b5c8b9` | success `#253e2a` | 6.62:1 |
| accent `#b9df88` | page `#101914` | 11.93:1 |
| accent `#b9df88` | panel `#18251e` | 10.57:1 |
| accent `#b9df88` | card `#1d2d24` | 9.62:1 |
| accent `#b9df88` | input `#111c16` | 11.63:1 |
| accent `#b9df88` | selected `#294332` | 7.19:1 |
| accent `#b9df88` | hover `#304b39` | 6.38:1 |
| accent `#b9df88` | success `#253e2a` | 7.76:1 |
| error `#ffb4a9` | page `#101914` | 10.55:1 |
| error `#ffb4a9` | panel `#18251e` | 9.34:1 |
| error `#ffb4a9` | card `#1d2d24` | 8.50:1 |
| error `#ffb4a9` | input `#111c16` | 10.28:1 |
| error `#ffb4a9` | selected `#294332` | 6.36:1 |
| error `#ffb4a9` | hover `#304b39` | 5.64:1 |
| error `#ffb4a9` | success `#253e2a` | 6.86:1 |
| border `#708a78` | page `#101914` | 4.78:1 |
| border `#708a78` | panel `#18251e` | 4.23:1 |
| border `#708a78` | card `#1d2d24` | 3.85:1 |
| border `#708a78` | input `#111c16` | 4.66:1 |
| focus `#d3ed8c` | page `#101914` | 13.89:1 |
| focus `#d3ed8c` | panel `#18251e` | 12.30:1 |
| focus `#d3ed8c` | card `#1d2d24` | 11.19:1 |
| focus `#d3ed8c` | input `#111c16` | 13.53:1 |
| on-accent `#173020` | accent `#b9df88` | 9.44:1 |
| on-accent `#173020` | focus `#d3ed8c` | 10.99:1 |
| warning-text `#f5d68d` | warning `#40351b` | 8.54:1 |
+78 -4
View File
@@ -4,7 +4,7 @@ This file holds accepted, scoped implementation work. It is not a speculative ba
## Proposed implementation sequence
Reconciled with `docs/SPEC.md` and `docs/WORKOUT_ROUTINE.md`. TASK-001 through TASK-003 and TASK-012–TASK-013 are complete; TASK-014 is complete following Captain acceptance on 2026-11-04; TASK-006 is superseded; TASK-005 and TASK-008 are accepted; TASK-015 is Complete following Captain acceptance on 2026-11-04; TASK-016 is accepted for planning only; TASK-017 is Complete following Captain acceptance on 2026-11-07; the remaining tasks are proposed. Implement one task per isolated branch/worktree under `docs/WORKFLOW.md`. Preserve the documented initial programme, including optional/ranged prescriptions and distinct session types. TASK-013 supersedes the dog-walk reference added by TASK-012; TASK-014 supersedes timer work.
Reconciled with `docs/SPEC.md` and `docs/WORKOUT_ROUTINE.md`. TASK-001 through TASK-003 and TASK-012–TASK-013 are complete; TASK-014 is complete following Captain acceptance on 2026-11-04; TASK-006 is superseded; TASK-005 and TASK-008 are accepted; TASK-015 is Complete following Captain acceptance on 2026-11-04; TASK-016 and TASK-019 are implementation-ready / awaiting Captain validation as a coordinated UI group; TASK-017 and TASK-018 are Complete following Captain acceptance; the remaining tasks are proposed. Implement one task per isolated branch/worktree under `docs/WORKFLOW.md`. Preserve the documented initial programme, including optional/ranged prescriptions and distinct session types. TASK-013 supersedes the dog-walk reference added by TASK-012; TASK-014 supersedes timer work.
### TASK-001: Application foundation and responsive shell
@@ -238,7 +238,7 @@ Reconciled with `docs/SPEC.md` and `docs/WORKOUT_ROUTINE.md`. TASK-001 through T
### TASK-016: Apply a consistent dark theme
- Status: Accepted for planning; awaiting implementation instruction
- Status: Complete — Captain explicitly accepted TASK-016 and authorized its commit and local codex merge on 2026-11-11. Rebuilt source: `.task-worktrees/task-016`, branch `task/016-dark-theme-rebuild`, base `922d1f6`. This is a reconstruction, not recovery of the old missing `/tmp` candidate.
- Requested: 2026-11-04
- Objective: Make the application consistently dark themed while preserving existing layout, navigation and workout behavior.
- Scope: Dark page backgrounds and layered card/panel surfaces; readable primary/secondary text; coordinated borders, green accents, buttons, links, badges, form inputs and native controls. Cover selected, hover, focus, disabled, loading, saved/success and error states. Use shared CSS color tokens and compatible React-Bootstrap theme settings rather than scattered overrides. Retain the existing typography, spacing and component hierarchy.
@@ -246,10 +246,10 @@ Reconciled with `docs/SPEC.md` and `docs/WORKOUT_ROUTINE.md`. TASK-001 through T
- Relevant areas: `src/styles.css`, `src/main.jsx`, `src/App.jsx`, shared React-Bootstrap configuration, strength/hang editors where required, existing interaction tests and `docs/SPEC.md`. No workout data or IndexedDB migration is expected.
- Proposed approach: Inspect current UI and approve a restrained dark palette; centralize semantic colors for surfaces/text/borders/accent/status/focus; apply the supported Bootstrap dark theme plus local tokens; inspect all controls and states in the browser and correct contrast or native-control mismatches. Preserve existing green identity where contrast permits.
- Required validation: Mobile (including 320px) and desktop browser review across all sections and both workout periods; keyboard/focus and measured contrast checks; input, disabled, saved and error-state review; existing test suite, lint, build, context validation and `git diff --check`; Captain visual acceptance before Complete. Avoid tests that merely duplicate CSS declarations.
- Dependencies or blockers: Use the approved codex base and a clean dedicated task branch under WORKFLOW; TASK-015 currently occupies the sole worktree. Coordinate styling with TASK-015; neither task requires implementing the other's behavior. No new app behavior is authorized here.
- Dependencies: Confirmed codex base `922d1f6`. The 2026-11-11 rebuild reimplements accepted TASK-018 compact CSS requirements as a prerequisite. TASK-020 launcher repair is copied to make the candidate runnable. TASK-019 availability changes are not included: the earlier combined candidate is missing. No Git merge or commit occurred.
- Non-goals: New layouts, unrelated UX redesign, light-mode variants, a theme picker, OS-theme switching, new settings or persistent preferences, and changes to workout definitions/storage/timers.
- Decisions required before implementation: Review the exact palette through the UI brief; default scope is a single dark theme. A light/dark switch would require separately approved scope.
- Recommended skills when engaged: Frontend UI Design → Webapp Feature → Frontend Visual QA. This record does not authorize implementation.
- Recommended skills when engaged: Frontend UI Design → Webapp Feature → Frontend Visual QA. Captain engaged implementation with TASK-019 on 2026-11-08; palette/composition and measured contrast are in `docs/TASK-016_UI.md` on the TASK-016 branch.
### TASK-017: Replace EMOM tables with one weight and one total-reps input
@@ -276,3 +276,77 @@ Reconciled with `docs/SPEC.md` and `docs/WORKOUT_ROUTINE.md`. TASK-001 through T
- TASK-017 completion evidence (2026-11-07): Captain explicitly stated “task complete. commit all and merge to codex”, accepting EMOM totals and shared per-side inputs. Final automated verification: 143 tests across 13 files, lint, build, context validation and whitespace checks pass. No independent agent browser visual pass is claimed. Captain authorized committing all pending task changes and local codex integration; no push/deployment. Work was done on a dedicated task branch in the original worktree, not a separate implementation worktree; this workflow deviation is recorded, not retroactively corrected. Testtask execution belongs to Captain.
### TASK-018: Narrow numeric workout inputs
- Status: Complete — Captain explicitly accepted TASK-018 on 2026-11-08; implementation engaged on 2026-11-08; dedicated branch `task/018-compact-inputs`, worktree `/tmp/exercise-tracker-task-018`, base `922d1f6`.
- Requested: 2026-11-08.
- Objective: Reduce the excessive width of numeric fields; Captain expects values of at most three digits in normal use.
- Scope: Compact widths for regular performance measurements and equipment loads, EMOM weight/total reps, hang attempts/goal and earlier-record numeric editors. Adjust their grid columns where necessary so inputs no longer stretch across the card; retain aligned headings, readable labels and the existing visual language.
- Acceptance criteria: Three-digit values remain readable with native input controls, padding and focus indicators. Existing supported decimal weights remain usable. Inputs are visibly compact at desktop and mobile widths, including 320px; labels, units, historical side text and errors wrap without horizontal overflow. Preserve accessible names, keyboard use and control height. Existing validation, zero/blank semantics, Save, suggestions, date isolation and historical data behavior remain unchanged. Three digits guide visual sizing; this task does not add a 999 limit or truncate existing data.
- Relevant areas: `src/styles.css`, `src/PerformanceEditor.jsx`, `src/EmomTotalEditor.jsx`, `src/StrengthEntryEditor.jsx`, `src/HangGoalEditor.jsx` and existing tests if markup must change.
- Proposed approach: Use a shared compact numeric width with bounded grid columns; keep labels free to wrap and retain existing responsive stacking. Prefer CSS-only changes. Inspect three-digit values and supported decimal loads with browser number controls before settling the width.
- Required validation: Existing tests, lint, build, context validation and `git diff --check`; inspect task diff against confirmed codex base. Desktop and 320px manual checks for regular/mixed-equipment rows, EMOM, hangs and expanded earlier records; keyboard/focus and zero/blank/decimal entry checks. Captain runs `PATH=/home/rob/.nvm/versions/node/v24.21.0/bin:$PATH scripts/testtask.sh 018`; Captain visual acceptance is required before Complete. No tests that merely duplicate CSS rules.
- Dependencies: TASK-017 is integrated in clean local `codex` at `922d1f6`. ADR-016/019 preserve load and storage semantics, ADR-020 preserves two-field EMOM, ADR-021 preserves shared side entry. TASK-016 dark theme remains separate. Prepare the dedicated numbered branch under WORKFLOW only when implementation is engaged and authorized; no Git operations are authorized by this briefing.
- Non-goals: Dark theme, card redesign, smaller touch heights, new numeric limits, changed validation/storage, programme changes or unrelated refactoring.
- Recommended implementation skills: Webapp Feature → Frontend Visual QA; Roborto Project Context governs task/handoff. No application implementation or browser/testtask launch during lock-on.
- TASK-018 agent validation (2026-11-08): 143 tests across 13 files, lint, production build, context validation (0 warnings) and `git diff --check` pass. Final diff reviewed against confirmed codex base `922d1f6`; only scoped CSS and task context changed. CSS-only change uses shared 5.25rem numeric inputs, bounded desktop/EMOM columns and aligned desktop headings; control heights, responsive stacking and data behavior retained. No new numeric limits or CSS-mirroring tests. Desktop/320px, native controls, decimal readability and keyboard/focus checks await Captain testtask acceptance. No testtask/browser launched.
### TASK-019: Hide previous-session action when no applicable data exists
- Status: Implementation-ready / awaiting Captain validation — engaged with TASK-016 on 2026-11-08; `task/019-previous-availability` in `/tmp/exercise-tracker-task-019`.
- Requested: 2026-11-08.
- Objective: Show “Use previous session” only when there is compatible previous-session data that can be applied.
- Scope: Conditional visibility in regular set/hold/hang and EMOM performance editors, including preserved detailed historical editors where the action exists. Resolve availability using the existing previous-performance compatibility rules: same exercise, period and format, compatible saved definition, earlier actual date and completed source rows. Empty, draft-only, incompatible, current-date or future records do not qualify. Preserve aggregate/minute separation and explicit user-triggered application.
- Acceptance criteria: The action is absent when no qualifying source exists, including a fresh database; visible when qualifying data exists. Keep it absent while availability is unknown or lookup fails; surface lookup failure with a retry path. Re-evaluate on date, period, exercise or saved-definition/format changes without stale results or button flashes. Checking availability writes nothing and never applies data automatically. Preserve current-entry protection, zero values, partial drafts, suggestions requiring review/Save, saved data and historical isolation. Existing populated-entry behavior is otherwise unchanged; this task does not broaden when suggestions may overwrite current work.
- Relevant areas: `src/DetailedPerformanceEditor.jsx`, `src/EmomTotalEditor.jsx`, `src/performanceStorage.js` and corresponding UI/storage tests.
- Required validation: Fresh/empty store, compatible completed source, zero-valued source, draft-only and incompatible sources, current/future exclusion, date/period/exercise changes, stale async responses, storage failure/retry, and existing-entry preservation. Run full tests, lint, build, context validation and `git diff --check`; review against confirmed integration base. Captain manual verification of hidden/visible states and keyboard access through testtask 019 is required before Complete. Captain alone runs testtask.
- Dependencies: Existing `previousPerformance` rules and ADR-019/020/021 govern compatibility and history. TASK-018 is Complete but uncommitted in its own worktree. TASK-019 starts from confirmed codex `922d1f6` with accepted TASK-018 CSS copied as a prerequisite. TASK-016 contains a copy of the TASK-019 candidate for the shared Captain test pass.
- Non-goals: Automatically applying suggestions, changing compatibility or history semantics, overwriting current entries, new history screens, layout redesign, storage migrations or unrelated refactoring.
- TASK-018 completion evidence (2026-11-08): Captain explicitly stated “task-018 complete”, satisfying the Captain acceptance gate. Agent checks passed 143 tests, lint, build, context validation and whitespace review. No independent agent browser pass is claimed. Implementation remains uncommitted on `task/018-compact-inputs` in `/tmp/exercise-tracker-task-018`; commit and integration require separate Captain instruction.
#### TASK-016 / TASK-019 group implementation evidence — 2026-11-08
- TASK-019: Shared keyed/cancellable availability lookup gates the action in detailed and aggregate EMOM editors. Unknown/empty/incompatible availability stays hidden; lookup failures have a separate retry path preserving current input. Existing compatibility, explicit application and current-entry protection remain unchanged. Added real IndexedDB UI cases and async race/retry tests; existing suggestion tests now wait for availability.
- TASK-016: Single dark document theme before first paint, semantic surface/text/accent/border/status tokens and coordinated Bootstrap/native controls. No theme switch or OS preference dependency. Existing layout and accepted compact-input dimensions retained. Brief and measured palette ratios: `docs/TASK-016_UI.md` in the task worktree.
- Validation: Full suite passes 155 tests across 15 files in both candidates; after the final parent-context race guard, the focused suite passes 13 tests across 2 files (including one additional regression). Final lint/build, context validation (0 warnings), whitespace checks and diff review against codex `922d1f6` pass. Overlay review separates TASK-018 CSS and identical TASK-019 files from TASK-016 changes. No storage/schema/dependency changes.
- Remaining acceptance: Captain desktop/320px, keyboard/focus, all sections/both periods, native number controls, initial/reload theme and suggestion hidden/visible/failure states. Palette text pairs exceed 4.5:1 and essential border/focus pairs exceed 3:1 by sRGB calculation; no browser visual/console/network pass is claimed. Captain alone runs testtask. Both tasks remain awaiting acceptance, not Complete. No commits/merges/push/deployment.
### TASK-020: Run testtask from project home
- Status: Implementation-ready / awaiting Captain validation — repaired on 2026-11-11 in persistent `.task-worktrees/task-020`, branch `task/020-testtask-repair`, base `922d1f6`. Reviewed tooling is installed uncommitted in project home. The former `/tmp` implementation is missing.
- Objective: Run `scripts/testtask.sh TASK_ID` from project home and select the corresponding checked-out task implementation, including uncommitted task files.
- Scope: Project-local wrapper source routing using Git worktree/branch metadata; preserve the standalone runner, snapshot integrity/secrets rules, browser isolation and Captain ownership. Report the selected source and refuse missing/ambiguous task worktrees rather than silently testing codex. Install the reviewed wrapper/helper in project home for immediate use, retaining the authoritative task worktree copy.
- Acceptance: Home-folder invocation for TASK-016 selects its combined candidate; other active numbered task branches route independently. Paths with spaces work. Invalid IDs, unknown tasks and ambiguous candidates fail clearly. No branch switches, commits or merges. No runner/browser launched during agent checks.
- Validation: Routing integration tests in temporary fixture repositories with a stub runner, shell syntax, Python checks, context validation and whitespace/diff review. Captain performs the real testtask/browser launch.
- Non-goals: Global CLI changes, launching/stopping test sessions, changing app storage or browser-profile persistence, application UI changes.
- TASK-020 evidence (2026-11-08): Five fixture-repository routing tests pass with a stub runner, covering home invocation, independent task IDs, dirty/untracked source preservation, paths with spaces, invalid/missing/ambiguous selection and no branch switch. Shell syntax passes; live read-only source resolution selects `/tmp/exercise-tracker-task-016` for 016. Existing snapshot/runner/hooks remain unchanged. No actual testtask/browser launched. Original and task context validation and whitespace checks pass. Captain's real launch is pending.
#### TASK-020 repair — 2026-11-11
- Captain requested fixing testtask to work like PitchInvader. Reproduced source-resolution failure for 016: registered `/tmp` implementation directories for 016/018/019/020 no longer exist. All task branch refs point at `922d1f6`; Git unreachable objects contain only old specification/routine documents, not the missing application candidate. No recoverable 016 candidate was found in the available repository evidence. Previous implementation/acceptance records remain historical evidence, not proof of a currently available candidate.
- Scope: Retain the standalone runner, isolated browser/profile and hash-verified snapshot adapter; select supported Node automatically through installed nvm like PitchInvader, provide read-only `--check`, report missing source loss clearly, and allow a live replacement source despite an old missing registration. Never silently test codex for a missing task. Use persistent implementation sources under `.task-worktrees/`, distinct from `.test-worktrees/` snapshots.
- Source: `.task-worktrees/task-020`, branch `task/020-testtask-repair`; existing project-home tooling/context edits preserved and incorporated. Wrapper/helper/hook/tests copied to project home for immediate use under the existing TASK-020 installation scope. No application changes or integration performed.
- Validation: 10 fixture routing/runtime tests pass with a stub runner, covering missing candidates, stale registrations, automatic Node selection, unavailable Node and no-launch preflight as well as original routing behavior. Real local `--check 020`, syntax, context and whitespace checks are recorded in the handoff. Captain alone launches a real runner/browser.
- Blocker: TASK-016/018/019 uncommitted application sources are missing. Restoring a saved candidate or separately authorized rebuilding is required before testing those tasks. Do not reconstruct baseline branches and call them recovered implementations.
#### TASK-016 reconstruction — 2026-11-11
- Trigger: Captain reported the 016 source-missing error after launcher repair. Rebuilt accepted TASK-016 in persistent `.task-worktrees/task-016` on `task/016-dark-theme-rebuild` from codex `922d1f6`; no recovery of lost uncommitted files is claimed.
- Single dark document/Bootstrap/native-control palette, semantic tokens and coordinated states; no theme picker, OS dependency or storage/programme changes. Accepted TASK-018 compact numeric requirements are reimplemented as a prerequisite. TASK-019 is not included in this candidate.
- TASK-020 launch tooling is copied as a prerequisite; tests/lint exclude nested `.task-worktrees` at home and in candidates. Home source preflight for 016 now passes. Actual runner and browser remain Captain-owned.
- UI brief and measured token contrast: `docs/TASK-016_UI.md` in the new candidate. Fresh full-suite result and final checks are in HANDOFF. Desktop/320px/native-control/focus/initial-reload/manual verification remains required before Complete.
- TASK-016 reconstruction final evidence: 143/143 tests across 13 files pass with `npm test -- --maxWorkers=1` (default parallel run had two timing failures); final lint/build, 10 stub-runner tooling tests, home `--check 016`, context validation (0 warnings) and whitespace review pass. Diff reviewed against `922d1f6`; app changes are CSS and document theme metadata only. No real runner/browser/snapshot was started. Implementation-ready pending Captain visual acceptance.
- TASK-016 completion (2026-11-11): Captain explicitly stated “task -016 complete commit and merge”, satisfying the Captain acceptance gate and authorizing commit/local codex integration of the tested reconstruction, including accepted compact-input requirements and the testtask tooling prerequisite. Agent evidence: 143/143 tests with one worker, lint/build, 10 routing tests, palette measurements, context/whitespace and diff review. Default-parallel timing failures remain disclosed; no independent agent browser pass is claimed. TASK-019 remains missing and is not included. TASK-020 retains its separate status/worktree; its launch tooling prerequisite is included in TASK-016 integration. No push/deployment or worktree/session cleanup authorized.
+11
View File
@@ -51,3 +51,14 @@ Before asking Captain for manual testing, identify an exact testable representat
## Captain-owned testtask execution
Captain clarified on 2026-11-07 that `testtask` is for Captain to run. Agents must not automatically invoke/restart the runner, open its browser windows or stop Captain testing sessions. Provide the command and handoff after automated checks; run or control testtask only on explicit instruction. This overrides skill defaults to execute the manual-test runner.
## Project-home testtask entry point
Run the project wrapper from project home: `PATH=/home/rob/.nvm/versions/node/v24.21.0/bin:$PATH scripts/testtask.sh TASK_ID`. It selects the checked-out `task/###-*` worktree using Git metadata, prints the source and invokes the existing engine there. It refuses missing or ambiguous task sources. The global CLI remains unchanged. Snapshot location is the selected source worktree's `.test-worktrees/task-###`; snapshot integrity and Captain-owned execution rules still apply.
## Persistent sources and runtime preflight (2026-11-11 repair)
Implementation worktrees belong under project-home `.task-worktrees/task-###` going forward; do not keep uncommitted implementation only in `/tmp`. This is separate from disposable `.test-worktrees` snapshots. Existing missing `/tmp` registrations are retained as evidence; do not prune them or claim their baseline branch contains lost uncommitted work.
Use `scripts/testtask.sh ###` from project home. The wrapper/hook select a supported Node automatically, using installed nvm Node 24 if necessary, as PitchInvader does. `scripts/testtask.sh --check ###` performs source/runtime/dependency validation without invoking the runner or browser; it does not prove port/display/browser readiness. Missing implementations require restoration or rebuilding and never fall back to codex. Captain still owns real launch and testing.
+1 -1
View File
@@ -3,7 +3,7 @@ import globals from 'globals'
import react from 'eslint-plugin-react'
export default [
{ ignores: ['dist/**', 'node_modules/**', '.test-worktrees/**'] },
{ ignores: ['dist/**', 'node_modules/**', '.test-worktrees/**', '.task-worktrees/**'] },
js.configs.recommended,
{
files: ['**/*.{js,jsx}'],
+3 -2
View File
@@ -1,9 +1,10 @@
<!doctype html>
<html lang="en">
<html lang="en" data-bs-theme="dark" style="background: #101914; color-scheme: dark;">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#f4f1ea" />
<meta name="theme-color" content="#101914" />
<meta name="color-scheme" content="dark" />
<title>Workout Tracker</title>
</head>
<body>
+147
View File
@@ -0,0 +1,147 @@
"""Exercise routing with a stub runner; never start a testtask session."""
import os
from pathlib import Path
import shutil
import subprocess
import tempfile
import unittest
SCRIPTS = Path(__file__).resolve().parent
class HomeRoutingTests(unittest.TestCase):
def setUp(self):
self.temp = tempfile.TemporaryDirectory(prefix='testtask-routing-')
self.addCleanup(self.temp.cleanup)
self.root = Path(self.temp.name) / 'project home'
self.root.mkdir()
self.git('init', '-b', 'codex')
(self.root / 'scripts').mkdir()
(self.root / '.roborto').mkdir()
(self.root / '.roborto/testtask.conf').write_text('# fixture only\n')
for name in ['testtask.sh', 'testtask_source.py', 'testtask-node.sh']:
shutil.copy2(SCRIPTS / name, self.root / 'scripts' / name)
self.git('add', '.')
self.git('-c', 'user.name=Routing Test', '-c', 'user.email=routing@example.invalid',
'commit', '-m', 'Fixture baseline')
self.bin = Path(self.temp.name) / 'bin'
self.bin.mkdir()
runner = self.bin / 'roborto-testtask'
runner.write_text('#!/bin/sh\nprintf "STUB_SOURCE=%s\\nSTUB_TASK=%s\\n" "$PWD" "$1"\n')
runner.chmod(0o755)
node = self.bin / 'node'
node.write_text('#!/bin/sh\nexit 0\n')
node.chmod(0o755)
self.env = {**os.environ, 'PATH': f'{self.bin}:/usr/bin:/bin',
'NVM_DIR': str(self.bin / 'no-nvm')}
def git(self, *args):
return subprocess.run(['git', '-C', str(self.root), *args], check=True,
text=True, capture_output=True)
def worktree(self, task, suffix):
path = Path(self.temp.name) / f'task {task} {suffix}'
self.git('worktree', 'add', '-b', f'task/{task}-{suffix}', str(path))
return path
def run_wrapper(self, *args, cwd=None):
return subprocess.run(['bash', str(self.root / 'scripts/testtask.sh'), *args],
cwd=cwd or self.root, env=self.env, text=True, capture_output=True)
def test_home_selects_task_and_preserves_dirty_untracked_source(self):
target = self.worktree('016', 'dark')
dirty = target / 'uncommitted.txt'
dirty.write_text('candidate data\n')
result = self.run_wrapper('016')
self.assertEqual(result.returncode, 0, result.stderr)
self.assertIn(f'STUB_SOURCE={target}', result.stdout)
self.assertIn('STUB_TASK=016', result.stdout)
self.assertEqual(dirty.read_text(), 'candidate data\n')
self.assertEqual(self.git('branch', '--show-current').stdout.strip(), 'codex')
def test_routes_each_number_independently_from_any_directory(self):
self.worktree('016', 'dark')
target = self.worktree('019', 'previous')
result = self.run_wrapper('019', cwd=self.bin)
self.assertEqual(result.returncode, 0, result.stderr)
self.assertIn(f'STUB_SOURCE={target}', result.stdout)
def test_missing_source_never_runs_codex(self):
result = self.run_wrapper('099')
self.assertNotEqual(result.returncode, 0)
self.assertIn('no checked-out', result.stderr)
self.assertNotIn('STUB_SOURCE', result.stdout)
def test_ambiguous_source_fails(self):
self.worktree('016', 'one')
self.worktree('016', 'two')
result = self.run_wrapper('016')
self.assertNotEqual(result.returncode, 0)
self.assertIn('multiple worktrees', result.stderr)
self.assertNotIn('STUB_SOURCE', result.stdout)
def test_missing_worktree_reports_lost_candidate_without_runner(self):
target = self.worktree('016', 'lost')
shutil.rmtree(target)
result = self.run_wrapper('016')
self.assertNotEqual(result.returncode, 0)
self.assertIn('implementation is missing', result.stderr)
self.assertIn('uncommitted files', result.stderr)
self.assertNotIn('STUB_SOURCE', result.stdout)
def test_live_candidate_is_used_when_old_registration_is_missing(self):
missing = self.worktree('016', 'lost')
shutil.rmtree(missing)
target = self.worktree('016', 'restored')
result = self.run_wrapper('016')
self.assertEqual(result.returncode, 0, result.stderr)
self.assertIn(f'STUB_SOURCE={target}', result.stdout)
def test_node_is_selected_from_nvm_when_absent_from_path(self):
self.worktree('016', 'dark')
(self.bin / 'node').unlink()
nvm_dir = self.bin / 'no-nvm'
nvm_dir.mkdir()
node_bin = nvm_dir / 'bin'
node_bin.mkdir()
node = node_bin / 'node'
node.write_text('#!/bin/sh\nexit 0\n')
node.chmod(0o755)
(nvm_dir / 'nvm.sh').write_text(
'nvm() { export PATH="$NVM_DIR/bin:$PATH"; }\n')
result = self.run_wrapper('016')
self.assertEqual(result.returncode, 0, result.stderr)
self.assertIn('STUB_TASK=016', result.stdout)
def test_missing_node_fails_before_runner(self):
self.worktree('016', 'dark')
(self.bin / 'node').unlink()
result = self.run_wrapper('016')
self.assertNotEqual(result.returncode, 0)
self.assertIn('Node >=20.19 is required', result.stderr)
self.assertNotIn('STUB_SOURCE', result.stdout)
def test_check_validates_without_invoking_runner(self):
target = self.worktree('016', 'dark')
hook = target / '.roborto/testtask-hook'
hook.write_text('#!/bin/sh\n[ "$1" = validate ] || exit 99\n')
hook.chmod(0o755)
(target / '.roborto/testtask.conf').write_text(
'ROBORTO_HOOK="$ROBORTO_PROJECT_ROOT/.roborto/testtask-hook"\n'
'ROBORTO_WORKTREE="$ROBORTO_PROJECT_ROOT/.test-worktrees/task-$ROBORTO_TASK_ID"\n')
result = self.run_wrapper('--check', '016')
self.assertEqual(result.returncode, 0, result.stderr)
self.assertIn('preflight passed', result.stdout)
self.assertNotIn('STUB_SOURCE', result.stdout)
def test_invalid_arguments_fail_without_runner(self):
for args in [(), ('16',), ('../016',), ('016', '019')]:
with self.subTest(args=args):
result = self.run_wrapper(*args)
self.assertEqual(result.returncode, 2)
self.assertIn('Usage:', result.stderr)
self.assertNotIn('STUB_SOURCE', result.stdout)
if __name__ == '__main__':
unittest.main()
+18
View File
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
# Sourced by the wrapper and hook; select Node without changing the caller's shell.
testtask_node_ready() {
command -v node >/dev/null 2>&1 &&
node -e 'const [a,b]=process.versions.node.split(".").map(Number); process.exit(a>20 || (a===20 && b>=19) ? 0 : 1)' >/dev/null 2>&1
}
if ! testtask_node_ready; then
TESTTASK_NVM_SCRIPT="${NVM_DIR:-$HOME/.nvm}/nvm.sh"
if [[ -f "$TESTTASK_NVM_SCRIPT" ]]; then
source "$TESTTASK_NVM_SCRIPT"
nvm use 24 >/dev/null 2>&1 || true
fi
fi
if ! testtask_node_ready; then
echo 'testtask: Node >=20.19 is required; install Node 24 through nvm or put a supported Node on PATH.' >&2
return 1
fi
unset TESTTASK_NVM_SCRIPT
+27 -1
View File
@@ -1,7 +1,33 @@
#!/usr/bin/env bash
set -Eeuo pipefail
CHECK_ONLY=0
if [[ "${1:-}" == --check ]]; then
CHECK_ONLY=1
shift
fi
if [[ $# -ne 1 || ! "$1" =~ ^[0-9]{3}$ ]]; then
echo 'Usage: scripts/testtask.sh [--check] TASK_ID (three digits)' >&2
exit 2
fi
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
command -v python3 >/dev/null 2>&1 || {
echo 'testtask: Python 3 is required for source routing and snapshot verification.' >&2
exit 127
}
TASK_SOURCE="$(python3 "$SCRIPT_DIR/testtask_source.py" "$SCRIPT_DIR/.." "$1")"
printf 'testtask: TASK-%s source: %s\n' "$1" "$TASK_SOURCE"
source "$SCRIPT_DIR/testtask-node.sh"
if ! command -v roborto-testtask >/dev/null 2>&1; then
echo 'testtask: standalone roborto-testtask CLI is missing; install/configure it before running.' >&2
exit 127
fi
exec roborto-testtask "$@"
cd -- "$TASK_SOURCE"
if (( CHECK_ONLY )); then
export ROBORTO_PROJECT_ROOT="$TASK_SOURCE" ROBORTO_TASK_ID="$1"
source .roborto/testtask.conf
export ROBORTO_WORKTREE
"$ROBORTO_HOOK" validate
printf 'testtask: preflight passed (%s); no runner or browser started.\n' "$(node --version)"
exit 0
fi
exec roborto-testtask "$1"
+51
View File
@@ -0,0 +1,51 @@
"""Resolve a numbered task to its checked-out implementation, never a snapshot."""
import re
import subprocess
import sys
from pathlib import Path
def task_source(repository, task):
if not re.fullmatch(r'[0-9]{3}', task):
raise ValueError('task ID must contain exactly three digits')
listing = subprocess.check_output(
['git', '-C', str(repository), 'worktree', 'list', '--porcelain', '-z'],
).decode()
prefix = f'refs/heads/task/{task}'
candidates = []
missing = []
for entry in listing.split('\0\0'):
fields = dict(field.split(' ', 1) for field in entry.split('\0') if ' ' in field)
branch = fields.get('branch', '')
if branch == prefix or branch.startswith(prefix + '-'):
path = Path(fields['worktree'])
if 'prunable' in fields or not path.is_dir():
missing.append(path)
else:
candidates.append(path)
if not candidates and missing:
paths = ', '.join(map(str, missing))
raise ValueError(
f'TASK-{task} implementation is missing: {paths}. '
'Restore the source from a saved copy or rebuild the candidate in a persistent '
'worktree; its branch alone does not recover uncommitted files. '
'Refusing to test the integration baseline instead.'
)
if not candidates:
raise ValueError(f'no checked-out task/{task} branch; prepare its implementation worktree first')
if len(candidates) != 1:
raise ValueError(f'multiple worktrees match TASK-{task}; reconcile the duplicate task branches first')
source = candidates[0]
if not source.is_dir() or not (source / '.roborto/testtask.conf').is_file():
raise ValueError(f'task source is missing or has no testtask configuration: {source}')
return source
if __name__ == '__main__':
try:
if len(sys.argv) != 3:
raise ValueError('expected repository path and task ID')
print(task_source(Path(sys.argv[1]), sys.argv[2]))
except (ValueError, subprocess.CalledProcessError) as error:
print(f'testtask: {error}', file=sys.stderr)
sys.exit(2)
+154 -68
View File
@@ -1,87 +1,120 @@
/* TASK-016: one document theme, independent of OS preference. */
:root, [data-bs-theme="dark"] {
--surface-page: #101914;
--surface-panel: #18251e;
--surface-card: #1d2d24;
--surface-input: #111c16;
--surface-selected: #294332;
--surface-hover: #304b39;
--surface-success: #253e2a;
--surface-warning: #40351b;
--text-primary: #e8f1e9;
--text-secondary: #b5c8b9;
--text-error: #ffb4a9;
--text-warning: #f5d68d;
--accent: #b9df88;
--on-accent: #173020;
--border-subtle: #3d5446;
--border-control: #708a78;
--focus: #d3ed8c;
--numeric-width: 5.25rem;
--bs-body-bg: var(--surface-page);
--bs-body-color: var(--text-primary);
--bs-secondary-color: var(--text-secondary);
--bs-emphasis-color: var(--text-primary);
--bs-secondary-bg: var(--surface-panel);
--bs-tertiary-bg: var(--surface-card);
--bs-border-color: var(--border-control);
--bs-link-color: var(--accent);
--bs-link-hover-color: var(--focus);
--bs-focus-ring-color: var(--focus);
}
:root {
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
color: #202923;
background: #f4f1ea;
color: var(--text-primary);
color-scheme: dark;
background: var(--surface-page);
}
body { min-width: 320px; margin: 0; }
body { min-width: 320px; margin: 0; background: var(--surface-page); color: var(--text-primary); }
button { font: inherit; }
.app-shell { min-height: 100vh; background: #f4f1ea; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 10; padding: .6rem 1rem; background: #fff; color: #173d32; }
.app-shell { min-height: 100vh; background: var(--surface-page); }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 30; padding: .6rem 1rem; background: var(--surface-panel); color: var(--accent); }
.skip-link:focus { top: .5rem; }
.site-header { position: sticky; top: 0; z-index: 20; min-height: 92px; background: #173d32; color: #fff; }
.site-header { position: sticky; top: 0; z-index: 20; min-height: 92px; background: var(--surface-selected); color: var(--text-primary); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand, .brand:hover, .brand:focus { display: inline-flex; align-items: center; gap: .75rem; color: #fff; font-size: 1.1rem; font-weight: 700; letter-spacing: -.02em; text-decoration: none; }
.brand-mark { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; background: #d6ec77; color: #173d32; font-weight: 800; }
.header-note { color: #d0e3db; font-size: .875rem; }
.brand, .brand:hover, .brand:focus { display: inline-flex; align-items: center; gap: .75rem; color: var(--text-primary); font-size: 1.1rem; font-weight: 700; letter-spacing: -.02em; text-decoration: none; }
.brand-mark { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-weight: 800; }
.header-note { color: var(--text-secondary); font-size: .875rem; }
.header-trailing { display: flex; align-items: center; gap: 1.5rem; }
.wall-clock { display: flex; flex-direction: column; align-items: flex-end; color: #e1eae4; font-size: .8rem; white-space: nowrap; }
.wall-clock time { color: #fff; font-size: clamp(1.65rem, 2.4vw, 2.2rem); font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: .02em; line-height: 1.15; }
.wall-clock { display: flex; flex-direction: column; align-items: flex-end; color: var(--text-secondary); font-size: .8rem; white-space: nowrap; }
.wall-clock time { color: var(--text-primary); font-size: clamp(1.65rem, 2.4vw, 2.2rem); font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: .02em; line-height: 1.15; }
.page-content { padding-top: clamp(1.5rem, 3vw, 2.5rem); padding-bottom: 3rem; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; }
.eyebrow, .panel-kicker { color: #476656; font-size: .73rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow, .panel-kicker { color: var(--text-secondary); font-size: .73rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1 { margin: .25rem 0 .55rem; font-size: clamp(2.2rem, 4vw, 3.25rem); line-height: 1.08; letter-spacing: -.045em; }
.intro { margin: 0; color: #5b685f; font-size: 1.03rem; }
.local-badge { flex: 0 0 auto; margin-bottom: .25rem; padding: .45rem .75rem; border: 1px solid #bbccc0; border-radius: 999px; color: #315847; font-size: .8rem; font-weight: 600; }
.section-nav { display: flex; flex-wrap: wrap; gap: .2rem; margin: 1.7rem 0 1.25rem; padding-bottom: .55rem; border-bottom: 1px solid #d4dcd4; }
.section-link.btn { min-height: 44px; padding: .55rem 1rem; border-radius: 8px; color: #445e50; font-weight: 650; text-decoration: none; }
.section-link.btn:hover { background: #e6ebe2; color: #173d32; }
.section-link.btn[aria-current="page"] { background: #173d32; color: #fff; }
.section-link.btn:focus-visible, .brand:focus-visible, .period-switch .btn:focus-visible, .week-controls .btn:focus-visible, .day-button.btn:focus-visible, .strength-entry button:focus-visible, .strength-entry input:focus-visible { outline: 3px solid #9fc45c; outline-offset: 3px; }
.content-panel { display: flex; align-items: flex-start; gap: 1.5rem; min-height: 280px; padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid #e0e5dd; border-radius: 20px; background: #fff; box-shadow: 0 14px 36px rgba(22, 54, 43, .045); }
.panel-icon { display: grid; flex: 0 0 56px; width: 56px; height: 56px; place-items: center; border-radius: 16px; background: #e8efd9; color: #315847; font-size: 2rem; line-height: 1; }
.intro { margin: 0; color: var(--text-secondary); font-size: 1.03rem; }
.local-badge { flex: 0 0 auto; margin-bottom: .25rem; padding: .45rem .75rem; border: 1px solid var(--border-control); border-radius: 999px; color: var(--accent); font-size: .8rem; font-weight: 600; }
.section-nav { display: flex; flex-wrap: wrap; gap: .2rem; margin: 1.7rem 0 1.25rem; padding-bottom: .55rem; border-bottom: 1px solid var(--border-subtle); }
.section-link.btn { min-height: 44px; padding: .55rem 1rem; border-radius: 8px; color: var(--text-secondary); font-weight: 650; text-decoration: none; }
.section-link.btn:hover { background: var(--surface-hover); color: var(--text-primary); }
.section-link.btn[aria-current="page"] { background: var(--surface-selected); color: var(--text-primary); }
.section-link.btn:focus-visible, .brand:focus-visible, .period-switch .btn:focus-visible, .week-controls .btn:focus-visible, .day-button.btn:focus-visible, .strength-entry button:focus-visible, .strength-entry input:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.content-panel { display: flex; align-items: flex-start; gap: 1.5rem; min-height: 280px; padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid var(--border-subtle); border-radius: 20px; background: var(--surface-panel); box-shadow: 0 14px 36px rgba(22, 54, 43, .045); }
.panel-icon { display: grid; flex: 0 0 56px; width: 56px; height: 56px; place-items: center; border-radius: 16px; background: var(--surface-selected); color: var(--accent); font-size: 2rem; line-height: 1; }
.content-panel h2 { margin: .4rem 0 .7rem; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.03em; }
.content-panel p:last-child { max-width: 48ch; color: #5b685f; line-height: 1.6; }
.shell-note { margin: 1rem 0; color: #627067; font-size: .875rem; }
.content-panel p:last-child { max-width: 48ch; color: var(--text-secondary); line-height: 1.6; }
.shell-note { margin: 1rem 0; color: var(--text-secondary); font-size: .875rem; }
.routine-view { max-width: 1100px; }
.period-switch { display: inline-flex; padding: 4px; border: 1px solid #c8d4c9; border-radius: 12px; background: #e9ede6; }
.period-switch .btn { min-width: 118px; min-height: 44px; border-radius: 8px; color: #365548; font-weight: 700; text-decoration: none; }
.period-switch .btn[aria-pressed="true"] { background: #173d32; color: #fff; }
.period-switch .btn:hover:not([aria-pressed="true"]) { background: #dce5da; }
.period-switch { display: inline-flex; padding: 4px; border: 1px solid var(--border-control); border-radius: 12px; background: var(--surface-panel); }
.period-switch .btn { min-width: 118px; min-height: 44px; border-radius: 8px; color: var(--text-secondary); font-weight: 700; text-decoration: none; }
.period-switch .btn[aria-pressed="true"] { background: var(--surface-selected); color: var(--text-primary); }
.period-switch .btn:hover:not([aria-pressed="true"]) { background: var(--surface-hover); }
.week-controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem; margin: 1.25rem 0 .55rem; }
.week-controls .btn { min-height: 44px; padding: .35rem .5rem; color: #315847; font-weight: 700; text-decoration: none; }
.week-controls .btn { min-height: 44px; padding: .35rem .5rem; color: var(--accent); font-weight: 700; text-decoration: none; }
.week-controls .btn:first-child { justify-self: start; }
.week-controls .btn:last-child { justify-self: end; }
.week-range { color: #52665a; font-size: .9rem; font-weight: 650; text-align: center; }
.week-range { color: var(--text-secondary); font-size: .9rem; font-weight: 650; text-align: center; }
.day-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; margin-bottom: 1.25rem; }
.day-button.btn { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 68px; padding: .4rem .2rem; border: 1px solid #d6dfd4; border-radius: 12px; background: #fff; color: #3d5e4d; text-decoration: none; }
.day-button.btn { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 68px; padding: .4rem .2rem; border: 1px solid var(--border-control); border-radius: 12px; background: var(--surface-panel); color: var(--text-secondary); text-decoration: none; }
.day-button span { font-size: .78rem; font-weight: 650; }
.day-button strong { font-size: 1.15rem; }
.day-button.btn:hover { border-color: #819e86; background: #ecf1e8; }
.day-button.btn[aria-pressed="true"] { border-color: #173d32; background: #173d32; color: #fff; }
.routine-panel { padding: clamp(1.15rem, 2.8vw, 2rem); border: 1px solid #e0e5dd; border-radius: 18px; background: #fff; box-shadow: 0 10px 30px rgba(22, 54, 43, .04); }
.day-button.btn:hover { border-color: var(--accent); background: var(--surface-hover); }
.day-button.btn[aria-pressed="true"] { border-color: var(--accent); background: var(--surface-selected); color: var(--text-primary); }
.routine-panel { padding: clamp(1.15rem, 2.8vw, 2rem); border: 1px solid var(--border-subtle); border-radius: 18px; background: var(--surface-panel); box-shadow: 0 10px 30px rgba(22, 54, 43, .04); }
.routine-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.routine-heading .panel-kicker { margin: 0 0 .35rem; }
.routine-heading h2 { margin: 0; font-size: clamp(1.5rem, 2.8vw, 2rem); letter-spacing: -.03em; }
.session-count { flex: 0 0 auto; padding: .35rem .65rem; border-radius: 999px; background: #eaf0e3; color: #315847; font-size: .8rem; font-weight: 700; }
.session-guidance { margin: .8rem 0 0; color: #53675a; line-height: 1.5; }
.session-count { flex: 0 0 auto; padding: .35rem .65rem; border-radius: 999px; background: var(--surface-selected); color: var(--accent); font-size: .8rem; font-weight: 700; }
.session-guidance { margin: .8rem 0 0; color: var(--text-secondary); line-height: 1.5; }
.exercise-list { display: grid; gap: .65rem; margin: 1.2rem 0 0; padding: 0; list-style: none; }
.exercise-card { display: flex; align-items: flex-start; gap: .9rem; padding: .9rem 1rem; border: 1px solid #e2e8e0; border-radius: 12px; background: #fbfcf9; }
.exercise-number { display: grid; flex: 0 0 30px; height: 30px; place-items: center; border-radius: 50%; background: #e8efd9; color: #315847; font-size: .8rem; font-weight: 800; }
.exercise-card { display: flex; align-items: flex-start; gap: .9rem; padding: .9rem 1rem; border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--surface-card); }
.exercise-number { display: grid; flex: 0 0 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--surface-selected); color: var(--accent); font-size: .8rem; font-weight: 800; }
.exercise-copy { min-width: 0; flex: 1; }
.exercise-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.exercise-title-row h3 { margin: 0; font-size: 1.05rem; line-height: 1.35; }
.optional-tag { padding: .12rem .4rem; border-radius: 999px; background: #f4eecf; color: #66521e; font-size: .72rem; font-weight: 700; }
.prescription { margin: .3rem 0 0; color: #315847; font-weight: 700; }
.exercise-meta { margin: .25rem 0 0; color: #5f6c62; font-size: .86rem; line-height: 1.4; }
.strength-entry { display: grid; justify-items: start; gap: .55rem; margin-top: .8rem; padding-top: .8rem; border-top: 1px solid #e2e8e0; }
.strength-entry > strong { color: #315847; font-size: .88rem; }
.optional-tag { padding: .12rem .4rem; border-radius: 999px; background: var(--surface-warning); color: var(--text-warning); font-size: .72rem; font-weight: 700; }
.prescription { margin: .3rem 0 0; color: var(--accent); font-weight: 700; }
.exercise-meta { margin: .25rem 0 0; color: var(--text-secondary); font-size: .86rem; line-height: 1.4; }
.strength-entry { display: grid; justify-items: start; gap: .55rem; margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--border-subtle); }
.strength-entry > strong { color: var(--accent); font-size: .88rem; }
.strength-fields, .strength-set { display: flex; flex-wrap: wrap; align-items: end; gap: .55rem; }
.strength-set > span { align-self: center; min-width: 3rem; color: #52665a; font-size: .84rem; font-weight: 700; }
.strength-entry label { display: grid; gap: .2rem; color: #52665a; font-size: .8rem; font-weight: 650; }
.strength-entry input { width: 7rem; min-height: 38px; padding: .3rem .45rem; border: 1px solid #b6c7b8; border-radius: 6px; color: #254838; }
.strength-set > span { align-self: center; min-width: 3rem; color: var(--text-secondary); font-size: .84rem; font-weight: 700; }
.strength-entry label { display: grid; gap: .2rem; color: var(--text-secondary); font-size: .8rem; font-weight: 650; }
.strength-entry input { width: var(--numeric-width); max-width: 100%; min-height: 38px; padding: .3rem .45rem; border: 1px solid var(--border-control); border-radius: 6px; color: var(--text-primary); }
.strength-entry button { min-height: 38px; }
.strength-actions { display: flex; align-items: center; gap: .7rem; }
.strength-actions span { color: #315847; font-size: .84rem; font-weight: 700; }
.strength-entry small { color: #657468; }
.strength-error { margin: 0; color: #9b3126; font-size: .84rem; }
.strength-actions span { color: var(--accent); font-size: .84rem; font-weight: 700; }
.strength-entry small { color: var(--text-secondary); }
.strength-error { margin: 0; color: var(--text-error); font-size: .84rem; }
.hang-goal-editor { margin-top: .65rem; }
.hang-goal-editor form { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.hang-goal-editor label { color: #53675a; font-size: .82rem; font-weight: 650; }
.hang-goal-editor input { width: 5.5rem; min-height: 38px; padding: .3rem .45rem; border: 1px solid #b6c7b8; border-radius: 6px; color: #254838; }
.hang-goal-editor label { color: var(--text-secondary); font-size: .82rem; font-weight: 650; }
.hang-goal-editor input { width: var(--numeric-width); max-width: 100%; min-height: 38px; padding: .3rem .45rem; border: 1px solid var(--border-control); border-radius: 6px; color: var(--text-primary); }
.hang-goal-editor .btn { min-height: 38px; }
.hang-goal-editor p { margin: .35rem 0 0; font-size: .82rem; }
.hang-goal-editor .goal-error { color: #9b3126; }
.hang-goal-editor .goal-error { color: var(--text-error); }
@media (max-width: 575px) {
.site-header { min-height: 80px; }
@@ -108,29 +141,29 @@ h1 { margin: .25rem 0 .55rem; font-size: clamp(2.2rem, 4vw, 3.25rem); line-heigh
}
/* TASK-015: scoped logging layout; existing visual language retained. */
.performance-entry { margin-top: .8rem; padding-top: .65rem; border-top: 1px solid #e2e8e0; }
.performance-entry { margin-top: .8rem; padding-top: .65rem; border-top: 1px solid var(--border-subtle); }
.performance-toolbar, .performance-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.performance-toolbar { margin-bottom: .5rem; }
.performance-toolbar strong { color: #315847; font-size: .88rem; }
.performance-toolbar strong { color: var(--accent); font-size: .88rem; }
.performance-rows { display: grid; gap: .45rem; }
.performance-row, .performance-head { display: grid; grid-template-columns: 4.8rem repeat(var(--fields), minmax(0, 1fr)); align-items: end; gap: .5rem; }
.performance-head { color: #52665a; font-size: .76rem; font-weight: 650; margin-bottom: .25rem; }
.performance-row { padding: .45rem; border: 1px solid #e2e8e0; border-radius: 8px; }
.performance-row.is-complete { border-color: #6c946c; background: #f0f5ec; }
.performance-row label { min-width: 0; font-size: .8rem; color: #52665a; }
.performance-row input[type=number] { width: 100%; min-width: 0; min-height: 40px; padding: .3rem .4rem; border: 1px solid #b6c7b8; border-radius: 6px; color: #254838; }
.performance-row, .performance-head { display: grid; grid-template-columns: 4.8rem repeat(var(--fields), minmax(0, var(--numeric-width))); align-items: end; gap: .5rem; }
.performance-head { padding-inline: .45rem; border-inline: 1px solid transparent; color: var(--text-secondary); font-size: .76rem; font-weight: 650; margin-bottom: .25rem; }
.performance-row { padding: .45rem; border: 1px solid var(--border-subtle); border-radius: 8px; }
.performance-row.is-complete { border-color: var(--border-control); background: var(--surface-success); }
.performance-row label { min-width: 0; font-size: .8rem; color: var(--text-secondary); }
.performance-row input[type=number] { width: var(--numeric-width); max-width: 100%; min-width: 0; min-height: 40px; padding: .3rem .4rem; border: 1px solid var(--border-control); border-radius: 6px; color: var(--text-primary); }
.performance-row .field-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.row-number { align-self: center; font-size: .8rem; color: #52665a; }
.row-number { align-self: center; font-size: .8rem; color: var(--text-secondary); }
.performance-row .remove-row { grid-column: 1 / -1; justify-self: end; padding-block: .15rem; }
.performance-actions { margin-top: .6rem; }
.performance-status, .performance-summary { margin: .4rem 0 0; color: #52665a; font-size: .82rem; }
.performance-status, .performance-summary { margin: .4rem 0 0; color: var(--text-secondary); font-size: .82rem; }
.exercise-details, .legacy-entry { margin-top: .6rem; font-size: .85rem; overflow-wrap: anywhere; }
.exercise-details p, .legacy-entry p { margin: .5rem 0; }
.exercise-details summary, .legacy-entry summary { cursor: pointer; color: #315847; padding-block: .4rem; }
.performance-entry button:focus-visible, .performance-entry input:focus-visible, .exercise-details summary:focus-visible, .legacy-entry summary:focus-visible { outline: 3px solid #9fc45c; outline-offset: 2px; }
.exercise-details summary, .legacy-entry summary { cursor: pointer; color: var(--accent); padding-block: .4rem; }
.performance-entry button:focus-visible, .performance-entry input:focus-visible, .exercise-details summary:focus-visible, .legacy-entry summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 991px) {
.performance-head { display: none; }
.performance-row { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.performance-row { grid-template-columns: repeat(2, minmax(0, var(--numeric-width))); align-items: end; }
.performance-row .field-label { position: static; width: auto; height: auto; clip-path: none; display: block; }
.row-number { grid-column: 1 / -1; }
}
@@ -142,9 +175,62 @@ h1 { margin: .25rem 0 .55rem; font-size: clamp(2.2rem, 4vw, 3.25rem); line-heigh
.performance-actions { align-items: stretch; }
}
.emom-total-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.emom-total-fields label { min-width: 0; font-size: .8rem; color: #52665a; }
.emom-total-fields input { display: block; width: 100%; min-width: 0; min-height: 40px; padding: .3rem .4rem; border: 1px solid #b6c7b8; border-radius: 6px; color: #254838; }
.emom-total-fields { display: grid; grid-template-columns: repeat(2, minmax(0, var(--numeric-width))); gap: .6rem; }
.emom-total-fields label { min-width: 0; font-size: .8rem; color: var(--text-secondary); }
.emom-total-fields input { display: block; width: var(--numeric-width); max-width: 100%; min-width: 0; min-height: 40px; padding: .3rem .4rem; border: 1px solid var(--border-control); border-radius: 6px; color: var(--text-primary); }
@media (max-width: 360px) { .emom-total-fields { grid-template-columns: minmax(0, 1fr); } }
.recorded-sides { grid-column: 1 / -1; margin: .2rem 0; font-size: .8rem; color: #52665a; }
.recorded-sides { grid-column: 1 / -1; margin: .2rem 0; font-size: .8rem; color: var(--text-secondary); }
/* Native controls and Bootstrap actions share the document palette. */
.strength-entry input, .hang-goal-editor input,
.performance-row input[type=number], .emom-total-fields input {
background: var(--surface-input);
color-scheme: dark;
}
.btn-primary {
--bs-btn-color: var(--on-accent);
--bs-btn-bg: var(--accent);
--bs-btn-border-color: var(--accent);
--bs-btn-hover-color: var(--on-accent);
--bs-btn-hover-bg: var(--focus);
--bs-btn-hover-border-color: var(--focus);
--bs-btn-active-color: var(--on-accent);
--bs-btn-active-bg: var(--focus);
--bs-btn-active-border-color: var(--focus);
}
.btn-outline-secondary, .btn-outline-success {
--bs-btn-color: var(--accent);
--bs-btn-border-color: var(--border-control);
--bs-btn-hover-color: var(--text-primary);
--bs-btn-hover-bg: var(--surface-hover);
--bs-btn-hover-border-color: var(--accent);
--bs-btn-active-color: var(--text-primary);
--bs-btn-active-bg: var(--surface-selected);
--bs-btn-active-border-color: var(--accent);
}
.btn-link {
--bs-btn-color: var(--accent);
--bs-btn-hover-color: var(--focus);
--bs-btn-active-color: var(--focus);
}
.btn:disabled, .strength-entry input:disabled, .hang-goal-editor input:disabled,
.performance-row input[type=number]:disabled, .emom-total-fields input:disabled {
opacity: 1;
color: var(--text-secondary);
background: var(--surface-panel);
border-color: var(--border-control);
cursor: not-allowed;
}
:where(a, button, input, summary):focus-visible {
outline: 3px solid var(--focus);
outline-offset: 3px;
box-shadow: none;
}
.section-link.btn[aria-current="page"],
.period-switch .btn[aria-pressed="true"],
.day-button.btn[aria-pressed="true"] {
box-shadow: inset 0 -3px 0 var(--accent);
}
.strength-actions, .strength-fields, .strength-set { flex-wrap: wrap; }
.performance-head span, .performance-row label, .emom-total-fields label { overflow-wrap: anywhere; }
+1 -1
View File
@@ -6,6 +6,6 @@ export default defineConfig({
plugins: [react()],
test: {
environment: 'jsdom',
exclude: [...configDefaults.exclude, '.test-worktrees/**'],
exclude: [...configDefaults.exclude, '.test-worktrees/**', '.task-worktrees/**'],
},
})