Build [v1.14.23]

This commit is contained in:
2026-04-23 18:23:07 +03:00
parent 7c4441a962
commit 8d9a4ccc7a
8 changed files with 83 additions and 76 deletions

View File

@@ -26,6 +26,7 @@ This is the **Single Source of Truth** for ALL AI agents. Refer to [PROJECT_ARCH
- **NO UPPERCASE** or **NO ITALICS** in any UI context (headers, labels, buttons). - **NO UPPERCASE** or **NO ITALICS** in any UI context (headers, labels, buttons).
- **NO BOLD FONTS**: Use `font-normal` throughout. Hierarchy via size and color only. - **NO BOLD FONTS**: Use `font-normal` throughout. Hierarchy via size and color only.
- **NO `tracking-widest`**. - **NO `tracking-widest`**.
- **StatCard Typography**: Numeric values in StatCards MUST match the exact text size of their corresponding labels (e.g., `text-base md:text-lg`) to avoid overwhelming the density of the component.
- **Layout**: Main pages MUST use `max-w-7xl`. - **Layout**: Main pages MUST use `max-w-7xl`.
- **Unified Headers**: Icon box (`p-4 bg-primary/10 border-primary/20`) + Title (`text-3xl font-normal`). - **Unified Headers**: Icon box (`p-4 bg-primary/10 border-primary/20`) + Title (`text-3xl font-normal`).
- **Iconography**: Use **Lucide Icons** exclusively. - **Iconography**: Use **Lucide Icons** exclusively.

View File

@@ -100,6 +100,7 @@ def extract_label_info(image_bytes: bytes, mode: str = "item"):
"Size": "size", "Size": "size",
"Color": "color", "Color": "color",
"PartNr": "part_number", "PartNr": "part_number",
"Specs": "specs",
"OCR": "ocr_text" "OCR": "ocr_text"
} }

View File

@@ -1,4 +1,4 @@
# Technical Inventory Hardware Extraction Protocol # Technical Inventory Hardware Extraction Protocol
Extract ALL relevant hardware items from the image with precise, standardized formatting. Extract ALL relevant hardware items from the image with precise, standardized formatting.
@@ -8,7 +8,7 @@
- **Multi-item labels**: Treat each SKU/variant as a separate item (e.g., "5m cable" and "7m cable" = 2 items) - **Multi-item labels**: Treat each SKU/variant as a separate item (e.g., "5m cable" and "7m cable" = 2 items)
## Item Field Format (CRITICAL) ## Item Field Format (CRITICAL)
[] Format: `<size_or_length> <type> <vendor> <connector> <part_number>`
**Component Rules:** **Component Rules:**
- `<size_or_length>`: - `<size_or_length>`:
@@ -17,8 +17,16 @@
- Rule: If ≥1000GB, use TB. If ≥1000MB, use GB. Otherwise use MB. - Rule: If ≥1000GB, use TB. If ≥1000MB, use GB. Otherwise use MB.
- **CABLE/WIRE LENGTH**: Meters only. Examples: "5m", "10m", "50m" - **CABLE/WIRE LENGTH**: Meters only. Examples: "5m", "10m", "50m"
- **RAM DIMM**: Capacity in GB. Examples: "128GB", "32GB", "8GB" - **RAM DIMM**: Capacity in GB. Examples: "128GB", "32GB", "8GB"
- **SFP/TRANSCEIVER SPEED**: Speed in G/Mbps. Examples: "10G", "1G", "40G", "100G"
- `<type>`: Asset class.
- **CABLES**:
- Use "Fiber" for all optical fiber cables.
- Use "Patchcord" for all copper UTP/RJ45 cables.
- Others: SATA, SAS, Power, USB, etc.
- **COMPONENTS**: DDR3/DDR4/DDR5, NVMe, SSD, HDD, SFP/Transceiver, DIMM, etc.
- **PRECEDENCE**: If an item is both "SSD" and "NVMe", use **NVMe** as the type and category.
- `<type>`: Asset class. One of: DDR3/DDR4/DDR5, SSD/HDD/NVMe, SATA/SAS, Patchcord/Fiber/Cable, SFP/Transceiver, DIMM, etc.
- `<vendor>`: Manufacturer (HP, HPE, Dell, Samsung, Cisco, Hynix, Intel, Broadcom) - `<vendor>`: Manufacturer (HP, HPE, Dell, Samsung, Cisco, Hynix, Intel, Broadcom)
- `<connector>`: Physical interface (RJ45, LC-LC, MPO, U.3, SATA, SAS, ST, SC). Omit if N/A. - `<connector>`: Physical interface (RJ45, LC-LC, MPO, U.3, SATA, SAS, ST, SC). Omit if N/A.
- `<part_number>`: Part number ONLY if visible. **Omit serial numbers.** - `<part_number>`: Part number ONLY if visible. **Omit serial numbers.**
@@ -26,9 +34,10 @@
**Item Examples (WITH HUMAN-READABLE SIZES):** **Item Examples (WITH HUMAN-READABLE SIZES):**
- `1.6TB NVMe HPE U.3 P66093-002` (not 1600GB) - `1.6TB NVMe HPE U.3 P66093-002` (not 1600GB)
- `256GB SSD Dell SATA SK-8765` (already human-readable) - `256GB SSD Dell SATA SK-8765` (already human-readable)
- `5m Patchcord LC-LC` - `5m Fiber LC-LC` (optical cable)
- `2m Patchcord RJ45` (copper cable)
- `128GB DDR4 Hynix` - `128GB DDR4 Hynix`
- `512MB Cache Samsung SATA` (stays MB if under 1GB) - `10G SFP+ Cisco LC 10-2415-03`
**Size Conversion Examples:** **Size Conversion Examples:**
- 1600GB → 1.6TB - 1600GB → 1.6TB
@@ -47,72 +56,74 @@
## Other Fields ## Other Fields
- **Type**: Repeat the asset class (DDR4, SSD, NVMe, Patchcord, etc.) - **Type**: Repeat the asset class (DDR4, SSD, NVMe, Patchcord, etc.)
- **Description**: Technical summary, max 5 words. Examples: "High-speed fiber optic", "Enterprise Gen4 storage" - **Description**: Technical summary, max 5 words. Examples: "High-speed fiber optic", "Enterprise Gen4 storage"
- **Category**: Memory, Storage, Network, Cabling, Compute, Optical, Transceiver - **Category**:
- For Spare Parts (see below): Use `spare parts - <type>` where `<type>` is the lowercase component name (e.g., `spare parts - ram`, `spare parts - ssd`, `spare parts - nvme`, `spare parts - raid card`, `spare parts - cpu`, `spare parts - psu`, `spare parts - hba`, `spare parts - nic`, `spare parts - sfp`).
- For Others: Use `Network`, `Cabling`, `Compute`, `Optical`, `Consumable`.
- **Connector**: Interface type from Item field. Examples: "LC-LC", "RJ45", "U.3" - **Connector**: Interface type from Item field. Examples: "LC-LC", "RJ45", "U.3"
- **Size**: **HUMAN-READABLE capacity or length.** Examples: "1.6TB", "256GB", "5m" (NOT "1600GB") - **Size**: **HUMAN-READABLE capacity, length, or speed.** Examples: "1.6TB", "256GB", "5m", "10G" (NOT "1600GB")
- **Color**: Physical color if distinguishing - **Color**: Physical color if distinguishing
- **PartNr**: Part number only (no serial numbers) - **PartNr**: Part number only. **CRITICAL: NEVER include Serial Numbers (S/N, SN, Serial).**
- **OCR**: Robust matching key for OCR tolerance - **Specs**: Detailed technical specifications (e.g., "1.2V, CL22", "850W 80+ Gold", "Gen4 x4", "Single-mode").
- **OCR**: Robust matching key for OCR tolerance. Format: `TYPE SIZE VENDOR CONNECTOR PARTNUMBER` (UPPERCASE, no special chars).
## OCR Field Rules (CRITICAL) ## OCR Field Rules (CRITICAL)
Generate a SHORT, clean matching key: Generate a SHORT, clean matching key for database lookup:
- Format: **UPPERCASE space-separated, NO special chars, NO duplicates** - Format: **UPPERCASE space-separated, NO special chars, NO duplicates**
- Include ONLY: Type + Size + Primary Vendor + Connector + Part Number - Include ONLY: Type + Size + Primary Vendor + Connector + Part Number
- **EXCLUDE**: Serial numbers, secondary vendors, duplicate tokens, EMC/SK labels - **STRICT EXCLUSIONS**:
- **USE HUMAN-READABLE SIZE**: Use TB/GB from Item field, not original notation - NO serial numbers (S/N, SN, Serial)
- NO secondary vendor names
- NO extraneous labels
- **CONSTRAINTS**:
- Each token appears ONE time only (no duplicates)
- Remove hyphens/special chars for fuzzy matching (e.g., `SK-8765` -> `SK8765`)
- **USE HUMAN-READABLE SIZE**: Use TB/GB/M/G from Item field.
**OCR Format:** `TYPE SIZE VENDOR CONNECTOR PARTNUMBER` **OCR Examples:**
**OCR Examples (WITH HUMAN-READABLE SIZES):**
- Item: `1.6TB NVMe HPE U.3 P66093-002` → OCR: `NVME 1.6TB HPE U3 P66093002` - Item: `1.6TB NVMe HPE U.3 P66093-002` → OCR: `NVME 1.6TB HPE U3 P66093002`
- Item: `5m Patchcord LC-LC` → OCR: `PATCHCORD 5M LC LC` - Item: `5m Fiber LC-LC` → OCR: `FIBER 5M LC LC`
- Item: `2m Patchcord RJ45` → OCR: `PATCHCORD 2M RJ45`
- Item: `256GB SSD Samsung SAS SK-8765` → OCR: `SSD 256GB SAMSUNG SAS SK8765` - Item: `256GB SSD Samsung SAS SK-8765` → OCR: `SSD 256GB SAMSUNG SAS SK8765`
- Item: `128GB DDR4 Hynix` → OCR: `DDR4 128GB HYNIX` - Item: `128GB DDR4 Hynix` → OCR: `DDR4 128GB HYNIX`
- Item: `10G SFP+ Cisco LC 10-2415-03` → OCR: `SFP+ 10G CISCO LC 10241503`
**OCR Constraints:**
- NO duplicate part numbers
- NO secondary vendor names
- NO extraneous labels
- Each token appears ONE time only
- Remove hyphens/special chars for fuzzy matching
- Use HUMAN-READABLE sizes (1.6TB not 1600GB)
## Spare-Parts vs Consumables Classification ## Spare-Parts vs Consumables Classification
CLASSIFICATION GUIDE - SPARE PARTS vs CONSUMABLES: CLASSIFICATION GUIDE - SPARE PARTS vs CONSUMABLES:
Spare Parts (replaceable components that plug into or interface with devices): Spare Parts (replaceable components that plug into or interface with devices):
- RAM, DDR memory modules (DDR3, DDR4, DDR5, SODIMM, DIMM) - **RAM**: DDR3, DDR4, DDR5, SODIMM, DIMM → Category: `spare parts - ram`
- SSDs, NVMe drives, M.2 modules, SATA drives, hard drives - **Storage**: NVMe, SSD, M.2, SATA HDD, SAS HDD → Category: `spare parts - nvme`, `spare parts - ssd`, or `spare parts - hdd`.
- CPUs, GPUs, processors, discrete graphics cards - *Rule: Use `nvme` if the item is an NVMe SSD.*
- Power supply units (PSU), power modules (NOT generic power cords) - **CPU**: Processors, Intel Xeon, AMD EPYC → Category: `spare parts - cpu`
- Expansion cards (PCIe, PCI, RAID controllers, network cards/NIC) - **Power**: PSU, Power Supply Modules → Category: `spare parts - psu`
- Cooling solutions (heatsinks, CPU coolers, thermal solutions) - **Controllers**: RAID Controllers, HBA, NIC, Network Cards → Category: `spare parts - raid card` or `spare parts - hba` or `spare parts - nic`
- Motherboards, chipsets, BIOS modules - **Cooling**: Heatsinks, Fans (specific to models) → Category: `spare parts - cooling`
- **Mainboard**: Motherboards, Riser Cards → Category: `spare parts - motherboard` or `spare parts - riser`
- **Optical**: SFPs, Transceivers → Category: `spare parts - sfp`
NOT Spare Parts (consumables, generic items): NOT Spare Parts (consumables, generic items):
- Cables (power, SATA, USB, Ethernet, proprietary cords) - Cables: Power cables, SATA cables, USB, Ethernet, Fiber Patchcords → Category: `Cabling` or `Consumable`
- Fasteners (screws, washers, bolts, standoffs) - Fasteners: Screws, brackets, rails → Category: `Consumable`
- Thermal paste, thermal pads, adhesive tapes - Materials: Thermal paste, pads, tapes → Category: `Consumable`
- Connectors, plugs, sockets, generic adapters
- Generic cords and utility items
Decision Tree: Decision Tree:
1. Does the item have a replaceable function in a larger system? 1. Does the item have a manufacturer part number (P/N)?
2. Does it have a manufacturer part number and technical specifications? 2. Is it a modular component of a larger system (Server, PC, Switch)?
3. Is it described with model/revision information? 3. Does it have technical specs (Speed, Capacity, Voltage)?
If YES to 2+ questions: Mark as SPARE PART If YES to 2+ questions: Mark as `spare parts - <type>`
If item matches consumable examples exactly: Mark as CONSUMABLE If item is a cable: Mark as `Cabling`
Otherwise: Mark as "uncertain" in the Category field for human review. If item is a generic hardware: Mark as `Consumable`
Otherwise: Mark as `uncertain` for review.
Examples: Examples:
✓ "Kingston Fury 16GB DDR4-3200" → Spare Part (RAM module) ✓ "Kingston Fury 16GB DDR4-3200" → Category: `spare parts - ram`
✓ "Samsung 970 EVO 1TB NVMe" → Spare Part (SSD) ✓ "Samsung 970 EVO 1TB NVMe" → Category: `spare parts - nvme`
✓ "Intel Core i7-12700K" → Spare Part (CPU) ✓ "Intel Core i7-12700K" → Category: `spare parts - cpu`
✓ "Corsair RM850x 850W Power Supply" → Spare Part (PSU) ✓ "LSI MegaRAID 9361-8i" → Category: `spare parts - raid card`
✗ "6ft SATA Cable" → Consumable (cable) ✗ "6ft SATA Cable" → Category: `Cabling`
✗ "CPU Mounting Hardware Kit" → Consumable (fasteners) ✗ "M3 Mounting Screws" → Category: `Consumable`
✗ "Thermal Paste Tube" → Consumable (adhesive material)
## Output Format ## Output Format
```json ```json
@@ -127,7 +138,8 @@
"Size": "human_readable_size", "Size": "human_readable_size",
"Color": "color", "Color": "color",
"PartNr": "part_number", "PartNr": "part_number",
"OCR": "TYPE SIZE VENDOR CONNECTOR PARTNUMBER" "Specs": "detailed technical specifications",
"OCR": "SIZE TYPE VENDOR CONNECTOR PARTNUMBER"
} }
] ]
} }

View File

@@ -54,6 +54,7 @@ A unified inventory management system that eliminates manual data entry through
## 4. Design & Operational Constraints ## 4. Design & Operational Constraints
- **Tech Stack**: FastAPI (Python), SQLite, Next.js (TypeScript), Tailwind CSS. - **Tech Stack**: FastAPI (Python), SQLite, Next.js (TypeScript), Tailwind CSS.
- **UI Fidelity**: Premium density, Lucide icons, **NO UPPERCASE**, **NO BOLD FONTS** (normal weight only). - **UI Fidelity**: Premium density, Lucide icons, **NO UPPERCASE**, **NO BOLD FONTS** (normal weight only).
- **StatCard Rule**: Numeric values MUST match label text size for balanced density.
- **Database**: Single-instance SQLite (WAL mode). Multi-instance is v3+. - **Database**: Single-instance SQLite (WAL mode). Multi-instance is v3+.
- **Security**: Mandatory auth, no bypasses, immutable audit logs. - **Security**: Mandatory auth, no bypasses, immutable audit logs.
- **AI**: Multi-provider resilience (Gemini primary, Claude fallback). - **AI**: Multi-provider resilience (Gemini primary, Claude fallback).

View File

@@ -2,38 +2,30 @@
**Active AI:** Gemini CLI **Active AI:** Gemini CLI
**Last Updated:** 2026-04-23 **Last Updated:** 2026-04-23
**Current Version:** v1.14.19 **Current Version:** v1.14.20
**Status**: ✅ SSL PROXY FIXED | 🟢 READY FOR PHASE 8 **Status**: ✅ STATCARD TYPOGRAPHY REFINED | 🟢 READY FOR PHASE 8
--- ---
## SESSION 42 EXECUTION SUMMARY — SSL Infrastructure Fix ## SESSION 44 EXECUTION SUMMARY — StatCard UI Tweak
### 1. SSL Proxy Fix (COMPLETE) ### 1. StatCard Typography Adjustment
- **Port 80 Conflict**: Identified that Caddy was failing to start because it tried to bind to port 80 for HTTP->HTTPS redirects, while port 80 was already in use by a system-wide Caddy. - **Constraint**: Reduced numeric value font size in dashboard cards (`StatCard.tsx`) to match their label text size (`text-base md:text-lg`).
- **Caddy Configuration**: Modified `Caddyfile.standalone` (root and `config/`) to include `auto_https disable_redirects` in the global options. This allows Caddy to run on custom ports (8918/8919) without interfering with port 80. - **Rationale**: User feedback indicated the previous large font sizes (`text-2xl md:text-3xl`) were overwhelming and disproportionate to the card's density.
- **Service Restart**: Successfully restarted backend, frontend, and proxy using `scripts/run_standalone.py restart`.
### 2. Verification ### 2. Rule Standardization
- **Backend SSL**: Verified reachable at `https://localhost:8918/` (Port 8916 upstream). - **AI_RULES.md Updated**: Formally documented the new standard in Section 3 (UI/UX Fidelity Standards). Numeric values in StatCards MUST now match label sizes to maintain visual balance.
- **Frontend SSL**: Verified reachable at `https://localhost:8919/` (Port 8917 upstream).
- **Service Status**: `run_standalone.py status` confirms all components are UP.
--- ---
## NEXT STEPS (Phase 8: Hardening & Release) ## NEXT STEPS (Phase 8: Hardening & Release)
1. **End-to-End Testing**: 1. **Extraction Validation**:
- Verify data consistency in multi-page Excel exports. - Run sample images of RAID cards and NVMe drives to confirm `spare parts - <type>` categorization.
- Stress test the new Python-based deployment scripts.
2. **UX Refinement**: 2. **UX Refinement**:
- Perform a final accessibility audit on the new Admin UI components. - Ensure the Admin UI displays these new categories correctly.
- Ensure consistent loading states across all Admin panels. 3. **v1.15.0 Milestone**:
- Finalize the release candidate.
3. **Production Preparation**:
- Finalize the production runbook.
- Prepare for the v1.15.0 "Stable" release milestone.
--- ---

View File

@@ -1,6 +1,6 @@
{ {
"version": "1.14.22", "version": "1.14.23",
"last_build": "2026-04-23-1616", "last_build": "2026-04-23-1823",
"codename": "ConfigCore", "codename": "ConfigCore",
"commit": "e5bb14d9" "commit": "7c4441a9"
} }

View File

@@ -448,7 +448,7 @@ export default function InventoryPage() {
/> />
</div> </div>
<div> <div>
<label className="text-sm font-normal text-secondary ml-1 tracking-tight">Size / Length</label> <label className="text-sm font-normal text-secondary ml-1 tracking-tight">Size / Length / Speed</label>
<input <input
type="text" type="text"
value={editedItem.size || ''} value={editedItem.size || ''}

View File

@@ -17,7 +17,7 @@ export default function StatCard({ label, value, icon: Icon }: StatCardProps) {
</span> </span>
</div> </div>
<span className="text-2xl md:text-3xl font-normal text-white whitespace-nowrap tabular-nums"> <span className="text-base md:text-lg font-normal text-white whitespace-nowrap tabular-nums">
{value} {value}
</span> </span>
</div> </div>