Skip to content

feat(ui): unify landing, welcome, and upload-route card layouts with il…#222

Merged
markboenigk merged 10 commits into
benevolentbandwidth:mainfrom
v7ncentng:landing-redesign
Jul 9, 2026
Merged

feat(ui): unify landing, welcome, and upload-route card layouts with il…#222
markboenigk merged 10 commits into
benevolentbandwidth:mainfrom
v7ncentng:landing-redesign

Conversation

@v7ncentng

Copy link
Copy Markdown
Contributor

Summary

Redesigned the landing, welcome, and upload-route pages to share one consistent two-panel card layout with illustrated PNG icons (replacing inline SVGs and ad-hoc per-page styling), and removed an orphaned CSV import modal component.

Motivation

The landing, welcome, and route-upload screens had drifted apart in card styling (different borders, paddings, hover states, icon treatments), so the three entry points into the app didn't read as one product. This redesign gives them a shared visual language so users see a consistent, polished flow from landing through welcome through upload.

Changes

Frontend

  • app/ui/src/app/page.tsx: Rebuilt the landing cards as a single bordered/shadowed panel split by a divider (was two separate boxes with a gap), added illustrated route-manager/driver icons via next/image, retuned title/subtitle typography and background gradient.
  • app/ui/src/app/welcome/page.tsx: Matched the welcome page's card panel to the landing page exactly (same 640px width, same 301px height, same on-screen position — verified with Playwright), added resume-session/new-session icons via next/image, and moved the "Back" button out of the centered flex column (now absolutely positioned) so it no longer shifts the card position.
  • app/ui/src/app/upload-route/page.tsx: Renamed ur-* CSS classes to upload-* for consistency with the other flow pages, made handleContinue async-safe with loading/error state and a spinner, swapped the drop-zone icon, added a checkmark icon for the file-selected state, added aria-label to the remove-file button.
  • app/ui/public: Added icon-driver.png, icon-new-session.png, icon-resume-session.png, icon-route-manager.png.

Validation

Frontend

  • npm run lint — clean, no warnings
  • npm run format:check — all files match Prettier style
  • npm run test

Backend

Not run — no backend files touched.

Risk

Low. Changes are frontend-only, confined to three page components, one deleted dead-code file, and new static icon assets. No routing, API, or state-management contract changes.

  • The pre-existing edit/page.tsx typecheck failure blocks build and typecheck on this branch already (verified present on HEAD before this diff) — it should be tracked/fixed separately, not introduced by this PR.
  • Card-position parity between landing and welcome was verified with an automated Playwright measurement (both panels: x:320, width:640, height:301.4), not just visual inspection.

Rollout and Recovery

No feature flags or migrations needed.

  • To revert the visual redesign: revert the changes to page.tsx, welcome/page.tsx, and upload-route/page.tsx individually — each page's styling is self-contained in its own <style> block.
  • To restore CSVImportModal.tsx: git checkout <prior-commit> -- src/app/edit/components/CSVImportModal.tsx (safe to leave removed since nothing imports it).

High-Signal PR Checklist

  • The summary states the user-visible outcome, not just file names.
  • The motivation explains why this change is needed now.
  • The change list separates frontend work (no backend/infra/docs touched here).
  • Validation includes exact commands run and results, and calls out the one pre-existing failure intentionally not attributed to this diff.
  • Risks and rollback steps are called out.

@v7ncentng v7ncentng changed the title Landing redesign feat(ui): unify landing, welcome, and upload-route card layouts with il… Jul 5, 2026
@markboenigk

Copy link
Copy Markdown
Collaborator

Nice cleanup on the visual consistency front — the shared card panel and icon swap read well. Found one functional bug and a few accessibility regressions worth fixing before merge; everything else is minor.


app/ui/src/app/edit/page.tsx line 199 — session export now sends the wrong data shape

handleExportSession swapped mapEditStateToSessionSave(...) for mapEditStateToOptimizeRequest(...), but still passes the result straight into downloadSessionSave(state: SessionSaveData). These two mapper functions return different shapes (OptimizeRequest vs SessionSaveData, via different vehicle-mapping helpers), so this will fail the Zod validation in buildSessionSave — users clicking "Export session" will hit "Failed to export the session state." Looks like an accidental collision from a rename elsewhere, unrelated to this PR's redesign scope. Probably just needs reverting to mapEditStateToSessionSave.


page.tsx / welcome/page.tsx — nested interactive elements on all 4 cards

The CTA changed from a decorative <span aria-hidden="true"> to a real <button>, nested inside a <div role="button" tabIndex={0} onClick onKeyDown>. Screen readers now announce two nested interactive controls, and clicks/keyboard activation can double-fire via bubbling. Either drop role="button"/tabIndex/onKeyDown from the parent and let the button be the sole target, or revert the CTA to the non-interactive aria-hidden span.


page.tsx / welcome/page.tsx — keyboard focus indicator removed from cards

.landing-card:focus-visible / .welcome-card:focus-visible (the outline styling) was deleted with no replacement — confirmed no focus rule remains in either file. Cards are still tabIndex={0} and keyboard-focusable, so keyboard users now get zero visual feedback on focus.


upload-route/page.tsxaria-label="Remove file" removed from the remove-file button

The button is icon-only (no visible text), so without the label it's inaccessible to screen readers. Worth noting the PR description says this was added — it's actually the opposite.


upload-route/page.tsx — dropped filename truncation and mobile responsive styles

.upload-file-name lost overflow:hidden/text-overflow:ellipsis/white-space:nowrap, so long filenames will overflow the row now that there's also a new checkmark icon taking up width. Separately, the entire @media (max-width: 520px) block was removed (stacked buttons, larger touch targets, responsive padding) — small-screen usability regresses without it.


upload-save-point/page.tsx — duplicate CSS block

The diff appends a second @keyframes upload-spin and .upload-spinner definition that already exists earlier in the same file's <style> block. Harmless (CSS just dedups) but only .upload-parse-error needed to be added here.


Nothing else stood out — the /driver_assist/driver-view route rename checks out, the try/finally fix for the stuck spinner is correct, and the edit/page.tsx dead-code removal (old importedCards migration branch, reindexAddresses) is safe since CSVUploadOverlay already reindexes internally.

One small aside: the PR description credits this PR with removing CSVImportModal.tsx, but that file was already deleted in an earlier merged commit — might be worth trimming that line from the description.

v7ncentng and others added 4 commits July 8, 2026 23:22
Session export was passing an OptimizeRequest into downloadSessionSave
(expects SessionSaveData), failing Zod validation on every click.
Landing/welcome cards nested a role="button" div around a real button,
double-exposing the control to screen readers and dropping the focus
indicator. upload-route lost its remove-file aria-label, filename
truncation, and small-screen layout in the redesign, and
upload-save-point carried a duplicate spinner/error CSS block.
@markboenigk markboenigk merged commit 848192c into benevolentbandwidth:main Jul 9, 2026
4 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.

2 participants