fix(sync): course screen copied the track name, and hid the original - #388
Merged
Conversation
…e original Two problems, one screen. The bug: every generated course name came up pre-filled with the track name the user had just typed on the previous screen. That was my reading of "new courses get the same text box, auto-populated by the name", and it was wrong — a course is not its track, so the screen read as broken. The box now starts holding what would actually be saved if you touched nothing. A sprint course keeps its date stamp, which is a valid final answer there since a sprint venue re-lays its course every event. A circuit course starts EMPTY, because the stamp is not valid for it and pre-filling anything invites clicking straight past the one thing the screen exists to ask. Course names no longer follow the track name at all, so retargetCourseDraft is gone and goToCourses is a plain step change. The layout: the course row now mirrors the track row — the ORIGINAL name first, then the circuit/sprint badge, then the track it belongs to (several tracks can be on this screen at once, so a bare course name is ambiguous), then the walked date decoded to readable text, then the box. It previously showed the track name where the course name should have been, which is why the copied value looked like it belonged there. Verified the new tests bite by restoring the copy behaviour: five fail, including canSave going true when a circuit course is still unnamed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ESkRRtF4vRrANPL6huSgmD
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ESkRRtF4vRrANPL6huSgmD
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
lapwing | cee561c | Commit Preview URL Branch Preview URL |
Aug 06 2026, 01:31 AM |
Coverage SummaryLines: 58.27% (7479/12835) · Statements: 57.41% · Functions: 55.16% · Branches: 55.2% Per-file coverage
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to plan 0016 from your first run through the wizard: the track screen looked right, the course screen didn't.
The bug you hit. Every generated course name came up pre-filled with the track name you'd just typed on the previous screen. That was my reading of "new courses get the same text box, auto-populated by the name", and it was wrong — a course is not its track. I flagged the guess in the original PR rather than asking, which is what let it reach you.
The box now starts holding what would actually be saved if you touched nothing:
Course names no longer follow the track name at all, so
retargetCourseDraftis gone andgoToCoursesis a plain step change.The layout. The course row now mirrors the track row: the original name first, then the circuit/sprint badge, then which track it belongs to, then the walked date decoded to readable text (
Walked 3 Aug 2026, 14:32rather thanN260803_1432), then the box.The track label is there because several tracks can be on that screen at once, so a bare course name is ambiguous between them. It's also why the copied value looked like it belonged — the old row was showing the track name in the slot where the course name should have been.
Related Issues
Follows #387 / #385 / #386 (plan 0016).
Type of Change
Checklist
bun run lintpassesbun run typecheckpassesbun run test:runpasses (2722 tests, 190 files)bun run buildsucceedsCHANGELOG.mdwalkedOn, already in all seven localesNotes for Reviewers
Verified the new tests bite by restoring the copy behaviour: five fail, including
canSavegoing true while a circuit course is still unnamed. That last one matters — under the old rule the inherited track name satisfied validation, so you could save a circuit course named after its track without ever being asked.One consequence worth knowing: naming only the track is no longer enough to reach "Save & import" for a circuit course. That's the intended reading of "circuit courses REQUIRE a name", but it is one more box to fill than before. Sprint is unaffected — its stamp is pre-filled and passes.
Generated by Claude Code