Feedback page: results, responses, who hasn't answered, reminders (2.1.0)

- Supervisor -> Feedback (supervisors and admins, campus-scoped): every
  event's form with answered of asked, response rate, average rating and
  last reminder; per event the results per question (with the AI summary),
  each response, and on named forms who was asked and who has answered.
- Remind those who haven't answered (or one person on a named form): a
  fresh link, plus the form to anyone eligible who hasn't had it; nobody gets
  the form or a reminder twice within 24 hours. The 3-day job is unchanged.
- Anonymous forms show no names and no list of who has answered.
- FeedbackInvite.reminderCount (migration 20261103120000_feedback_reminders);
  access log action feedback_responses; help page; dashboard and Ctrl+K links.
- Roadmap: the AI helpers on the privacy pages are dropped; 2.1.0 is the
  feedback page.
- Tests: tests/feedbackPage.test.ts, e2e/feedback.spec.ts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-03 13:03:05 +02:00
co-authored by Claude Opus 5.5
parent c018772ded
commit 9dda0d1851
31 changed files with 2184 additions and 52 deletions
+5 -4
View File
@@ -1,6 +1,6 @@
# Handover — where things stand and how to carry on
Last updated: 2026-11-03, after **2.0.2** and Hub **1.6.2**. The plan itself is in
Last updated: 2026-11-03, after **2.1.0** and Hub **1.6.2**. The plan itself is in
[ROADMAP-v2.md](./ROADMAP-v2.md) (decisions table at the end); the previous round of
features is in [FEATURES-ROUND-1.md](./FEATURES-ROUND-1.md).
@@ -17,6 +17,7 @@ encrypted settings unreadable or break existing installs.
| Version | What |
|---------|------|
| **2.1.0** | **Feedback page** (Supervisor → Feedback): overview, per-event results / responses / people, **Remind** (all who haven't answered, or one person on a named form; 24-hour gap) — `src/services/feedback.ts`, `src/v2/resources/feedback.ts`, `frontend/src/app/dashboard/supervisor/feedback/page.tsx`; reminders share `sendFeedbackReminders` (utils/feedback.js) with the 3-day job; anonymous forms show no names or who answered; access log `feedback_responses`. Migration `20261103120000_feedback_reminders` (`FeedbackInvite.reminderCount`). Tests `tests/feedbackPage.test.ts`, `e2e/feedback.spec.ts` (the e2e seed puts a named form on the past event). AI on the privacy pages dropped from the roadmap |
| 2.0.2 | **Billing bands:** heartbeat income bands widened to `over R10 000 000` (`BAND_TOPS` in `src/hub/report.js`, every licence-tier edge is a band edge — test in `tests/hub.test.js`), new `income.eventIncome12m` (12 months, no donations/sponsorships/legs) that the tier is billed on, donation legs no longer double-counted. Tiers and prices live in `crosscode-site/src/data/pricing.mjs` and the Hub's `frontend/src/lib/tiers.ts` (Hub 1.6.2) |
| 2.0.1 | **Summarise this report on every report:** the eight reports that list people are sent as anonymised totals built on the screen (`frontend/src/components/reports/aiReportData.ts`; attendees in `buildAiPayload` in `ReportsV2.tsx`); the server refuses personal columns on those (`personalColumns` in `backend/src/ai/helpers.ts`, 403 `AI_REPORT_HAS_PEOPLE`) and logs each (`ai_report`) |
| **2.0.0** | **AI helpers** (draft an event, draft a message, summarise a report or feedback, improve text — `backend/src/ai/`, through the Hub with a rand cap per licence; eval set `npm run ai:eval`); **API v1 removed** (410 `API_V1_REMOVED`; provider webhooks and links in sent messages still answered — [v1 removed](#v1-removed-20)); **Argon2id passwords** with re-hashing at sign-in ([Passwords](#passwords-20)); `node-fetch` removed; React Compiler lint rules back to errors (`lib/hooks.ts`, see [Next.js 16](#nextjs-16-1515)); campus-scope route test on v2 (`tests/v2CampusScope.test.ts`); migration guide `MIGRATING-TO-2.md`. Migration `20261030120000_ai_helpers`. Needs Hub 1.6.0+ for AI |
@@ -99,9 +100,9 @@ encrypted settings unreadable or break existing installs.
a **contact form to info@crosscode.co.za** (needs a small send endpoint on the server — see
§17's building notes); a privacy notice and terms of use; no cookies or analytics. Logo,
colours, wording and screenshots come from Joshua later — start with placeholders.
- **2.1.0 — after the site** (roadmap §18): AI helpers on Privacy → **Consent log** (summarise how
consent moved, as counts per purpose and channel) and **Access log** (a review for the
information officer that flags unusual access, staff sent as pseudonyms). Open questions in §18.
- **2.1.0** (roadmap §18): the **Feedback page** — results per event, each response, who
hasn't answered and a "remind" action. AI helpers on the privacy pages were dropped
(2026-11-03).
- Testing AI locally: run the Hub (`../events-hub`, port 5200), set Settings → AI there, give a
test licence an AI cap, and start Cross Events with `HUB_URL=http://localhost:5200`.
2. **AI rules** (decided 2026-10-29, roadmap §15): the AI buttons show only when the licence's
+26 -29
View File
@@ -22,9 +22,9 @@ providers), maintainable (tests, CI, typed backend, versioned API), and with
| 3 | The five helpers (§15) with their buttons, an eval set, privacy notice text | 2.0.0 | ✅ eval 19/19 through a local Hub (2026-10-30) |
| 4 | v1 removed (webhook paths and old message links keep working); clean-ups: Argon2id passwords with rehash-on-login, `node-fetch` gone, React Compiler lint rules back to errors | 2.0.0 | ✅ |
| 5 | Migration guide (`MIGRATING-TO-2.md`), docs | 2.0.0 | ✅ |
| 6 | Marketing site: Cross Code with a Cross Events page (§17) | `joshua/crosscode-site` | to do — decided 2026-11-02 (§17); content and logo from Joshua. **Done before 2.1.0** (§18) |
| 6 | Marketing site: Cross Code with a Cross Events page (§17) | `joshua/crosscode-site` | ✅ built; prices, founding offer, free month and brochure added in site 1.1.0 (2026-11-03) |
| 7 | 2.0.1: Summarise this report on every report (people reports as anonymised totals) | 2.0.1 | ✅ (§18) |
| 8 | 2.1.0: AI helpers on the privacy pages (Consent log, Access log) | 2.1.0 | planned (§18), after the marketing site |
| 8 | 2.1.0: Feedback page — results, answers, who hasn't answered, reminders (§18) | 2.1.0 | ✅ built. (AI helpers on the privacy pages were dropped on 2026-11-03.) |
The full version list is in [HANDOVER.md](./HANDOVER.md) and the [build order](#suggested-build-order) below.
@@ -82,7 +82,7 @@ Removed from scope (2026-10-28): Wallet passes (§7) and languages (§10).
15. [AI helpers (2.0 headline)](#15-ai-helpers-20-headline)
16. [AI: later stages](#16-ai-later-stages)
17. [Marketing site (Cross Code)](#17-marketing-site-cross-code)
18. [After 2.0: 2.0.x, the site, then 2.1.0](#18-after-20-20x-the-site-then-210)
18. [After 2.0: 2.0.x, the site, then 2.1.0 (the feedback page)](#18-after-20-20x-the-site-then-210-the-feedback-page)
19. [Suggested build order](#suggested-build-order)
20. [Decisions](#decisions-2026-10-22)
@@ -1073,7 +1073,7 @@ Part of 2.0 (decided 2026-10-30): a **simple static HTML site** for selling, not
---
## 18. After 2.0: 2.0.x, the site, then 2.1.0
## 18. After 2.0: 2.0.x, the site, then 2.1.0 (the feedback page)
Decided 2026-11-02. Order: **2.0.1** → **the marketing site (crosscode.co.za, §17)** → **2.1.0**.
The site comes first: 2.1.0 isn't started until crosscode.co.za is live.
@@ -1095,28 +1095,27 @@ crosscode.co.za as decided in §17 (repo `joshua/crosscode-site`, Joshua's own s
form to info@crosscode.co.za, privacy notice and terms, no cookies). Placeholders until Joshua
sends the logo, colours, wording and screenshots.
### 2.1.0: AI helpers on the privacy pages
### 2.1.0: Feedback page
AI buttons on **Privacy → Consent log** and **Privacy → Access log** (admins and the information
officer), reusing the Hub proxy, caps, `<AiButton>` and the `summarise_report` pattern from §15 —
probably as new helpers so they can be switched on and off on their own in Site settings → AI.
Decided 2026-11-03. **AI helpers on the privacy pages (Consent log, Access log) are dropped** —
Joshua doesn't want AI on the privacy pages. 2.1.0 is a full feedback page instead.
- **Consent log — "Summarise consent":** how consent has moved over a period, per purpose and
channel (opt-ins against opt-outs, WhatsApp STOPs, unsubscribes after a broadcast, spikes), and
anything to act on (a purpose many people are leaving, consent given on an older notice text).
Sent as counts per purpose, channel, action and day — never who.
- **Access log — "Review access":** a plain-language review for the information officer: what was
looked at or exported, how much, by which role, and **what looks unusual** (a bulk export at
night, many medical-list views by one person, someone exporting much more than usual, sensitive
entries). Spotting one person's unusual access needs entries grouped per staff member, so staff
are sent as **pseudonyms** ("Staff 1", "Staff 2") that the screen turns back into names — the same
idea as the `[[CONTACT1]]` placeholders — with only their role sent.
- **To decide when it's picked up:** separate helpers or one "summarise a log" helper; how far
back each looks (default 30 days?); whether the access-log review could also run on a schedule
and email the information officer (an automatic monthly check); whether summarising the access
log itself goes in the access log (probably yes, as `ai_access_review`).
- Same as every helper: eval cases, help content, CHANGELOG / WHATS-NEW, the privacy notice only
if what is sent changes.
Post-event feedback forms already exist (event wizard → Feedback, a 3-day automatic reminder, the
Feedback summary report). What was missing is a place for supervisors and admins to **see** the
feedback and to **chase** the people who haven't answered:
- **Supervisor → Feedback** (supervisors and admins; campus-scoped staff see their campuses):
every event with a feedback form — when it goes out or went out, invited, answered, response
rate, average rating.
- **One event's feedback:** the per-question results (star ratings, choices, comments), each
response on its own (with the person's name on a named form), and **People**: who was asked,
who has answered, reminders sent.
- **Remind everyone who hasn't answered:** a fresh link to each, and the form to anyone who has
become eligible since it went out (checked in later). On a named form, one person can be
reminded on their own. Nobody is reminded twice within 24 hours.
- **Anonymous forms stay anonymous:** no names on answers, and no list of who has or hasn't
answered (that would give answers away on a small event) — only the counts.
- Opening a named form's answers is recorded in the access log (`feedback_responses`).
---
@@ -1138,7 +1137,7 @@ probably as new helpers so they can be switched on and off on their own in Site
| 11 | 1.51.0 ✅, 1.51.1 ✅, 1.51.2 ✅, 1.51.3 ✅ | TypeScript backend + OpenAPI + `/api/v2` alongside v1: 1.51.0 foundations (build, launcher, route declarations, errors, paging, OpenAPI at `/docs/v2`, first read endpoints); 1.51.1 registrations and payments as TS services, typed frontend calls; 1.51.2 check-in and accounts; 1.51.3 Express 5, the scanner on v2, v1 deprecation headers, v2-shaped shared middleware | The breaking-change groundwork |
| 11b | 1.51.4 ✅ – 1.51.16 ✅ | **Every endpoint on v2 before 2.0** (decided 2026-10-29): 1.51.4 dependency audit and Node 24 LTS; 1.51.5 Next.js 16 and ESLint 10 (ESLint 9 is out of support); 1.51.6 the complete command palette and ExcelTS instead of exceljs; 1.51.7 setting events up (the staff list, create, change, deactivate, copy-from, notification recipients) and pg-boss 11; 1.51.8 the rest of event set-up (the event in full, ticket options and variants, attachments, sections, costs, uploads, calendar file, alias); 1.51.9 series, season passes, bundles, coupons and campuses; 1.51.10 managing registrations (the staff lists, status, at the door, bulk actions, items, coupons, attendees, attendee forms); 1.51.11 money, staff side (payments, cashup, provider transactions, waitlist, sponsorship, consent, form builder, feedback); 1.51.12 tickets and attendance, staff side (tickets, scan locks, attendance, allocations); 1.51.13 kids check-in and volunteer rosters; 1.51.14 people and messaging (users, WhatsApp, broadcasts, scheduled emails, automations, banner, saved filters, dashboard, stats, analytics, reports); 1.51.15 privacy and admin (privacy, admin, settings, setup, Hub, outbound webhooks, backups); 1.51.16 **incoming webhooks and links in sent messages**: Yoco, PayFast and WAWP webhooks and the links in emails and WhatsApp (unsubscribe, consent, ticket transfer, calendar feeds, waitlist offers) get v2 URLs — new messages and provider registrations use them, and the v1 paths keep answering (links by a 308 redirect to v2, provider webhooks handled by the same code, since providers may not follow a redirect on a POST). Each puts its area's endpoints on v2 (1.51.1 – 1.51.10 by moving the logic into TS services; from 1.51.11 by `v1Route`, which runs the v1 handler behind a v2 route — moving those handlers into TS services is a 2.x clean-up that doesn't change the API), its screens onto `apiV2`, and its v1 routes into `SUCCESSORS`. Then 1.51.17, a security fix (forgot password and sign-in don't reveal accounts) | 2.0 can then remove v1 |
| 12 | **2.0.0** ✅ | **AI helpers** (§15 — headline feature: draft an event, summarise reports and feedback, draft messages, improve text; through the Hub with a rand cap per licence), v1 removed (all of it is on v2 by then; the old webhook URLs and links already sent in messages keep forwarding to v2), migration guide, docs, and the marketing site (§17: a static Cross Code site with a Cross Events page). Released 2026-11-02 (built on `release/2.0` in parts); the marketing site follows in its own repo | The release. AI needs the Hub (phase 6) for the key, metering and caps |
| 13 | 2.0.1 ✅ → marketing site → **2.1.0** | Summarise every report (2.0.1); crosscode.co.za (§17); AI on the Consent log and Access log (2.1.0, §18) | Decided 2026-11-02: the site before 2.1.0 |
| 13 | 2.0.1 ✅ → marketing site ✅ → **2.1.0** | Summarise every report (2.0.1); crosscode.co.za (§17); the feedback page (2.1.0, §18 — replaces AI on the privacy pages, dropped 2026-11-03) | Decided 2026-11-02: the site before 2.1.0 |
Each phase should add matching help content (`frontend/src/content/help/`),
audit log entries, Jest tests, a CHANGELOG entry, and updates to FEATURES.md
@@ -1201,7 +1200,5 @@ feature.
## Still open
- **Marketing site (§17):** everything is decided; waiting on Joshua for the logo, colours, text
about Cross Code, photos and screenshots (built with placeholders meanwhile). Must be done
before 2.1.0 (§18).
- **2.1.0 (§18):** the open questions on the Consent log and Access log helpers.
- **Marketing site (§17):** built; waiting on Joshua's real logo, wording and photos where
placeholders remain.