Skip to content

Restore trip-change notification tap into the directions focus #1939

Description

@bmander

Background

PR #1872 restructures the trip planner so directions are embedded in the home map (a "directions focus") and retires the standalone TripPlanScreen. That standalone screen used to consume a notification intent via TripPlanScreen.maybeRestoreFromIntent to rehydrate the form and show fresh results when the user tapped a "your trip changed" alert.

With the standalone screen gone, that restore path is now a no-op: the change notification still carries the serialized request (copyIntoBundleSimple) and the updated itineraries (OTPConstants.ITINERARIES) plus OTPConstants.INTENT_SOURCE = NOTIFICATION, but nothing in HOME reads those extras. Tapping a trip-change alert therefore opens generic HOME instead of the changed trip.

See TripPlanMonitorService.notifyChange (the openIntent around the copyIntoBundleSimple / ITINERARIES extras) — the code comment there marks the restore as deferred, and the PR body flags it as out of scope for that presentation-only change.

What's needed

Wire the notification tap into the new directions focus:

  • Consume the launch intent in HOME (HomeActivity launch-intent channel → HomeViewModel.enterDirections(...)).
  • Rehydrate the trip-plan form from the request bundle (mirroring the old maybeRestoreFromIntent).
  • Inject the notification's precomputed itineraries into the directions results rather than re-planning.
  • Preserve the INTENT_SOURCE = NOTIFICATION source metadata.

Notes

Deferred follow-up from PR #1872.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions