Commit Graph
320 Commits
Author SHA1 Message Date
Christian Vidal Wolf b5e8c2fe22 feat: upgrade Gemini models to 3.1 and 2.5 series (April 2026) 2026-04-24 13:54:45 +02:00
Christian Vidal Wolf 96c37f92e2 security: restrict AI settings to authorized admin email 2026-04-24 13:47:31 +02:00
Christian Vidal Wolf 13890af125 feat: add AI Settings modal to manage API keys from the UI 2026-04-24 13:45:38 +02:00
Christian Vidal Wolf 43f94b3902 fix: include dynamic columns in sticky position/z-index calculation
- Include pricingEditableCols and containerCols in column order for pinned calculation
- Fix z-index stacking so all pinned columns stay visible while scrolling
2026-04-24 13:35:43 +02:00
Christian Vidal Wolf 1c76544e47 fix: update CSP to allow Gemini API 2026-04-24 13:31:49 +02:00
Christian Vidal Wolf 05f9f0ef10 fix: improve column pinning with proper z-index stacking
- Add getStickyRank() function for layered z-index on pinned columns
- Higher z-index for rightmost pinned columns so they stack correctly
- Apply z-index dynamically based on column order in pinned list
- All pinned columns now stay visible while scrolling
2026-04-24 13:31:36 +02:00
Christian Vidal Wolf 3bc2753bec debug: add API key source logging 2026-04-24 13:28:01 +02:00
Christian Vidal Wolf 2c1efc44d6 fix: rename Gemini API key to VITE_GEMINI_API_KEY and improve logging 2026-04-24 13:27:34 +02:00
Christian Vidal Wolf e6207dff64 feat: add column pinning (freeze) functionality in Pricing Units tab
- Add Pin Columns button to select columns to freeze
- Implement sticky columns with left positioning for pinned columns
- Support pinning dynamic pricing and container columns
- Add Pin icon indicator on pinned columns
- Include reset and unpin all options in pin panel
2026-04-24 13:23:18 +02:00
Christian Vidal Wolf b8a960e3e5 fix: enable real-time filtering for global search and fix selection bug 2026-04-24 12:43:27 +02:00
Christian Vidal Wolf a0a9fbeb2e fix: resolve syntax error in global search ternary operator 2026-04-24 12:39:47 +02:00
Christian Vidal Wolf c5d083e011 feat: implement advanced 5-term global search in PricingView 2026-04-24 12:38:11 +02:00
Christian Vidal Wolf 64babee90d feat: upgrade column filters to support up to 5 dynamic terms with AND/OR logic 2026-04-24 12:34:00 +02:00
Christian Vidal Wolf dbc47d95cb feat: implement advanced Excel-style Custom Filter for SKU and Name columns and fix search clear bug 2026-04-24 12:27:30 +02:00
Christian Vidal Wolf 6a258c3fb6 docs: clarify multi-word search in UI and apply AND logic to column name filters 2026-04-24 12:23:48 +02:00
Christian Vidal Wolf 97fe06eedd feat: implement multi-word AND search in all views and initialize RuFlo V3 2026-04-24 12:20:14 +02:00
Christian Vidal Wolf b662acddd7 fix: date formatting for Dropbox data imports 2026-04-23 21:44:26 +02:00
Christian Vidal Wolf 8ffcae5eef fix: prefer history data over synced data for internal columns 2026-04-23 19:28:25 +02:00
Christian Vidal Wolf a987a5b750 debug: add immediate log after getHistoryDataForMerge 2026-04-23 19:25:52 +02:00
Christian Vidal Wolf cf602fe9a2 debug: add detailed safeFetch and getHistoryDataForMerge logging 2026-04-23 19:23:29 +02:00
Christian Vidal Wolf 3892b9f256 debug: log processedRow[103] for 59272EN 2026-04-23 19:20:43 +02:00
Christian Vidal Wolf f15c9fa853 fix: pad rows to match extendedHeaders length so internal cols are readable 2026-04-23 19:17:03 +02:00
Christian Vidal Wolf 7ef9f62497 debug: add diagnostic logs to trace history merge for 59272EN 2026-04-23 19:14:10 +02:00
Christian Vidal Wolf c1e3960a20 fix: merge history data into rows when products table is empty 2026-04-23 19:07:38 +02:00
Christian Vidal Wolf ee94926d04 fix: HistoryEntry.id type changed from number to string (Supabase returns UUID) 2026-04-23 18:58:52 +02:00
Christian Vidal Wolf be2adbfe68 debug: add detailed logging to trace history loading 2026-04-23 18:51:07 +02:00
Christian Vidal Wolf 0eeeeb480c fix: always load history on mount and reload on data change 2026-04-23 18:47:32 +02:00
Christian Vidal Wolf 7b71aa484e fix: reload history when data refreshes from Dropbox 2026-04-23 18:43:18 +02:00
Christian Vidal Wolf e0508d50d6 fix: restore internal control columns and protect them from Dropbox sync overrides 2026-04-23 18:36:35 +02:00
Christian Vidal Wolf 5112a27cda Feat: Implement dynamic internal column protection and Fullscreen mode.
- Internal control columns (Type, Checking, etc.) now persist across Excel shifts.
- Master data columns now prioritize Dropbox source of truth.
- Added Fullscreen mode to all main tabs (Pricing, Descriptions, Matrix).
- Improved Supabase data loading with pagination.
2026-04-23 18:27:40 +02:00
Christian Vidal WolfandClaude Sonnet 4.6 e1cfaaedfa fix: paginate getAllSyncedRows to fetch all products beyond the 1000 row Supabase cap
With 1005+ products, the old query returned only the top 1000 by updated_at.
Items edited long ago (like 51016DE) were silently missing from syncedData,
so the merge never applied their saved edits. Now paginate by product_id
until we exhaust the table.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 16:56:54 +02:00
Christian Vidal Wolf be7009353a temp: diagnostic log v2 for 51016DE 2026-04-23 16:54:31 +02:00
Christian Vidal WolfandClaude Sonnet 4.6 596b779e01 fix: guard against undefined headers in MissingDataView and MatrixView
Extended headers array can have empty strings that get passed as header
values; guard all .toLowerCase().includes() calls with (h || '').

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 16:51:16 +02:00
Christian Vidal WolfandClaude Sonnet 4.6 0165793b3e fix: fill sparse holes in extendedHeaders to prevent undefined.includes() crash
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 16:47:39 +02:00
Christian Vidal WolfandClaude Sonnet 4.6 96c56947c0 fix: extend headers with virtual columns so saved edits at indices >Excel length render
When the Excel shrinks (fewer columns than when an edit was saved), the
saved value exists in Supabase at e.g. index 103 but headers only covers
0-76, so the column never renders. Now we pad headers up to the hardcoded
virtual column indices (PRODUCT_TYPE=103, etc.) so the merge value is
visible in the UI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 16:44:42 +02:00
Christian Vidal WolfandClaude Sonnet 4.6 59e4bdeb92 fix: protect products with history from being overwritten by Dropbox sync
Products that have entries in products_history were edited at some point.
If their status was accidentally reset to 'excel', the sync would overwrite
their data. Now also check products_history to build the protected set.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 16:38:23 +02:00
Christian Vidal WolfandClaude Sonnet 4.6 80f86cb83e fix: remove temp diag log
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 16:35:20 +02:00
Christian Vidal Wolf c3dda5d919 temp: add diag log for 51016DE Supabase data 2026-04-23 16:31:30 +02:00
Christian Vidal WolfandClaude Sonnet 4.6 ebef518f11 fix: apply Supabase edits by diff vs Excel, not by editable column index
Instead of relying on resolvedCols.PRODUCT_TYPE (which can resolve to the
wrong index if the column header doesn't match the pattern), compare the
saved Supabase row against the fresh Excel row: any index where they differ
is a user edit and gets applied. This fixes TYPE / 'Surprise Bath bomb'
not appearing after reload.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 16:29:46 +02:00
Christian Vidal WolfandClaude Sonnet 4.6 63242d8852 fix: resolve TYPE column with pattern ['type'] instead of ['product','type']
The column header in the Excel is 'TYPE', not 'Product Type', so the
old pattern never matched. resolveColumnIndices fell back to the hardcoded
index 103, causing the PRODUCT_TYPE editable column index to be wrong on
reload and edited values (e.g. 'Surprise Bath bomb') to never be applied.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 16:26:04 +02:00
Christian Vidal WolfandClaude Sonnet 4.6 f3ed3cf147 fix: preserve edited changes after export and on Dropbox reload
resetAllPendingRows was setting status to 'synced' instead of 'edited',
causing the merge logic on reload to skip those rows. Also keep 'edited'
and 'saved' statuses locally after export instead of clearing all.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 16:22:35 +02:00
Christian Vidal Wolf 7de903a184 fix: load saved edits (status edited/pending) from Supabase 2026-04-23 16:16:20 +02:00
Christian Vidal Wolf 56fc7d34c3 fix: load fresh Excel values, only preserve pending edits 2026-04-23 16:14:18 +02:00
Christian Vidal Wolf 6bcf697165 fix: always use fresh Dropbox Excel values on load 2026-04-23 16:12:09 +02:00
Christian Vidal Wolf 605b93c445 fix: sync preserves manually edited items (status edited/pending) 2026-04-23 16:10:01 +02:00
Christian Vidal Wolf c2b229e899 fix: only preserve Supabase if value is different from Dropbox 2026-04-23 16:07:16 +02:00
Christian Vidal Wolf ba5bea44c0 fix: increase synced rows limit to 1000 2026-04-23 16:02:59 +02:00
Christian Vidal Wolf d98665fde0 fix: preserve app edits from Supabase (shows in Change History) 2026-04-23 16:00:21 +02:00
Christian Vidal Wolf 5ad1bff842 fix: use Dropbox values unless there's pending edit 2026-04-23 15:57:33 +02:00
Christian Vidal Wolf dbaf0e76fe Fix: Implement dynamic column re-alignment for data merging.
- Automatically detects if saved data uses the old Excel structure.
- Shifts indices dynamically to ensure UVP and SRP values match current columns.
- Fixes the 2.41 UVP and 4.95 SRP Int discrepancy.
2026-04-23 15:55:13 +02:00