Skip to content

HI-Fi: driver assist and summary page#174

Open
hir-al-14 wants to merge 10 commits into
benevolentbandwidth:mainfrom
hir-al-14:driver_assist_hifi
Open

HI-Fi: driver assist and summary page#174
hir-al-14 wants to merge 10 commits into
benevolentbandwidth:mainfrom
hir-al-14:driver_assist_hifi

Conversation

@hir-al-14
Copy link
Copy Markdown
Contributor

@hir-al-14 hir-al-14 commented May 18, 2026

Summary

  • Adds the high-fidelity driver_assist PWA flow for importing route JSON, completing/reporting stops, finishing a route, and exporting a route summary JSON.

Motivation

  • Drivers need a browser-based mobile workflow that matches the existing delivery flow while preserving route progress locally and producing a usable end-of-route summary for dispatch or review.

Changes

  • Frontend:

    • Connected /upload-route to the driver assist route import flow so uploaded JSON is transformed into driver route state instead of looping back to upload.
    • Updated /driver_assist with the mobile-first stop workflow: route summary, remaining/delivered/reported sections, expandable stop cards, notes, delivered status, issue reporting, and navigation.
    • Added local progress persistence so driver notes, completed stops, and reported failures survive refreshes.
    • Added /driver_assist/summary with total/complete/remaining counts, per-stop completion badges, b2 footer branding, and sticky route summary export.
    • Connected route summary export to the shared JSON download helper.
    • Split driver assist UI into focused component, style, storage, summary, import, transform, and export helper files.
    • Added practical comments across the driver assist route, summary, storage, import, transform, and export code paths.
    • Ran Prettier across changed app/ui files and kept the actual content diff focused to the driver assist files.
  • Backend:

    • No backend changes in this driver assist UI work.
  • Mobile:

    • No native app/mobile changes in this driver assist UI work.

Validation

Frontend

  • npm --prefix app/ui run lint
  • npm --prefix app/ui run format:check
  • npm --prefix app/ui run typecheck
  • npm --prefix app/ui run test
  • npm --prefix app/ui run build
  • npm --prefix app/mobile run lint
  • npm --prefix app/mobile run typecheck

Backend

  • cmake --preset dev
  • .github/scripts/check-backend-static.sh build/dev
  • cmake --build --preset dev --parallel
  • ctest --preset dev --output-on-failure --no-tests=error -LE 'e2e|docker'
  • docker compose -f deploy/compose/docker-compose.arm64.yml --env-file deploy/env/http-server.arm64.env config

Risk

  • Main risk is browser storage state: stale or invalid saved driver route JSON could send a driver back to upload, but invalid local data is cleared and invalid uploads show user-facing errors.
  • Route summary export depends on the browser download path, so download behavior may vary slightly by browser/PWA install mode.

Rollout and Recovery

  • Roll out by merging the PWA UI changes and having drivers open /driver_assist or install the PWA from the browser.
  • Recovery is to revert this PR; existing route-manager JSON save files and native mobile app behavior remain separate.

High-Signal PR Checklist

  • The summary states the user-visible or operational outcome, not just file names.
  • The motivation explains why this change is needed now.
  • The change list separates frontend, backend, infrastructure, and documentation work where applicable.
  • Validation includes exact commands run, relevant output, and any checks intentionally skipped.
  • Risks, migrations, feature flags, and rollback steps are called out when relevant.
  • Screenshots or request/response examples are included for UI and API behavior changes.

Screenshots for driver assist

Driver assist stops screen Driver assist route progress Driver assist summary export

@hir-al-14 hir-al-14 changed the title Driver assist hifi Hifi: driver assist May 18, 2026
@hir-al-14 hir-al-14 changed the title Hifi: driver assist HI-Fi: driver assist and summary page May 18, 2026
@hir-al-14 hir-al-14 force-pushed the driver_assist_hifi branch from 6f361ec to fc0f6ff Compare May 25, 2026 18:34
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