You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the foundation PR for shared hierarchical navigation. It introduces the reusable UI layer and component without adopting it in an application yet.
Shared UI package
add the private, source-exported @gadgets/ui workspace package for runtime UI shared by the Workshop and gatekeeper management apps
keep React and Kumo as peer dependencies so consumers share one runtime and design-system instance
add package-level TypeScript and Vitest configuration, root and subpath exports, ownership guidance, and lockfile entries
Hierarchical list
add a headless HierarchicalListPrimitive that recursively renders semantic nested lists while leaving row presentation to the consumer
support controlled or uncontrolled expansion, forced expand-all behavior, consumer-controlled selection, selection clearing, and custom structural/rendering slots
add the Kumo HierarchicalList adapter using Kumo controls and tokens, Phosphor icons, and Motion-powered insertion indicators and drag previews
support desktop context menus and configurable narrow-screen action drawers opened by touch long press
support native mouse dragging and touch-pointer dragging, optional edge auto-scroll, root/sibling/folder insertion, post-removal index normalization, and rejection of self/descendant moves
support Arrow Up/Down focus movement and accessible Alt+Arrow reordering, indenting, and unindenting for draggable rows
preserve focus after consumer-applied moves and announce successful moves through a polite live region
expose item flags for draggable and droppable behavior while leaving tree mutation in the consuming application
Frontend conventions
define @gadgets/ui as the shared runtime UI ownership boundary while keeping Kumo as the primitive and token foundation
add repository guidance for feature-oriented organization, component APIs, React effects/state, styling, accessibility, and behavior-focused tests
add the frontend-conventions skill with the full conventions for React work under packages/
add package-specific guidance for source exports, peer dependencies, Tailwind source scanning, and the headless-primitive/Kumo-adapter split
Scope
this PR adds the package and reusable component only; application adoption follows separately
consumers continue to own selected state and applying onMove results to their tree data
[P2] Announce moves only after successHierarchicalListPrimitive.tsx:355: A rejected onMove promise still announces that the item moved. Delay the success announcement until resolution or confirmed tree movement.
[P2] Scope synthetic drop events to the originating listHierarchicalListDragAndDrop.tsx:219: Releasing a touch drag over an unrelated drop zone dispatches a synthetic drop to it, potentially triggering unrelated actions.
[P2] Clear drag state when the source disappearsHierarchicalListPrimitive.tsx:372: If items change mid-drag and remove the source, its end handler unmounts while draggedItem and previews remain active. Reconcile drag state with current items and disabled DnD.
[P2] HierarchicalListPrimitive.tsx:342 Scope focused-row lookup to this list. A touch drag can steal focus from another list containing the same item ID.
[P2] HierarchicalListPrimitive.tsx:363 Overlapping async moves overwrite pending focus restoration. If the newer move rejects and the older succeeds, focus is lost.
[P2] useHierarchicalListRowInteractions.ts:117,142 Interactive descendants trigger row long-press and click behavior. Clicking or holding an input/button can unexpectedly select the row or open actions.
[P2] HierarchicalList.tsx:191 Clear openActions when an item or its actions disappear. Restoring them currently remounts the menu already open, potentially at (0,0).
Tests were not run because pnpm is unavailable in the runner.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is the foundation PR for shared hierarchical navigation. It introduces the reusable UI layer and component without adopting it in an application yet.
Shared UI package
@gadgets/uiworkspace package for runtime UI shared by the Workshop and gatekeeper management appsHierarchical list
HierarchicalListPrimitivethat recursively renders semantic nested lists while leaving row presentation to the consumerHierarchicalListadapter using Kumo controls and tokens, Phosphor icons, and Motion-powered insertion indicators and drag previewsFrontend conventions
@gadgets/uias the shared runtime UI ownership boundary while keeping Kumo as the primitive and token foundationfrontend-conventionsskill with the full conventions for React work underpackages/Scope
onMoveresults to their tree dataTesting
pnpm --filter @gadgets/ui test:run(33 tests)pnpm install --lockfile-only --frozen-lockfile