-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
Users with complex storage setups (e.g., a toolbox with drawers, a filing cabinet with folders) can't represent containment relationships between bins. Everything is flat, making it hard to model real-world storage hierarchies.
Proposed Solution
Allow bins to have an optional parent bin, creating a tree structure.
Data Model
- Add
parent_id TEXT REFERENCES bins(id) ON DELETE SET NULLto thebinstable - Enforce max depth of 3 levels to keep UI manageable (e.g., Cabinet → Drawer → Section)
- A bin's
location_idmust match its parent'slocation_id
API Changes
POST /api/binsandPUT /api/bins/:idaccept optionalparent_idGET /api/binsreturnsparent_idandparent_namefieldsGET /api/bins/:idreturnschildren: Bin[]array- Deleting a parent bin nullifies
parent_idon children (they become top-level)
UI/UX
Bin List Page
- Default view remains a flat grid — nested bins show a subtle "contains X bins" badge
- Add a "Tree View" toggle (icon button next to sort) that switches to an indented, collapsible list layout
- Tree view: parent bins are expandable rows; clicking expands to show children inline
Bin Detail Page
- "Parent Bin" selector field (searchable dropdown of bins in the same location, excluding self and descendants to prevent cycles)
- "Contains" section listing child bins as clickable cards
- Breadcrumb trail at top:
Location > Parent > Current Bin
Bin Create Dialog
- Optional "Parent Bin" field — pre-filled if creating from within a parent bin's detail page
Scope
- No drag-and-drop reparenting in v1 — use the edit form
- Search results remain flat (but show parent name as context)
- Export/import preserves hierarchy via
parent_idreferences
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request