Trail editor: pace panel says "Couldn't reach the pace engine" for users not in TRAIL_ANALYZE_USERS (403) #71

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

Found in the live acceptance test of deploy-676a7c62 (2026-11-05), user claude_test.

Problem: for users who are not in TRAIL_ANALYZE_USERS (live: only one user id), the editor still shows the "My pace (LiDAR + your runs)" panel with an Estimate button. Clicking it gives POST /api/v1/trail-analyze/analyze → 403, and the panel then says "Couldn't reach the pace engine." The engine is reachable; the user just is not allowed to use it. Those users can never see #49's "Use pace estimate" button or the pace curve colouring ("The pace curve appears once your pace is estimated."), so they get no hint why.

Repro:

  1. Log in as claude_test, open /trail/edit/new and draw any route.
  2. In "My pace", click Estimate.
  3. Expected: the panel is hidden, or it says that pace estimation is not enabled for this account. Actual: HTTP 403 and "Couldn't reach the pace engine."

Evidence: /root/tools/wanderer-shots/acceptance/out/t4e-no-use-pace-button.png. Script: /root/tools/wanderer-shots/acceptance/t4_basic_info.mjs (step 4e).

Fix idea: expose "pace engine allowed" to the page (for example in the layout data, from the same allowlist check) and hide the panel when it is false. Alternatively, map 403 to its own message. Low priority. This also means the #49 "Use pace estimate" flow could not be tested live with the test account.

🤖 Generated with Claude Code

Found in the live acceptance test of `deploy-676a7c62` (2026-11-05), user `claude_test`. **Problem:** for users who are not in `TRAIL_ANALYZE_USERS` (live: only one user id), the editor still shows the "My pace (LiDAR + your runs)" panel with an **Estimate** button. Clicking it gives `POST /api/v1/trail-analyze/analyze` → **403**, and the panel then says **"Couldn't reach the pace engine."** The engine is reachable; the user just is not allowed to use it. Those users can never see #49's "Use pace estimate" button or the pace curve colouring ("The pace curve appears once your pace is estimated."), so they get no hint why. **Repro:** 1. Log in as `claude_test`, open `/trail/edit/new` and draw any route. 2. In "My pace", click **Estimate**. 3. **Expected:** the panel is hidden, or it says that pace estimation is not enabled for this account. **Actual:** HTTP 403 and "Couldn't reach the pace engine." **Evidence:** `/root/tools/wanderer-shots/acceptance/out/t4e-no-use-pace-button.png`. Script: `/root/tools/wanderer-shots/acceptance/t4_basic_info.mjs` (step 4e). **Fix idea:** expose "pace engine allowed" to the page (for example in the layout data, from the same allowlist check) and hide the panel when it is false. Alternatively, map 403 to its own message. Low priority. This also means the #49 "Use pace estimate" flow could not be tested live with the test account. 🤖 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#71
No description provided.