Skip to content

Spaces: named groups for organizing projects in the sidebar - #232

Merged
currentbits merged 9 commits into
mainfrom
coder/spaces-named-groups-for-organizing-proje-471613
Aug 17, 2026
Merged

currentbits merged 9 commits into
mainfrom
coder/spaces-named-groups-for-organizing-proje-471613

Conversation

@currentbits

@currentbits currentbits commented Aug 17, 2026 •

Copy link
Copy Markdown
Owner

Closes #159.

The sidebar has always been a flat project list. Past about five projects, finding a thread turns from scanning into hunting — which is exactly the point where Solenta's target user (client work, product, experiments, all at once) needs it most. This adds a grouping layer.

What a Space is

{ id, name } and nothing else. A project belongs to at most one via an optional spaceId; anything unassigned falls into a trailing section. With zero spaces the sidebar renders exactly as it does today — nobody who ignores the feature sees a change, which is what makes this safe to merge.

Changes

Shared contract — SpaceInfo, ProjectInfo.spaceId, ProjectUpdateInput.spaceId, and a spaces CRUD surface on CoderApi (spaces:list/add/update/remove), implemented by the preload, the web wire client, the browser dev mock and the test fake.

Electron main — spaces: [] in the store, where array order is display order. spaceId is normalised in migrateProject to an absent key rather than null, matching how remoteHost/remotePath already behave, so old stores need no migration step. removeSpace drops the space and unassigns its projects — it never deletes a project or touches a repo on disk. updateProject rejects an unknown spaceId instead of persisting a dangling reference.

Renderer — a new buildSidebarSections() layers spaces over the existing buildSidebarGroups(), which is left untouched, so the "activity NEVER reorders the list" rule still holds inside every section. Space headers collapse and persist through the localStorage idiom already in Sidebar.tsx. Creating is an inline input on the section header, renaming and deleting reuse the per-project pencil/x affordances, and deleting confirms with explicit wording that projects are unassigned rather than removed.

Assignment works two ways: drag a project header onto a space header (native HTML5 DnD, no new dependency, on a dedicated application/x-solenta-project dataTransfer type so it can never be confused with the composer's file drop), or pick from a Space <select> in the Edit Project modal — the keyboard-accessible path. @formkit/auto-animate was already attached to that list, so the reflow animates for free.

Two edge cases handled deliberately: a project whose spaceId matches no existing space lands in Unassigned rather than vanishing from the sidebar, and collapsing a space also drops its threads from the ⌘1-9 / ⌘J/K navigation order so keyboard selection stays in lockstep with what is actually rendered.

The large line count on Sidebar.tsx is mostly whitespace: the project group map moved one level deeper under its new space section, so it was re-indented in a separate commit where git diff -w is empty.

Verification

  • tsc --noEmit clean.
  • test:renderer 740/740, including 11 new tests covering create/rename/delete, both assignment paths, dangling ids, collapse persistence, and the ⌘1-9 ordering.
  • test:core 38/38.
  • test:electron 857 pass, 11 fail — an identical failure set to base, confirmed by running the base commit in a scratch worktree (orch-server port binding plus a reconnect-backoff assertion). test:memory 85/88, in a package this branch does not touch at all.
  • Checked mechanically that every styles.* referenced in Sidebar.tsx resolves in the CSS module — a missing class renders silently unstyled and no jsdom test would catch it.

Not visually smoke-tested in the running app: npm run dev writes the same coder-store.json as the daily driver, and pointing a second writer at real data was not worth the risk for a visual check.

Note on history

The branch started from a local worktree merge that had diverged from main, which made the initial PR diff show 73 unrelated files. main is merged in and the one conflict — in electron/worktrees.js, from that other thread's work, not this one — was resolved in favour of main's newer landed version. The diff is now exactly the 17 files of this change, and all suites were re-run afterwards.

Deliberately left out

Space icons (a name holds an emoji fine), manual reordering of spaces or of projects within one (project order is intentionally activity-derived), and per-space keyboard shortcuts (⌘1-9 and ⌘J/K are already taken by thread navigation). Each is a small follow-up if it turns out to be wanted.

🤖 Generated with Claude Code

  • PR created by the Claude Code agent

Willem and others added 8 commits August 17, 2026 13:10
… App beachballs when multiple threads run concurrently
SpaceInfo + ProjectInfo.spaceId + a spaces CRUD surface on CoderApi, with
the web wire client, browser dev mock and test fake implementing it. The
electron main process and the sidebar UI land on top of this.

Refs #159

Co-Authored-By: Claude Opus 5 <[email protected]>
SpaceInfo + ProjectInfo.spaceId + a spaces CRUD surface on CoderApi, with
the web wire client, browser dev mock and test fake implementing it. The
electron main process and the sidebar UI land on top of this.

Refs #159

Co-Authored-By: Claude Opus 5 <[email protected]>
Store spaces as {id,name} in array order, assign projects via optional
spaceId, and expose spaces:list/add/update/remove. Removing a space
clears membership on its projects. No icons, colors, or manual order.
Renderer half of #159. Spaces wrap the existing project list: named
sections in array order, a trailing Unassigned group, and a no-op when
no spaces exist. Collapse persists, ⌘1-9 follows the visible list, and
assignment is native drag-and-drop or the Edit Project select.

Refs #159
Whitespace only — `git diff -w` is empty. The block moved one level
deeper when space sections wrapped it and kept its old indentation.

Refs #159

Co-Authored-By: Claude Opus 5 <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

# Conflicts:
#	electron/worktrees.js
@currentbits
currentbits merged commit 4e3333b into main Aug 17, 2026
1 check failed
@currentbits
currentbits deleted the coder/spaces-named-groups-for-organizing-proje-471613 branch October 3, 2026 16:07
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.

Spaces: named groups for organizing projects in the sidebar

1 participant