Update session handoff with current state and remaining tasks

Consolidates all 7 commits (4 prior + 3 this session), organizes
remaining UX review items by effort level, and documents outstanding
infrastructure and mobile tasks.
This commit is contained in:
Adam Moussa 2026-05-22 17:31:49 -04:00
parent 85bed9a161
commit d583f99f5b

106
HANDOFF-2026-05-22.md Normal file
View file

@ -0,0 +1,106 @@
# 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
- Postgres via Docker (port 5432)
- .NET API on http://localhost:5000 (dev mode, ASPNETCORE_ENVIRONMENT=Development)
- Vite frontend on http://localhost:5173
## Not done yet
### Must do before push
- **Not pushed** — 7 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 — medium effort)
- Shrink KPI cards 25–35%, make each clickable (navigate to filtered list)
- Role-specific KPI labels (dispatcher: My Submitted / Needs Revision; admin: Pending Review / Urgent / Unpriced)
- Reorder nav items per role (admins: Admin Queue first, dispatchers: Dashboard first)
- Move Priority column before Status in tables
- Add Age column to admin queue (e.g., "2h", "1d")
- Replace "View All" with stronger "View All Proposals" button
- Add WO # and Priority to Dashboard recent proposals table
### UX improvements (from external review — heavy lift)
- Group proposal revisions in tables (show latest only, expand for history)
- Restructure admin workspace layout (wider center panel, collapsible submission details, hide empty Similar Proposals)
- Restructure proposal form into sections (job identifiers, site/location, work details, attachments)
- Status tabs on All Proposals page (replace status dropdown)
- Sticky action bar in admin workspace with total display
- Add disabled-submit helper text on proposal form ("Complete required fields to submit")
- Reduce status timeline height 30–40%, add timestamps under completed steps
- Add "current status" explanation on detail page (e.g., "Awaiting admin pricing and approval")
### 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