Fix: resolve Unterminated regexp literal build error in page.tsx
This commit is contained in:
@@ -200,4 +200,20 @@ Obiectiv: audit de securitate complet înainte de producție.
|
||||
- `ALLOWED_ORIGINS` — auto-detected
|
||||
- `DATA_DIR` — absolute path
|
||||
- `JWT_SECRET_KEY` — ephemeral (regenerates on restart)
|
||||
\n---\n
|
||||
## [Archived] Gemini (Antigravity) — 2026-04-13 — CORS & Config Centralization
|
||||
|
||||
**Active AI:** Gemini (Antigravity)
|
||||
**Archived:** 2026-04-14
|
||||
**Version:** v1.9.18 | **Branch:** dev
|
||||
|
||||
### Status
|
||||
STABLE — GENERIC CORS & CONFIG CENTRALIZATION COMPLETE.
|
||||
The CORS system has been upgraded to support `EXTRA_ALLOWED_ORIGINS` in `inventory.env`.
|
||||
|
||||
### What was done
|
||||
1. **Generic CORS**: Introduced `EXTRA_ALLOWED_ORIGINS` in `inventory.env`. Backend expansion in `main.py` handles all required ports.
|
||||
2. **Config Centralization**: `inventory.env` is now the Primary SSOT for networking and AI keys.
|
||||
3. **Startup**: Enhanced `start_server.sh` with better LAN/VPN URL discovery and display.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,41 +1,45 @@
|
||||
# CURRENT AI WORKING SESSION — HANDOVER
|
||||
|
||||
**Active AI:** Gemini (Antigravity)
|
||||
**Last Updated:** 2026-04-13
|
||||
**Current Version:** v1.9.18 (CORS Sync)
|
||||
**Last Updated:** 2026-04-14
|
||||
**Current Version:** v1.9.19 (MobilePolish)
|
||||
**Branch:** dev
|
||||
|
||||
---
|
||||
|
||||
## STATUS: 🟢 STABLE — GENERIC CORS & CONFIG CENTRALIZATION COMPLETE
|
||||
## STATUS: 🟢 STABLE — MOBILE UX & BOX MANAGER REFINEMENT COMPLETE
|
||||
|
||||
**CRITICAL FOR NEXT AI:** The CORS system has been upgraded to support `EXTRA_ALLOWED_ORIGINS` in `inventory.env`. The backend automatically expands these into full URLs (http/https across all ports).
|
||||
**CRITICAL FOR NEXT AI:** The UI has been optimized for mobile ("Premium" density).
|
||||
1. **Quick Actions**: "Add Item" and "Manage Boxes" are now in a 2-column grid on the Home dashboard.
|
||||
2. **Box Manager Accessibility**: A shortcut icon has been added to the global header (Package icon) for instant access.
|
||||
3. **Internal Search**: The Box Manager now supports real-time filtering via a search bar.
|
||||
|
||||
---
|
||||
|
||||
## WHAT WAS DONE THIS SESSION
|
||||
|
||||
### 1. Generic CORS (External Access)
|
||||
- **Variable**: Introduced `EXTRA_ALLOWED_ORIGINS` in `inventory.env`.
|
||||
- **Backend Expansion**: Updated `backend/main.py` to automatically generate allowed origins (plain/SSL) for any IP or FQDN provided in this comma-separated list.
|
||||
- **Tailscale Ready**: Pre-configured with `100.78.182.27` as requested by the user.
|
||||
### 1. Dashboard UX Refinement
|
||||
- **Grid Layout**: Transformed the vertical stack button list into a 2-column "Quick Actions" grid with modern card styling.
|
||||
- **Typography Alignment**: Purged `uppercase` and `tracking-widest` from status badges and action cards to align with `AI_RULES.md`.
|
||||
- **Mode Switcher**: Verified Title Case compliance.
|
||||
|
||||
### 2. Configuration Centralization
|
||||
- **inventory.env Updates**: Added placeholders for `GEMINI_API_KEY` and security tokens to encourage usage of a single configuration file for both local and Docker deployments.
|
||||
- **Port Consistency**: Cleaned up `config/backend.env.example` to reflect the actual ports used (8916-8919).
|
||||
### 2. Box Manager Enhancements
|
||||
- **Global Shortcut**: Integrated a small `Package` icon in the header next to the Sync button.
|
||||
- **Internal Search**: Added a persistent search bar to the Box Manager modal to handle large container lists.
|
||||
- **Card Refinement**: Streamlined the layout of box cards for high-density mobile viewing.
|
||||
|
||||
### 3. Startup & Discovery
|
||||
- **Dynamic Access Banner**: Enhanced `start_server.sh` to detect `EXTRA_ALLOWED_ORIGINS` and display the corresponding Tailscale/VPN URLs at startup.
|
||||
|
||||
### 4. Verification
|
||||
- **Test Script**: Verified the CORS expansion logic with `scratch/verify_cors.py` (deleted after use).
|
||||
### 3. Documentation & RELEASE
|
||||
- **User Guide**: Updated `USER_GUIDE.md` with instructions for the new Search and Header shortcut.
|
||||
- **Version Bump**: Increment to `v1.9.19`.
|
||||
- **Deployment**: Generated production bundle `aInventory-PROD-v1.9.19.zip`.
|
||||
|
||||
---
|
||||
|
||||
## WHAT THE NEXT AI MUST DO
|
||||
|
||||
1. **Docker Sync**: If the user experiences issues with the API key in Docker, suggest rebuilding the image or ensuring `inventory.env` is correctly mounted.
|
||||
2. **Reverse Proxy**: If a more complex FQDN setup is needed, consider updating `config/Caddyfile` to handle wildcard subdomains if `EXTRA_ALLOWED_ORIGINS` list becomes too long.
|
||||
1. **Phase 8: Database Encryption**: As per `PLAN.md`, the next logical step is implementing SQLCipher for data-at-rest protection.
|
||||
2. **Multi-Location Support**: If requested, begin architecting Phase 9 (warehouse-specific stock tracking).
|
||||
3. **Docker Validation**: Verify that the latest `inventory.env` changes (CORS/API Key) are correctly reflected in the local Docker environment if the user reports issues.
|
||||
|
||||
---
|
||||
|
||||
@@ -43,16 +47,13 @@
|
||||
|
||||
**Active database:** `<project_root>/data/inventory.db`
|
||||
**LDAP config:** `config/ldap_config.json`
|
||||
**Network config:** `inventory.env` (Now the Primary SSOT for networking)
|
||||
**Proxy config:** `config/Caddyfile`
|
||||
**Network config:** `inventory.env` (SSOT)
|
||||
**Production Bundle:** `aInventory-PROD-v1.9.19.zip`
|
||||
|
||||
**How to start:**
|
||||
```bash
|
||||
./start_server.sh
|
||||
```
|
||||
- Local URL: `https://localhost:8919`
|
||||
- LAN URL: `https://192.168.84.113:8919`
|
||||
- Tailscale URL: `https://100.78.182.27:8919` (Now allowed in CORS)
|
||||
|
||||
---
|
||||
✓ Done.
|
||||
|
||||
Reference in New Issue
Block a user