Skip to content

First-person navigation: course-up pitched camera, maneuver banner and compact strip - #28

Merged
fcastrovilli merged 5 commits into
mainfrom
feat/first-person-nav
Nov 2, 2026
Merged

fcastrovilli merged 5 commits into
mainfrom
feat/first-person-nav

Conversation

@fcastrovilli

@fcastrovilli fcastrovilli commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

First-person navigation: an app-controlled, course-up, pitched follow camera driven only by accepted native fixes, an original directional puck, a maneuver banner, a compact bottom strip, traveled/remaining route rendering and one cased arrow through the next junction.

native snapshot (+ Kotlin tests)
  upcoming/following maneuvers (ids per routeRevision; type, modifier, street, roundabout exit, coordinate, gap)
  progress offset · snapped position + alignment · speed/course + accuracies · monotonic fix time
camera (pure planner + tests)
  intent: follow | free | overview   (pan → free at gesture start; Ricentra → one 500 ms move)
  per mode: walk ~30° / bike ~45° / car ~50° pitch; puck anchored low between banner and strip
  turn framing 8 / 10 / 12 s ahead; circular bearing filter; hold bearing when stopped
screen
  banner: glyph · big distance · street + action · reserved "Poi …"/status row
  strip: arrival time (estimate, no traffic) · remaining · voice · overview · Interrompi; "Stima sospesa" when position is lost
  route: traveled thin/muted · remaining brand line · cased junction arrow; driving shows one-way arrows, hides business labels
transit: walking camera on access/transfer/final walks (trace only, no turn instructions)

Deferred: 3D buildings, compass heading for walking, lane guidance.

Evidence

Android 16 emulator, replayed 1 Hz traces (walk, bike, drive, day/night, transit access walk), screen recordings + screenshots:

Check Result
Puck vs target anchor (steady) median 0.08–0.19 %, p95 0.16–0.66 % of screen height (target ±3 %)
Turn framing start bike 10.2 s (10 s window), car 12.4–13.4 s (12 s window); unit tests within one fix for every mode
30 s stationary bearing and zoom stable, no look-ahead
359° → 1° short path, < 8° per fix
Pan follow cancelled in 61–74 ms; reroutes do not move the camera while free
Degraded fixes look-ahead stops, grey ring puck, "Guida in pausa · Ultima indicazione"
  • bun run verify: typecheck, zero-warning lint, 531 tests. :avoid-navigation:testDebugUnitTest: 87 tests. Rust harness not run (no cargo).
  • Not covered: physical GPS course/speed, frame pacing on the Pixel, screen-off, voice timing, battery, TalkBack/large text by eye.

Merge Danger

Door: two-way

Blast Radius: navigation

Navigation camera, panel and native snapshot; browsing map unaffected (navigation exit restores north-up and flat).


Summary by cubic

Implements first-person road navigation: an app-controlled, course-up, pitched follow camera driven only by accepted native fixes, with a maneuver banner, compact bottom strip, traveled/remaining route rendering and an original directional puck. The native snapshot now carries structured maneuvers and kinematics, and the camera runs as follow, free, or overview without fixes or reroutes ever reclaiming it.

Native snapshot

  • Upcoming and following maneuvers carry raw OSRM type, modifier, roundabout exit, street, coordinate and the gap between them; ids are tied to the route revision and change on reroute.
  • Route progress is measured on the same bridged geometry the interface draws, alongside the snapped position with an alignment state and speed/course with accuracies and monotonic fix time.
  • Payloads never contain null or NaN, and unknown maneuver types keep the supplied text with a neutral glyph rather than a guessed turn.

Camera and screen

  • A pan enters free at gesture start, Ricentra restores the follow pose in one 500 ms move — re-fitting the current leg during a transit ride or wait — and overview frames the remaining route once, north-up and flat.
  • Pitch, zoom and puck anchor are per mode (walk ~30°, bike ~45°, car ~50°); turn framing starts 8/10/12 s ahead with circular bearing filtering, and the bearing holds when stopped. When the provider omits speed or course, the planner estimates them for presentation only, bounded by fix accuracy and a maximum interval, with no motion from stationary jitter.
  • The banner shows the glyph, distance, street and action, with status in its own pill below so a warning is never hidden by the following-maneuver row; the strip shows estimated arrival, remaining time and distance, voice, overview and Stop. Banner and strip heights are fixed so the camera anchor never jumps.
  • The traveled route renders thin and muted under the active remaining line, with one cased arrow through the next junction; driving and cycling hide generic business labels, and driving shows one-way chevrons including reverse one-way roads.
  • Cycling and driving draw at the snapped route position with a bounded look-ahead that stops on degraded fixes, while walking keeps the real offset; leaving guidance returns the browsing map to north-up and flat on the next issued camera command.

Transit access, transfer, and final walks use the walking camera; 3D buildings, walking compass heading and lane guidance remain deferred.

Written for commit 973e4d9. Summary will update on new commits.

View guided diff Turn on auto-fix

Summary by CodeRabbit

  • New Features

    • Added first-person road guidance with mode-specific camera framing, a live position marker, route progress styling, and maneuver cues.
    • Added compact guidance controls for recentering, viewing the route overview, muting voice guidance, and managing the trip.
    • Improved maneuver details, signal and location information, and transit walking guidance.
  • Documentation

    • Added guidance behavior and Android emulator findings, with notes on what still requires physical-device validation.

… navigation snapshot

Native: keep raw OSRM maneuver facts (type, modifier, exit, name, ref,
bearings, driving side) beside Ferrostar's parsed steps, index maneuvers
into the immutable route geometry, and publish upcoming/following
maneuvers with ids tied to the route revision, the route-relative
progress offset, Ferrostar's snapped position with an alignment state,
and speed/course/accuracies/monotonic fix time. Payloads stay free of
null/NaN.

TypeScript: snapshot types, a route measure using the native metric,
and a pure first-person camera planner with deterministic fixtures
(straight, turns, close turns, roundabout, U-turn, stop/start,
deviation, degraded fixes, arrival, bearing wraparound, duplicate
timestamps).
The guidance map is now app-controlled: one native ease per distinct
accepted fix (linear over the measured fix interval, so puck and map
share one clock and React renders at 1 Hz), course-up with circular
filtering and a held bearing when slow, per-mode pitch/zoom, and the puck
anchored low in the map between banner and bottom strip through top
padding. Turn framing keeps the junction and outgoing path in view from
8/10/12 s before the maneuver and releases over 2-3 s. Cycling and
driving add a bounded presentation-only lead that never crosses the
upcoming maneuver and stops on degraded or late fixes.

Camera intent is follow / free / overview: a gesture enters free at
gesture start and blocks pending moves; overview frames the remaining
route north-up once; Ricentra restores the follow pose in one 500 ms
move; fixes and reroutes never take the camera back.

The puck is original artwork (wedge with live centre, disc without a
direction, subdued ring for a retained position), drawn at the anchor
while following and as a map symbol otherwise. Development builds log
MapLibre's own projection of the anchor and junction for assertions.
… route split and turn arrow

Banner: original maneuver glyphs from the OSRM type/modifier (straight,
slight/normal/sharp turns, U-turn, fork, merge, ramps, roundabouts with
exit number and circulation, arrival; unknown maneuvers keep a neutral
glyph with the supplied text), the distance in heavy Mona Sans with a
smaller unit, street and action in Geist with two lines reserved, and a
reserved row for 'Poi ...' (only when the following maneuver is within
about ten seconds of travel) or status (rerouting, off route, reduced
precision, paused with the last instruction). No state changes the
banner or strip height, so the camera anchor never jumps.

Strip: arrival labelled as an estimate without traffic, remaining time
and distance, distinct voice states, overview and Interrompi; the summary
opens details; problems and Retry float above the strip; a paused
position shows 'Stima sospesa' instead of an apparently current ETA.

Map: muted travelled route under the active remaining line (cut by the
native progress through line-gradient), one cased arrow through the next
junction from the real geometry, generic business labels hidden while
driving or cycling, one-way chevrons while driving (a hidden brand
basemap layer adopted under an app source so live theme switches keep
it). Transit access/transfer/final walks use the walking camera when a
usable fix exists and otherwise frame the current leg. Leaving guidance
returns the browsing map to north-up and flat.
Ricentra, the problem row and transit confirmations float above the
strip from the screen container: Android delivers no touches to views
drawn outside their parent's bounds. Record the emulator replay evidence
for first-person guidance in the delivery notes.
@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-02T09:39:59.776770Z df43e5e 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.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You'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 11 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

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: 48371c59-0c85-48f1-a558-f05dfa73ee05
Commits

Reviewing files that changed from the base of the PR and between df43e5e and 973e4d9.

Files selected for processing: 26
  • docs/development/navigation.md
  • docs/development/ux.md
  • src/features/app/AppShell.tsx
  • src/features/map/MapCanvas.native.tsx
  • src/features/map/orientation-reset.test.ts
  • src/features/map/orientation-reset.ts
  • src/features/map/useGuidanceCameraDriver.ts
  • src/features/navigation/BannerReserveProbe.tsx
  • src/features/navigation/ManeuverGlyphImage.tsx
  • src/features/navigation/NavigationPanel.tsx
  • src/features/navigation/exit-number.ts
  • src/features/navigation/guidance-camera.test.ts
  • src/features/navigation/guidance-camera.ts
  • src/features/navigation/guidance-commands.test.ts
  • src/features/navigation/guidance-commands.ts
  • src/features/navigation/guidance-fixtures.ts
  • src/features/navigation/guidance-layout.test.ts
  • src/features/navigation/guidance-layout.ts
  • src/features/navigation/maneuver-presentation.test.ts
  • src/features/navigation/maneuver-presentation.ts
  • src/features/navigation/map-projection.ts
  • src/features/navigation/motion-estimator.test.ts
  • src/features/navigation/motion-estimator.ts
  • src/features/navigation/useGuidanceCamera.ts
  • src/theme/brand-basemap.ts
  • src/theme/map-style.test.ts
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: e47217ea-7786-42cb-9fff-96ecda34af1b
Commits

Reviewing files that changed from the base of the PR and between d67b606 and df43e5e.

Files ignored due to path filters: 84
  • assets/navigation/arrowhead-dark.png is excluded by !**/*.png
  • assets/navigation/arrowhead-dark@2x.png is excluded by !**/*.png
  • assets/navigation/arrowhead-dark@3x.png is excluded by !**/*.png
  • assets/navigation/arrowhead-light.png is excluded by !**/*.png
  • assets/navigation/arrowhead-light@2x.png is excluded by !**/*.png
  • assets/navigation/arrowhead-light@3x.png is excluded by !**/*.png
  • assets/navigation/maneuver-arrive-left.png is excluded by !**/*.png
  • assets/navigation/maneuver-arrive-left@2x.png is excluded by !**/*.png
  • assets/navigation/maneuver-arrive-left@3x.png is excluded by !**/*.png
  • assets/navigation/maneuver-arrive.png is excluded by !**/*.png
  • assets/navigation/maneuver-arrive@2x.png is excluded by !**/*.png
  • assets/navigation/maneuver-arrive@3x.png is excluded by !**/*.png
  • assets/navigation/maneuver-fork-left.png is excluded by !**/*.png
  • assets/navigation/maneuver-fork-left@2x.png is excluded by !**/*.png
  • assets/navigation/maneuver-fork-left@3x.png is excluded by !**/*.png
  • assets/navigation/maneuver-left.png is excluded by !**/*.png
  • assets/navigation/maneuver-left@2x.png is excluded by !**/*.png
  • assets/navigation/maneuver-left@3x.png is excluded by !**/*.png
  • assets/navigation/maneuver-merge-left.png is excluded by !**/*.png
  • assets/navigation/maneuver-merge-left@2x.png is excluded by !**/*.png
  • assets/navigation/maneuver-merge-left@3x.png is excluded by !**/*.png
  • assets/navigation/maneuver-ramp-left.png is excluded by !**/*.png
  • assets/navigation/maneuver-ramp-left@2x.png is excluded by !**/*.png
  • assets/navigation/maneuver-ramp-left@3x.png is excluded by !**/*.png
  • assets/navigation/maneuver-roundabout-left.png is excluded by !**/*.png
  • assets/navigation/maneuver-roundabout-left@2x.png is excluded by !**/*.png
  • assets/navigation/maneuver-roundabout-left@3x.png is excluded by !**/*.png
  • assets/navigation/maneuver-roundabout-right.png is excluded by !**/*.png
  • assets/navigation/maneuver-roundabout-right@2x.png is excluded by !**/*.png
  • assets/navigation/maneuver-roundabout-right@3x.png is excluded by !**/*.png
  • assets/navigation/maneuver-roundabout-sharp-left.png is excluded by !**/*.png
  • assets/navigation/maneuver-roundabout-sharp-left@2x.png is excluded by !**/*.png
  • assets/navigation/maneuver-roundabout-sharp-left@3x.png is excluded by !**/*.png
  • assets/navigation/maneuver-roundabout-slight-left.png is excluded by !**/*.png
  • assets/navigation/maneuver-roundabout-slight-left@2x.png is excluded by !**/*.png
  • assets/navigation/maneuver-roundabout-slight-left@3x.png is excluded by !**/*.png
  • assets/navigation/maneuver-roundabout-slight-right.png is excluded by !**/*.png
  • assets/navigation/maneuver-roundabout-slight-right@2x.png is excluded by !**/*.png
  • assets/navigation/maneuver-roundabout-slight-right@3x.png is excluded by !**/*.png
  • assets/navigation/maneuver-roundabout-straight.png is excluded by !**/*.png
  • assets/navigation/maneuver-roundabout-straight@2x.png is excluded by !**/*.png
  • assets/navigation/maneuver-roundabout-straight@3x.png is excluded by !**/*.png
  • assets/navigation/maneuver-roundabout-uturn.png is excluded by !**/*.png
  • assets/navigation/maneuver-roundabout-uturn@2x.png is excluded by !**/*.png
  • assets/navigation/maneuver-roundabout-uturn@3x.png is excluded by !**/*.png
  • assets/navigation/maneuver-sharp-left.png is excluded by !**/*.png
  • assets/navigation/maneuver-sharp-left@2x.png is excluded by !**/*.png
  • assets/navigation/maneuver-sharp-left@3x.png is excluded by !**/*.png
  • assets/navigation/maneuver-slight-left.png is excluded by !**/*.png
  • assets/navigation/maneuver-slight-left@2x.png is excluded by !**/*.png
  • assets/navigation/maneuver-slight-left@3x.png is excluded by !**/*.png
  • assets/navigation/maneuver-straight.png is excluded by !**/*.png
  • assets/navigation/maneuver-straight@2x.png is excluded by !**/*.png
  • assets/navigation/maneuver-straight@3x.png is excluded by !**/*.png
  • assets/navigation/maneuver-unknown.png is excluded by !**/*.png
  • assets/navigation/maneuver-unknown@2x.png is excluded by !**/*.png
  • assets/navigation/maneuver-unknown@3x.png is excluded by !**/*.png
  • assets/navigation/maneuver-uturn-left.png is excluded by !**/*.png
  • assets/navigation/maneuver-uturn-left@2x.png is excluded by !**/*.png
  • assets/navigation/maneuver-uturn-left@3x.png is excluded by !**/*.png
  • assets/navigation/oneway-dark.png is excluded by !**/*.png
  • assets/navigation/oneway-dark@2x.png is excluded by !**/*.png
  • assets/navigation/oneway-dark@3x.png is excluded by !**/*.png
  • assets/navigation/oneway-light.png is excluded by !**/*.png
  • assets/navigation/oneway-light@2x.png is excluded by !**/*.png
  • assets/navigation/oneway-light@3x.png is excluded by !**/*.png
  • assets/navigation/puck-dot-dark.png is excluded by !**/*.png
  • assets/navigation/puck-dot-dark@2x.png is excluded by !**/*.png
  • assets/navigation/puck-dot-dark@3x.png is excluded by !**/*.png
  • assets/navigation/puck-dot-light.png is excluded by !**/*.png
  • assets/navigation/puck-dot-light@2x.png is excluded by !**/*.png
  • assets/navigation/puck-dot-light@3x.png is excluded by !**/*.png
  • assets/navigation/puck-retained-dark.png is excluded by !**/*.png
  • assets/navigation/puck-retained-dark@2x.png is excluded by !**/*.png
  • assets/navigation/puck-retained-dark@3x.png is excluded by !**/*.png
  • assets/navigation/puck-retained-light.png is excluded by !**/*.png
  • assets/navigation/puck-retained-light@2x.png is excluded by !**/*.png
  • assets/navigation/puck-retained-light@3x.png is excluded by !**/*.png
  • assets/navigation/puck-wedge-dark.png is excluded by !**/*.png
  • assets/navigation/puck-wedge-dark@2x.png is excluded by !**/*.png
  • assets/navigation/puck-wedge-dark@3x.png is excluded by !**/*.png
  • assets/navigation/puck-wedge-light.png is excluded by !**/*.png
  • assets/navigation/puck-wedge-light@2x.png is excluded by !**/*.png
  • assets/navigation/puck-wedge-light@3x.png is excluded by !**/*.png
Files selected for processing: 35
  • docs/development/delivery.md
  • docs/development/navigation.md
  • docs/development/ux.md
  • modules/avoid-navigation/android/src/main/java/quest/avoid/maps/navigation/FerrostarNavigationEngine.kt
  • modules/avoid-navigation/android/src/main/java/quest/avoid/maps/navigation/GuidanceModel.kt
  • modules/avoid-navigation/android/src/main/java/quest/avoid/maps/navigation/NavigationRuntime.kt
  • modules/avoid-navigation/android/src/test/java/quest/avoid/maps/navigation/GuidanceModelTest.kt
  • scripts/render-navigation-assets.mjs
  • src/domain/navigation.ts
  • src/features/app/AppMap.tsx
  • src/features/app/AppShell.tsx
  • src/features/map/GuidanceMapLayers.tsx
  • src/features/map/MapCanvas.native.tsx
  • src/features/map/MapCanvas.types.ts
  • src/features/map/guidance-puck.ts
  • src/features/map/useGuidanceCameraDriver.ts
  • src/features/map/useMapCamera.ts
  • src/features/navigation/ManeuverGlyphImage.tsx
  • src/features/navigation/NavigationPanel.tsx
  • src/features/navigation/TransitFollowPanel.tsx
  • src/features/navigation/guidance-camera.test.ts
  • src/features/navigation/guidance-camera.ts
  • src/features/navigation/guidance-fixtures.ts
  • src/features/navigation/guidance-route.test.ts
  • src/features/navigation/guidance-route.ts
  • src/features/navigation/maneuver-presentation.test.ts
  • src/features/navigation/maneuver-presentation.ts
  • src/features/navigation/map-projection.ts
  • src/features/navigation/route-measure.test.ts
  • src/features/navigation/route-measure.ts
  • src/features/navigation/useGuidanceCamera.ts
  • src/theme/brand-assets.test.ts
  • src/theme/brand-basemap.ts
  • src/theme/map-style.test.ts
  • src/theme/palette.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.

Walkthrough

This PR adds first-person road-guidance camera planning and map rendering for walking, cycling, and driving, plus walking-camera guidance for transit legs. Native Android navigation publishes structured maneuver, route-progress, alignment, and fix-kinematics data. The interface adds maneuver-focused controls, route and puck styling, generated assets, tests, and development documentation.

Changes: First-Person Guidance

Layer / File(s) Summary
Native guidance data and runtime
src/domain/navigation.ts, modules/avoid-navigation/android/src/main/java/quest/avoid/maps/navigation/*, modules/avoid-navigation/android/src/test/java/quest/avoid/maps/navigation/GuidanceModelTest.kt
Adds navigation snapshot types and Android parsing and indexing for maneuver facts. Runtime updates publish maneuver details, route progress, snapped location, alignment, and fix kinematics.
Route measurement and camera planning
src/features/navigation/route-measure.ts, src/features/navigation/map-projection.ts, src/features/navigation/guidance-camera.ts, src/features/navigation/guidance-route.ts, src/features/navigation/guidance-fixtures.ts, src/features/navigation/*test.ts
Adds route measurement, map projection, per-mode camera frames, route progress styling calculations, and maneuver arrows. Tests cover camera behavior, route geometry, and guidance calculations.
Guidance state and camera integration
src/features/navigation/useGuidanceCamera.ts, src/features/navigation/useMapCamera.ts, src/features/map/MapCanvas*, src/features/map/useGuidanceCameraDriver.ts, src/features/app/AppMap.tsx, src/features/app/AppShell.tsx
Connects navigation state and measured panel layout to guidance camera state. Map camera controls handle follow, free, and overview intent, and MapCanvas applies guidance camera commands.
Guidance map layers and assets
src/features/map/GuidanceMapLayers.tsx, src/features/map/guidance-puck.ts, src/theme/brand-basemap.ts, src/theme/palette.ts, scripts/render-navigation-assets.mjs, src/theme/*test.ts
Adds guidance route layers, puck symbols, and one-way arrows. The asset script generates navigation PNGs and checks them; theme definitions include a traveled-route color.
Maneuver interface and guidance documentation
src/features/navigation/maneuver-presentation.ts, src/features/navigation/ManeuverGlyphImage.tsx, src/features/navigation/NavigationPanel.tsx, src/features/navigation/TransitFollowPanel.tsx, docs/development/*
Adds maneuver glyph and banner presentation, a compact navigation strip and overlay controls, and panel layout reporting. Development documentation describes the guidance behavior and emulator checks.

Estimated code review effort: 4 (Complex) | ~60 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant AppShell
  participant AppMap
  participant useGuidanceCamera
  participant MapCanvas
  participant useGuidanceCameraDriver
  participant MapLibre
  AppShell->>AppMap: Pass measured guidance viewport
  AppMap->>useGuidanceCamera: Provide navigation state and viewport
  useGuidanceCamera-->>AppMap: Return guidance map state
  AppMap->>MapCanvas: Pass guidance state
  MapCanvas->>useGuidanceCameraDriver: Provide camera state and map commands
  useGuidanceCameraDriver->>MapLibre: easeTo or fitBounds
Loading

Possibly related PRs

  • avoid-quest/maps#16: Defines accepted native fixes and location states used by this PR’s camera planning.
  • avoid-quest/maps#11: Establishes the navigation UI and map-camera modules that this PR extends.
  • avoid-quest/maps#25: Adds the transit plan and follow-panel flow used by this PR’s transit guidance handling.
Merge Risk: Moderate · previous review df43e

After guidance stops, the browsing map can stay tilted and rotated instead of returning to north-up and flat. On phones in landscape, the guidance camera frames the puck and turns within a very small area. Fix the exit reset before merging; the remaining findings are minor.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 66.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 main changes: first-person navigation with a pitched course-up camera, maneuver banner, and compact guidance strip.
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 66.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 50 functions across 32 files. (3 skipped: 3 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

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

@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: df43e5e5ad

ℹ️ 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 on lines +47 to +48
if (!loaded || frame || !fit || intent !== 'follow' || gestureActive.current || fitIssued.current === fit.key) return;
fitIssued.current = fit.key;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Honor transit recenter requests without a walking frame

During a transit ride, while waiting to board, or during a walk without a usable fix, useGuidanceCamera returns no camera frame. After the current leg has been fitted once, panning and pressing Ricentra changes the intent back to follow, but this guard rejects the unchanged leg key; the recenter counter is only consumed when a walking frame exists. Consequently, the visible Ricentra control does not move the map back. Include explicit recenter requests in the fit identity or otherwise issue a new fit when returning from free mode.

Useful? React with 👍 / 👎.

Comment on lines +108 to +112
{then ? <>
<Text className="text-sm font-semibold text-secondary">Poi</Text>
<ManeuverGlyphImage glyph={maneuverGlyph(then)} size={22} color={colors.textSecondary} />
<Text numberOfLines={1} className="min-w-0 flex-1 text-sm text-secondary">{maneuverLines(then, then.instruction).secondary ?? then.instruction}</Text>
</> : status ? <Num testID="navigation-status" accessibilityLiveRegion="polite" numberOfLines={1} className={`min-w-0 flex-1 text-sm font-semibold ${statusTone}`}>{status}</Num> : null}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep reduced-precision warnings visible beside chained turns

When a following maneuver qualifies for the “Poi” row, this conditional suppresses status, including text.precision. Accepted reduced-precision fixes do not necessarily set snapshot.problem, so the separate problem overlay does not restore the warning; the accuracy limitation is then only available inside the details modal. The previous panel displayed precision independently of the next instruction. Preserve a visible precision warning even when showing chained maneuvers, rather than presenting those instructions without their location uncertainty.

AGENTS.md reference: AGENTS.md:L7-L7

Useful? React with 👍 / 👎.

Comment thread src/features/map/MapCanvas.native.tsx Outdated
Comment on lines +50 to +54
leftGuidance.current = false;
let current = true;
const issued = commands.current;
void map.current?.getCenter().then(center => {
if (current && issued === commands.current) camera.current?.easeTo({ center, padding: { top, right, bottom, left }, duration: 250 });
if (current && issued === commands.current) camera.current?.easeTo({ center, ...pose, padding: { top, right, bottom, left }, duration: 250 });

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve the orientation reset when leaving guidance

When guidance closes, this effect captures commands.current and waits asynchronously for getCenter(), but the browsing-centering effect at line 70 runs in the same effect flush because guiding and followLocation changed, incrementing that counter. The callback therefore skips the only command containing bearing: 0, pitch: 0, while leftGuidance.current has already been cleared. The browsing move supplies neither orientation field, leaving the map pitched and course-up after navigation ends. Apply the reset in the winning browsing command or retain it until a reset command actually executes.

Useful? React with 👍 / 👎.

Comment on lines +94 to +96
<View style={{ minHeight: Math.round(52 * Math.min(fontScale, 1.5)) }}>
<Text accessibilityLiveRegion="polite" numberOfLines={2} className="text-xl font-semibold leading-7 text-primary">{lines.primary}</Text>
{lines.secondary ? <Text numberOfLines={1} className="text-base leading-6 text-secondary">{lines.secondary}</Text> : null}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reserve enough banner height for a wrapped street and action

When a street name wraps to two lines and has a secondary action, these children require 80 dp at the default font scale: two 28 dp primary lines plus a 24 dp action. The container reserves only 52 dp and can grow, so switching between short and wrapped street names changes the banner height by 28 dp. That height is reported through onChromeLayout, changing the guidance viewport and causing GuidanceCamera.update to issue a layout-recovery camera move even without a new fix; entering rerouting can shrink it again. Reserve a consistent height for all allowed text lines so maneuver changes and status transitions do not resize the banner and disturb the following camera.

Useful? React with 👍 / 👎.

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

  • Fix comments: Fix CodeRabbit comments on this PR

Comment thread src/features/app/AppShell.tsx Resolved
Comment thread src/features/map/MapCanvas.native.tsx Resolved
Comment thread src/theme/brand-basemap.ts Resolved
- Derive motion honestly when the platform omits speed/course: a
  displacement must clear the combined horizontal accuracy (min 3 m,
  10 s window), motion needs two consistent estimates, course accuracy
  is geometric; stationary jitter yields no speed, course or lead.
- Show status in its own pill below the banner so 'Poi' never hides a
  reduced-precision or pause warning; both are in the spoken label.
- Transit ride/wait: Ricentra re-fits the current leg (the recenter
  request is part of the fit identity); one pure command decision.
- Keep the north-up/flat reset after guidance until a browse command
  that is actually issued carries it; a user gesture cancels it.
- Model the visible map as a rectangle with horizontal insets (landscape
  side panel) for anchoring, projection and fits.
- Fixed banner row heights measured per font scale (text capped at 2x);
  one street line when an action line is shown.
- Stack the bottom strip on narrow screens or large text.
- Lay the roundabout exit number beside its glyph, sized in proportion.
- '1 chilometro' for 1000-1049 m.
- One-way chevrons also on reverse one-way roads (oneway = -1).
@fcastrovilli
fcastrovilli merged commit 3cd016c 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