Skip to content

feat(ui): improve delivery time handling#214

Open
Gill87 wants to merge 6 commits into
benevolentbandwidth:mainfrom
Gill87:feat/ui-improvements
Open

feat(ui): improve delivery time handling#214
Gill87 wants to merge 6 commits into
benevolentbandwidth:mainfrom
Gill87:feat/ui-improvements

Conversation

@Gill87

@Gill87 Gill87 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Vehicle add/edit departure time now defaults blank minutes to 00 after a valid hour is entered, allowing common on-the-hour departures to save without an extra manual minute entry.
  • Confirmed address cards now distinguish one-sided delivery windows: start-only windows show From <time>, end-only windows show By <time>, full ranges and empty windows keep their prior display.

Motivation

Changes

  • Frontend: added vehicle departure-time helper logic that fills blank minutes with 00 only for valid hours from 1 through 12.
  • Frontend: tracks whether 00 was generated by the UI so user-entered minutes, including a deliberate 00, are not overwritten.
  • Frontend: added a shared locked delivery-time formatter and reused it in both desktop and mobile locked address-card views.
  • Frontend tests: added focused Vitest coverage for departure minute defaulting, generated-minute clearing, user-entered minute preservation, and locked delivery-window labels.
  • Backend, infrastructure, mobile app, and documentation behavior are unchanged by this PR.

Validation

Frontend

  • npm --prefix app/ui test -- deliveryHelpers.test.ts — passed: 1 test file, 10 tests.
  • npm --prefix app/ui run typecheck — passed.
  • npm --prefix app/ui test — passed: 24 test files, 122 tests.
  • npm --prefix app/ui run lint — skipped locally; CI will run the full lint gate for the branch.
  • npm --prefix app/ui run format:check — skipped locally; CI will run the formatting gate for the branch.
  • npm --prefix app/ui run build — skipped locally; CI will run the production build gate for the branch.

Other Checks

  • npm --prefix app/mobile run lint — skipped locally because the mobile app is outside this UI change.
  • npm --prefix app/mobile run typecheck — skipped locally because the mobile app is outside this UI change.
  • cmake --preset dev — skipped locally because backend code is outside this UI change.
  • .github/scripts/check-backend-static.sh build/dev — skipped locally because backend code is outside this UI change.
  • cmake --build --preset dev --parallel — skipped locally because backend code is outside this UI change.
  • ctest --preset dev --output-on-failure --no-tests=error -LE 'e2e|docker' — skipped locally because backend code is outside this UI change.

Risk

  • Low UI risk: both changes are limited to edit-page time handling and confirmed address-card display text.
  • The main departure-time risk is accidentally overwriting custom minutes; generated-minute state and focused tests cover user-entered minute preservation.
  • The main address-card risk is inconsistent desktop/mobile wording; both locked views call the same formatter and share unit coverage.
  • Saved data, validation constraints, solver payloads, and backend behavior are not changed.

Rollout and Recovery

  • Rollout follows the normal frontend deployment path for the Next.js UI.
  • Recovery is a small revert of the departure-time helper, locked delivery-window formatter, and their focused tests if unexpected editing or display behavior appears.
  • Data migration, feature flag setup, and backfill work are not required.

High-Signal PR Checklist

  • The summary states the user-visible outcome.
  • The motivation explains why the changes are needed.
  • The change list separates frontend work from unaffected areas.
  • Validation includes exact commands run and checks intentionally left to CI.
  • Risks and rollback steps are called out.
  • UI behavior is described in text and covered by focused unit tests.

@Gill87 Gill87 changed the title feat(ui): autofill vehicle departure minutes feat(ui): improve delivery time handling Jun 28, 2026
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