Skip to content

fix(car): wire notifications & emergency, fix TabTemplate crash, pin car-app to stable#5997

Merged
jamesarich merged 2 commits into
mainfrom
claude/hopeful-cray-697dd3
Jun 28, 2026
Merged

fix(car): wire notifications & emergency, fix TabTemplate crash, pin car-app to stable#5997
jamesarich merged 2 commits into
mainfrom
claude/hopeful-cray-697dd3

Conversation

@jamesarich

Copy link
Copy Markdown
Collaborator

Why

The Android Auto (feature:car) feature shipped against androidx.car.app:1.9.0-alpha01 with several surfaces built but never wired to data, plus a latent crash that surfaces once pinned to a stable release. This wires them up, fixes the crash, and pins to stable.

🐛 Fixes

  • TabTemplate crash: HomeScreen built its TabTemplate without setActiveTabContentId(). That was tolerated by the alpha but throws IllegalStateException on stable 1.7.0 — the tabbed car UI would crash on launch for every connected user. Caught by the new test.
  • Notifications never reached Android Auto: the manifest lacked the com.google.android.gms.car.application meta-data pointing at automotive_app_desc.xml, so MessagingStyle notifications never surfaced in-car.
  • meshName bug: showed the firmware version string instead of the owner long name.

🌟 Wiring

  • Emergency flow: incoming ALERT_APP packets now drive EmergencyHandler (was emptyFlow()).
  • Auto semantic actions: reply / mark-read actions now carry SEMANTIC_ACTION_REPLY / _MARK_AS_READ + setShowsUserInterface(false), added at the source in core MeshNotificationManagerImpl so the app's existing (richer) MessagingStyle notifications work hands-free in-car.

🧹 Cleanup

  • Deleted dead duplicate CarNotificationManager / CarReplyReceiver (core already posts richer notifications with avatars + multi-message; the car copies were never called).
  • Pinned androidx.car.app 1.9.0-alpha011.7.0 stable; dropped the unused app-automotive catalog entry.

🛠️ Tests

  • CarScreensTest drives the real HomeScreen via TestCarContext + a CarStateCoordinator test seam (mokkery-mocked repos, Robolectric), asserting the correct template per connection state and the ALERT_APP → emergency flow. This test caught the TabTemplate crash above.
  • feature/car/TESTING.md documents the verification paths (SessionController tests; DHU/AAOS caveats).

Testing Performed

spotlessCheck, detekt, :feature:car:testGoogleDebugUnitTest (incl. CarScreensTest), :core:service:compileAndroidMain, :androidApp:assembleGoogleDebug — all pass.

🤖 Generated with Claude Code

…car-app to stable

The car feature shipped against androidx.car.app 1.9.0-alpha01 with several
surfaces built but never wired, plus a latent crash once pinned to stable.

🐛 Fixes
- HomeScreen built TabTemplate without setActiveTabContentId(), which throws on
  stable 1.7.0 — the tabbed car UI would crash on launch for every connected user.
- Messaging notifications never reached Android Auto: the manifest was missing the
  com.google.android.gms.car.application meta-data pointing at automotive_app_desc.
- meshName showed the firmware version string instead of the owner long name.

🌟 Wiring
- Emergency flow: ALERT_APP packets now drive EmergencyHandler (was emptyFlow()).
- Reply / mark-read notification actions now carry the Android Auto semantic actions
  (SEMANTIC_ACTION_REPLY / _MARK_AS_READ + setShowsUserInterface(false)) at the source
  in core MeshNotificationManagerImpl, so the app's existing MessagingStyle
  notifications work hands-free in-car.

🧹 Cleanup
- Deleted dead duplicate CarNotificationManager / CarReplyReceiver (core already posts
  richer notifications; the car copies were never called).
- Pinned androidx.car.app 1.9.0-alpha01 → 1.7.0 stable; dropped unused app-automotive.

🛠️ Tests
- CarScreensTest: drives the real HomeScreen via TestCarContext + a CarStateCoordinator
  test seam (mokkery repos, Robolectric), asserting template-per-state and the
  ALERT_APP → emergency flow. This caught the TabTemplate crash above.
- feature/car/TESTING.md documents the verification paths.

Testing Performed: spotlessCheck, detekt, :feature🚗testGoogleDebugUnitTest (incl.
CarScreensTest), :core:service:compileAndroidMain, :androidApp:assembleGoogleDebug — all pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions github-actions Bot added the bugfix PR tag label Jun 28, 2026
…n up group summary

Replying to a message from Android Auto left the conversation showing in the head
unit, because the cancel only removed the individual notification and left the group
summary behind — and the reply never marked the conversation read.

🐛 Fixes
- cancelMessageNotification now rebuilds (or clears) the group summary, so the dismissed
  conversation doesn't linger in the Android Auto notification center.
- showGroupSummary cancels the summary entirely when no message conversations remain.
- ReplyReceiver marks the conversation read (clearUnreadCount) on reply, mirroring the
  mark-as-read action — Android Auto keys dismissal off read state.
- ReplyReceiver sends first, then dismisses in a defensive finally, so a slow/failed BLE
  send can no longer drop the reply or leave the notification stuck. Added logging.

Verified on a Pixel 6a via the Desktop Head Unit: reply sends, conversation is marked
read, and the notification (and summary) clear from the phone and the head unit.

Testing Performed: spotlessCheck, detekt, :core:service:compileAndroidMain,
:androidApp:assembleGoogleDebug — all pass; manual DHU verification on device.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jamesarich jamesarich marked this pull request as ready for review June 28, 2026 23:14
@jamesarich jamesarich added this pull request to the merge queue Jun 28, 2026
Merged via the queue into main with commit 5cf433d Jun 28, 2026
22 checks passed
@jamesarich jamesarich deleted the claude/hopeful-cray-697dd3 branch June 28, 2026 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant