Skip to content

desktop: bump maplibre-gl to 6.4.1 and make the map work with it - #194

Merged
kevinelliott merged 3 commits into
masterfrom
claude/project-thread-kx5j6f
Nov 14, 2026
Merged

kevinelliott merged 3 commits into
masterfrom
claude/project-thread-kx5j6f

Conversation

@kevinelliott

@kevinelliott kevinelliott commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Kevin · project thread

Carries Dependabot's maplibre-gl 5.24.1 → 6.4.1 bump from #192, plus the code changes the desktop app needs for it. Merging this also closes #192, since it contains that commit.

On its own, #192 breaks the desktop app in three ways:

  • No default export. maplibre-gl 6 is ESM-only with named exports, so import maplibregl from "maplibre-gl" fails in both npm run check and npm run build. MapView.svelte now imports the namespace.
  • Typed map events. The error handler's cast to { error?: Error } no longer type-checks. The event is typed now, so the cast is removed.
  • Separate worker module. With only the import fixed, the app builds but the map is blank and logs no error. Version 6 ships its worker as its own file and looks for it next to the library file, which a bundled app doesn't have. The app now bundles the worker through Vite (?worker&url, with worker.format: "es") and passes it to setWorkerUrl.

Verification

  • npm run check: 0 errors, 0 warnings.
  • npm run build: succeeds, and the worker is emitted as its own asset.
  • Loaded the built app in headless Chromium with the simulated-data backend, on master and on this branch. The basemap, aircraft and vessel markers and controls render the same on both.

Not verified: the packaged Tauri app on each OS. The Desktop workflow on this PR builds those.


Generated by Claude Code


Note

Medium Risk
Major map library upgrade affects core map rendering; changes are localized to import/worker/Vite config but regressions are possible in the packaged Tauri build.

Overview
Bumps maplibre-gl from ^5.9.0 to ^6.4.1 (lockfile included) so the desktop app stays on the v6 line.

MapView.svelte adapts to v6’s ESM-only API: namespace import instead of default, setWorkerUrl wired to a Vite-bundled worker (?worker&url), and the map error handler uses the library’s typed event (no manual cast).

vite.config.ts sets worker: { format: "es" } so the maplibre worker module bundles correctly.

Reviewed by Cursor Bugbot for commit 47c05cf. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Bug Fixes
    • Map error handling now safely handles missing error details while preserving the existing offline fallback behavior.
  • Updates
    • Updated the map display integration for the current desktop build setup. The map’s existing display and fallback behavior remain unchanged.

dependabot Bot and others added 3 commits November 14, 2026 07:23
Bumps [maplibre-gl](https://github.com/maplibre/maplibre-gl-js) from 5.24.1 to 6.4.1.
- [Release notes](https://github.com/maplibre/maplibre-gl-js/releases)
- [Changelog](https://github.com/maplibre/maplibre-gl-js/blob/main/CHANGELOG.md)
- [Commits](maplibre/maplibre-gl-js@v5.24.1...v6.4.1)

---
updated-dependencies:
- dependency-name: maplibre-gl
  dependency-version: 6.4.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
maplibre-gl 6 is ESM-only with named exports, types its map events, and
ships its worker as a separate module it expects to find next to its own
file. Import the namespace, drop the now-unneeded error cast, and point
the library at the worker Vite bundles; without that the map came up
blank with no error.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PS44Q9xMXvq6eHJiMxeSUJ
@kevinelliott kevinelliott self-assigned this Nov 14, 2026
@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The desktop app upgrades maplibre-gl to ^6.4.1, configures Vite to use ES module workers, and sets MapLibre’s worker URL to Vite’s bundled worker URL. The map error handler reads the error message with optional chaining; its matching and fallback behavior remain unchanged.

Changes: MapLibre worker setup

Layer / File(s) Summary
Dependency and worker integration
desktop/package.json, desktop/vite.config.ts, desktop/src/components/MapView.svelte
The dependency range changes to ^6.4.1. Vite uses ES module workers, and MapView sets the bundled worker URL. The error handler reads the message through optional chaining; its matching and fallback behavior are unchanged.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Suggested reviewers: claude

Merge Risk: Minimal · up to 47c05

This updates the desktop map library to version 6 and configures its worker for the Vite build. No specific problem was found, and the author reports passing type checks, a successful build, and matching map rendering against master.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the two main parts of the changeset: the maplibre-gl dependency bump to 6.4.1 in desktop/package.json, and the MapView.svelte and vite.config.ts changes that adapt the map code to vers…
Linked Issues check Passed [#192] The only directly linked issue asks to upgrade the desktop maplibre-gl dependency from 5.24.1 to 6.4.1. The PR changes desktop/package.json to maplibre-gl ^6.4.1 (summary: +1/-1). The u…
Out of Scope Changes check Passed All changed files connect to the #192 upgrade. desktop/package.json: the dependency bump itself. desktop/src/components/MapView.svelte: changes the import from default to namespace, because maplib…
Full details: Title check

Explanation

The title names the two main parts of the changeset: the maplibre-gl dependency bump to 6.4.1 in desktop/package.json, and the MapView.svelte and vite.config.ts changes that adapt the map code to version 6. It is specific, short, and matches the PR objectives, which describe the same upgrade and integration work.

Full details: Linked Issues check

Explanation

[#192] The only directly linked issue asks to upgrade the desktop maplibre-gl dependency from 5.24.1 to 6.4.1. The PR changes desktop/package.json to maplibre-gl ^6.4.1 (summary: +1/-1). The upstream fixes listed in #192 come with the library version, so this PR does not need to implement them separately. The issue names no project-specific coding requirement and no test requirement. The PR also changes desktop/src/components/MapView.svelte and desktop/vite.config.ts so the app runs on version 6. Limit: desktop/package-lock.json is excluded from review (!**/package-lock.json), so the resolved version in the lock file is not verified. The ^6.4.1 range in package.json is the evidence used here.

Full details: Out of Scope Changes check

Explanation

All changed files connect to the #192 upgrade. desktop/package.json: the dependency bump itself. desktop/src/components/MapView.svelte: changes the import from default to namespace, because maplibre-gl 6 has no default export. It also removes the { error?: Error } cast in the error handler, because version 6 types that event. It also sets the worker URL through Vite (?worker&amp;url) and passes it to setWorkerUrl, because version 6 loads its worker from a separate file. The summary states the error message matching and offline fallback are unchanged. desktop/vite.config.ts: adds worker: { format: "es" }, which supports the worker bundling. No unrelated feature or refactoring change appears in the summary.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 601e10cf-486a-4030-9f94-a0edba0d4b5b
Commits

Reviewing files that changed from the base of the PR and between 37de382 and 47c05cf.

Files ignored due to path filters: 1

  • desktop/package-lock.json is excluded by !**/package-lock.json
Files selected for processing: 3

  • desktop/package.json
  • desktop/src/components/MapView.svelte
  • desktop/vite.config.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@cursor cursor 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.

Approved. Cursor Bugbot completed successfully with no findings that need human review, so this PR meets the approval criteria. No reviewers were requested.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@kevinelliott
kevinelliott merged commit 3db1e12 into master Nov 14, 2026
11 checks passed
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.

3 participants