Skip to content

feat(app): add spreadsheet prospect UI preview (R18) - #10

Open
poisvin wants to merge 1 commit into
mainfrom
feat/prospect-preview-7644
Open

poisvin wants to merge 1 commit into
mainfrom
feat/prospect-preview-7644

Conversation

@poisvin

@poisvin poisvin commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements the approved spreadsheet-style prospect UI preview for Gather R18 / #7644.

  • Uses the existing @codemancers/sheets library: numbered rows, resizable columns for Name, Company, LinkedIn and Actions; no card-based listing.
  • Add, view and edit temporary prospects, with local name/company search and pagination.
  • Validates required fields and HTTPS LinkedIn profile URLs; failed validation preserves the draft and focuses the first invalid field.
  • Supports keyboard interaction and responsive forms; the grid scrolls horizontally on small screens.
  • Displays an explicit non-persistence warning. No API calls, local storage or database writes.
  • Development-only /prospects-preview route follows the existing page.dev.tsx convention. No authentication or backend setup needed to try the preview.

This is a working UI slice, not completion of R18. The three preview fields are not the final retained-field contract. Persistence, backend search/filtering, duplicate conflict handling, custom fields and integration into authenticated navigation remain follow-up work. Column sorting is disabled rather than misleadingly sorting only one local page.

DB architecture / boundary

No DB changes. No tables, columns, foreign keys or migrations are introduced or renamed. Existing authentication storage is untouched. The preview record below is an in-memory UI object, not a Prisma model or proposed schema.

flowchart LR
    Preview["Development-only prospect preview"] --> State["React state only\nid, name, company, linkedinUrl"]
    Preview -. "no calls" .-> API["Backend API — unchanged"]
    API --> DB[("Existing PostgreSQL — unchanged")]
Loading

Data flow

flowchart TD
    Form["Add / edit form"] --> Validate{"Required fields + safe LinkedIn URL"}
    Validate -->|invalid| Errors["Keep draft; show errors; focus field"]
    Errors --> Form
    Validate -->|valid| State["Temporary React state"]
    State --> Search["Search name/company"]
    Search --> Pagination["Local pagination"]
    Pagination --> Grid["Spreadsheet grid"]
    Grid --> Detail["View details"]
    Detail --> Form
    Reload["Reload or leave page"] --> Reset["Discard temporary records"]
Loading

Try it

pnpm exec next dev apps/app --hostname 127.0.0.1 --port 4202

Open http://127.0.0.1:4202/prospects-preview and use test details only. Add a prospect, return to the grid, open its details, edit it, search, then reload to confirm the preview clears.

Verification

  • Passed locally: 13 unit tests, 2 browser tests (desktop/mobile), TypeScript, lint, formatting and diff whitespace checks.
  • Direct code review and static security scan completed. Automated independent review was attempted but unavailable (delegation runtime failure; alternate Codex reviewer returned HTTP 401). No independent approval is claimed; normal PR review is still required.
  • User visually approved the spreadsheet layout.
  • Unit tests cover grid headers, create/edit/cancel, draft preservation, unsafe URLs, required fields, search, pagination and reset.
  • Browser tests cover desktop/mobile, keyboard flow, validation, edit/search, viewport overflow, no browser errors, no data requests and reload reset.

Commands:

pnpm exec vitest run --config apps/app/vitest.config.mts
pnpm exec playwright test --config apps/app-e2e/preview.config.mts --reporter line
pnpm exec tsc --noEmit -p apps/app/tsconfig.json
pnpm exec oxlint apps/app/src/components/prospects apps/app/src/app/prospects-preview apps/app/specs/prospects-preview.spec.tsx apps/app-e2e/preview-tests apps/app-e2e/preview.config.mts
pnpm exec oxfmt --check apps/app/src/components/prospects apps/app/src/app/prospects-preview apps/app/specs/prospects-preview.spec.tsx apps/app-e2e/preview-tests apps/app-e2e/preview.config.mts

The previously reported HTTP 400 was not reproduced; this PR does not claim to fix it.

@poisvin
poisvin force-pushed the feat/prospect-preview-7644 branch from d3b7758 to 69d0300 Compare November 13, 2026 15:57
@poisvin

poisvin commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto current main including merged PR #12. Implementation unchanged (verified with git range-diff). Verification: 85 frontend unit tests, 2 desktop/mobile browser tests and frontend TypeScript passed. Pushed with an explicit force-with-lease; existing local next-env.d.ts change preserved and excluded.

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