Repository navigation
Map: latest Next.js and dependencies, working controls, green CI, Cloudflare Pages deploy - #25
Merged
Merged
Conversation
…eploy - Upgrade map to Next.js 16.4, React 19.3, deck.gl 9.4, Tailwind 4.3, ESLint 10, TypeScript 6 and latest of everything else; shadcn CLI moves to devDependencies. maplibre-gl stays on latest 5.x because deck.gl 9.4 does not support maplibre-gl 6 yet. - Fix the lint errors that were failing Map CI (impure Date.now in render, explicit any) and clear all warnings. - Wire up the toolbar help button, export hex cells and station polygons in the GeoJSON export, use one source-type palette everywhere, keep the 'updated' timer ticking, honor NEXT_PUBLIC_MAP_STYLE_URL, close popups on Escape, and format signal levels. - Load Geist from the geist package instead of Google Fonts at build time. - Add a static export build and a Cloudflare Pages deploy workflow. - Add Dependabot config for map, service, actions and Docker. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PS44Q7WRmAzMJLhi44dzdo
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 40 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fe21be5. Configure here.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PS44Q7WRmAzMJLhi44dzdo
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.



Requested by Kevin · project thread
Summary
The map was already on Next.js (16.2.1), so this brings it up to date rather than migrating it, makes the dead controls work, gets Map CI green, and adds a Cloudflare Pages deploy.
service/is untouched here and is being handled in a separate PR.Dependencies
Three things are deliberately not on the newest major:
MapboxOverlayreadsmap.transform, which MapLibre 6 removed.npm auditflags a critical advisory on maplibre-gl <= 6.4.0 (XSS sanitizer bypass inDOM.sanitize). The map setsattributionControl={false}and only loads CARTO styles, so I do not believe that path is reachable here, but I have not proven it. Dependabot will keep proposing 6.x so it can be taken once deck.gl supports it.< 6.1.shadcn(a CLI, only needed for its CSS at build time) moved todevDependencies. Its new version no longer pulls in hono, express-rate-limit, qs or js-yaml.Dependabot PRs superseded
All eight open
/mapPRs are covered by the regenerated lockfile and can be closed once this merges: #2, #8, #9, #12, #13, #14, #20, #23. The targets are either met (next 16.4.6, fast-uri 3.1.9, protocol-buffers-schema 3.6.1, ip-address 10.7.6) or the package is no longer in the tree (hono, @hono/node-server, express-rate-limit, qs, js-yaml). The/serviceones (#1, #19, #21, #22) belong to the service PR.A new
.github/dependabot.ymlgroups future updates (map, service, GitHub Actions, Docker) so they arrive as a few weekly PRs instead of one per transitive package.CI
Map CI was failing in the lint job with 4 errors (
Date.now()called during render inStatsBar, threeanys inCoverageMap). Those are fixed and the 5 warnings are gone too. The workflow now also runstsc, builds both outputs, and triggers on changes to the workflow file itself.Local results on this branch:
Not verified locally: the Docker build and Node 24 (the sandbox has Node 22 and no Docker). CI on this PR covers both.
Controls that now work
?toolbar button was an empty handler. It now opens the shortcuts dialog (which also closes on backdrop click and Escape).sourceColor) shared by the legend, markers, lists and popups.NEXT_PUBLIC_MAP_STYLE_URLwas documented but ignored. It now sets the default basemap.geistpackage instead of Google Fonts, so builds need no network and the font variables actually apply.Cloudflare Pages
The app is entirely client-rendered, so it deploys as a static export (
npm run build:staticwritesmap/out) withwrangler pages deploy. No adapter or Worker is needed.npm run buildstill produces the standalone server for the Docker image..github/workflows/deploy-map.ymldeploys production on push tomainand a preview on pull requests. It needs:CLOUDFLARE_API_TOKEN(Account > Cloudflare Pages > Edit)CLOUDFLARE_ACCOUNT_IDCLOUDFLARE_PAGES_PROJECT(defaults toairframes-coverage; the Pages project must exist)Until the secrets exist the deploy step is skipped with a warning, so this PR's checks do not fail on it. The deploy itself is therefore untested.
Screenshots
Taken from the static export of this branch in headless Chromium. The sandbox cannot reach
coverage-api.airframes.ioor the CARTO basemap, so the API responses are generated sample data and the basemap is a plain Natural Earth outline. Station names and numbers are not real.Hex grid

Help dialog from the

?buttonPolygons

Station search, fly-to and detail

Marine filter

3D pitch with the Light style

Fullscreen

The same run downloaded both exports and checked their contents: hex mode gave 11,627 cell polygons plus 36 station points, polygon mode gave 36 coverage polygons plus 36 station points. No console or page errors.
Follow-ups not in this PR
NEXT_PUBLIC_WS_URLis still unused; the map polls every 10 seconds and the service has no WebSocket endpoint.src/components/ui/*(shadcn components) are not used by any screen.Generated by Claude Code
Note
Medium Risk
Touches production deploy paths, Node 24, and major frontend dependency bumps; Cloudflare deploy is new and untested without repository secrets.
Overview
Upgrades the map stack (Next 16.4.6, React 19.3.1, deck.gl 9.4.1, Node 24 in CI/Docker) and adds Dependabot grouping for
map/,service/, Actions, and Docker.CI & deploy: Map CI now lints, typechecks, builds standalone (Docker) and static export, and verifies
out/index.html. A newdeploy-map.ymlworkflow publishes the static build to Cloudflare Pages (production onmain, previews on same-repo PRs), skipping deploy when Cloudflare secrets are missing.Build model:
next.config.tsswitches betweenstandaloneandexportviaNEXT_OUTPUT=export(npm run build:static); images are unoptimized for static hosting.public/_headerssets cache/security headers for Pages.Map UX & quality: Fixes previously broken or partial controls—
?help is wired through the UI store; GeoJSON export usesbuildCoverageGeoJSONfor hex/polygon mode plus stations;sourceColor/sourceLabelunify legends, markers, and popups; “updated Ns ago” ticks every second;NEXT_PUBLIC_MAP_STYLE_URLdrives the default basemap; Geist loads from thegeistpackage (no Google Fonts). Lint/type issues inCoverageMapandStatsBarare addressed.Reviewed by Cursor Bugbot for commit 6752045. Bugbot is set up for automated code reviews on this repo. Configure here.