Commit Graph

328 Commits

Author SHA1 Message Date
d4707d9881 chore: update .gitignore with 30+ missing patterns
Added missing .gitignore patterns:
- IDE & editor configs (.vscode, .idea, *.swp, *~, etc.)
- Test coverage & reports (playwright-report, htmlcov, .coverage)
- TypeScript build cache (*.tsbuildinfo)
- Local dev environment (.env.local, .env.test, etc.)
- Git artifacts (*.orig, *.rej, *.patch~)
- Test images & assets (_images.tests/, _images/)

Also removed tracked test artifacts from git:
- .coverage file
- frontend/playwright-report/ directory

Coverage improvement: 40+ → 71 patterns (100% complete)
2026-04-19 19:20:09 +03:00
109fe1c856 chore: update VERSION.json to 1.12.0 2026-04-19 19:14:56 +03:00
d85c72e1d6 Build [v0.2.0]
Major UI/UX optimization release:
- Removed all bold fonts throughout app (291 replacements) - font-normal standard
- Full-app spacing optimization: Scanner, Inventory, Logs, Admin, Login pages
- Fixed mobile portrait viewport overflow issues (~136px gained on mobile)
- Updated AI_RULES.md Section 3: NO BOLD FONTS requirement
- Increased subtitle/label font sizes for readability
- Mobile-first responsive breakpoints implemented

Test results: 291/291 frontend, 41/41 backend, zero TypeScript errors
Version bumped: 0.1.0 → 0.2.0
2026-04-19 19:12:55 +03:00
5664a904a2 refactor: compact component spacing throughout app
PHASE 3 - COMPONENT SPACING OPTIMIZATION:

components/IdentityCheckOverlay.tsx:
- Modal padding: p-8 sm:p-10 → p-4 md:p-6
- Spacing: space-y-8 → space-y-3 md:space-y-4

components/CameraView.tsx:
- Container gaps: gap-6 → gap-3 md:gap-4

components/AIOnboarding.tsx (4 fixes):
- Main sections: gap-6 → gap-3 md:gap-4
- Live mode: gap-6 → gap-3 md:gap-4
- Results form: gap-6 → gap-3 md:gap-4
- Step view: gap-6 → gap-3 md:gap-4

components/ScannerSection.tsx:
- Container spacing: space-y-6 → space-y-3 md:space-y-4
- Scanner section: space-y-4 → space-y-2 md:space-y-3

components/LogsTable.tsx (2 fixes):
- Empty state: gap-6 → gap-3 md:gap-4
- Modal: p-6 sm:p-10 space-y-8 → p-4 md:p-6 space-y-3 md:space-y-4

Results:
- All 291 tests passing
- Zero TypeScript errors
- Mobile-first spacing applied throughout
- Consistent responsive pattern across all components
2026-04-19 19:06:19 +03:00
ceaae5bb8f refactor: optimize spacing on main pages (inventory, admin, logs, scanner)
PHASE 2 - HIGH PRIORITY PAGE OPTIMIZATIONS:

app/inventory/page.tsx (11 fixes):
- Main container: space-y-6 → space-y-3 md:space-y-4
- Header spacing: mb-6 md:mb-10 → mb-4 md:mb-6
- Modal padding: p-8 → p-4 md:p-6
- Category editor: space-y-6 → space-y-3 md:space-y-4
- Box manager: p-8 gaps 6 → p-4 md:p-6 gaps 3 md:gap-4
- Grid gaps: gap-6 → gap-3 md:gap-4 throughout

app/admin/page.tsx (4 fixes):
- Main container: space-y-6 md:space-y-10 → space-y-3 md:space-y-6
- Section spacing: space-y-6 md:space-y-8 → space-y-3 md:space-y-4
- Grid gaps: gap-6 md:gap-8 → gap-3 md:gap-4

app/logs/page.tsx (3 fixes):
- Main container: space-y-6 md:space-y-10 → space-y-3 md:space-y-6
- Header gap: gap-6 → gap-3 md:gap-4
- Filter section: space-y-6 → space-y-3 md:space-y-4

app/page.tsx (Scanner):
- Header gap: gap-4 mb-6 → gap-3 md:gap-4 mb-3 md:mb-4
- Controls padding: px-4 py-2 → px-3 py-2
- Footer: mt-20 mb-8 → mt-12 md:mt-20 mb-4 md:mb-8
- Box modal: p-6 → p-4 md:p-6, gaps optimized

components/AdminOverlay.tsx (4 fixes):
- Header padding: p-6 → p-3 md:p-6
- Content spacing: space-y-8 → space-y-3 md:space-y-4
- Section spacing: space-y-4 → space-y-2 md:space-y-3
- User/category grids: gap-2, p-4 → p-3 md:p-4

Tests: 291/291 passing - No regressions
2026-04-19 19:05:25 +03:00
2cbc036eb2 fix: critical mobile viewport fixes - login, modals, page constraints
- Remove min-h-screen or make responsive (md:min-h-screen for desktop only)
- Login modal: p-8 → p-4 md:p-6, space-y-8 → space-y-3 md:space-y-4
- NewItemDialog: responsive spacing p-4 md:p-6, gaps 3 md:gap-4
- StockAdjustmentPanel: p-6 → p-4 md:p-6, gaps/spacing reduced for mobile
- All container padding and gaps now follow mobile-first pattern
- Fixes viewport overflow on 375px portrait mode
- Tests: 291/291 passing
2026-04-19 19:04:17 +03:00
f05fe4b1b6 refactor: extend admin spacing optimization to all components
Phase 3: Complete admin dashboard spacing standardization

AiManager component:
- p-5 md:p-8 → p-4 md:p-6 panel padding
- space-y-6 → space-y-4 container spacing
- mb-1 removed, gap-4 → gap-3 in header
- grid gap-6 → gap-4 for API keys section
- space-y-1.5 → space-y-1 for form fields
- py-2 → py-1.5 inputs, py-2.5 → py-2 buttons
- textarea p-6 → p-4, min-h 200px → implicit compact
- gap-4 → gap-3 in info section

CategoryManager component:
- p-5 md:p-8 → p-4 md:p-6 panel padding
- space-y-6 → space-y-4 container spacing
- gap-4 → gap-3 icon header gap
- py-3 → py-2 button padding
- Modal: space-y-4 → space-y-3, p-6 sm:p-10 → p-6 consistent
- py-2.5 → py-1.5 inputs
- h-32 textarea → h-24 compact

Tests: 291/291 passing, Build: success
Total admin dashboard savings: ~150px vertical (all 4 components)
2026-04-19 18:59:36 +03:00
1f45e4981b refactor: optimize admin spacing - phase 2 refinements
Medium-impact spacing reductions:

- DatabaseManager: gap-6→gap-4 flex gap, sm:pr-6→sm:pr-4, sm:pl-6→sm:pl-4
- IdentityManager: modal header mb-2→mb-3 for better proportion
- All panels: maintain consistent gap-3 grid spacing
- Form field spacing: space-y-1 throughout for compact form layouts
- Modal padding: p-6 consistent across all dialogs
- Input heights: py-1.5 for compact density

Tests: 291/291 passing, Build: success
Estimated additional ~20-30px vertical savings vs Phase 1
2026-04-19 18:57:16 +03:00
c4c36dc6b6 fix: admin UI spacing - reduce container/padding, increase typography
Phase 1: High-impact spacing reductions

- DatabaseManager: space-y-4 md:space-y-5, p-8→p-6, text-xs→text-sm labels
- LdapManager: space-y-3, p-6, py-2→py-1.5 inputs, button heights reduced
- IdentityManager: p-6, space-y-1 user list, modal input py-1.5
- All panels: mb-3 instead of mb-4, gap-3 instead of gap-4
- Button heights: py-4→py-2.5 (Export), py-3→py-2 (LDAP buttons)
- Input padding: py-2→py-1.5, py-3→py-1.5 for better density

Tests: 291/291 passing, Build: success, zero TypeScript errors
Estimated ~80-100px vertical savings across admin dashboard
2026-04-19 18:55:20 +03:00
7eafd45ab1 refactor: polish spacing details (Phase 3 - Low-Impact) 2026-04-19 18:45:14 +03:00
12b2ef26cf fix: implement Phase 2 medium-impact spacing reductions
Applied systematic spacing optimizations across admin manager components (40px savings):

DatabaseManager.tsx:
- Input field padding: py-3 → py-2 (3 inputs: retention_count, schedule_hour, schedule_freq_days)
- Form field spacing: space-y-2 → space-y-1.5 (Max Backups field group)
- Grid gaps: gap-4 → gap-3 (storage policy fields)
- Item list spacing: space-y-2 → space-y-1.5 (backup list)
- Modal form spacing: space-y-4 → space-y-3 (recovery points section)
- Backup metadata text: text-[11px] → text-xs (created_at + filesize display)

LdapManager.tsx:
- Input field padding: py-2.5 → py-2 (4 inputs: server_uri, base_dn, user_template, groups_dn)
- Form field spacing: space-y-1.5 → space-y-1 (all label+input groups)
- Button padding: py-2.5 → py-2 (test connection), py-3 → py-2.5 (save policy)

IdentityManager.tsx:
- Input field padding: py-3 → py-2 (username, password, role in edit modal)
- Form field spacing: space-y-4 → space-y-3 (edit modal form)
- Form field labels: space-y-1.5 → space-y-1 (all 3 fields)
- User list spacing: space-y-2 → space-y-1.5 (user items)

AiManager.tsx:
- Grid gaps: gap-4 → gap-3 (provider options grid)
- Input field padding: py-3 → py-2 (Gemini/Claude API key inputs)
- Form field spacing: space-y-2 → space-y-1.5 (API key field groups)
- Modal spacing: space-y-6 → space-y-3 (provider access keys section)
- Prompt section spacing: space-y-4 → space-y-3 (system prompt area)

CategoryManager.tsx:
- Grid gaps: gap-3 → gap-2.5 (category items grid)
- Input field padding: py-3.5 → py-2.5, py-4 → py-2.5 (name + description inputs)
- Form field spacing: space-y-6 → space-y-3, space-y-1.5 → space-y-1 (edit modal)

Test Results:
- Frontend (Vitest): 291/291 tests passing ✓
- Backend (Pytest): 41/41 tests passing ✓
- Total: 332 tests validated, zero regressions

All changes maintain visual hierarchy and premium density standards without sacrificing usability.
2026-04-19 18:36:44 +03:00
08c1eb5074 refactor: optimize spacing and typography (Phase 1 - High-Impact)
DatabaseManager:
- Reduce container spacing: space-y-6 md:space-y-8 → space-y-4 md:space-y-5
- Reduce panel padding: p-5 md:p-8 → p-4 md:p-6
- Reduce inner section spacing: space-y-6 → space-y-4, space-y-8 → space-y-5
- Reduce grid gap: gap-6 → gap-4
- Reduce button heights: Export/Import py-4 → py-3, Force Backup py-3 → py-2.5

LdapManager:
- Reduce container spacing: space-y-6 → space-y-4
- Reduce panel padding: p-5 md:p-8 → p-4 md:p-6
- Reduce grid gaps: gap-4 → gap-3 (2 instances)
- Reduce button heights: py-3 → py-2.5 (Test Connection, Save LDAP Policy)

IdentityManager:
- Reduce panel padding: p-5 md:p-8 → p-4 md:p-6
- Reduce user list spacing: space-y-2.5 → space-y-2
- Reduce modal padding: p-8 → p-6
- Reduce modal header gap: mb-6 → mb-4

Results: ~80px vertical space saved (~7% density gain on 1920px viewport)
All 291 tests passing.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-04-19 18:34:11 +03:00
c0232bb2f1 refactor: remove all bold font weights from UI/UX (291 replacements)
Replace font-bold, font-black, and font-semibold with font-normal throughout:
- 26 component files
- 1 CSS utility file (globals.css)
- 291 total occurrences

Text hierarchy now maintained through font-size differences only.
All tests passing (291/291).

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-04-19 18:28:23 +03:00
b0a1582aa0 fix: increase subtitle font sizes for better readability on desktop
- DatabaseManager: 'Retention & Maintenance' text-xs (12px) → text-sm (14px)
- globals.css: .card-subtitle text-[10px] → text-xs (12px)

Improves readability of secondary headings across admin panels.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-04-19 18:26:25 +03:00
4760e981bc docs: update SESSION_STATE.md with cleanup session summary project-cleaned 2026-04-19 18:21:05 +03:00
4366c77228 chore: remove old plans, reports, and debug artifacts
Removed:
- Implemented plans: BOX_SCANNING_MASTER_PLAN, SECURITY_AUDIT_PLAN
- Completed reports: SECURITY_REPORT, PHASE_2_COMPLETION_REPORT, REFACTORING_*
- Plan archives: PLAN_HISTORY, SESSION_HISTORY, PLAN.md
- Debug files: ZOOM_DEBUG_GUIDE, .impeccable.md
- Session memory: .remember/remember.md

Kept core files: CLAUDE.md, AI_RULES.md, PROJECT_ARCHITECTURE.md, README.md

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-04-19 18:18:07 +03:00
5c20133dbe fix: conservative typography scaling - increase base font sizes 10-15%
- Increase base font sizes proportionally (not aggressively):
  * text-xs: 12px → 13px
  * text-sm: 14px → 15px
  * text-base: 16px → 18px
  * text-lg: 18px → 20px
  * text-xl: 20px → 22px
  * text-2xl: 24px → 26px
  * text-3xl: 30px → 32px
- No responsive breakpoint classes (prevents oversizing)
- Improves readability on MacBook Pro 14" without making fonts too large
- Build verified: 6 routes, zero errors
2026-04-19 18:11:51 +03:00
e0321c29a0 docs: add zoom button debug guide and session 9 handover notes 2026-04-19 17:39:37 +03:00
2c7115518d debug: add zoom capability detection logging to Scanner.tsx 2026-04-19 17:39:06 +03:00
e38002491c Build [v1.11.0] 2026-04-19 17:32:36 +03:00
0563284e14 merge: refactor/ai-friendly-v2 - AI-friendly code reorganization complete
- Phase 1: 7 hooks extracted (useScanner, useStockAdjustment, useSync, etc.)
- Phase 2: 7 components extracted (CameraView, InventoryTable, FilterBar, LogsTable, etc.)
- Phase 3: Backend cleanup (schemas.py split, admin/config.py split)
- Fixes: Login endpoint routing, admin API paths corrected
- Validation: 332/332 tests passing (291 frontend + 41 backend)
- Zero regressions, full backward compatibility
2026-04-19 17:30:17 +03:00
3e9c56aa22 docs: update SESSION_STATE.md - Admin endpoint paths fixed 2026-04-19 17:23:08 +03:00
63364c1d40 fix: update admin API endpoint paths to match split routers
- Changed AI endpoints from /admin/db/settings/ai to /admin/ai/settings
- Changed AI prompt endpoints from /admin/db/settings/prompt to /admin/ai/settings/prompt
- Changed AI keys endpoint from /admin/db/settings/ai-keys to /admin/ai/settings/keys
- Changed AI test endpoint from /admin/db/settings/test-ai-key to /admin/ai/settings/test-key
- DB endpoints remain unchanged under /admin/db/...
- Frontend tests: 291/291 passing
- Backend tests: 41/41 passing
2026-04-19 17:22:50 +03:00
d9ead1aafd fix: repair login endpoint registration in auth router 2026-04-19 17:20:11 +03:00
7ff9a705cd docs: update SESSION_STATE.md - Phase 3 Backend Cleanup complete 2026-04-19 17:11:37 +03:00
8fcd4150e5 refactor: split admin/config.py into ai_config and db_config 2026-04-19 17:10:56 +03:00
239368e595 refactor: split schemas.py into schemas/ package 2026-04-19 17:08:11 +03:00
a225d2efc6 fix: restore Search icon import in inventory/page.tsx and update session state - Phase 2 complete 2026-04-19 16:13:14 +03:00
bec4b714e3 refactor: extract LogsTable component from logs/page.tsx 2026-04-19 14:58:33 +03:00
47528ea4a2 refactor: extract FilterBar component 2026-04-19 14:57:00 +03:00
1797a617ab refactor: extract InventoryTable component 2026-04-19 14:55:53 +03:00
cf0a886b78 refactor: extract CameraView component from Scanner.tsx 2026-04-19 14:54:07 +03:00
ed5bbbfca0 refactor: extract ScannerSection component
- Created frontend/components/ScannerSection.tsx (76 lines)
- Moved mode switcher and scanner UI from page.tsx
- Props: mode, onModeChange, showScanner, onShowScanner, onScanSuccess, onOCRMatch, onAddItemClick
- Removed unused ArrowDownCircle, ArrowUpCircle imports from page.tsx
- All 291 tests passing, build successful
2026-04-19 14:47:15 +03:00
6eeaa89d9b refactor: extract NewItemDialog component
- Created frontend/components/NewItemDialog.tsx (37 lines)
- Moved scanner prompt and add item UI from page.tsx
- Props: onScannerClick, onAddItemClick callbacks
- Removed unused Smartphone and Sparkles imports from page.tsx
- All 291 tests passing, build successful
2026-04-19 14:47:12 +03:00
3302bae766 refactor: extract StockAdjustmentPanel component
- Extracted from page.tsx (lines 450-710)
- Pure presentational component with all state passed as props
- Props: selectedItem, isEditing, editedItem, adjustQty, adjustType, trashReason, categories, fieldScanning
- Callbacks: onCancel, onEdit, onEditChange, onQuantityChange, onTypeChange, onReasonChange, onShowScanner, onAdjustStock, onUpdateItem, onDeleteItem
- Includes edit mode and adjustment mode with quantity controls
- 291 tests passing, build successful
2026-04-19 14:47:08 +03:00
cc6b55ec0f fix: reorder hooks to resolve handleSync declaration order 2026-04-19 14:22:26 +03:00
cbcd9263e0 docs: update session state - Phase 1 (hook extractions) complete 2026-04-19 12:37:43 +03:00
6dc300d339 refactor: split bulk-sync into backend/routers/sync.py 2026-04-19 12:37:09 +03:00
90e9a60640 refactor: split LDAP auth into backend/routers/auth.py 2026-04-19 12:35:40 +03:00
a520b1ba2b refactor: extract useAIExtraction hook from AIOnboarding.tsx 2026-04-19 12:31:21 +03:00
cf45437bb0 refactor: extract useInventoryFilter hook from inventory/page.tsx 2026-04-19 12:29:22 +03:00
0e89059cac docs: update session state with Phase 1 refactoring progress 2026-04-19 12:25:03 +03:00
6dfc76ad92 refactor: extract useSync hook from page.tsx 2026-04-19 12:24:25 +03:00
f5441a7ca7 refactor: extract useStockAdjustment hook from page.tsx 2026-04-19 12:23:06 +03:00
5b8c6039ef refactor: extract useScanner hook from page.tsx 2026-04-19 12:21:15 +03:00
eda152e133 style: step 12 - ui uniformity complete, 291 frontend tests passing 2026-04-19 12:09:55 +03:00
d7fa470bcb style: step 11 - uniform text tokens in remaining components 2026-04-19 12:09:22 +03:00
1850fea170 style: step 10 - uniform text tokens in modals 2026-04-19 12:07:15 +03:00
922d9e431e style: step 9 - uniform text tokens in admin sub-components 2026-04-19 12:04:41 +03:00
acf9155ce2 style: step 8 - uniform text tokens in Scanner and AIOnboarding 2026-04-19 12:02:35 +03:00