16 Commits

Author SHA1 Message Date
Eric Wagoner
731e9ac58c Add ownership warning to deploy --reset-data
The script now prints the chown command needed after pushing data,
since uploaded files are owned by admin and the web server can't
write to them. Updated docs to match.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 14:40:41 -05:00
Eric Wagoner
25ec949798 Update documentation for item categories feature
- Add categories.json to file structure in both docs
- Document itemCategories loading in frontend architecture
- Add Item Categories section to README with category table
- Update data model to include category field
- Update filtering documentation with categoryFilter
- Add customization instructions for adding categories

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v1.0.0
2025-12-24 12:46:50 -05:00
Eric Wagoner
459878f045 Fix category filter bug and add tab accessibility
The category tabs were not filtering because the generic tab event handler
was overwriting currentFilter with undefined (category tabs use data-category
not data-filter). Fixed by targeting only [data-filter] tabs and clearing
categoryFilter when switching to non-category tabs.

Added proper ARIA attributes for screen reader accessibility:
- role="tablist" on nav-tabs container
- role="tab" and aria-selected on all tab buttons
- Dynamic aria-selected updates on tab clicks

Also includes API support for category field and deploy script update.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 12:28:36 -05:00
Eric Wagoner
39b1ff7bc0 Fix modal focus trapping and add focus indicators
Focus trapping:
- Manually handle all Tab key navigation within modals
- Use getComputedStyle and offsetWidth/Height to detect visible elements
- Focus appropriate input field when modal opens (PIN or Name)

Focus indicators:
- Add visible outline on buttons (:focus)
- Add visible outline on checkbox (:focus)
- Add visible outline on modal close button (:focus)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 10:56:01 -05:00
Eric Wagoner
7d39ea4dd8 Fix visibility check for elements in fixed-position modals
offsetParent returns null for elements inside position:fixed containers.
Use getComputedStyle instead to check display and visibility.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 10:49:45 -05:00
Eric Wagoner
ce6670e35b Fix focus trap to only include visible focusable elements
- Add getFocusableElements helper function
- Exclude input[type="hidden"] from selector
- Filter out elements where offsetParent is null (hidden)
- Filter out disabled elements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 10:47:38 -05:00
Eric Wagoner
0421fd9833 Add Enter key to submit forms in modals
- Enter in PIN input triggers Unlock
- Enter in Confirm PIN input triggers Save PIN
- Enter in Item Name input triggers Save Item

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 10:46:17 -05:00
Eric Wagoner
c55a8e08c4 Fix focus trapping using inert attribute
- Wrap main content in container with id="mainContent"
- Set inert attribute on background when modal opens
- Remove inert when modal closes
- This properly prevents all keyboard/mouse interaction with background

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 10:40:38 -05:00
Eric Wagoner
44d0f7a257 Add focus trapping for modal dialogs
- Focus moves to first focusable element when modal opens
- Tab/Shift+Tab cycles within modal only
- Escape key closes modal
- Focus returns to previously focused element on close

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 10:34:22 -05:00
Eric Wagoner
fa9e24763f Improve accessibility throughout the application
- Add skip-to-content link for keyboard users
- Add ARIA roles and labels to modals (dialog, aria-modal, aria-labelledby)
- Make inventory items keyboard accessible (tabindex, role=button, onkeydown)
- Make container legend items keyboard accessible with aria-pressed state
- Make stats clickable area keyboard accessible
- Add aria-labels to FAB and lock buttons
- Add aria-hidden to decorative SVGs and color dots
- Add live regions for toast notifications and loading states
- Associate form labels with inputs via for= attribute
- Add visually-hidden CSS class for screen reader text

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 10:30:14 -05:00
Eric Wagoner
f39a9b0c5a Add Recent filter to show 10 most recently added items
Sorts by ID descending (newest first) and limits to 10 items.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 23:13:11 -05:00
Eric Wagoner
6b7858aabe Add duplicate detection when adding items
- normalizeName() strips punctuation and normalizes whitespace/case
- findDuplicates() checks for matching normalized names
- Shows confirmation dialog if similar item exists

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 23:06:06 -05:00
Eric Wagoner
d04d6e58e2 Add MIT license
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 22:40:00 -05:00
Eric Wagoner
7e523392c0 Add backend PIN verification and security hardening
- Add requirePin() check on add/update/delete endpoints (closes PIN bypass vulnerability)
- Restrict CORS to specific allowed origins only
- Add input length limits to sanitize() function
- Frontend now sends currentPin with all write requests
- Deploy script copies data/index.php to block directory listing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 22:30:39 -05:00
Eric Wagoner
08d550b0bd Update documentation with all features and learnings
- Updated README with all features: spices filter, shopping list export,
  clickable container legend, category prefixes
- Added deployment troubleshooting for file ownership issues
- Updated CLAUDE.md with architecture details, filtering logic,
  common issues and fixes
- Added live URL reference

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 22:23:23 -05:00
Eric Wagoner
726325e501 Initial commit: Pantry inventory tracker
A simple web app for tracking kitchen pantry items with:
- Search and filter by stock status, spices, or container type
- PIN-protected editing
- Shopping list export (tap Out of Stock to copy)
- QR code for quick mobile access
- OpenGraph card for social sharing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 22:20:27 -05:00