Build [v.1.3.6]
This commit is contained in:
@@ -5,6 +5,38 @@ Entries are added here when a new AI session starts.
|
||||
|
||||
---
|
||||
|
||||
## [Archived] Claude (Sonnet 4.6) — 2026-04-11 — Login Loop Fix Attempt
|
||||
|
||||
**Active AI:** Claude (Sonnet 4.6)
|
||||
**Archived:** 2026-04-11
|
||||
**Version:** v1.3.5 | **Branch:** dev
|
||||
|
||||
### What was broken when this session started
|
||||
- Login succeeds (LDAP user `bede`) but main page immediately redirects back to `/login`
|
||||
- Root cause: axiosInstance in `frontend/lib/api.ts` initialized at SSR time with wrong baseURL (`http://localhost:8000` instead of `https://192.168.84.140:3002`)
|
||||
- 401 interceptor redirects unconditionally — no guard for "already on /login"
|
||||
- No token guard on `page.tsx` before API calls fire
|
||||
|
||||
### What this session did
|
||||
1. `frontend/lib/api.ts` — axiosInstance baseURL now lazy (set in request interceptor, not at module init)
|
||||
2. `frontend/lib/api.ts` — 401 interceptor now guards: `!window.location.pathname.includes('/login')`
|
||||
3. `frontend/app/page.tsx` — token guard added to BOTH useEffect hooks (first one calls `getCategories`, second calls `loadInventory`)
|
||||
4. `frontend/lib/auth.ts` — removed debug console.log statements
|
||||
5. `frontend/app/login/page.tsx` — removed debug console.log statements + unused `memo` import
|
||||
|
||||
### What was NOT done / NOT verified
|
||||
- Server was NOT restarted after changes
|
||||
- Login flow was NOT tested end-to-end by this AI
|
||||
- The fix may still fail if there are other API calls in `page.tsx` or child components firing before token check
|
||||
|
||||
### IMPORTANT NOTE FOR NEXT AI
|
||||
The `page.tsx` file has pre-existing TypeScript errors (not introduced by this session):
|
||||
- Line 241: `Property 'serial_number' does not exist on type 'Item'`
|
||||
- Line 598-599: `Property 'type' does not exist on type 'Partial<Item>'`
|
||||
These are separate issues — do NOT conflate them with the login fix.
|
||||
|
||||
---
|
||||
|
||||
## [Archived] Claude — 2026-04-11 — Security Audit Phase Start
|
||||
|
||||
**Active AI:** Claude (Pending Handover)
|
||||
|
||||
Reference in New Issue
Block a user