proposal-system/HANDOFF-2026-05-22.md
Adam Moussa 594d3395c6 Add UX improvements: clickable KPIs, status tabs, revision grouping, workspace restructure, form sections
Medium-effort improvements:
- Shrink KPI cards and make each clickable (navigates to filtered list)
- Role-specific KPI labels (admin: All Proposals/Pending Review; dispatcher: Total Submitted/In Review)
- Reorder sidebar nav per role (admins see Admin section first)
- Add WO# and Priority columns to Dashboard recent proposals table
- Replace "View All" with "View All Proposals" button with arrow icon
- Add Age column to admin queue with color-coded staleness (>2d orange, >5d red)

Heavy-lift improvements:
- Status tabs on All Proposals page (replace status dropdown with All/In Review/Approved/Sent/Revised tabs)
- Group proposal revisions in tables (expand/collapse, latest shown by default)
- Collapsible left panel in admin workspace (chevron toggle, center panel expands to fill)
- Sticky action bar with total display, item count, vendor cost, compact unsaved-changes chip
- Restructure proposal form into 3 card sections (Job Details, Site & Location, Work Details)
- Disabled-submit helper text showing missing required fields
- Compact status timeline with timestamps under completed steps
- Status explanation below timeline (e.g., "Awaiting admin pricing and approval")
2026-05-27 18:17:48 -04:00

5.7 KiB
Raw Blame History

Session Handoff — 2026-05-22

What was done (committed on main, 7 commits ahead of origin)

Commits 1–4 (prior session)

Commit 1: Site search, PO number, service category, form enhancements

  • Site search UX: Moved "Enter address manually" button outside Autocomplete dropdown (click-race fix), removed flickering searchedOnce state, disabled MUI client-side double-filtering
  • Structured manual entry: 5 separate fields (Site Code, Street, City, State, Zip) auto-assemble into customerAddress string
  • PO number: Added poNumber to frontend form, backend entity, and AddPoNumber migration
  • Service category "Other": Added Other to enum, shows "Specify Category" text field when selected, prepends custom text to notes
  • Label consistency: "Work Order #" → "Work Order Number", "PO Number" on form and detail page
  • Form layout: Top row reflowed to 3-column layout (4/4/4)
  • Dev PDF generation script (scripts/generate-pdf-local.py)

Commit 2: Status/priority display, sortable tables, list filters

  • STATUS_LABELS map: "InReview" → "In Review" everywhere
  • PRIORITY_LABELS map: "Emergency" → "Emergency Dispatch"
  • Sent color changed from green (same as Approved) to blue
  • Urgent rows: orange border + warning icon; Emergency: red border + red background + alert icon
  • All 8 columns in My Proposals list sortable via TableSortLabel (client-side, default Submitted desc)
  • Status, Category, Priority filter dropdowns with server-side filtering; filters reset to page 1

Commit 3: PDF download, versioning, status timeline fix

  • Removed admin-only restriction on GET pdf and GET pdf/{revision} endpoints
  • Added GET pdf/versions endpoint returning {revision, generatedAt}[]
  • "Download PDF" button on detail page for Approved/Sent/Revised proposals
  • "PDF Versions" card with individual download per revision
  • Dev-mode support for GetPdfRevision endpoint
  • Status timeline stepper uses STATUS_LABELS (fixes raw "InReview" display)

Commit 4: Admin workspace revision dropdown, editable WO#, approval fix

  • Bug fix: ApproveAsync now accepts both InReview and Revised proposals
  • Revision dropdown: "Rev X" chip is now a clickable dropdown listing all revisions with status and download
  • Editable Work Order Number: WO# in admin workspace is now editable; added WorkOrderNumber to UpdateProposalRequest
  • Info bar reorder: Customer → Site → WO# → PO# → Category → Priority
  • Download PDF button in action bar for Sent and Revised proposals
  • Typed getHistory API to return ProposalDetail[]

Commits 5–7 (this session)

Commit 5: Fix layout double-offset from persistent drawer

  • The sidebar's persistent Drawer reserved width in the flex container AND the main content had margin-left for the same width, pushing content 440px to the right
  • Removed the redundant margin-left from main content; added transition: width 250ms to the Drawer for smooth toggle

Commit 6: Add role-aware dashboard stats and recent proposals

  • GetStatsAsync now returns global counts for admins/sysadmins instead of filtering by SubmittedById
  • Dashboard recent proposals query uses mine=false for admins so they see all proposals

Commit 7: Apply UX quick wins from external review

  • "Not priced" display: New formatBidAmount() helper replaces $0.00 with "Not priced" across Dashboard, ProposalListPage, AdminDashboard, and ProposalDetailPage
  • Login button consistency: All three dev-login role buttons now use the same filled style with role descriptions (e.g., "Admin — Review and approve proposals")
  • Context-aware empty states: Proposal list distinguishes "no results match filters" from "you have no proposals" with appropriate copy and actions
  • Clear Filters button: Added to ProposalListPage and AdminDashboard filter rows; appears when any filter/search is active
  • Workspace button clarity: "Regenerate" renamed to "Regenerate Suggested Line Items"; disabled Save/Approve buttons show tooltip explanations
  • Plain language: Similar Proposals empty state changed from "RAG engine" jargon to "Similar proposals will appear here when available"
  • User Management placeholder: Centered layout with "Coming Soon" heading and Cognito guidance text
  • Screenshot script: scripts/screenshot-pages.mjs captures all pages for all 3 roles via Puppeteer (incognito contexts, dev-login button clicks)

What's running locally

Not done yet

Must do before push

  • Not pushed — 8 commits on main ahead of origin, needs git push
  • CDK compute stack needs IAmazonDynamoDB read permission on verified-sites table for production SiteService

UX improvements (from external review — DONE)

All 15 medium-effort and heavy-lift UX improvements from the external review have been implemented (commit 8).

Infrastructure / ops

  • Confluence architecture map update (page id 1540098)
  • [skip deploy] convention not implemented in deploy workflow
  • Automated test suite not started

Mobile

  • App icons still placeholders
  • Google OAuth mobile crash uninvestigated

Compliance Fixes Applied (2026-05-18)

  • Fixed oss-index-creator Lambda: added functionName, architecture: ARM_64, logRetention: TWO_MONTHS
  • Added node-version: "24" to all CI workflow reusable calls (web, mobile, infra)
  • Removed dead _api_request() helper and unused time imports from all 4 main Python Lambdas
  • Added permissions: id-token: write to deploy-mobile.yaml for OIDC
  • Added paths-ignore: mobile/** to deploy.yaml
  • Added @react-native-community/cli + cli-platform-ios as mobile devDependencies