@gperezmz/bb-plugin-thread-glance 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +20 -0
  3. package/THIRD_PARTY_NOTICES.md +230 -0
  4. package/app.tsx +12 -0
  5. package/components/ui/alert-dialog.tsx +142 -0
  6. package/components/ui/button.tsx +59 -0
  7. package/components/ui/card.tsx +83 -0
  8. package/components/ui/coarse-pointer-sizing.ts +66 -0
  9. package/components/ui/context-menu.tsx +355 -0
  10. package/components/ui/dialog.tsx +416 -0
  11. package/components/ui/dropdown-menu.tsx +640 -0
  12. package/components/ui/hooks/use-compact-viewport.tsx +37 -0
  13. package/components/ui/hooks/use-media-query.ts +70 -0
  14. package/components/ui/hooks/use-pointer-coarse.ts +7 -0
  15. package/components/ui/hover-card.tsx +36 -0
  16. package/components/ui/icon-extended.tsx +333 -0
  17. package/components/ui/icon-registry.ts +189 -0
  18. package/components/ui/icon.tsx +444 -0
  19. package/components/ui/input.tsx +30 -0
  20. package/components/ui/menu-item-hover.tsx +93 -0
  21. package/components/ui/motion.ts +4 -0
  22. package/components/ui/overlay-trigger.ts +84 -0
  23. package/components/ui/popover.tsx +223 -0
  24. package/components/ui/responsive-overlay.tsx +823 -0
  25. package/components/ui/tooltip.tsx +63 -0
  26. package/dist/app.css +2 -0
  27. package/dist/app.js +66 -0
  28. package/dist/app.meta.json +11 -0
  29. package/dist/server.js +71 -0
  30. package/dist/server.js.map +6 -0
  31. package/dist/server.meta.json +11 -0
  32. package/features/thread-list/components/Dialogs.tsx +299 -0
  33. package/features/thread-list/components/FoldRows.tsx +147 -0
  34. package/features/thread-list/components/GroupSection.tsx +370 -0
  35. package/features/thread-list/components/ProviderBadge.tsx +57 -0
  36. package/features/thread-list/components/PullRequestBadge.tsx +50 -0
  37. package/features/thread-list/components/Rails.tsx +28 -0
  38. package/features/thread-list/components/RenameEditor.tsx +118 -0
  39. package/features/thread-list/components/RowMenu.tsx +168 -0
  40. package/features/thread-list/components/SplitMiniMap.tsx +55 -0
  41. package/features/thread-list/components/ThreadDetails.tsx +138 -0
  42. package/features/thread-list/components/ThreadList.tsx +855 -0
  43. package/features/thread-list/components/ThreadRowView.tsx +631 -0
  44. package/features/thread-list/components/Toolbar.tsx +296 -0
  45. package/features/thread-list/components/controller.ts +64 -0
  46. package/features/thread-list/components/glyphs.tsx +129 -0
  47. package/features/thread-list/components/row-card.ts +127 -0
  48. package/features/thread-list/data/storage.ts +18 -0
  49. package/features/thread-list/data/useAutoExpand.ts +53 -0
  50. package/features/thread-list/data/useClientPreferences.ts +20 -0
  51. package/features/thread-list/data/useNotes.ts +41 -0
  52. package/features/thread-list/data/useNow.ts +19 -0
  53. package/features/thread-list/data/usePreferences.ts +126 -0
  54. package/features/thread-list/data/useScheduled.ts +43 -0
  55. package/features/thread-list/data/useStamps.ts +68 -0
  56. package/features/thread-list/icons.ts +44 -0
  57. package/features/thread-list/index.ts +2 -0
  58. package/features/thread-list/model/attention.ts +89 -0
  59. package/features/thread-list/model/counters.ts +67 -0
  60. package/features/thread-list/model/details.ts +79 -0
  61. package/features/thread-list/model/drag.ts +104 -0
  62. package/features/thread-list/model/expansion.ts +71 -0
  63. package/features/thread-list/model/families.ts +297 -0
  64. package/features/thread-list/model/groups.ts +263 -0
  65. package/features/thread-list/model/labels.ts +50 -0
  66. package/features/thread-list/model/layout.ts +61 -0
  67. package/features/thread-list/model/menu.ts +78 -0
  68. package/features/thread-list/model/move.ts +46 -0
  69. package/features/thread-list/model/notes.ts +52 -0
  70. package/features/thread-list/model/provider-mark.ts +59 -0
  71. package/features/thread-list/model/share.ts +101 -0
  72. package/features/thread-list/model/sort.ts +78 -0
  73. package/features/thread-list/model/state.ts +330 -0
  74. package/features/thread-list/model/time.ts +107 -0
  75. package/features/thread-list/model/toggles.ts +99 -0
  76. package/features/thread-list/model/view.ts +669 -0
  77. package/features/thread-list/model/windowing.ts +27 -0
  78. package/features/thread-list/testing/fixtures.ts +162 -0
  79. package/hooks/useBrowserDimmingModal.ts +5 -0
  80. package/lib/portal-scope.ts +15 -0
  81. package/lib/utils.ts +17 -0
  82. package/package.json +96 -0
  83. package/server/cli.ts +107 -0
  84. package/server/failures.ts +136 -0
  85. package/server/import.ts +144 -0
  86. package/server/notes.ts +236 -0
  87. package/server/preference-store.ts +96 -0
  88. package/server/scheduled.ts +129 -0
  89. package/server/serial.ts +12 -0
  90. package/server/stamps.ts +142 -0
  91. package/server/startup.ts +121 -0
  92. package/server.ts +126 -0
  93. package/shared/contract.ts +73 -0
  94. package/shared/preferences.ts +241 -0
  95. package/shared/signals.ts +71 -0
  96. package/skills/thread-glance/SKILL.md +69 -0
  97. package/tsconfig.json +36 -0
  98. package/types/global-jsx.d.ts +10 -0
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: thread-glance
3
+ description: "Reads and changes the Thread Glance sidebar's layout preferences with `bb thread-glance prefs`: grouping, sort, group order, hidden and collapsed groups, child-thread nesting and folding, harness icons. Use when asked to change how the Thread Glance sidebar lists, groups, sorts, hides, collapses or nests threads or draws their harness icon."
4
+ ---
5
+
6
+ # Thread Glance preferences
7
+
8
+ Thread Glance keeps its own layout preferences, separate from bb's built-in
9
+ list. `bb thread-list prefs` changes bb's list and has no effect on Thread
10
+ Glance; use `bb thread-glance prefs` for it.
11
+
12
+ ```sh
13
+ bb thread-glance prefs list [--json]
14
+ bb thread-glance prefs get <key> [--json]
15
+ bb thread-glance prefs set <key> <value> [--json]
16
+ bb thread-glance prefs reset <key> [--json]
17
+ ```
18
+
19
+ `set` takes JSON, and a bare word is read as a string:
20
+
21
+ ```sh
22
+ bb thread-glance prefs set nesting tree
23
+ bb thread-glance prefs set threadLifecycles '["active","archived"]'
24
+ bb thread-glance prefs set hiddenGroups '["threads","project:<project-id>"]'
25
+ ```
26
+
27
+ A list value replaces the whole list. To add or remove one item, `get` the
28
+ key, edit the list, and `set` the result. A value the key's schema rejects
29
+ fails with `invalid_preference_value` and leaves the stored value as it was;
30
+ an unknown key fails with `unknown_preference`. Every open window applies a
31
+ change at once. `reset` restores the default.
32
+
33
+ ## Keys
34
+
35
+ `prefs list` prints each key's current value and a one-line description.
36
+ Ids come from `bb project list`, `bb thread section list`, `bb machine list`
37
+ and `bb environment list`; a thread id is a `thr_…` id.
38
+
39
+ | Key | Values | Default |
40
+ | --- | --- | --- |
41
+ | `threadLifecycles` | `active`, `archived`, or both; at least one | `["active"]` |
42
+ | `organizationMode` | `project`, `chronological` (custom sections) or `machine` | `project` |
43
+ | `environmentGrouping` | `true` folds sibling threads sharing a worktree into a folder row | `false` |
44
+ | `chronologicalSort` | `updated`, `created` or `alpha`; `none` reads as `updated` | `updated` |
45
+ | `sortDirection` | `default` (the field's own direction), `ascending`, `descending` | `default` |
46
+ | `sectionOrder` | Top-level order by project: `pinned`, `projects`, `threads` | all three |
47
+ | `manualSectionOrder` | Top-level order chronologically: `pinned`, `sections`, `threads` | all three |
48
+ | `machineSectionOrder` | Top-level order by machine: `pinned`, `machines`, `threads` | all three |
49
+ | `hiddenGroups` | Groups moved into More: `threads`, `project:<id>`, `section:<id>`, `machine:<id>` | `[]` |
50
+ | `collapsedSections` | Collapsed built-in groups: `pinned`, `threads` | `[]` |
51
+ | `collapsedProjects` | Project ids | `[]` |
52
+ | `collapsedThreadSections` | Custom section keys, `section:<id>` | `[]` |
53
+ | `collapsedMachines` | Machine ids | `[]` |
54
+ | `collapsedEnvironments` | Environment ids of collapsed folder rows | `[]` |
55
+ | `nesting` | `folded`: children one level deep behind a chip; `tree`: bb's full tree | `folded` |
56
+ | `foldOlder` | `true` folds quiet top-level threads past the 5 most recent behind an "N older" row | `true` |
57
+ | `workingFirst` | `true` sorts working threads first under `updated` | `false` |
58
+ | `expandedOlder` | Group ids and parent thread ids whose "N older" or "N more child threads" row is open | `[]` |
59
+ | `expandedChildren` | Parent thread ids whose children are shown (`folded` nesting) | `[]` |
60
+ | `collapsedChildren` | Parent thread ids whose children are hidden (`tree` nesting) | `[]` |
61
+ | `showPullRequests` | `true` shows a pull request badge on rows | `true` |
62
+ | `childAttention` | Which child threads count as needing attention (filter, badge, counters, ordering, auto-reveal) and stay out of a family's "N more child threads" fold alongside running ones: `blocked` counts a child that waits on you, is offline, or failed with its manager idle; `everything` also counts every failed or unread child | `blocked` |
63
+ | `harnessIcon` | How rows draw the harness logo: `muted` (monochrome), `colour` (the provider's tint) or `hidden` | `muted` |
64
+
65
+ The filter (all or needs attention) and the row density are kept per
66
+ browser, and the CLI cannot read or change them.
67
+
68
+ Sections themselves and the section a thread is in are bb core state: use
69
+ `bb thread section` and `bb thread update`.
package/tsconfig.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "compilerOptions": {
3
+ "strict": true,
4
+ "target": "ES2022",
5
+ "module": "ESNext",
6
+ "moduleResolution": "bundler",
7
+ "jsx": "react-jsx",
8
+ "lib": [
9
+ "ES2022",
10
+ "DOM"
11
+ ],
12
+ "types": [
13
+ "node"
14
+ ],
15
+ "paths": {
16
+ "@/*": [
17
+ "./*"
18
+ ]
19
+ },
20
+ "noEmit": true,
21
+ "skipLibCheck": false
22
+ },
23
+ "include": [
24
+ "server.ts",
25
+ "app.tsx",
26
+ "server",
27
+ "shared",
28
+ "features",
29
+ "components",
30
+ "lib",
31
+ "hooks",
32
+ "vitest.config.ts",
33
+ "perf",
34
+ "types"
35
+ ]
36
+ }
@@ -0,0 +1,10 @@
1
+ // @dnd-kit's declarations name the global JSX namespace, which React 19's
2
+ // types no longer declare. Alias it to React's so the library typechecks.
3
+ import type { JSX as ReactJSX } from "react";
4
+
5
+ declare global {
6
+ namespace JSX {
7
+ type Element = ReactJSX.Element;
8
+ type IntrinsicElements = ReactJSX.IntrinsicElements;
9
+ }
10
+ }