Early conditional return before useEffect/useMemo violated React Rules
of Hooks, causing error #300 (rendered more hooks than previous render)
after login.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- pendingRows now stores originalData + newData per article so changes
can be individually reverted to their pre-edit state
- TopBar Save button becomes a split button: left saves all, right
opens a dropdown listing every pending change with article no + name
- Each row in the dropdown has a Revert button that restores the
original data locally and removes it from the pending queue
- Dropdown closes automatically when all changes are saved/reverted
or when clicking outside
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Changes are now queued locally (yellow highlight) and only persisted to
Supabase when the user clicks the Save button in the top-right corner.
The button shows the count of pending changes and a spinner while saving.
EditPanel closes immediately after queuing — no Supabase call per edit.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: save all changes to Supabase with reliable upsert
- Replace broken PATCH→POST fallback with single atomic upsert (POST +
Prefer: resolution=merge-duplicates). The old PATCH returned 200 OK
with empty body for new articles, causing silent data loss on every
first save per article.
- Fix getAllSyncedRows pagination: add explicit limit=10000 and Range
header to bypass Supabase's default 1000-row cap.
- Add fetchWithRetry helper (2 retries on 5xx/network errors).
- handleSaveRow now returns Promise<boolean> and closes EditPanel only
after a confirmed successful save.
- Add 'error' save status: failed rows turn red (border-l-red-500)
across ProductDescriptions, ArticleDetails, and PricingView.
- EditPanel shows saving spinner, disables buttons while saving, and
displays inline error message with "Retry Save" on failure.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace label+hidden-input pattern in ColumnFilterPopover with direct
onClick on div — browsers don't reliably fire onChange for display:none
inputs activated via label click. Also adds missing columnFilters to
useMemo deps in ProductDescriptions and ArticleDetails, and restores
rowStatuses prop wiring in ProductDescriptions.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The rowStatuses prop was merged from feature branch but is incompatible
with main. Removed it and restored original tbody structure while keeping
the Present/Missing filter fix.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
The missing/present filter was not working due to operator precedence.
Added explicit parentheses to ensure correct evaluation.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Long DE, Long EN, Short DE, and Short EN columns now only show
Present/Missing filter options instead of all unique values
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Added Classification column next to Line with color-coded badges (Core=blue, OOC=amber)
- Added Excel-style filter icons on Article Name (text search), Line, and Classification headers
- Filter icons appear on hover; turn blue when active
- Multi-select popover for Line and Classification; free-text popover for Article Name
- Filters work additively alongside the existing global search bar
- ArticleDetails: removed Tariff/Barcode/Origin columns and tab to simplify the view
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Added per-column filter popover (Excel-style) with search, multi-select checkboxes, and clear button
- Filter icon appears on hover for each column header; turns blue when active
- "Clear All Column Filters" button appears in toolbar when any column filter is active
- Added License and Classification columns to the table with OOC badge styling
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- EditPanel: short description prompts now target ~30% of the long description character count, preserving key highlights as flowing prose
- DimensionsView: near-duplicate clusters expanded view replaced with a flat checkbox list (SKU + name + current dims per row), a target-dimension dropdown, and a "Sync N selected" button that unifies inner dimensions across selected products via ConfirmModal
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
New tab shows all products with missing UVP/SRP pricing or invalid
container units (40'HC/HQ = 0 or 1, missing Units/Outer). Price
fields are inline-editable with Supabase sync. Columns are detected
dynamically from Excel headers so future SRP countries (e.g. Poland)
appear automatically.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces percentage-based threshold (15%) with strict absolute tolerance:
two dimension groups are flagged only if all three sorted dimensions
differ by less than 1 cm. Targets likely data entry typos.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Compares each sorted dimension individually (max relative diff ≤15% per axis)
instead of total cubic volume. Catches cases like 29x15x20 vs 26x16x19.5
that volume comparison misses.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Groups with different inner dimensions but similar cubic volume (≤5% diff)
are flagged as possible data entry errors in a dedicated UI section.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Products with identical dimensions in different order (e.g. 29x10x15 vs 10x29x15) are now grouped together by sorting dimension values into a canonical form.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- src/lib/auth.ts: signIn/signOut/getStoredSession via Supabase Auth REST API
- src/components/LoginPage.tsx: login form with domain validation UI
- src/components/TopBar.tsx: show logged-in user email + sign out button
- src/App.tsx: gate entire app behind auth — shows LoginPage if no session
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>