Trail editor: GPX without <name> keeps the .gpx extension in the fallback name, so a descriptive filename is replaced #70

Closed
opened 2026-11-05 19:19:00 +00:00 by maximus · 1 comment
Member

Found in the live acceptance test of deploy-676a7c62 (2026-11-05), user claude_test (#49 basic info, placeholder names).

Problem: a GPX file whose filename is a real name but which has no <name> inside gets its name replaced by the route-based "A – B".

Why: gpx2trail(gpxData, selectedFile.name) uses the full filename with the extension as the fallback name, giving "Gorges du Verdon Hiking.gpx". isStructuralPlaceholder() treats every name that matches FILE_EXTENSION as a placeholder, so any filename fallback counts as a placeholder no matter what it says.

Results (same track, Nice):

File <trk><name> Name after upload After auto-fill Expected
Morning_Run.gpx Morning Run Morning Run Carabacel – Fabron replaced ✔
Morning_Run.gpx (none) Morning_Run.gpx Carabacel – Fabron replaced ✔
Gorges du Verdon Hiking.gpx Gorges du Verdon Hiking Gorges du Verdon Hiking Gorges du Verdon Hiking kept ✔
Gorges du Verdon Hiking.gpx (none) Gorges du Verdon Hiking.gpx Carabacel – Fabron kept ✘

Evidence: /root/tools/wanderer-shots/acceptance/out/t4g-upload-verdonNoName.png and /root/tools/wanderer-shots/acceptance/out/t4g-upload-verdonInside.png. Script: /root/tools/wanderer-shots/acceptance/t4_basic_info.mjs (GPX files in /root/tools/wanderer-shots/acceptance/gpx/).

Fix idea: strip the extension from the filename fallback, so the trail is named "Gorges du Verdon Hiking". Then judge the base name with the same rules: Morning_Run is still a Strava default once _ is normalised, and Activity_123 / Track 001 are still placeholders. Low priority.

🤖 Generated with Claude Code

Found in the live acceptance test of `deploy-676a7c62` (2026-11-05), user `claude_test` (#49 basic info, placeholder names). **Problem:** a GPX file whose **filename** is a real name but which has no `<name>` inside gets its name replaced by the route-based "A – B". **Why:** `gpx2trail(gpxData, selectedFile.name)` uses the full filename **with the extension** as the fallback name, giving "Gorges du Verdon Hiking.gpx". `isStructuralPlaceholder()` treats every name that matches `FILE_EXTENSION` as a placeholder, so any filename fallback counts as a placeholder no matter what it says. **Results (same track, Nice):** | File | `<trk><name>` | Name after upload | After auto-fill | Expected | |---|---|---|---|---| | `Morning_Run.gpx` | Morning Run | Morning Run | Carabacel – Fabron | replaced ✔ | | `Morning_Run.gpx` | (none) | Morning_Run.gpx | Carabacel – Fabron | replaced ✔ | | `Gorges du Verdon Hiking.gpx` | Gorges du Verdon Hiking | Gorges du Verdon Hiking | Gorges du Verdon Hiking | kept ✔ | | `Gorges du Verdon Hiking.gpx` | (none) | Gorges du Verdon Hiking.gpx | **Carabacel – Fabron** | kept ✘ | **Evidence:** `/root/tools/wanderer-shots/acceptance/out/t4g-upload-verdonNoName.png` and `/root/tools/wanderer-shots/acceptance/out/t4g-upload-verdonInside.png`. Script: `/root/tools/wanderer-shots/acceptance/t4_basic_info.mjs` (GPX files in `/root/tools/wanderer-shots/acceptance/gpx/`). **Fix idea:** strip the extension from the filename fallback, so the trail is named "Gorges du Verdon Hiking". Then judge the base name with the same rules: `Morning_Run` is still a Strava default once `_` is normalised, and `Activity_123` / `Track 001` are still placeholders. Low priority. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
Member

Fixed in batch PR #72 (deploy 5577c715), live since 2026-11-05 ~22:10 CET in wanderer-web:deploy-5577c715 (homelab-flux #857). Verified with the live e2e suite and acceptance re-runs as claude_test.

🤖 Generated with Claude Code

Fixed in batch PR #72 (`deploy` 5577c715), live since 2026-11-05 ~22:10 CET in `wanderer-web:deploy-5577c715` (homelab-flux #857). Verified with the live e2e suite and acceptance re-runs as `claude_test`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
public/wanderer#70
No description provided.