Portal requirements (POR-*)
@enode/portal — the browser-first coach/admin console (responsive, no native
shell). Shared behavior (auth flow, i18n, units, error engine) lives in
shared.md. See the overview for the ID scheme and
status legend. Test cases:
portal-system-tests.md.
Areas: AUTH · DASH (dashboard) · PLAN (planner) · DEVICES · USERS ·
EXER (exercises) · WKT (workout templates) · TAGS · INS (insights) ·
PROF (profiles/performance) · HIST (history) · MIGR (migration) ·
EXP (export) · NOTIF (notifications) · RBAC (privilege gating).
Template/description sharing spans WKT, EXER and PLAN — the model behind
those rows is in sharing.md.
Auth & entry (POR-AUTH)
| ID | Requirement | Status | Tests |
|---|---|---|---|
| POR-AUTH-01 | Pro users sign in via the shared flow (SHR-AUTH-01); registration is Pro-only. A One user is blocked by the backend (314, missing canAccessPortal) with a message directing them to the One app — same policy as the Pro app (product decision 2026-07-28; previously One logins were allowed for migration). | stable | POR-ST-1.1..1.3, AUTH-LOG-11 |
| POR-AUTH-02 | Device-limit (310), onboarding (311), and invitation (312) responses are handled with their dedicated dialogs/redirects (SHR-AUTH-06..08). | stable | POR-ST-1.6..1.8 |
Dashboard (POR-DASH)
| ID | Requirement | Status | Tests |
|---|---|---|---|
| POR-DASH-01 | The dashboard shows time-range-scoped summaries (active athletes, completed sessions, total volume, sets) with trends vs the prior period. | stable | POR-ST-2.1, POR-ST-2.2 |
| POR-DASH-02 | Top-exercise and athlete-activity rankings and a completed-sessions table are shown for the selected range. | stable | POR-ST-2.3, POR-ST-2.4 |
Planner (POR-PLAN)
Covered in depth by the dedicated Planner manual test protocol.
| ID | Requirement | Status | Tests |
|---|---|---|---|
| POR-PLAN-01 | The planner offers month/week/day calendar views of scheduled and recurring workouts. | stable | Planner protocol §1–§5 |
| POR-PLAN-02 | Workouts can be created, edited, deleted, and rescheduled (including drag & drop); recurring schedules are supported. | stable | Planner protocol §6, §8, §9 + POR-ST-3.1 |
| POR-PLAN-03 | Saving a change to a shared workout plan surfaces the shared-definition conflict dialog (HTTP 313) with fork/update/cancel options. The "edit the shared definition" option is offered only when the user owns the definition or holds write privilege on it. | stable | Planner protocol §7 |
| POR-PLAN-04 | Picking a template the user does not own asks once, before anything is applied to the draft, whether the schedule should follow the original (the author's later edits reach it; it disappears if they stop sharing) or make its own copy (independent of later changes). Cancelling re-opens the picker and leaves the draft untouched. | stable | |
| POR-PLAN-09 | A schedule that follows someone else's template renders its exercises read-only, says so above them naming the author, and offers Copy to edit — taking your own copy is the only way to change the plan, and it is also what stops the schedule following the original. The appointment itself (date, time, recurrence, athletes, the schedule's own name and tags) stays editable while following. | stable | |
| POR-PLAN-08 | The follow control is always a single line; its consequences ("whose later changes reach this appointment", "what your own copy keeps") open from an info icon that starts collapsed every time. | stable | |
| POR-PLAN-06 | Because a followed plan cannot be edited in place, the save-time conflict it used to produce cannot arise from this surface. The HTTP 313 dialog remains the backstop for what the client cannot see (a definition shared with other schedules), and without write privilege it offers only "save as a private copy". | stable | |
| POR-PLAN-07 | The schedule drawer's template picker and the Workouts page's Explore drawer are ONE component (TemplateBrowser), differing only in whether the viewer's own templates are included and in what a row does. Both offer a self-hiding single-select Yours / Internal / Public strip, one collapsible section per author, the shared ranked search, and a preview: the card body selects in one tap, a chevron opens the read-only detail. The picker offers no way to author a template — the schedule form's own "Add exercise" is the lighter path. | stable | |
| POR-PLAN-05 | A calendar chip for a workout planned from someone else's template carries its provenance glyph, and states it in the chip's accessible name. | stable | |
| POR-PLAN-10 | A coach can filter the calendar by athletes and athlete tags from the header's Filter button. The filter shows as a chip bar under the header, led by a "N of M workouts" count for the range in view. + Athletes and + Tags open the same anchored popover (athletes with profile pictures, tags with their colours) and offer only the athletes on the loaded schedules and the athlete tags those schedules follow or those athletes carry. A workout stays when a chosen athlete, or a current member of a chosen tag, takes part (union), or when it follows a chosen tag. Closing the bar clears the filter; the filter is never remembered across visits. Athletes don't see the control. | stable | Planner protocol §12 |
Devices (POR-DEVICES)
| ID | Requirement | Status | Tests |
|---|---|---|---|
| POR-DEVICES-01 | Connected device sessions (stations) can be listed, searched, and removed. | stable | POR-ST-4.1, POR-ST-4.2, POR-ST-4.3, POR-ST-4.4, POR-ST-4.5, POR-ST-4.6 |
Users & roster (POR-USERS)
| ID | Requirement | Status | Tests |
|---|---|---|---|
| POR-USERS-01 | Users are listed in a searchable table filterable by role (admin/coach/athlete). | stable | POR-ST-5.1 |
| POR-USERS-06 | The signed-in user appears in the roster only when they are trainable — whatever their role, owner included — badged "You" and excluded from bulk selection. Any other owner stays hidden. | stable | POR-ST-5.8 |
| POR-USERS-02 | A user can be created and edited in the user details drawer (for a training subject: "Edit" in the athlete drawer), including athlete metadata; height/weight respect the metric/imperial setting. Editing someone else needs the tier privilege (writeUserAthlete / writeUserTrainer / writeUserAdmin); editing your own row needs writeSelf, whatever your role — which is how an owner, who is no tier, edits themselves. Archive and delete stay tier-only, so neither is offered on your own row. | stable | POR-ST-5.2, POR-ST-5.6, POR-ST-5.8 |
| POR-USERS-03 | Bulk operations: add tags to multiple users; delete multiple users (with confirmation). | stable | POR-ST-5.3, POR-ST-5.4 |
| POR-USERS-04 | A roster CSV can be uploaded through the wizard: dropzone → parse → column auto-mapping → validation → review → asynchronous creation with live progress. Privilege: featureUserBatchUpload. | stable | POR-ST-5.5 |
| POR-USERS-05 | Per-user actions include data export and viewing upcoming workouts. | stable | POR-ST-5.7 |
Exercises (POR-EXER)
| ID | Requirement | Status | Tests |
|---|---|---|---|
| POR-EXER-01 | The exercise catalogue is searchable by name/tag and filterable by equipment and muscle category; exercises can be favourited. | stable | POR-ST-6.1, POR-ST-6.2 |
| POR-EXER-02 | The exercise detail drawer shows catalogue data and lets the user override name/details with custom values. | stable | POR-ST-6.3 |
| POR-EXER-03 | The detail drawer's Naming card publishes the user's own name for a movement at one of three access levels, and updates it afterwards. Publishing requires a name of the user's own; the card states what each level does before it is picked. | stable | |
| POR-EXER-04 | Other people's published namings for the same movement are listed as selectable cards with their reach and author. Selecting one and confirming stages that name and description into the drawer's own fields — it is a rename of the user's exercise, creating no link to the other user's naming; their own values and history are untouched until they save. | stable |
Workout templates (POR-WKT)
| ID | Requirement | Status | Tests |
|---|---|---|---|
| POR-WKT-01 | Workout templates are listed as cards with search and tag filtering; templates can be created and edited in a drawer and bulk-deleted. The page is an early build (in-code note: structural first pass). | stable | POR-ST-7.1..7.3 |
| POR-WKT-02 | The table lists the viewer's OWN templates only; what other people share reaches them through the Explore action, which appears only when something usable is actually shared with them. Search matches the template's name, its tags, the names of the exercises it contains, and the muscles and muscle groups it trains — ranked by how much of the session the searched muscle is. | stable | |
| POR-WKT-03 | The template drawer has an Access level card: a three-level picker (Private / Internal / Public) with a live line stating what the chosen level does, including what un-sharing would cost. It replaces the previous create-time hardcode, so a template's reach can be changed after creation. | stable | |
| POR-WKT-04 | A template the user does not own opens read-only — no Save, Delete, Add or Select — showing its name, tags, access level, a Source row with the author's provenance, and its exercises as inert slot cards. | stable | |
| POR-WKT-05 | Save a copy on a read-only template creates the user's own copy, closes the Explore drawer and swaps onto the normal editor for it. The copy is self-contained: any movement it references that the copier does not own is adopted into their catalogue. If the template stopped being shared in the meantime, the user is told so and the list refreshes. | stable | |
| POR-WKT-06 | The table carries a sortable Access column: the level for an own unshared template, "Shared by you" once it goes out, and "Shared by {author}" on a foreign row. It is the surface that answers "what have I actually shared". | stable |
Tags (POR-TAGS)
| ID | Requirement | Status | Tests |
|---|---|---|---|
| POR-TAGS-01 | Tags are listed with access-level filter chips; a tag can be created/edited (color, details) and bulk-deleted; tag relations are shown. | stable | POR-ST-8.1..8.3 |
Insights — custom charts (POR-INS)
| ID | Requirement | Status | Tests |
|---|---|---|---|
| POR-INS-01 | Users with the writeCustomCharts privilege can build custom charts (5 chart types) on a draggable board; charts persist per user. | stable | POR-ST-9.1..9.3 |
| POR-INS-02 | The empty state and walkthrough render synthetic example charts (educational visuals, not real data). The full builder's result card draws the chart's layout (single trend, panels, team matrix, ranking, rows, panels per lift, radar) named from the picks — title, metrics and their level, athletes (tag members included), lifts, period, radar axes and groups — with neutral marks instead of values. | mocked | — (known behaviour; a real-data preview needs a backend call that doesn't exist yet) |
| POR-INS-03 | "New chart" opens coaching questions grouped by moment (before the next session, over the block, compare groups), each saying what the chart helps decide. Questions whose metric the account doesn't offer are hidden. A question starts guided steps (whose sessions → which lifts → check and save; a Profile also asks against whom and on which metrics), which save the same chart the full builder would. The check step shows the same "What you'll get" preview as the full builder. | stable | POR-ST-9.4 |
| POR-INS-04 | The guided steps suggest the lifts the chosen athletes trained in the timeframe (with how many athletes trained each), and the check step says how many of the athletes have sessions on the chosen lifts, with one-tap fixes (a longer timeframe, leaving fixed athletes out). A Ranking warns when fewer than 3 athletes have data. Counts are athletes, not sessions (from /history/scope). | stable | POR-ST-9.5 |
| POR-INS-05 | The full builder stays reachable from every guided step ("Adjust everything", all choices kept) and from the questions ("Build it yourself"); "Always open the full builder" (stored on the device) skips the questions. A Distribution always requires an exercise. | stable | POR-ST-9.6 |
| POR-INS-06 | Wherever athletes are picked one by one for a chart (guided step, full builder, guided check step), a coach with the writeEntityTag privilege can "Tag these athletes…": a new athlete tag is created at once, given to those athletes, and the chart follows the tag instead of the fixed list, so athletes who get the tag later join it. The tag stays even if the chart is discarded. | stable | POR-ST-9.7 |
| POR-INS-07 | Each guided question fixes its shape: many athletes × one lift, one athlete × many lifts ("Is one athlete progressing on every lift?", "Which lift is least consistent?"), or many × a capped few ("Where is something off this week?", correlations). The steps follow it (single athlete picker, single lift, a lift cap, pre-picked lifts). The guided check step and the full builder say how many series the selection makes (tags counted with today's members) and which view the chart opens with. | stable | POR-ST-9.8 |
| POR-INS-08 | A Trend opens in the view that fits the kind of selection (one fixed pick = one, a tag or several = many): the single trend for 1 × 1, panels when one side is many, the team matrix (one cell per athlete × lift, coloured by the change) for many × many. The header switches views for the session. A crowded Correlation colours the athletes with the strongest same-direction link and greys the rest. | stable | POR-ST-9.9 |
| POR-INS-09 | On the Insights board a chart can be changed in place: in the full chart each saved part of the subject (athletes, lifts, period, metric; Profile: groups, metrics, period) is a link that opens only that picker and saves; the view controls are marked as the view and "Reset view" brings back how the chart opens. A tap on a mark or legend row focuses it (⌘ / Ctrl adds up to three to compare); the selection card on the plot, a right-click on a mark, and the legend row's "⋯" offer Spotlight on every chart, Open athlete, Velocity profile, Show sessions and Remove from chart (hand-picked athletes only; tag members are explained). A spotlit athlete is drawn in one colour on every chart (everyone else grey) until cleared; on the board the charts that hold them are ringed and name them, the others fade back with "… isn't in this chart", and the spotlight bar counts "in N of M charts". A Trend zooms into a dragged time range until reset. | stable | POR-ST-9.10 |
| POR-INS-10 | The Insights board shows tabs All (every saved chart) and one per chart type. Every chart is a tile that leads with its answer in words, names who it is about (those athletes in colour, the rest grey), shows who · what · when in one line, draws its plot at one height for every type (big selections folded, e.g. a long ranking as top 3 · ⋯ · bottom 2) and ends with a one-line key. A chart that couldn't be built says so and offers Try again. "Expand" opens the full chart with every control over the board, beside the sidebar and under the portal's page header ("← Insights"), at the content column's full width and with its own address (Back closes it), led by the same answer, with the tab's other charts to step through. There the answer follows the controls (lift, load, value, period, grouping), shows its caveat, says which rows it highlights (✕ draws all alike) and draws what it rests on (the Ranking's "well below" line, the Profile's "about the same" band). Answers that the data can't support stay neutral ("Not enough sessions for a trend yet"). | wip | — (new; the Ranking's "well below the team" threshold is a placeholder) |
| POR-INS-11 | The full builder is an accordion stepper: one step open at a time (chart type, metric(s), athletes, exercises, timeframe, name & note; a Profile has metrics, profile group and reference group instead), every other step folded into a summary. A new chart opens on its first missing step and single choices move on by themselves; a saved chart opens folded with its type locked. Save with something missing opens that step and says why. Exercises show as not needed for athlete-level metrics. A Profile needs athletes in both groups. | wip | — (new) |
| POR-INS-12 | A chart reads and links in place. In the full chart: a Trend shows a crosshair at the hovered date and the side panel lists every row's value there; a time navigator under the plot (drag, arrow keys, presets 4 · 8 · 12 weeks · All) sets the zoom; a Ranking's tooltip gives each bar's gap to the team median and a long ranking scrolls a long ranking to a picked or found athlete; a Trend matrix cell shows its trend in a popover; a Correlation lights the hovered athlete in every lift, says a fit line's link in words and shows one lift alone; a Profile lights one metric in its bars, radar and table. On a tile: one-line tooltips; a name in the answer lights its rows and opens the chart with them focused. The board offers "Spotlight an athlete…"; the export menu adds Image for slides (PNG), Copy image and Download values (CSV), and a right-click on a plot offers the same images instead of the browser's menu; next to the load picker "Each at their own load" explains Usual load and "Loads mixed" warns on All loads; a ranking of one athlete shows their value, not a lone bar; "?" lists the keys; "+ Compare" in the selection card compares on touch. | wip | POR-ST-9.11 |
| POR-INS-13 | A chart exports as a report: Export as PDF gives A4 pages (Letter in US-style locales) with the kicker, the chart's answer as the headline, the standfirst with real dates, a figure drawn for print, a table in coach words and how-to-read notes; every value states the load it was lifted at, per athlete (or per group for Profile); hidden rows are left out and listed; the enode mark sits behind the figure. Trend prints only views that work without hovering: an overlay with every line named up to 4 lines, else the named lines over a team band (range + median) plus panels for everyone, or the matrix plus panels per lift for many × many. Image for slides gives a 1920 × 1080 PNG (download or copy). Light only. | wip | POR-ST-9.12 |
Profiles — performance matrix (POR-PROF)
| ID | Requirement | Status | Tests |
|---|---|---|---|
| POR-PROF-01 | The Profiles page shows a two-axis athlete × exercise performance matrix with list/grid views (persisted preference), pair detail, and per-athlete trend. | stable | POR-ST-10.1..10.3 |
History & session details (POR-HIST)
| ID | Requirement | Status | Tests |
|---|---|---|---|
| POR-HIST-01 | Completed sessions can be searched with filters and paginated; the default window is the last year. | stable | POR-ST-11.1, POR-ST-11.2 |
| POR-HIST-02 | A session opens in a drawer with a summary tab and technique board. | stable | POR-ST-11.3 |
| POR-HIST-03 | The session summary's zone-distribution and muscle-map cards render from the V2 history-stats DTO; marked WIP in code, zone card limited to conventional-strength exercises. | wip | — (known behaviour) |
| POR-HIST-04 | A dedicated date-range picker is planned for a later milestone (dev-only all-time toggle exists). | wip | — |
| POR-HIST-05 | An Archived filter splits the sessions table into disjoint compartments: by default sessions from archived athletes are hidden; the filter shows only those (SHR-ARCH-03). Like the page's other facets it narrows the loaded page only, so the counts are page-scoped. | stable | POR-ST-17.2 |
Migration (POR-MIGR)
| ID | Requirement | Status | Tests |
|---|---|---|---|
| POR-MIGR-01 | A wizard migrates athletes, groups, and history from the old enode Pro app (the only source it reads: /migrations/enode_pro/…); reachable as a route and as a sidebar drawer. The "Bring in your old data" row in Account › Data & import names the same single source. The Enode One import runs only inside the One app's web view (/migrate). The wizard's "Mock data (dev)" shortcut shows only while useShowDevUi() is true (dev build, "preview production UI" off). Privilege: featureMigration. | stable | POR-ST-12.1, POR-ST-12.2 |
| POR-MIGR-02 | Exercise mapping during migration is chosen manually by the coach (auto-suggestion intentionally stubbed — backend returns no targets by design). | stable | POR-ST-12.3 |
Export (POR-EXP)
| ID | Requirement | Status | Tests |
|---|---|---|---|
| POR-EXP-01 | The export flow produces data exports (including PDF); reachable as a route (deep-linkable via URL params) and as a sidebar drawer. The Everything quick export fills in, for all time, every athlete and exercise definition with a completed session (/history/profile_scope) and every exportable metric, so Export is enabled without picking. The ids are sent one by one because POST /file_export exports nothing for an empty list. Privilege: featureDataExport. | stable | POR-ST-13.1, POR-ST-13.2 |
Notifications (POR-NOTIF)
| ID | Requirement | Status | Tests |
|---|---|---|---|
| POR-NOTIF-01 | Notifications arrive live (stream + arrival peek + bell unread badge) and are listed in an inbox with filter segments, mark-read, delete, and deep-link expansion. | stable | POR-ST-14.1..14.3 |
| POR-NOTIF-02 | Long-running roster uploads report progress live (stream host + peek). | stable | POR-ST-5.5 |
Privileges & roles (POR-RBAC)
| ID | Requirement | Status | Tests |
|---|---|---|---|
| POR-RBAC-01 | Navigation entries and routes are gated by privileges (useHasPrivilege): Users pages, Insights, roster upload, migration, and export are hidden/blocked without the corresponding privilege. | stable | POR-ST-15.1, POR-ST-15.2 |
| POR-RBAC-02 | The role model is owner → administrator ("Facility") → coach → athlete; the owner is an all-access singleton excluded from role filters and from other users' rosters (see POR-USERS-06 for the signed-in user's own row). | stable | POR-ST-15.3 |
Dev-only surfaces
/dashboard/debug, /dashboard/debug/wizard, and /dashboard/debug/benchmark
plus the mock-data harness render only in dev builds (render-time guards; all
mock setters no-op in production). Not release-tested beyond confirming they
are absent in production builds (POR-ST-16.5).