Repository navigation
workout editor
github-actions[bot] edited this page Oct 12, 2026
·
2 revisions
-
Route:
/c/:slug/:page-slug(legacy/workout/:cat/:name,/collections/:slug/:name) -
Host Component:
apps/playground/app/pages/WorkoutEditorPage.tsx -
Domain Models:
Collection,Note,Notesource (rawContent + occurrence map; saved states inBlockRevision),Page
-
NoteEditor(apps/playground/src/components/organisms/editor/NoteEditor.tsx). Full CodeMirror instance with inline timer overlays. -
PageActions(apps/playground/app/pages/shared/PageActions.tsx). Action toolbar for workout runs, sharing, and scheduling. -
ResponsiveActions(apps/playground/app/nav/ResponsiveActions.tsx). Distributes controls between top bar and bottom dock. -
EditorDialog(@bitcobblers/wod-wiki-ui). Modal for scheduling workouts to calendar dates.
-
usePlaygroundContent(apps/playground/app/hooks/usePlaygroundContent.ts). Manages local content state and avoids ghost note persistence for bundled collections. -
useScriptBlockCommands(apps/playground/app/hooks/useScriptBlockCommands.ts). Connects CodeMirror block gutter buttons to run and schedule commands. -
useNotePageNav(apps/playground/app/pages/shared/useNotePageNav.ts). Generates navigation anchors from script blocks.
- Sticky Header: Title, collection badge, View/Edit mode toggle, and action buttons ("Play", "Add to Today", "Schedule", "Share").
- Main Canvas: Centered editor runway showing full workout markdown, dialect badges, and time blocks.
- Right Rail (216px right): Table of contents listing workout sections and interval movements.
- Top Navbar: Workout title and category tag. Sticky header hidden.
- Content Column: Responsive editor area with touch-friendly line spacing.
- Thumb Dock FAB: Floating "Play" button triggers workout runner.
- Dock Overflow Sheet: Contains "Add to Today", "Schedule", and "Edit Mode" toggles.
-
Seed Protection vs User Scratch:
- Bundled workouts display in read-only mode by default.
- Tapping Edit or modifying content creates a personal scratch copy without mutating seed assets.
-
Direct Scheduling Flow:
- Scheduling creates an authoritative
Noterow attached to the targetPage.date. - Toast alert provides direct navigation link via
noteByIdPath(journalNote.id).
- Scheduling creates an authoritative