docs: drop RD-16 — the instruction would have discarded server decisions
RD-16 was to make parseDashboardView return BigProfile directly, on the
plan's claim that DashboardViewDto, DashboardView and BigProfile were
three names for one payload. Reading the type disproves it.
DashboardView is a pair of BigProfile and HerregistratieDecisions.
BigProfile is { registration, person } and has nowhere to put decisions,
so returning it directly would silently drop the server-computed
herregistratie eligibility — the value ADR-0001 says the front end must
render rather than recompute.
The store's two map calls are not a redundant hop either. They project
one aggregate into two independently consumed signals, and six files read
them separately.
Also withdraw the earlier correction that "Step 2 did not fully land".
That claim came from reading the parse signature without reading the type
it returns. Commit 42e7a1e did the right parts, including moving
HerregistratieDecisions into domain, and correctly left alone the part
that would have been wrong.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -174,7 +174,7 @@ ticket is picked. The phase sections below this table are the source for each ti
|
||||
| RD-13 | Same for org-template, folding `pendingPublish` in | 12 | 1b#2a,#6 | |
|
||||
| RD-14 | Move `SaveState` to `debounced-save.ts`; delete `action-state.ts` | 13 | 1b#2b | |
|
||||
| RD-15 | Delete `.claude/worktrees/` (22 checkouts, 4.7 GB) | 01 | 2.1 | |
|
||||
| RD-16 | `parseDashboardView` returns `BigProfile`; delete `DashboardView` | 01 | 2.2 | |
|
||||
| RD-16 | ~~`parseDashboardView` returns `BigProfile`~~ DROPPED — would discard decisions | 01 | 2.2 | |
|
||||
| RD-17 | `successOf`/`successOr` sweep — 10 sites, 8 files | 01 | 2.3 | |
|
||||
| RD-18 | Ticket sweep, frontend — 181 refs / 100 files | 01 | 2.4 | |
|
||||
| RD-19 | Ticket sweep, backend — 370 refs / 86 files | 01 | 2.4 | |
|
||||
@@ -496,12 +496,38 @@ fix both bugs. If the budget shrinks, stop after A5; B3 and B2 are hygiene, not
|
||||
`637d500` merged the whole RB-01..RB-33 arc. **RD-15 must re-verify all 22 before removing
|
||||
any** — check every branch tip is an ancestor of `main`, and stop if one is not.
|
||||
|
||||
2. **Finish Step 2's name collapse** (committed as done, but did not land):
|
||||
`parseDashboardView` still returns `DashboardView`
|
||||
(`registratie/infrastructure/dashboard-view.adapter.ts:119`), and
|
||||
`big-profile.store.ts` pays twice — line 35 computes `RemoteData<Err, DashboardView>`,
|
||||
line 45 re-maps to `RemoteData<Err, BigProfile>`. Make the parse return `BigProfile`
|
||||
directly and delete the intermediate. One payload, one name.
|
||||
2. ~~**Finish Step 2's name collapse.**~~ **DROPPED while executing RD-16 — the instruction
|
||||
was wrong, and following it would have introduced a bug.**
|
||||
|
||||
This plan claimed `DashboardViewDto → DashboardView → BigProfile` was "three names for one
|
||||
payload" and that `parseDashboardView` should return `BigProfile` directly. Reading the
|
||||
type disproves it:
|
||||
|
||||
```ts
|
||||
export interface DashboardView {
|
||||
profile: BigProfile;
|
||||
decisions: HerregistratieDecisions;
|
||||
}
|
||||
```
|
||||
|
||||
`DashboardView` is a **pair**, and `BigProfile` is `{ registration, person }` — one
|
||||
_member_ of that pair, with nowhere to put `decisions`. Returning `BigProfile` directly
|
||||
would silently discard the server-computed herregistratie eligibility, which is exactly
|
||||
what ADR-0001 says the front end must render rather than recompute.
|
||||
|
||||
The store's two `map` calls are not a redundant hop either: they project one aggregate into
|
||||
two independently-consumed signals, and six files consume them separately — for example
|
||||
`mijn-registratie.section.ts` takes `profile` while `wat-moet-ik-regelen.section.ts` takes
|
||||
`decisions`.
|
||||
|
||||
So the three names are a wire DTO, a screen-shaped aggregate, and a component of that
|
||||
aggregate. Three different things, correctly named.
|
||||
|
||||
**The other half of Step 2 was already done correctly:** `HerregistratieDecisions` lives in
|
||||
`registratie/domain/registration.ts:40`, not in `contracts/`, and only one hand-written
|
||||
contracts file remains (`duo-diplomas.dto.ts`, a different endpoint). Commit `42e7a1e` did
|
||||
the parts that were right and correctly left alone the part that would have been wrong.
|
||||
|
||||
3. **`successOf` / `successOr` sweep** — 10 inline unwraps remain in 8 files. They do not all
|
||||
want the same helper:
|
||||
- `undefined` fallback → existing `successOf`: `beoordeling.page.ts:78`
|
||||
@@ -852,8 +878,11 @@ End to end, after Phase 0 and Phase 3:
|
||||
|
||||
Measured against the current tree, not assumed:
|
||||
|
||||
- **Step 2 did not fully land** — the `DashboardViewDto → DashboardView → BigProfile` chain is
|
||||
intact (Phase 2.2).
|
||||
- ~~**Step 2 did not fully land.**~~ **This correction was itself wrong, and is withdrawn.**
|
||||
The chain is intact because it _should_ be: `DashboardView` is a pair of `BigProfile` and
|
||||
`HerregistratieDecisions`, not a third name for either. Collapsing it would discard the
|
||||
server-computed decisions. The claim was made by reading the parse signature without reading
|
||||
the type it returns. See Phase 2.2, now dropped.
|
||||
- **7 files exceed 250 lines, not 8.** The plan counted by `wc -l`; the rule as specified uses
|
||||
`skipBlankLines` + `skipComments`. `concepts.page.ts` (472) was missing from its list, but
|
||||
`behandel-scherm` (232) and `stamdata-table-editor` (236) were on it and already pass.
|
||||
|
||||
@@ -110,7 +110,7 @@ two. Note that RD-15 exists because 22 abandoned agent worktrees are still on di
|
||||
| RD-13 | Same for org-template, folding `pendingPublish` in | 12 | | done |
|
||||
| RD-14 | Move `SaveState` to `debounced-save.ts`; delete `action-state.ts` | 13 | | done |
|
||||
| RD-15 | Remove 22 abandoned agent worktrees (4.7 GB) | 01 | | done |
|
||||
| RD-16 | `parseDashboardView` returns `BigProfile`; delete `DashboardView` | 01 | | todo |
|
||||
| RD-16 | ~~`parseDashboardView` returns `BigProfile`~~ — DROPPED, see PLAN.md 2.2 | 01 | | n/a |
|
||||
| RD-17 | `successOf`/`successOr` sweep — 10 sites, 8 files | 01 | | todo |
|
||||
| RD-18 | Ticket-reference sweep, frontend — 181 refs, 100 files | 01 | | todo |
|
||||
| RD-19 | Ticket-reference sweep, backend — 370 refs, 86 files | 01 | | todo |
|
||||
|
||||
Reference in New Issue
Block a user