feat: bulk reorganization, item quantities, and print improvements#65
Merged
akifbayram merged 29 commits intomainfrom Mar 7, 2026
Merged
feat: bulk reorganization, item quantities, and print improvements#65akifbayram merged 29 commits intomainfrom
akifbayram merged 29 commits intomainfrom
Conversation
- Add quantity INTEGER DEFAULT NULL to bin_items table - Include quantity in BIN_SELECT_COLS json_object - Add quantity: number | null to BinItem TypeScript interface
- Update POST handler to parse quantity from item objects - Add quantity to inner SELECT in BIN_SELECT_COLS subquery - Add ALTER TABLE migration for existing databases - Add test for adding items with quantity
- Add updateItemQuantity client function and update renameItem signature - Add quantity stepper (−/+) in view mode, qty input in edit mode - Show ×quantity in read-only item list - Confirm dialog when decrementing to zero - Fix BinItem type references in BinCreateForm and tests
Unify quantity editing across view and edit modes using simple text
inputs instead of +/− stepper buttons. Quantities now flow through
the edit form state and are persisted via the update API as item
objects with { name, quantity }. Server replaceBinItems also preserves
quantity when receiving object-shaped items.
…eference Update all user-facing and API documentation to reflect the new optional quantity field on bin items, including the new PATCH quantity endpoint, mixed string/object item format, AI quantity extraction, export format changes, and MCP tool descriptions.
…ents Wire quantity field through AI context, schemas, providers, command parsing/execution, text structuring, batch routes, and all related UI components (suggestions panel, bulk add, quick add, bin create/edit). Extract shared quantity helpers into src/lib/itemQuantities.ts.
Use onTouchEnd to trigger item editing immediately on first tap, bypassing the sticky :hover state that caused a layout shift and required a second tap. Also narrow transition-all to transition-opacity on the delete button to prevent subtle height changes on hover.
Introduce a Labels/Item List toggle on the print page. When "Item List" is selected, bins render as a tabular item sheet (with optional checkboxes and quantities) instead of QR labels. PDF download is hidden in item-list mode. Print mode persists via localStorage and can be pre-selected with ?mode=items URL param.
- Rewrite ReorganizePage to reuse BinSelectorCard and useBinSelection from the print feature for consistent bin selection UX - Two-column layout matching PrintPage (settings left, preview right) - Add "Reorganize" nav item with Sparkles icon
Add a "Reorganize" tab to the Custom Prompts section in AI settings, allowing users to customize the system prompt used for bin reorganization. Also moves the reorganize button above the proposal section.
Replace inline spinner with animated progress bar during AI streaming. Add smooth scroll to preview, increase max tokens to 16K, and add reorganize link to sidebar navigation.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
quantitycolumn tobin_items, with full support across server endpoints (CRUD, batch, export/import), AI system (commands, suggestions, structuring), and UI (inline editable quantity fields)/reorganizepage with AI-powered streaming reorganization — select bins, get AI suggestions for restructuring, preview changes with diff view, and apply in bulk. Includes custom reorganization prompt in AI settings.AiProgressBarandAiThinkingStatecomponents, integrated into reorganize page and command input dialogTest plan
npx biome check .andnpx tsc --noEmitnpx vitest run(client) andcd server && npx vitest run(server)