OpenSpec change add-lead-listing-export (change 4b of the leads design).
What
Lead Listing (/leads): every lead in the company, search by name, mobile (any format) or email, event count, last event and latest salesperson worked out at read time, server paging.
Lead detail (/leads/{leadUuid}): event history and a shared-contact warning; edit form under BO_LEADS_EDIT, read-only otherwise. "View lead" link from the event lead edit page.
xlsx export of the Lead Listing and the Event Leads Listing (Apache POI in mobile-api): on-screen columns only, current search or filters, all pages, mobiles as text, dates as dates, 20,000-row cap (422 EXPORT_TOO_LARGE), audit log line without lead data.
Permissions: BO_LEADS, BO_LEADS_EDIT, BO_LEADS_EXPORT; an export or edit also needs the listing's own module (@AdminModule(also=…), fails closed).
services-system: the ACL menu now keeps url-less M modules with a parent, so the edit and export permissions reach the portal (found in the browser check).
DB: index event_lead (company_id, lead_uuid) and three module rows; SQL in the change folder, mirrored in local/seed/03-colite.sql.
Verification
mvn -T 1C verify for services-counter, mobile-api and services-system: pass.
Portal: 1146 vitest tests, tsc, lint and build: pass.
Playwright on the local stack: searches, detail, edit, invalid mobile, both exports downloaded and read back, 360px detail page, and restricted users (read-only without edit, no Export and 403 without export, not-authorised without BO_LEADS).
Each task passed an Opus review gate; a whole-branch Opus review found no Critical issues, and its Important timeout issue is fixed.
Known follow-up
The API gateway logs POST/PUT bodies, so lead capture, update and search bodies (names, mobiles, emails) reach the gateway log. This predates this change (4a capture has it too) and needs a small gateway change before go-live.
OpenSpec change `add-lead-listing-export` (change 4b of the leads design).
## What
- **Lead Listing** (`/leads`): every lead in the company, search by name, mobile (any format) or email, event count, last event and latest salesperson worked out at read time, server paging.
- **Lead detail** (`/leads/{leadUuid}`): event history and a shared-contact warning; edit form under `BO_LEADS_EDIT`, read-only otherwise. "View lead" link from the event lead edit page.
- **xlsx export** of the Lead Listing and the Event Leads Listing (Apache POI in mobile-api): on-screen columns only, current search or filters, all pages, mobiles as text, dates as dates, 20,000-row cap (422 `EXPORT_TOO_LARGE`), audit log line without lead data.
- **Permissions**: `BO_LEADS`, `BO_LEADS_EDIT`, `BO_LEADS_EXPORT`; an export or edit also needs the listing's own module (`@AdminModule(also=…)`, fails closed).
- **services-system**: the ACL menu now keeps url-less `M` modules with a parent, so the edit and export permissions reach the portal (found in the browser check).
- **DB**: index `event_lead (company_id, lead_uuid)` and three module rows; SQL in the change folder, mirrored in `local/seed/03-colite.sql`.
## Verification
- `mvn -T 1C verify` for services-counter, mobile-api and services-system: pass.
- Portal: 1146 vitest tests, `tsc`, lint and build: pass.
- `openspec validate add-lead-listing-export --strict`: valid.
- Playwright on the local stack: searches, detail, edit, invalid mobile, both exports downloaded and read back, 360px detail page, and restricted users (read-only without edit, no Export and 403 without export, not-authorised without `BO_LEADS`).
- Each task passed an Opus review gate; a whole-branch Opus review found no Critical issues, and its Important timeout issue is fixed.
## Known follow-up
The API gateway logs POST/PUT bodies, so lead capture, update and search bodies (names, mobiles, emails) reach the gateway log. This predates this change (4a capture has it too) and needs a small gateway change before go-live.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
Search lists every lead in the company with its event count, last event
and latest salesperson, worked out at read time. Detail adds the event
history and other leads sharing the mobile or email.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
List, detail and update under /api/admin/leads. Update validates and
normalises like capture and needs both Edit leads and Leads, enforced by
the new also() attribute, which fails closed if any lookup throws.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
Same columns and filters as the screen, all pages, refused above 20,000
rows. Mobiles are text and dates are dates. Each export is logged with
user, listing and row count only. Adds poi-ooxml 4.1.0, as in services-system.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
Lead Listing with search and server paging, lead detail with event
history, shared-contact warning and an edit form under BO_LEADS_EDIT,
and a View lead link from the event lead edit page.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
A binary mobile-api call with the same error shape, export proxy routes
that pass Content-Type and Content-Disposition through, and an Export
button under BO_LEADS_EXPORT that downloads with the current search or
filters and shows EXPORT_TOO_LARGE on the page.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
BO_LEADS_EDIT and BO_LEADS_EXPORT are grantable url-less M modules, but
the ACL menu kept only modules with a url or type A, so the portal's
hasModule never saw them and the edit form and Export button never
showed. Found in the browser check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
The export routes wait up to 120 s as the design says, instead of the
30 s default. Event names and updatedAt can be null, and a history card
for a removed event shows no empty name line. Notes on export paging
and on url-less folder modules in the ACL menu.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
ngqile
merged commit 0de4b089e4 into main2026-11-27 09:35:50 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
OpenSpec change
add-lead-listing-export(change 4b of the leads design).What
/leads): every lead in the company, search by name, mobile (any format) or email, event count, last event and latest salesperson worked out at read time, server paging./leads/{leadUuid}): event history and a shared-contact warning; edit form underBO_LEADS_EDIT, read-only otherwise. "View lead" link from the event lead edit page.EXPORT_TOO_LARGE), audit log line without lead data.BO_LEADS,BO_LEADS_EDIT,BO_LEADS_EXPORT; an export or edit also needs the listing's own module (@AdminModule(also=…), fails closed).Mmodules with a parent, so the edit and export permissions reach the portal (found in the browser check).event_lead (company_id, lead_uuid)and three module rows; SQL in the change folder, mirrored inlocal/seed/03-colite.sql.Verification
mvn -T 1C verifyfor services-counter, mobile-api and services-system: pass.tsc, lint and build: pass.openspec validate add-lead-listing-export --strict: valid.BO_LEADS).Known follow-up
The API gateway logs POST/PUT bodies, so lead capture, update and search bodies (names, mobiles, emails) reach the gateway log. This predates this change (4a capture has it too) and needs a small gateway change before go-live.
🤖 Generated with Claude Code
https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM