Skip to content

feat: target scale, unified level display and evaluation switch (UX-07) - #211

Merged
bri-b-dev merged 1 commit into
mainfrom
b/target-scale
Oct 10, 2026
Merged

bri-b-dev merged 1 commit into
mainfrom
b/target-scale

Conversation

@bri-b-dev

Copy link
Copy Markdown
Owner

Summary

  • Target scale (TargetScale.vue, tab "Ziele"): a bar with ★ / ★★ / ★★★ markers at their thresholds, the best result (▲) and the last result. For "smaller is better" drills the scale is mirrored so better is always to the right. One line states the next threshold and the distance ("Nächste Stufe ★★ ab 7: dein Bestwert 6, noch +1."), below it all thresholds for the chosen handicap. A Mein HCP | Ziel-HCP switch shows what the goal needs (goal = ★★ at the target HCP, "Ziel erreicht" / "noch +4"). The full table stays under "Alle HCP-Bereiche" (open when no handicap is known). The picture is aria-hidden; the same information is text
  • One level display: LevelStars (stars + number + color per level, accessible name "Level 2 von 3") replaces the ad-hoc chips in the drill card, drill head, history and completion sheet; LevelBadge (was unused) now shows the latest session's level. The drill card shows difficulty as dots (●●●○○) so a star always means level
  • Evaluation mode in the stats is a labeled Aktuell | Historisch switch with a plain-words explanation (default stays "Aktuell")
  • Geometry/next-step logic in src/hcp/scale.ts (pure, tested)

Acceptance

  • Next threshold readable in one line - covered by the TargetScale tests (both directions, target mode, reached, no result)
  • Switching the mode changes the statistic for a session played at another handicap - tests/views/stats-mode.test.ts (Putting 33 % in "Aktuell" vs. 100 % in "Historisch")

Numbers

Start chunk 145.2 KB, tests 284 -> 310, lint 0 errors.

Test plan

  • npm test, npm run lint, npm run typecheck, npm run build (local)
  • CI
  • Manual: Ziele tab for a "greater" and a "smaller" drill, with and without results, with a target HCP (switch); marker labels on a narrow phone (they can get close for tight thresholds - the text line carries the numbers); level chip colors in light and dark; Stats -> Aktuell/Historisch

🤖 Generated with Claude Code

- TargetScale: scale with level markers, best and last result, mirrored for "smaller is better";
  one line with the next threshold and distance; Mein HCP | Ziel-HCP switch; full table collapsed below
- LevelStars is the single level display (stars + number + color) used by drill card, drill head,
  history and the completion sheet; LevelBadge now shows the latest session's level
- drill card shows difficulty as dots so stars only mean level
- evaluation mode as a labeled Aktuell | Historisch switch with an explanation
- scale model in src/hcp/scale.ts; tests (310)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@bri-b-dev
bri-b-dev merged commit f2751fb into main Oct 10, 2026
1 check passed
@bri-b-dev
bri-b-dev deleted the b/target-scale branch October 10, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant