Skip to content

feat(frontend): rebuild team management as a save-once workspace - #214

Merged
sabinem merged 1 commit into
mainfrom
feat/team-formation
Aug 21, 2026
Merged

feat(frontend): rebuild team management as a save-once workspace#214
sabinem merged 1 commit into
mainfrom
feat/team-formation

Conversation

@sabinem

@sabinem sabinem commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

The manage-teams page could not cope with a hundred participants: people were chips in a wrap, preferences were truncated titles, and every drag was a server round trip.

It is now two columns — projects with their teams on the left, unassigned on the right, both scrollable — and people are full-width rows wherever they sit. Each project carries a number, and a participant's preferences show as those numbers rather than titles, with the matching one highlighted inside a team so it is obvious whether someone got what they asked for.

"Suggest teams" builds a whole distribution from everyone's preferences. The rule is deliberately singular: everyone goes to a project they picked, spread evenly across their options, and no team exceeds six. There is no minimum team size. A minimum sounds reasonable and generates every hard case — projects dissolved, people redistributed, totals that satisfy no split, teams emptied when the number is raised — for a judgement that belongs to the organizer anyway. A project two people want is a team of two, and dragging is the tool for deciding otherwise. The algorithm lives in $lib/utils/teamDistribution so it can be tested without a page around it.

The page is now a workspace rather than a series of instructions: dragging, adding, renaming, deleting and clearing all happen in the browser, the header shows what is pending, and one Save writes it. That collapses move, createTeam, renameTeam, deleteTeam and clearAssignments into a single save action which takes the complete desired state and reconciles — deletes first, then creates and renames, then the membership difference.

Applying is slow by construction: there is no bulk RPC, so a hundred people is a few hundred sequential calls.

The manage-teams page could not cope with a hundred participants: people
were chips in a wrap, preferences were truncated titles, and every drag was
a server round trip.

It is now two columns — projects with their teams on the left, unassigned on
the right, both scrollable — and people are full-width rows wherever they
sit. Each project carries a number, and a participant's preferences show as
those numbers rather than titles, with the matching one highlighted inside a
team so it is obvious whether someone got what they asked for.

"Suggest teams" builds a whole distribution from everyone's preferences.
The rule is deliberately singular: everyone goes to a project they picked,
spread evenly across their options, and no team exceeds six. There is no
minimum team size. A minimum sounds reasonable and generates every hard
case — projects dissolved, people redistributed, totals that satisfy no
split, teams emptied when the number is raised — for a judgement that
belongs to the organizer anyway. A project two people want is a team of two,
and dragging is the tool for deciding otherwise. The algorithm lives in
$lib/utils/teamDistribution so it can be tested without a page around it.

The page is now a workspace rather than a series of instructions: dragging,
adding, renaming, deleting and clearing all happen in the browser, the
header shows what is pending, and one Save writes it. That collapses move,
createTeam, renameTeam, deleteTeam and clearAssignments into a single
`save` action which takes the complete desired state and reconciles —
deletes first, then creates and renames, then the membership difference.

Applying is slow by construction: there is no bulk RPC, so a hundred people
is a few hundred sequential calls.
@sabinem
sabinem merged commit 3332408 into main Aug 21, 2026
2 checks passed
@sabinem
sabinem deleted the feat/team-formation branch August 21, 2026 14:14
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.

1 participant