Skip to content

fix: Alumni panel: year rows cannot change year or unit, and the lead mark ignores title fixes - #1010

Merged
hueypov merged 2 commits into
devfrom
build/1006-alumni-year-row-fix-d42c2ece
Nov 17, 2026
Merged

hueypov merged 2 commits into
devfrom
build/1006-alumni-year-row-fix-d42c2ece

Conversation

@hueypov

@hueypov hueypov commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Summary

The Alumni panel's "Years on the page" rows can now change their academic year, their department or division, and their mark (Member, Lead or Head), as well as their title. This works on rows from the team record and on rows added on the page. The public Alumni page lists each row under its new year and unit and shows the chosen mark, so a title fix no longer leaves a LEAD tag that contradicts it. The team record (roles) is never written.

  • Record rows: the fix is keyed by the year and group the record gives the row, like title fixes today. A new table alumni_line_fixes (migration 0090, additive) holds the moved year, the moved unit and the mark; the title stays in alumni_role_fixes. Each part left empty shows what the record says.
  • Added rows: their year and unit are edited in place and saved with the list; a new nullable mark column on alumni_added_years holds the mark (an older row reads as Member).
  • Undo: a record row with any fix shows "Undo fixes", which returns its title, year, unit and mark to the record; Save then stores no fix for it. Added rows keep "Remove".
  • Marks on the page: a chosen mark sets the tag and the accent in any group kind. A mark is stored whenever it differs from what the page shows with none chosen (unchosenMark): the record's rank in a department, and nothing elsewhere, where the title decides. So Member picked on an imported "IT Lead" row is kept and the page shows no lead styling. Where the title decides, the panel's mark picker starts with nothing picked.
  • Clashing rows: a moved row or added year whose year and group later gain a team-record row is no longer dropped. The page lists the record's row; the fix panel still lists the moved one, marks both rows as sharing a year and group, and offers Undo. Save refuses ("They already have … in …") until one is changed, so a fix is never deleted silently.
  • Checks: the server refuses a move or an added year that would list the person twice in one group of one year, a year outside 2021–22 to this one, and a unit the record does not have.

Tests cover changing year, unit and mark on a record row and on an added row, the title-fix mark case, a Member mark on an imported lead title, a moved row that clashes with a later record row, undo, and the double-listing refusal (lib/dashboard/alumni.test.ts), plus the migration (lib/seed/additive-migration.test.ts).

LAW-SOURCE: manifest-prose

Fixes #1006

Deviations

  • Scope narrowing — Said: a rendered-visual change attaches before and after captures of the surface it changes. Did: no fabrika ui render captures of /dashboard/alumni are attached. Why: this repo's render command starts next dev, which this lane's rules forbid, and the fix panel sits behind sign-in. Disposition: stated here; the Vercel preview, the unit tests and CI are the evidence.
  • Pre-existing test or fixture changed — Said: existing tests stay as they are. Did: updated the fix-panel fixture in lib/dashboard/alumni.test.ts (a line's source, mark, group kind, and the empty list of clashing lines) and one role fix in lib/about/alumni-record.test.ts to the new line shape, and renamed the test "a record year can only be retitled" to "a fix may not name an added year as one of the record's". Why: a line now carries its source and its mark, and record years are no longer title-only, which this issue changes. Disposition: stated here; the assertions are unchanged.

🤖 Generated with Claude Code

…ger leaves a contradicting mark (#1006)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
website-v2 Ready Ready Preview Nov 16, 2026 11:37pm UTC

Request Review

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

@hueypov

hueypov commented Nov 16, 2026

Copy link
Copy Markdown
Member Author

review-code: FAIL @ b29d46c content:18c3ad02bb37 — chosen mark can be dropped; colliding moved rows vanish from the panel

review-code: FAIL (round 1, head b29d46c)

CI is green at the head: 9 of 9 checks passed, including the required ci-required and the secrets scan. The migration drizzle/0090_alumni_line_fixes.sql only adds things. It creates a new table with its index, checks and audit trigger, and adds a nullable mark column with a check. Nothing is dropped, renamed or rewritten. Server writes keep the existing access checks.

Criteria

  1. Year and unit change on every row: FAIL (see finding B). Record rows and added rows can change year and unit, and roles stay unchanged (after.roles === record.roles in the test). But a moved record row whose new year and group later gain a team-record row is filtered out in laidOut (lib/about/alumni-record.ts). The panel never lists it, so it cannot be edited.
  2. Member / Lead / Head mark shown on the page: FAIL (see finding A).
  3. Undo returns a row to the record: FAIL. Undo works for visible rows: the test "undoing a record row's fix…" passes, and an empty fix is stored as no fix. The hidden row from finding B has no undo control.
  4. Tests cover year, unit and mark on record and added rows: PASS. See the four new tests in lib/dashboard/alumni.test.ts.

Findings

  • A. A chosen mark can be dropped. Both the panel (setMark in components/dashboard/alumni-panels.tsx) and the server check (mark: mark === source.rank ? null : mark in lib/dashboard/alumni.ts) store null when the chosen mark equals the record's rank. Imported, leadership and advisors lines always have rank member. So choosing Member on an imported row titled e.g. "IT Lead" stores no mark, marked stays false, and entryOf falls back to leadsByRole(title). The page still styles the row as a lead. The editor's choice is lost, and the title still decides the mark, which criterion 2 rules out. Fix: keep an explicit mark apart from "use the record", or compare against what the page would show rather than the stored rank. New criterion #5.
  • B. A colliding moved row disappears. laidOut drops a moved line whose new year and group are taken by a record line. alumnusRow only gets the lines that survive, so the panel cannot show, edit or undo that fix. The whole-list save in lib/dashboard/database-alumni.ts then deletes it without a word. New criterion Applications #6.

Test gaps

No test covers an explicit mark that equals the record's rank outside a department, or a collision after the record changes.

Deviations

Two entries are disclosed, and both match what the diff does: no render captures, because rendering needs next dev; and two existing fixtures were moved to the new line shape. Nothing undisclosed that this gate could see.

Diff reading was delegated to codex. I checked both findings myself against the head.

Verdict-written: 2026-11-16T23:28:54Z

#1006)

A picked mark is now stored whenever it differs from what the page shows
with none chosen, so Member on an imported lead title drops the lead
styling. A moved or added row that clashes with a later record row stays
in the fix panel, and Save refuses instead of dropping its fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hueypov

hueypov commented Nov 16, 2026

Copy link
Copy Markdown
Member Author

Repair round 1 at 343ba6c, answering the review-code FAIL at b29d46c.

  • Finding A (chosen mark dropped): the mark is now compared against unchosenMark in lib/about/alumni-record.ts (the record's rank in a department, none elsewhere, where the title decides) instead of the stored rank. A Member pick on an imported, leadership or advisors row is kept, so the page shows it. The panel uses the same function for the picker's value and for clearing a mark. Test: "a mark the editor picks is what the page shows outside a department: Member on an imported lead title shows no lead".
  • Finding B (colliding moved row vanishes): laidOut now keeps the losing line in Alumnus.clashing instead of dropping it. alumnusRow carries it as clashing, the fix panel lists it beside the other rows with a note that two rows share a year and group, and Undo works on it. checkAlumnusFix counts clashing lines, so Save refuses with the double-listing message rather than deleting the fix. Test: "a moved row stays in the fix panel when the record later gains a row where it moved, and Save never drops its fix".

Look first at laidOut and unchosenMark in lib/about/alumni-record.ts, and the mark line of checkRecordRow in lib/dashboard/alumni.ts. PR body summary updated for the new mark and clash behaviour; no render captures, as before.

— at 343ba6c

@hueypov

hueypov commented Nov 16, 2026

Copy link
Copy Markdown
Member Author

review-code: PASS @ 343ba6c content:91d6854cdc08 — both round-1 findings repaired; all six criteria met

review-code: PASS (round 2, head 343ba6c)

CI at the head is settled green: 9 of 9 checks passed, including the required ci-required and the secrets scan. The migration drizzle/0090_alumni_line_fixes.sql is unchanged since round 1 and only adds things (a new table, a nullable mark column, checks, index, audit trigger). Governance is not required on this diff.

This round read the full diff at the head and the repair delta b29d46cc..343ba6c9.

Criteria

  1. Year and unit change on every row, roles unchanged: PASS. Record and added rows take a year and a unit; a moved row that loses its place to a record row is now kept in Alumnus.clashing instead of being dropped, so the panel still lists it (FixForm seeds its rows from row.lines plus row.clashing).
  2. Member / Lead / Head mark shown on the page: PASS. The server (checkRecordRow) and the panel (setMark) now compare the pick against unchosenMark, which is the record's rank only in a department and null elsewhere. So in leadership, imported and advisors groups any picked mark is stored, marked is true, and entryOf uses the mark instead of the title.
  3. Undo returns a row to the record: PASS. The clashing row is listed with the others, so its Undo control is there; the collision test shows an undo stores no fix and the page lists the row in its record year again.
  4. Tests cover year, unit and mark on record and added rows: PASS. The round-1 tests stay, in lib/dashboard/alumni.test.ts.
  5. A picked mark always wins, in every group kind; test on an imported row: PASS. New test "a mark the editor picks is what the page shows outside a department": Member on an imported "IT Lead" stores mark: "member" and the page shows lead: false; Head shows the HEAD tag.
  6. A moved row stays visible, editable and undoable after a collision; Save never silently deletes its fix; test covers it: PASS. New test "a moved row stays in the fix panel when the record later gains a row where it moved…": the row appears in clashing, roleFixed stays true, a Save with the rows as they stand is refused with "They already have 2022–23 in Recovery." rather than dropping the fix, and undo restores it. checkAlumnusFix now counts clashing lines among the record lines, and the save in lib/dashboard/database-alumni.ts builds the row through alumnusRow, which carries clashing. The panel also shows a note on a clashing row telling the editor to change or undo one.

Findings

None blocking. Note: while a clash stands, every Save for that person is refused until the editor moves or undoes one row. That is loud, not silent, so it meets criterion 6.

Deviations

Two entries, both match the diff: no render captures (rendering would need a local dev run), and two existing fixtures moved to the new line shape (here also given groupKind). Nothing undisclosed that this gate could see.

The rendered panel change is routed to review-ui.

Verdict-written: 2026-11-16T23:48:41Z

@hueypov

hueypov commented Nov 16, 2026

Copy link
Copy Markdown
Member Author

Owner visual check (2026-11-17): the Alumni panel's year rows were checked on this PR's preview (year, unit and mark editable). This stands in for the review-ui capture, which could not render the open panel.

@hueypov
hueypov added this pull request to the merge queue Nov 16, 2026
Merged via the queue into dev with commit ebe7506 Nov 17, 2026
10 checks passed
@hueypov
hueypov deleted the build/1006-alumni-year-row-fix-d42c2ece branch November 17, 2026 00:11

This branch was successfully deployed

1 active deployment
Preview — 343ba6c9 Deployed Nov 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Alumni panel: year rows cannot change year or unit, and the lead mark ignores title fixes

1 participant