Skip to content

Show approximate 3D buildings during navigation - #30

Merged
fcastrovilli merged 3 commits into
mainfrom
feat/navigation-buildings
Nov 2, 2026
Merged

fcastrovilli merged 3 commits into
mainfrom
feat/navigation-buildings

Conversation

@fcastrovilli

@fcastrovilli fcastrovilli commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add subtle grey building volumes from zoom 17 during road guidance and transit walks. Existing OpenFreeMap tiles combine mapped heights and estimates from floor counts; these are approximate context, not surveyed measurements. Exclude their generic 5 m fallback conservatively, including indistinguishable genuine 5 m buildings. No new provider, dependency, permission or native code.

browse / plan / transit ride / overview at any zoom → flat footprints
road guidance / transit walk at z17+ → approximate grey volumes
pan during guidance → keep buildings; recenter → restore follow
Stop → flat planning map

Route layers follow the extrusion. The pinned Native renderer disables depth testing for subsequent 2D layers; observed Android views retain the route, casing, junction arrow and puck.

Evidence

  • Before: feature regressions failed (15 pass, 5 fail, 1 missing-module error). Review exposed overview retaining volumes on short routes; its regression failed (5 pass, 1 fail).
    After: focused suites pass (25 tests); final bun run verify with pinned Bun 1.4.3 passes typecheck, zero-warning lint and all 556 tests.
  • Android 16 AOSP development client, unchanged native beta.2 modules: 1 Hz synthetic walking fixes, first 110 m of a central Turin route at 1.4 m/s. Inspected building rendering, route/arrow/puck visibility, live light/dark changes, overview/recenter, free-camera pan, zooming out and Stop cleanup. Screenshots and recording retained outside Git; delivery notes record the observations and next-beta field checklist.
  • Independent standards and spec reviews completed. Overview was fixed with a regression. The final product contract explicitly allows tagged heights and floor-derived estimates while excluding defaults. Native rendering checks address the visual acceptance gap.
  • Physical readability, GPS, battery and smoothness remain field checks. The emulator's sparse Android UI frame sample was slow and does not establish native map pacing. Separate cycling, driving and transit-walk replays were not performed for this increment.
  • New feature: no originating field-report bug. Kotlin/JVM and Rust harnesses were not run because native code and guidance policy are unchanged; Cargo is unavailable.

Merge Danger

Door: two-way

Reverting restores flat buildings; no persisted state changes.

Blast Radius: navigation

Approximate volumes add GPU work and can differ from actual buildings. They remain subordinate to guidance, and browsing/planning/overview remain flat. Physical performance is explicitly unverified.

Summary by CodeRabbit

  • New Features
    • During active road guidance and transit walking, approximate grey 3D building shapes appear from zoom 17 when height or floor-count data is available.
    • Building shapes fade in as you zoom in; route lines, markers, and labels remain visible above them.
  • Limitations
    • Buildings with default or unsuitable height data remain flat. Browsing, planning, route overviews, and transit rides continue to show flat buildings.

A hidden native fill-extrusion layer (avoid_building_3d) from zoom 17,
made visible by guidance through the adopted-layer mechanism used for
one-way chevrons. Browsing, planning and transit rides stay flat.

OpenFreeMap's Planetiler OpenMapTiles profile writes render_height as
ceil(height ?? building:height ?? levels * 3.66 ?? 5) with no provenance
field, so the filter drops the 5 m default bucket, missing or
non-numeric fields, tops not above their base and hide_3d outlines.
Flat footprints stay beneath at every zoom.

The extrusion sits after the flat footprints and before boundaries,
labels and the guidance route anchor, so the route, junction arrow,
puck and labels are drawn over buildings.
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

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: a07fc38d-db19-4d1b-851a-05893c13cda2
Commits

Reviewing files that changed from the base of the PR and between 53dcc41 and 6b5bccc.

Files selected for processing: 12
  • docs/development/delivery.md
  • docs/development/navigation.md
  • docs/development/ux.md
  • docs/research/online-services.md
  • src/features/map/GuidanceMapLayers.tsx
  • src/features/map/MapCanvas.native.tsx
  • src/features/map/guidance-basemap.test.ts
  • src/features/map/guidance-basemap.ts
  • src/theme/brand-basemap.ts
  • src/theme/map-style.test.ts
  • src/theme/map-styles/NOTICE.md
  • src/theme/map-styles/notices.json

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

Walkthrough

The map styles add a hidden-by-default building extrusion layer. Guidance state controls its visibility. The changes also document building-height filtering, zoom behavior, layer ordering, and remaining rendering checks.

Changes: Navigation Buildings

Layer / File(s) Summary
Building extrusion style and validation
src/theme/brand-basemap.ts, src/theme/map-style.test.ts, src/theme/map-styles/NOTICE.md, src/theme/map-styles/notices.json, docs/research/online-services.md
Light and dark styles define the extrusion color, height filter, and zoom-based opacity. Tests cover filtering, layer order, and contrast. Notices and research documentation describe the height data and its limitations.
Guidance visibility and documented behavior
src/features/map/guidance-basemap.ts, src/features/map/GuidanceMapLayers.tsx, src/features/map/MapCanvas.native.tsx, src/features/map/guidance-basemap.test.ts, docs/development/*
guidanceBasemap controls building visibility by guidance mode and intent. The map layer applies that setting, and tests and development documentation describe the supported modes and rendering checks.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant GuidanceMapState
  participant guidanceBasemap
  participant MapCanvasNative
  participant GuidanceMapLayers
  GuidanceMapState->>guidanceBasemap: provide mode and intent
  guidanceBasemap->>MapCanvasNative: return buildings visibility
  MapCanvasNative->>GuidanceMapLayers: pass GuidanceBasemap props
  GuidanceMapLayers->>GuidanceMapLayers: set extrusion layer visibility
Loading

Possibly related PRs

  • avoid-quest/maps#28: Defines the guidance state and basemap adjustment contract used and extended by this change.
Merge Risk: Minimal · up to 6b5bc

Guidance buildings follow the documented zoom and transit-mode behavior. No merge-blocking issue was identified.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the pull request's main change: showing approximate 3D building volumes during navigation.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 4 functions across 6 files. (6 skipped: 6 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

src/features/map/MapCanvas.native.tsx

Oops! Something went wrong! :(

ESLint: 9.39.5

Error: File 'expo/tsconfig.base' not found.
Occurred while linting /src/features/map/MapCanvas.native.tsx:1
Rule: "import/namespace"
at resolveExtends (/.eslint-tmp/node_modules/get-tsconfig/dist/index.cjs:7:7283)
at _parseTsconfig (/.eslint-tmp/node_modules/get-tsconfig/dist/index.cjs:7:8467)
at parseTsconfig (/.eslint-tmp/node_modules/get-tsconfig/dist/index.cjs:7:13444)
at Object.getTsconfig (/.eslint-tmp/node_modules/get-tsconfig/dist/index.cjs:7:17072)
at /.eslint-tmp/node_modules/eslint-import-resolver-typescript/lib/index.cjs:314:36
at Array.map ()
at initMappers (/.eslint-tmp/node_modules/eslint-import-resolver-typescript/lib/index.cjs:307:26)
at Object.resolve (/.eslint-tmp/node_modules/eslint-import-resolver-typescript/lib/index.cjs:127:3)
at withResolver (/.eslint-tmp/node_modules/eslint-module-utils/resolve.js:183:23)
at fullResolve (/.eslint-tmp/node_modules/eslint-module-utils/resolve.js:204:22)

src/features/map/guidance-basemap.test.ts

ESLint skipped: the matched ESLint configuration already failed (unknown).

src/features/map/guidance-basemap.ts

ESLint skipped: the matched ESLint configuration already failed (unknown).

  • 2 others

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

@fcastrovilli fcastrovilli changed the title Explore navigation-only building extrusions Show approximate 3D buildings during navigation Nov 2, 2026
@fcastrovilli
fcastrovilli marked this pull request as ready for review November 2, 2026 12:22
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 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-11-02T12:23:42.755434Z 6b5bccc Draft marked ready
ℹ️ 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.

@fcastrovilli
fcastrovilli merged commit 7709c56 into main Nov 2, 2026
3 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.

1 participant