Skip to content

Add and remove projects from the Add project dialog, as GitHub's repository picker does - #740

Merged
lavaman131 merged 1 commit into
mainfrom
feat/project-picker
Oct 29, 2026
Merged

lavaman131 merged 1 commit into
mainfrom
feat/project-picker

Conversation

@lavaman131

@lavaman131 lavaman131 commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

The Add project dialog could only add: choosing a repository added it and
closed the dialog, and one already added showed greyed out with nothing to
do. Nothing anywhere could take a repository out of the Projects sidebar.

The dialog now works like GitHub's multi-select repository picker (Primer's
SelectPanel): each row is a checkbox and the repository's full name,
projects listed first as it opens, and choosing a row (click, Enter or
Space) adds or removes it at once. The list never reorders after a choice.
It stays open for several changes and closes with Escape or a click
outside. With no projects yet, the first one added still closes it, so a
first run goes straight to creating a document. A row being changed shows
a spinner in its checkbox; a failure restores it and says why.

  • Server: NavigationStore.removeProject (memory and PostgreSQL, one storage
    contract), and DELETE /api/navigation/projects/:repositoryId (same-origin,
    signed in, 204 or 404). Removing the repository of the last document
    forgets that document. Opening a document there adds the project back.
  • Web: PaletteListbox takes checked, set as aria-checked, while
    aria-selected keeps meaning the highlighted row. The checkbox is drawn as
    choice-control's, inside the option, so no control nests in another.
    The sidebar moves focus to a new project only when the dialog closes
    with it; while the dialog stays open it keeps focus. removeProject lives
    in the lazily loaded dialog, keeping the initial JavaScript within budget.
  • e2e/machine-choice.e2e.ts closes the dialog with Escape after its second
    and third projects, as it now stays open.

Assistant-model: Claude Opus 5.5 (fast)
Assistant-workflow: inline
Assistant-verification: Chromium E2E passed: machine-choice, hosted, document-creation, auth-lifecycle, keyboard-shortcuts and shell suites (102 pass), and machine-choice's "creating projects" 8 of 8 with --repeat-each 4, which failed in CI before focus stayed in the open dialog
Assistant-verification: bun test unit passed: apps/web/src (847 pass), src/navigation (10 pass), storage contract in memory and against postgres:17
Assistant-verification: typecheck, lint and build passed: bun run types, bun run ci, bun run build (initial JS 257905 B, under the 258000 B budget)
User-preference: Model the project picker on GitHub's repository selection UI with checkboxes, and remove anything excessive
Co-authored-by: Alex Lavaee lavaman131@github.com

Add project with checkboxes: octocat/notes checked

Base automatically changed from feat/sidebar-live-documents to main October 29, 2026 05:32
@lavaman131
lavaman131 force-pushed the feat/project-picker branch 2 times, most recently from 2d2ae13 to 76d8518 Compare October 29, 2026 05:47
…sitory picker does

The Add project dialog could only add: choosing a repository added it and
closed the dialog, and one already added showed greyed out with nothing to
do. Nothing anywhere could take a repository out of the Projects sidebar.

The dialog now works like GitHub's multi-select repository picker (Primer's
SelectPanel): each row is a checkbox and the repository's full name,
projects listed first as it opens, and choosing a row (click, Enter or
Space) adds or removes it at once. The list never reorders after a choice.
It stays open for several changes and closes with Escape or a click
outside. With no projects yet, the first one added still closes it, so a
first run goes straight to creating a document. A row being changed shows
a spinner in its checkbox; a failure restores it and says why.

- Server: NavigationStore.removeProject (memory and PostgreSQL, one storage
  contract), and DELETE /api/navigation/projects/:repositoryId (same-origin,
  signed in, 204 or 404). Removing the repository of the last document
  forgets that document. Opening a document there adds the project back.
- Web: PaletteListbox takes `checked`, set as aria-checked, while
  aria-selected keeps meaning the highlighted row. The checkbox is drawn as
  choice-control's, inside the option, so no control nests in another.
  The sidebar moves focus to a new project only when the dialog closes
  with it; while the dialog stays open it keeps focus. removeProject lives
  in the lazily loaded dialog, keeping the initial JavaScript within budget.
- e2e/machine-choice.e2e.ts closes the dialog with Escape after its second
  and third projects, as it now stays open.

Assistant-model: Claude Opus 5.5 (fast)
Assistant-workflow: inline
Assistant-verification: Chromium E2E passed: machine-choice, hosted, document-creation, auth-lifecycle, keyboard-shortcuts and shell suites (102 pass), and machine-choice's "creating projects" 8 of 8 with --repeat-each 4, which failed in CI before focus stayed in the open dialog
Assistant-verification: bun test unit passed: apps/web/src (847 pass), src/navigation (10 pass), storage contract in memory and against postgres:17
Assistant-verification: typecheck, lint and build passed: bun run types, bun run ci, bun run build (initial JS 257905 B, under the 258000 B budget)
User-preference: Model the project picker on GitHub's repository selection UI with checkboxes, and remove anything excessive
Co-authored-by: Alex Lavaee <lavaman131@github.com>
@lavaman131
lavaman131 merged commit 80ac995 into main Oct 29, 2026
24 checks passed
@lavaman131
lavaman131 deleted the feat/project-picker branch October 29, 2026 05:52
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