-
Notifications
You must be signed in to change notification settings - Fork 0
fix(therapies): stop the catalogue generator consuming its own output (#180) and serve aliases by rewrite (#177) #1886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
4a2b8a7
fix(therapies): stop the catalogue generator consuming its own output
claude 8f0c395
perf(therapies): serve catalogue aliases by rewrite instead of duplic…
claude 4935d26
docs(issues): close #180 and #177, and correct the paths they moved
claude 31c8d0d
docs(ledger): record the review for this branch
claude 6e3e1dd
Merge branch 'main' into claude/therapy-catalogue-alias-rewrite
BigSimmo a3a8100
fix: ship generated therapy assets with app runner
BigSimmo 50ce160
test: cover every next config runner import
BigSimmo 2d0b93d
Merge main into Therapy catalogue asset branch
BigSimmo a1d1f45
Merge branch 'main' into claude/therapy-catalogue-alias-rewrite
BigSimmo fd6cabf
Merge branch 'main' into claude/therapy-catalogue-alias-rewrite
BigSimmo 3905c39
Merge branch 'main' into claude/therapy-catalogue-alias-rewrite
BigSimmo 9e711f1
Merge branch 'main' into claude/therapy-catalogue-alias-rewrite
BigSimmo 1abe95f
Merge branch 'main' into claude/therapy-catalogue-alias-rewrite
BigSimmo b27fed3
Merge branch 'main' into claude/therapy-catalogue-alias-rewrite
BigSimmo 4e7c3ab
fix(docs): update therapy catalogue references
BigSimmo e804ab3
Merge branch 'main' into claude/therapy-catalogue-alias-rewrite
BigSimmo 40eb83e
Merge branch 'main' into claude/therapy-catalogue-alias-rewrite
BigSimmo feca6e0
Merge branch 'main' into claude/therapy-catalogue-alias-rewrite
BigSimmo e24eacf
fix(ci): reconcile therapy docs with ledger inbox
BigSimmo e0f2e60
Merge branch 'main' into claude/therapy-catalogue-alias-rewrite
BigSimmo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
docs/outstanding-issues-inbox/02278dd9-cc4d-4114-8d5e-84414910b886.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "version": 1, | ||
| "id": "02278dd9-cc4d-4114-8d5e-84414910b886", | ||
| "createdOn": "2026-08-13", | ||
| "action": "update", | ||
| "payload": { | ||
| "id": "#175", | ||
| "detail": "VERIFIED CORRECT 2026-08-12 — re-checked against merged main during the full ledger sweep and left unchanged: src/data/therapies-source.json holds 205 records and 0 carry a modality value, exactly as described. This stamp exists so a later reader can tell \"checked and still true\" from \"never looked at\"; the two were indistinguishable before. **Outcome:** the Therapy detail and recommend screens either show a curated modality or stop carrying the field at all. **Detail:** the source catalogue derived `modality` from each record's own tag list — all 205 records had one, every value was also present in that record's `tags`, and the whole catalogue collapsed to CBT/ACT/DBT. It mislabelled the treatments it could not describe: ECT and rTMS as \"ACT\", Psychoanalysis and Psychodynamic Psychotherapy as \"CBT\", MBT and TFP as \"DBT\". Pre-existing on main, surfaced by the PR #1489 review. The generator emits it only when the source curates a value that is not already a tag, which today means null for 205/205 on the index projections *and* the full catalogue the detail/recommend screens load (`catalogue: \"full\"`), so the two chips (`detail-screen.tsx:49`, `recommend-screen.tsx:115`) never render and `select.ts:117` contributes no same-modality point. Removal was provably search-neutral: `src/lib/therapies.ts` scores with boolean `haystack.includes(token)`, not term frequency, and every modality value was already contributed by `tags.join(\" \")` in the same haystack. **Next:** one of two — curate real modality values in `src/data/therapies-source.json` (clinical work, needs the psychiatrist), or drop the field from `types.ts`, `src/lib/therapies.ts`, the two chips and `select.ts`. **Stop:** do not reinstate the tag-derived value to make the chips reappear; a guess rendered as curated fact is the defect. `tests/therapy-compass-pathways.test.ts` pins the echo invariant on both the index and the full catalogue asset. Renumbered from this PR's original `#169` because `main` claimed `#169`–`#174` while the branch was open." | ||
| } | ||
| } |
10 changes: 10 additions & 0 deletions
10
docs/outstanding-issues-inbox/3f38592b-8346-48dc-87d9-acc585ffe5b8.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "version": 1, | ||
| "id": "3f38592b-8346-48dc-87d9-acc585ffe5b8", | ||
| "createdOn": "2026-08-13", | ||
| "action": "update", | ||
| "payload": { | ||
| "id": "#117", | ||
| "detail": "**Outcome:** `/therapy-compass` mobile LCP lands near the other mobile routes instead of double them. **Measured 2026-07-30** by the new pre-merge Lighthouse budget: mobile LCP 5229 ms, TBT 612 ms, CLS 0.142, against 2123-2460 ms on every other mobile route and 826 ms on desktop — so it is client-side work under mobile CPU/network throttling, not server latency. **Cause before this PR:** `useTherapyData` fetched the thin browse index (205 records) for the home/search/pathways screens, so the download plus JSON parse sat on the critical path before content painted. **Current split:** home now fetches `public/therapy-compass-data/therapies-home.211dab554c4ec62d.json` (136,288 bytes raw), pathways use the thin browse index, and search loads the full prose corpus (#1471). 90% of the index weight is long-form clinical prose — indications 159 KB (26%), contraindicationsOrCautions 139 KB (23%), bestUsedFor 73 KB (12%), clinicalSummary 67 KB (11%), patientPopulation 59 KB (10%), targetSymptoms 48 KB (8%) — while name, slug, category, tags and setting together are 54 KB (7%). **Remaining decision for search/pathways: rendered on the card, matched by search, or neither.** `therapy-card.tsx` references five of those prose fields and the same index feeds the search screen, so stripping fields could silently change clinical display or search recall. **Next:** settle that per-field question, then either pre-truncate prose that only feeds card display, or move search matching server-side / load prose on first keystroke. **Gate:** `check:therapy-data-index` plus the therapy Playwright journeys; re-measure with `npm run verify:lighthouse`. **Stop:** do not drop a field from the catalogue payload without confirming no card renders it and no search path matches on it. Same class as #013 (route-chunk / catalogue JSON weight), different route and now measured." | ||
| } | ||
| } |
10 changes: 10 additions & 0 deletions
10
docs/outstanding-issues-inbox/7336de95-160e-4255-b2c0-abcfd7f4e093.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "version": 1, | ||
| "id": "7336de95-160e-4255-b2c0-abcfd7f4e093", | ||
| "createdOn": "2026-08-13", | ||
| "action": "done", | ||
| "payload": { | ||
| "id": "#180", | ||
| "outcome": "Resolved by PR #1886: the hand-edited therapy catalogue moved to `src/data/therapies-source.json`, outside the generated public directory, so regeneration can no longer consume its own output; generated assets remain canonical-byte checked." | ||
| } | ||
| } |
10 changes: 10 additions & 0 deletions
10
docs/outstanding-issues-inbox/976c4c7a-5c74-47e3-975b-046718c54859.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "version": 1, | ||
| "id": "976c4c7a-5c74-47e3-975b-046718c54859", | ||
| "createdOn": "2026-08-13", | ||
| "action": "done", | ||
| "payload": { | ||
| "id": "#177", | ||
| "outcome": "Resolved by PR #1886: unversioned Therapy Compass catalogue aliases are served by Next afterFiles rewrites to the current content-addressed assets with must-revalidate alias headers, while duplicate public alias files are no longer written and the generator guard prevents them reappearing." | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.