Skip to content

Import Godsey trails into Payload - #126

Merged
kwiens merged 1 commit into
mainfrom
codex/godsey-dashboard-copy
Sep 20, 2026
Merged

kwiens merged 1 commit into
mainfrom
codex/godsey-dashboard-copy

Conversation

@kwiens

@kwiens kwiens commented Sep 19, 2026

Copy link
Copy Markdown
Owner

🤖

Summary

  • store the six permitted Godsey Ridge lines in a data-only supplemental GeoJSON
  • mark both public Chattanooga GeoJSON datasets as deprecated transition artifacts staged for removal, with an explicit removal gate
  • merge supplemental features generically into Chattanooga's static import data
  • add a committed Payload data migration that backfills geometry, measurements, bounds, and elevation profiles into the six existing production rows and their latest versions
  • preserve curator-owned geometry if either the live row or latest Payload version is already edited
  • keep the Chattanooga seed as the repeatable full import for new or rebuilt databases during the transition
  • fail measurement generation before terrain work or file writes unless all 224 curated trails have source geometry
  • remove the legacy raw-name metadata table and its city/map plumbing
  • render every Chattanooga trail through the same database-backed layer
  • suppress the superseded Mapbox Studio layer until it is deleted from the shared style

Static-data deprecation

Payload is authoritative. public/data/chattanooga/trails.geojson and trails-supplemental.geojson remain only to bootstrap fresh databases and provide the existing runtime outage/unseeded fallback. Their embedded metadata, adjacent README, generator, seed, runtime config, and repository guidance all mark them staged-for-removal.

Remove both files, their converter plumbing, and geojsonFallbackUrl together after a database-native bootstrap exists and the map has an explicit database-outage experience. The immutable Payload migration remains as migration history.

Provenance

The supplemental coordinates came from the six existing checked-in elevation profiles, which were originally sampled from the legacy Godsey Ridge Trails Mapbox layer. No external data was fetched. Trail names and source paths now live in data; neither the converter nor the runtime map contains a Godsey-specific name mapping.

The migration carries an immutable snapshot of the six geometries, profiles, and measurements. Its rollback only removes data when the live row and latest version still match that snapshot, so later curator edits survive and the two Payload representations cannot diverge.

Verification

  • pnpm test:run — 60 files, 639 tests passed
  • pnpm check
  • pnpm build
  • uv run --with-requirements scripts/requirements.txt python -m unittest discover -s scripts -p 'test_*.py' — 22 tests passed
  • isolated Postgres migration test: down restored geometry-less live/version records; up synchronized geometry and profiles into both records
  • isolated Payload draft-read test: a latest draft returned the migrated line, profile, and measurements
  • isolated preservation tests: simulated edited live geometry and edited latest-draft geometry both survived up and down unchanged
  • production read-only check: exactly six target rows exist; every live row and latest version is imported, published, and currently missing geometry
  • production migration status: this migration is pending; both prior migrations have run

The lockfile normalizes transitive packages to existing project constraints so pnpm dedupe:check remains clean: postcss-selector-parser uses the declared 6.1.3 override, and transitive Node typings reuse the direct Node 24 types required by .nvmrc.

Rollout

  1. Merge the PR.
  2. The production Vercel build runs pnpm db:migrate and applies the backfill before the new deployment goes live.
  3. Wait for the production deployment to become Ready.
  4. Verify the dashboard reports 0 Chattanooga trails without database geometry or elevation, then spot-check the six Godsey trails on the public map.

No manual seed command is required for this rollout.

@vercel

vercel Bot commented Sep 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
bikemap Ready Ready Preview Sep 20, 2026 12:57pm UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 19, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-19T21:51:21.371278Z 08f39e8 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 08f39e8caa

ℹ️ 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".

Comment thread src/data/mapbox-style.ts Outdated
@kwiens
kwiens force-pushed the codex/godsey-dashboard-copy branch from 0a4a57d to 3fdc04d Compare September 20, 2026 12:56
@kwiens
kwiens merged commit cb8e984 into main Sep 20, 2026
5 checks passed

This branch was successfully deployed

1 active deployment
Preview 3fdc04d5 Deployed Sep 20, 2026 by vercel[bot]
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