Store and manage trail elevation profiles in Payload - #128
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6eb51197ff
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…rofiles # Conflicts: # scripts/seed/chattanooga.ts # src/data/cities/chattanooga/trails-data.test.ts
…rofiles # Conflicts: # scripts/seed/bend.ts
🤖
Summary
Code and documentation
Examples
An existing trail's Measurements tab now presents rider-facing values such as:
The sidebar uses the same stored summaries:
A trail with CMS geometry shows Recalculate elevation and samples Terrain-RGB. A style-owned trail such as Godsey Ridge Expert Spur shows an enabled Repopulate elevation action instead. Its bundled profile changes the stale 0.00 mi summary to 0.03 mi and stores all eight chart samples in Payload.
Recalculation is a narrow authenticated request:
The Godsey fallback path returns the same response shape with:
The action is disabled while the form is saving or has unsaved edits. Terrain and bundled-profile failures leave existing measurements untouched.
Production rollout
The read-only production audit before this change found:
After deployment, run:
No database migration is required. The six style-owned Godsey Ridge trails receive their checked-in profiles during the seed; an editor can also repopulate any one of them directly from its Measurements tab.
Verification
The unrelated local change in src/utils/map.test.ts is intentionally excluded from this PR.