feat(#438): register PCOL Daily Cause List flat-file list type - #863
Conversation
Registers PCOL_DAILY_CAUSE_LIST as a flat-file (strategic) manual-upload cause list in the list-type catalogue. Flat-file list: no JSON schema, no Excel conversion, no bespoke renderer/PDF generator. - libs/list-types/common/src/list-type-data.ts: new catalogue entry (CFT_IDAM, isNonStrategic: false, Public, Civil Court, no urlPath) - apps/postgres/prisma/scripts/001_insert_missing_list_types.sql: prod seed row - apps/postgres/prisma/scripts/003_upsert_sub_jurisdictions_and_list_type_links.sql: Civil Court sub-jurisdiction link - libs/list-types/common/src/list-type-data.test.ts: unit tests for the entry - docs/tickets/438/*: planning docs Closes #438. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughChangesPCOL list type registration
Notification template selection
Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a9c262c7-2913-4773-8b6d-e0800c661d7e
📒 Files selected for processing (8)
apps/postgres/prisma/scripts/001_insert_missing_list_types.sqlapps/postgres/prisma/scripts/003_upsert_sub_jurisdictions_and_list_type_links.sqldocs/tickets/438/plan.mddocs/tickets/438/review.mddocs/tickets/438/tasks.mddocs/tickets/438/ticket.mdlibs/list-types/common/src/list-type-data.test.tslibs/list-types/common/src/list-type-data.ts
| 1. **`allowedProvenance` value.** The ticket says "Restricted provenances: None", but the | ||
| data model requires a value and every sibling Civil list uses `CFT_IDAM`. Options: | ||
| `CFT_IDAM` (consistent with Civil siblings) vs `MANUAL_UPLOAD` (the provenance actually used | ||
| by manual uploads — see `libs/api/src/blob-ingestion/validation.ts`). The plan assumes | ||
| `CFT_IDAM` for consistency. **Please confirm the intended `allowedProvenance`.** | ||
| 2. **Welsh translation sign-off.** "Rhestr Achosion Dyddiol Hawliadau Meddiant Ar-lein" comes | ||
| from the ticket/pip-frontend. Confirm it is the approved Welsh string (no | ||
| `[WELSH TRANSLATION REQUIRED]` placeholder needed). | ||
| 3. **E2E coverage expectation.** Is a dedicated E2E test required for this list type, or is the | ||
| existing manual-upload E2E coverage sufficient? Adding PCOL to | ||
| `e2e-tests/utils/seed-list-types.ts` is only needed if a PCOL-specific journey is written. | ||
| 4. **Prod rollout mechanism.** Confirm the `apps/postgres/prisma/scripts/00x_*.sql` scripts are | ||
| the correct/only path for prod (seeding is skipped when `ENVIRONMENT === "prod"`), and that | ||
| they are executed as part of the release for this change. |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
Update the resolved open questions.
The plan still presents allowedProvenance and PCOL-specific E2E coverage as open questions, while docs/tickets/438/tasks.md records them as resolved or skipped. Update this section to reflect the final decisions and leave only genuinely pending rollout work.
🧰 Tools
🪛 LanguageTool
[formatting] ~157-~157: Insert a comma before quoting reported speech: “says, "”…
Context: ...allowedProvenance value.** The ticket says "Restricted provenances: None", but the ...
(SAID_COMMA_SPEECH)
| - [x] **The PCOL Daily Cause List is created and linked to the Civil jurisdiction; in the manual upload form the list name is displayed as "PCOL Daily Cause List".** | ||
| Data created in `list-type-data.ts:84-93` with `subJurisdictionIds: [1]` (Civil Court) and | ||
| `shortenedFriendlyName: "PCOL Daily Cause List"`; prod rows in | ||
| `001_insert_missing_list_types.sql:14` and Civil link in | ||
| `003_upsert_sub_jurisdictions_and_list_type_links.sql:75-76`. The manual-upload dropdown | ||
| uses `shortenedFriendlyName || friendlyName || name` (pre-existing, proven for sibling | ||
| Civil lists). Runtime UI confirmation is an outstanding manual QA step | ||
| (`tasks.md:9`) but the code change fully satisfies the criterion. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Align approval with the outstanding manual checks.
The review record marks acceptance and approval complete even though the required manual checks remain unchecked.
docs/tickets/438/review.md#L94-L101: leave the runtime-dependent acceptance criterion pending until the manual upload and publication checks are verified.docs/tickets/438/review.md#L127-L134: do not mark the reviewAPPROVEDuntil those checks pass or an explicit waiver is recorded.docs/tickets/438/tasks.md#L9-L10: retain these tasks as release-blocking verification items.
🧰 Tools
🪛 LanguageTool
[grammar] ~94-~94: Did you mean “because”?
Context: ...ia Verification - [x] **The PCOL Daily Cause List is created and linked to the Civil...
(CAUSE_BECAUSE)
📍 Affects 2 files
docs/tickets/438/review.md#L94-L101(this comment)docs/tickets/438/review.md#L127-L134docs/tickets/438/tasks.md#L9-L10
| @@ -0,0 +1,58 @@ | |||
| # #438: Style Guide: PCOL Daily List | |||
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Rename the ticket title to reflect the delivered scope.
The title says “Style Guide”, but the ticket explicitly states that no style guide is required. Rename it to “PCOL Daily Cause List” or similar to avoid misleading future readers.
🎭 Playwright E2E Test Results82 tests 52 ✅ 6m 42s ⏱️ Results for commit 4c2940d. ♻️ This comment has been updated with latest results. |
Preview Deployment Successful 🚀Your preview environment is ready:
The environment will be automatically cleaned up when this PR is closed. |
Register MENTAL_HEALTH_TRIBUNAL_HEARING_LIST as a flat-file, strategic, manually-uploaded list type linked to the Mental Health Tribunal sub-jurisdiction (Tribunal jurisdiction), with Public default sensitivity. - Add catalogue entry to list-type-data.ts (CFT_IDAM, isNonStrategic: false, defaultSensitivity: Public, subJurisdictionIds: [20]) plus unit test - Add prod seed row (001) and sub-jurisdiction link by stable name (003) Flat-file list type: no JSON schema, validator, converter, PDF generator, or list page. Manual upload form auto-populates from findStrategicListTypes(). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…o PI_AAD Change default/allowed provenance from CFT_IDAM to PI_AAD in the list type reference data and the insert-missing-list-types SQL script. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Preview Deployment Successful 🚀Your preview environment is ready:
The environment will be automatically cleaned up when this PR is closed. |
Preview Deployment Successful 🚀Your preview environment is ready:
The environment will be automatically cleaned up when this PR is closed. |
Flat-file lists with no generated PDF/Excel (e.g. PCOL_DAILY_CAUSE_LIST) fell through to the NON_SJP_PDF template, which requires pdf_link_text / pdf_link_to_file personalisation that is only set when a PDF buffer exists. GOV.UK Notify then rejected the send with 'Missing personalisation'. Route the no-attachment case to the no-links template. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Preview Deployment Successful 🚀Your preview environment is ready:
The environment will be automatically cleaned up when this PR is closed. |
…-cause-list # Conflicts: # apps/postgres/prisma/scripts/001_insert_missing_list_types.sql # apps/postgres/prisma/scripts/003_upsert_sub_jurisdictions_and_list_type_links.sql # libs/list-types/common/src/list-type-data.ts
Not part of the PCOL daily cause list ticket. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
libs/list-types/common/src/list-type-data.ts (1)
94-115: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick winRegister the intended PCOL and Mental Health Tribunal list types.
These lines add
ET_DAILY_LISTandET_FORTNIGHTLY_PRESS_LIST, but this PR is intended to registerPCOL_DAILY_CAUSE_LISTand the Mental Health Tribunal list type. BecauseseedListTypes()persists every entry inlistTypeData, the current change will register unrelated lists and leave PCOL unavailable to the catalogue and manual-upload journey. Replace these objects with the required metadata and verify their jurisdiction and display names.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 3290d8d5-a205-4d29-bae3-4d6235f735e6
📒 Files selected for processing (3)
libs/list-types/common/src/list-type-data.tslibs/notifications/src/govnotify/template-config.test.tslibs/notifications/src/govnotify/template-config.ts
|
Preview Deployment Successful 🚀Your preview environment is ready:
The environment will be automatically cleaned up when this PR is closed. |



Summary
Registers
PCOL_DAILY_CAUSE_LIST(Possession Claim Online Daily Cause List) as a flat-file, strategic manual-upload cause list. It is uploaded verbatim (PDF/manual document) through the admin manual-upload journey and served via the existing generic flat-file path — there is no JSON schema, no Excel conversion, no bespoke renderer, and no bespoke PDF generator.Closes #438.
PCOL_DAILY_CAUSE_LISTsubJurisdictionId: 1)falseCFT_IDAMChanges
libs/list-types/common/src/list-type-data.ts— new catalogue entrylibs/list-types/common/src/list-type-data.test.ts— unit tests for the entry (fields, sub-jurisdiction, shortened name, absence of urlPath)apps/postgres/prisma/scripts/001_insert_missing_list_types.sql— prod seed row (TS seeding is skipped in prod)apps/postgres/prisma/scripts/003_upsert_sub_jurisdictions_and_list_type_links.sql— Civil Court linkdocs/tickets/438/*— planning/review docsNote for reviewers
defaultSensitivityis stored as"Public"— the sourcelistLookup.jsonhas an empty string, which defaults to public; no catalogue entry usesnull/"".provenance: "CFT_IDAM"matches every existing Civil sibling list type. The ticket says "no restricted provenances";allowedProvenanceonly affects access forClassifiedsensitivity, so withPublicit is not access-significant.libs/list-types/common/src/list-type-data.test.ts. Whichever PR merges second will conflict on that file — the fix is to keep bothdescribeblocks. This branch's tests live in a single self-containeddescribe("listTypeData PCOL Daily Cause List", ...)block for easy reconciliation.Testing
list-type-data.test.ts, 8 tests passing)yarn workspace @hmcts/list-types-common test— 256 tests passing🤖 Generated with Claude Code
Summary by CodeRabbit