Skip to content

refactor: Apple Maps, performance fixes, dead code removal#32

Merged
mwolf1989 merged 1 commit into
mainfrom
refactor/performance-apple-maps
Feb 28, 2026
Merged

refactor: Apple Maps, performance fixes, dead code removal#32
mwolf1989 merged 1 commit into
mainfrom
refactor/performance-apple-maps

Conversation

@mwolf1989

Copy link
Copy Markdown
Owner

Summary

  • Map: Replace custom Seelenreich tile overlay with native Apple Maps (Standard/Satellite/Hybrid). Node annotations stay as-is.
  • Performance: O(1) message lookups via packet ID index, cached NSDataDetector, O(n) map annotation updates, stable DebugView ForEach IDs, cached notification auth
  • Cleanup: Remove dead code (ContentView.swift, TileDownloaderSheet, ZipImportSheet, empty setupBLEScanner, unused tile URL settings)

Changes

  • MapView.swift — Native Apple Maps, removed CachedTileOverlay and tile overlay logic
  • AppState.swift — Added packetIdToAllIndex for O(1) lookups, stable DebugLine struct
  • SharedMessageViews.swift — Cached NSDataDetector as static let
  • AppCoordinator.swift — Stored NotificationCenter observer, removed empty setupBLEScanner
  • MeshHessenApp.swift — Cached notification authorization state
  • SettingsService.swift — Removed unused tile URL properties
  • SettingsView.swift — Updated Map settings to Apple Maps styles
  • DebugView.swift — Stable ForEach identity using DebugLine.id
  • Deleted: ContentView.swift, TileDownloaderSheet.swift, ZipImportSheet.swift

Test plan

  • Verify map displays Apple Maps tiles correctly with all 3 styles
  • Verify node annotations appear and update on the map
  • Verify right-click context menu works on map nodes
  • Verify messages still dedup correctly (packet ID index)
  • Verify debug log scrolling works smoothly
  • Verify DM notifications still work

🤖 Generated with Claude Code

- Replace custom Seelenreich tile overlay with native Apple Maps (Standard/Satellite/Hybrid)
- Add packetIdToAllIndex for O(1) message lookups instead of O(n) linear scans
- Cache NSDataDetector as static let instead of recreating per message render
- Fix MapView O(n²) annotation updates with dictionary lookup
- Use stable DebugLine IDs in ForEach instead of unstable .offset
- Cache notification authorization to avoid re-requesting on every DM
- Store NotificationCenter observer token and clean up in deinit
- Remove dead code: ContentView.swift, empty setupBLEScanner(), TileDownloaderSheet, ZipImportSheet
- Remove unused tile server URL settings from SettingsService

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mwolf1989 mwolf1989 merged commit b5d5687 into main Feb 28, 2026
@mwolf1989 mwolf1989 deleted the refactor/performance-apple-maps branch February 28, 2026 16:59
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