The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.
Private project: add people from the People panel Implementation Plan
For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (
- [ ]) syntax for tracking.
Goal: A project owner adds Swarm people to a private project from the roster's This project ▸ People "+", through a picker (mockup option B).
Architecture: Desktop only. A new file desktop/lib/super_tabs/project_add_people.dart has a pure list builder and the picker dialog. The dialog sends the existing project.sharing command with the live member list plus the ticked ids. roster.dart points the People "+" at it under the spec's four conditions.
Tech Stack: Flutter/Dart (desktop), flutter_test widget tests with the ConversationServer fixture.
Spec: docs/specs/2026-11-04-private-project-add-people.md
Global Constraints
- Copy, verbatim: tooltip "Add people to this project"; title "Add people to "; search placeholder "Search people in this Swarm"; sections "Not in this project" and "Already in"; owner mark "Project owner"; empty "Everyone in this Swarm is in this project."; no match "No one matches"; buttons "Cancel" and "Add 1 person" / "Add N people".
- Command, exactly:
{'type': 'project.sharing', 'projectId': id, 'visibility': 'private', 'memberIds': [...]}. No backend change. memberIds= live snapshotmemberIdsat Add time ∪ ticked ids that are still Swarm people, minus the owner, no duplicates.- The "+" is the picker only when: the scope is This project with a readable open project (
scoped != null),scoped.isPrivate,scoped.ownerId == c.accountId, andc.canWrite. Otherwise the heading behaves exactly as today. - Desktop only (desktop/lib). Nothing in mobile/, web, backend or cli.
Review Focus
- A member added from another device while the picker is open is kept, because Add reads the live snapshot (Task 2 test "keeps a member added since the dialog opened").
- A refused Add (PROJECT_OWNER_REQUIRED or a 200-cap error) keeps the dialog open with the ticks and shows the error (Task 2 test "a refused Add stays open with its error").
- Search with spaces or capital letters still matches (Task 1 test "search ignores case and surrounding spaces").
- A ticked person who left the Swarm before Add is not sent (Task 2 test "drops a ticked person who left the Swarm").
- A non-owner, or a public project, never gets the picker, and keeps today's "+" (Task 3 tests).
Task 1: The picker's lists
Files:
- Create:
desktop/lib/super_tabs/project_add_people.dart - Test:
desktop/test/super_tab_project_add_people_test.dart
Interfaces:
Produces:
({List<SuperTabPerson> addable, List<SuperTabPerson> inProject}) projectPeopleLists(List<SuperTabPerson> people, SuperTabProject project, String query), andString projectPersonName(SuperTabPerson p)(p.name ?? p.username).Step 1: Write the failing tests (
group('projectPeopleLists')), with people built throughSuperTabPerson.fromJsonand a project throughSuperTabProject.fromJson(ownerowner, members[dee], private), Swarm people owner, dee, tony, Ana (name: 'Ana'):- "splits the Swarm into who can be added and who is in":
addableids['Ana' person, 'tony']sorted byprojectPersonNamecase-insensitively;inProjectids['owner', 'dee'], owner first. - "search ignores case and surrounding spaces": query
' TON 'givesaddable[tony]andinProject[]. Query'example.com'matches by email. - "no one to add": with every person a member,
addableis empty.
- "splits the Swarm into who can be added and who is in":
Step 2: Run
cd desktop && flutter test test/super_tab_project_add_people_test.dart. Expected: FAIL,projectPeopleListsis not defined.Step 3: Implement both functions in
project_add_people.dart. The query is trimmed and lowercased, and matched as a substring ofname,usernameandemail.Step 4: Run the same command. Expected: PASS.
Step 5: Commit
git add desktop/lib/super_tabs/project_add_people.dart desktop/test/super_tab_project_add_people_test.dart && git commit -m "Desktop: the lists of a private project's Add people picker"
Task 2: The picker dialog
Files:
- Modify:
desktop/lib/super_tabs/project_add_people.dart - Test:
desktop/test/super_tab_project_add_people_test.dart
Interfaces:
Consumes:
projectPeopleLists,projectPersonName(Task 1);SuperTabController.command(Map)returns null on failure and setsoperationError.Produces:
Future<void> showProjectAddPeople(BuildContext context, SuperTabController c, SuperTabProject project). Widget keys:ValueKey('project-add-search'),ValueKey('project-add-person-<id>')(each checkbox row),ValueKey('project-add-confirm').Step 1: Write the failing widget tests (
group('showProjectAddPeople')). Pump aMaterialAppwith a button that callsshowProjectAddPeople(context, controller, project)for aConversationServerwhoseleadproject is private, ownerowner, members[{'id':'dee'}], with people dee and tony added (assuper_tab_roster_scope_test.dartswarm()does):- "lists who can be added and who is in": finds the "Add people to " title,
project-add-person-tony, noproject-add-person-dee, and the text "Project owner".project-add-confirmis disabled. - "ticking tony and Add sends project.sharing and closes": after the tap on Add, the server's
leadprojectmembersids are['dee', 'tony'],visibilityis'private', and the dialog is gone. The button read "Add 1 person" before the tap. - "keeps a member added since the dialog opened": with the dialog open, set the server project's members to dee and ana, add person ana,
await controller.refresh(), tick tony, Add. Expect members{dee, ana, tony}. - "drops a ticked person who left the Swarm": tick tony, remove tony from
server.state['people'], refresh, Add. Expect members['dee']. - "a refused Add stays open with its error": set
server.refuse = {'code': 'PROJECT_OWNER_REQUIRED', 'message': 'Only the project owner can manage this project.'}, tick, Add. Expect the dialog still shown, that message shown, and tony's checkbox still ticked. - "search narrows both lists, and an empty match says so": type
'zzz'inproject-add-search. Expect "No one matches". With every person a member, expect "Everyone in this Swarm is in this project.".
- "lists who can be added and who is in": finds the "Add people to " title,
Step 2: Run
cd desktop && flutter test test/super_tab_project_add_people_test.dart. Expected: FAIL,showProjectAddPeopleis not defined.Step 3: Implement
showProjectAddPeoplewithshowAppDialogandSuperTabDialogScope(controller: c, projectId: project.id, requireWrite: true), laid out like the Sharing dialog inproject_options.dart(AlertDialog, width 400,CheckboxListTilerows,DesktopChrometext styles). Rebuild fromc(ListenableBuilder) so the lists follow the live snapshot. On Add, set busy, then read the live project (c.snapshot?.projectsby id) and the live people, buildmemberIdsper Global Constraints,await c.command(...), pop on non-null, else clear busy. The button label is "Add 1 person" for one tick, "Add N people" otherwise.Step 4: Run the same command. Expected: PASS.
Step 5: Commit
git add desktop/lib/super_tabs/project_add_people.dart desktop/test/super_tab_project_add_people_test.dart && git commit -m "Desktop: Add people picker for a private project"
Task 3: The People "+" opens it
Files:
- Modify:
desktop/lib/super_tabs/roster.dart:621-625(PeopleSuperTabSectionHeading) - Test:
desktop/test/super_tab_roster_scope_test.dart
Interfaces:
Consumes:
showProjectAddPeople(Task 2);scoped(roster.dart:513),c.accountId,c.canWrite,c.isOwner,widget.onInvite.Step 1: Write the failing tests in
super_tab_roster_scope_test.dart, usingswarm(tester, board: false)with theleadproject made private with members[{'id':'dee'}], thenchoose(tester, 'This project'):- "the project owner adds people to a private project from People's +": the tooltip "Add people to this project" exists. Tapping it shows "Add people to openharness" (the fixture project's name). Tick
project-add-person-tony, tapproject-add-confirm, and afterpumpAndSettleperson('tony')is found. - "a public project keeps the Swarm invite on People's +": with the project public, the tooltip is "Invite people", and tapping it calls the fixture's invite callback.
- "someone who does not own the private project gets no picker": with the fixture on account
dee(RosterFixture(account: 'dee'), or the existing way the file switches account), "Add people to this project" is not found.
- "the project owner adds people to a private project from People's +": the tooltip "Add people to this project" exists. Tapping it shows "Add people to openharness" (the fixture project's name). Tick
Step 2: Run
cd desktop && flutter test test/super_tab_roster_scope_test.dart. Expected: the first test FAILs (no such tooltip). The other two pass already, which pins today's behaviour.Step 3: Implement in the People heading:
final addsToProject = scoped != null && scoped.isPrivate && scoped.ownerId == c.accountId && c.canWrite;thenonAdd: addsToProject ? () => unawaited(showProjectAddPeople(context, c, scoped)) : c.isOwner ? widget.onInvite : null, andaddTooltip: addsToProject ? 'Add people to this project' : 'Invite people'.Step 4: Run
cd desktop && flutter test test/super_tab_roster_scope_test.dart test/super_tab_roster_test.dart test/super_tab_project_add_people_test.dart && flutter analyze lib/super_tabs/project_add_people.dart lib/super_tabs/roster.dart. Expected: all pass, and analyze shows no issue in these two files.Step 5: Commit
git add desktop/lib/super_tabs/roster.dart desktop/test/super_tab_roster_scope_test.dart && git commit -m "Desktop: a private project's People + adds people to it (Diego)"