Repository navigation
Commit 7e1fc40
feat(web): sidebar thread groups use the section header idiom
## What Changed
Thread group headers read like upstream's `Settled (N)` shelf header, and a drag picks group membership by depth, like the dnd-kit sortable-tree example.
### Look
- **Header:** `Group name (N)`, hairline, chevron
- **Title:** keeps width; rule takes leftovers
- **Count:** own span, never truncated
- **Actions:** one hover `…` menu, `ui/menu`
- **Menu items:** rename, regenerate title, dissolve
- **Rename:** double-click still works
### Model
- **Header:** sortable marker, like Pinned
- **Span:** header, members, zero-height end marker
- **Depth 0:** header, plain rows
- **Depth 1:** members
### Projection
- **Depth:** sideways offset, 15px step, max 1
- **Row above:** allows nesting
- **Row below:** may force it
### Drops
- **Create:** depth 1 under a plain thread
- **Join:** depth 1 under a group
- **Leave:** member at depth 0
- **Reorder:** inside the group keeps membership
- **Refused:** pinned rows, other projects' groups
- **Dissolve:** one member left; header fades
### Cues
- **Outline:** `ring-1 ring-primary` on the target
- **Landing:** `bg-primary/8` slot, projected depth
### Seam
- **Fork-owned:** `SidebarThreadGroup.projection.ts`
- **Also:** `.drag.ts`, `.markers.ts`, `.span.ts`
- **Removed:** create band, span collision
- **Hooks:** `Sidebar.tsx` 30
- **Others:** `.drag.ts` 3, `.logic.ts` 4
- **Net:** upstream files +101 / −505 vs `hyprws`
Groups state, contracts, and server are unchanged.
## Why
The header was a static droppable while upstream's Pinned and Settled headers are sortable markers, so mid-drag it drew over the `Pinned` label.
Round three's middle-band create and span collision were hard to hit and hard to read.
Depth projection is the known dnd-kit idiom: one gesture creates, joins, and leaves.
## UI Changes
### Before
| Sidebar | Mid-drag |
| --- | --- |
|  |  |
### After
| Create | Join | Leave |
| --- | --- | --- |
|  |  |  |
At rest, 256px sidebar:

Title width measured at rest, before and after the header fix:
| Sidebar | Before | After |
| --- | --- | --- |
| 256px | 125px | 149px |
| 220px | 105px | 113px |
| 180px | 65px | 73px |
Hover menu:

Grounded in T3's built-in Browser panel on a worktree dev server with synthetic pointer events.
No near-pinned shot: the panel stopped painting (`preview_snapshot` failed); pinned refusal is covered by tests.
## Close conditions
- [x] **Header:** section header idiom
- [x] **Actions:** one hover menu
- [x] **Drop target:** visible mid-drag
- [x] **Create by drag:** depth 1 under a plain thread
- [x] **Seam:** no `ui/` restyle
- [x] **Seam:** upstream lines hook-marked
| Condition | Evidence |
| --- | --- |
| Header, title width | rest shot, width table |
| Actions | after-menu shot |
| Drop target | join, leave shots |
| Create | create shot |
| Depth rules | `SidebarThreadGroup.projection.test.ts` |
| Span rules | `SidebarThreadGroup.span.test.ts` |
| No restyle | `Button` and `ui/menu` variants only |
| Hook-marked | `fork:ci` exit 0 |
## Follow-ups
- **Slot lead:** one row ahead, dragging down
- **Cause:** upstream divider reveal, rows +50px
- **Also:** collision uses the rest frame
- **Dead helper:** `getSidebarThreadLayoutOrder`
- **Dead store action:** `moveProjectThread`
## Checklist
- [x] This PR is small and focused
- [x] I explained what changed and why
- [x] I included before/after screenshots for any UI changes
- [ ] I included a video for animation/interaction changes
Closes #1287
Model and harness: Claude Opus 5.5, Claude Code.
## Fork trailers
Squashes:
- 7ae8321fb1 feat(web): sidebar thread groups use the section header idiom
- b7b64c0024 chore(web): drop sidebar helpers unused since thread-group projection
Fork-Domain: thread-ordering
Fork-Tier: qol1 parent 25192cc commit 7e1fc40
14 files changed
Lines changed: 1097 additions & 741 deletions
File tree
- apps/web/src
- components
- docs/user
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| |||
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
27 | | - | |
| 30 | + | |
| 31 | + | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
| |||
35 | 39 | | |
36 | 40 | | |
37 | 41 | | |
| 42 | + | |
38 | 43 | | |
39 | 44 | | |
40 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
| |||
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | 73 | | |
75 | 74 | | |
76 | | - | |
77 | | - | |
78 | | - | |
| 75 | + | |
79 | 76 | | |
80 | 77 | | |
81 | 78 | | |
| |||
197 | 194 | | |
198 | 195 | | |
199 | 196 | | |
| 197 | + | |
200 | 198 | | |
201 | 199 | | |
202 | 200 | | |
| |||
238 | 236 | | |
239 | 237 | | |
240 | 238 | | |
| 239 | + | |
241 | 240 | | |
242 | 241 | | |
243 | 242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
39 | 44 | | |
40 | 45 | | |
41 | 46 | | |
| |||
189 | 194 | | |
190 | 195 | | |
191 | 196 | | |
| 197 | + | |
192 | 198 | | |
193 | 199 | | |
194 | 200 | | |
| |||
211 | 217 | | |
212 | 218 | | |
213 | 219 | | |
| 220 | + | |
214 | 221 | | |
215 | 222 | | |
216 | 223 | | |
| |||
227 | 234 | | |
228 | 235 | | |
229 | 236 | | |
| 237 | + | |
230 | 238 | | |
231 | 239 | | |
232 | 240 | | |
| |||
457 | 465 | | |
458 | 466 | | |
459 | 467 | | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | 468 | | |
529 | 469 | | |
530 | 470 | | |
| |||
562 | 502 | | |
563 | 503 | | |
564 | 504 | | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | | - | |
574 | | - | |
575 | | - | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | 505 | | |
645 | 506 | | |
646 | 507 | | |
| |||
0 commit comments