Skip to content

Cut the sessions list twice: machine, then tag - #131

Merged
karngyan merged 1 commit into
mainfrom
worktree-nested-grouping
Aug 20, 2026
Merged

Cut the sessions list twice: machine, then tag#131
karngyan merged 1 commit into
mainfrom
worktree-nested-grouping

Conversation

@karngyan

Copy link
Copy Markdown
Contributor

What

The sessions list can now be grouped twice. Display options gain a Then by select under Grouping; any pair works (machine then tag, tag then machine, state then directory). A fresh browser opens on machine then tag.

How it reads

  • A machine heading keeps its tally over every row on it. Under it, one subheading per tag, "No tag" last, each with its own fold, + and drop target. A session tagged twice sits under both, same as flat tag grouping.
  • A second cut that would draw one subheading over every row (a machine with nothing tagged, a group where everything is running) flattens away. A single untagged shell looks exactly as it did.
  • + on a tag under a machine prefills both. Dragging between tags under one machine retags; across machines refuses with the existing sentence.

Compatibility

  • ViewConfig.subgrouping is new. Saved views and the current arrangement written before it read as none, the same bargain direction made: what that build showed is what comes back. Only a browser with nothing arranged gets the new default.
  • subgrouping: 'none' is a first-class choice, so one grouping is still one grouping.
  • Picking the first cut's key for the second, or turning grouping off, resets the second to none; the select is disabled while there is no first cut.

Not done

No screenshot. Driving the installed daemon from reins needs the handoff dance and I did not want to hold the PR on it. The model, table, options, store and route are all under unit tests.

Tests

pnpm vitest run: 90 files, 1892 tests. pnpm run lint (tsc) clean. styles.build.test.ts passes after rewording two comments the Tailwind scanner picked up.

🤖 Generated with Claude Code

Display options gain a "Then by" select. Groups carry optional children,
keyed parent plus child so one tag on two machines folds and drops apart,
and a second cut that yields a single subheading flattens away. Stored
arrangements missing the field read as cut once, so saved tabs look as
they did before.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@karngyan
karngyan merged commit 91ea986 into main Aug 20, 2026
1 check passed
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