feat(F-164): completed feature

This commit is contained in:
chattie
2026-08-22 18:25:21 +02:00
parent 9018c89590
commit 08af6caf50
20 changed files with 982 additions and 227 deletions

View File

@@ -6800,13 +6800,15 @@
"description": "Upgrade POS Next.js from outdated 15.x to the supported version aligned with Admin and fix resulting config/build compatibility.", "description": "Upgrade POS Next.js from outdated 15.x to the supported version aligned with Admin and fix resulting config/build compatibility.",
"priority": "high", "priority": "high",
"risk": "med", "risk": "med",
"status": "pending", "status": "done",
"created_at": "2026-08-22", "created_at": "2026-08-22",
"gates": { "gates": {
"reviewer": false, "reviewer": true,
"security": false, "security": true,
"qa": false "qa": true,
} "close": true
},
"completed_at": "2026-08-22T16:25:21Z"
}, },
{ {
"id": "F-165", "id": "F-165",

View File

@@ -0,0 +1,9 @@
<!-- BEGIN:nextjs-agent-rules -->
# This is NOT the Next.js you know
This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices.
This block is written and re-added by `next dev` — verify at `node_modules/next/dist/server/lib/generate-agent-files.js`. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean.
<!-- END:nextjs-agent-rules -->

View File

@@ -0,0 +1 @@
@AGENTS.md

View File

@@ -1,6 +1,7 @@
/// <reference types="next" /> /// <reference types="next" />
/// <reference types="next/image-types/global" /> /// <reference types="next/image-types/global" />
/// <reference path="./.next/types/routes.d.ts" /> import "./.next/dev/types/routes.d.ts";
import "./.next/dev/types/root-params.d.ts";
// NOTE: This file should not be edited // NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information. // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

View File

@@ -2,6 +2,10 @@ import type { NextConfig } from 'next';
const nextConfig: NextConfig = { const nextConfig: NextConfig = {
allowedDevOrigins: ['192.168.18.93', 'localhost'], allowedDevOrigins: ['192.168.18.93', 'localhost'],
turbopack: {
root: __dirname,
},
outputFileTracingRoot: __dirname,
}; };
export default nextConfig; export default nextConfig;

File diff suppressed because it is too large Load Diff

View File

@@ -8,17 +8,18 @@
"start": "next start --port 3006" "start": "next start --port 3006"
}, },
"dependencies": { "dependencies": {
"next": "^15.1.0", "next": "^16.3.1",
"react": "^19.0.0", "react": "^19.2.8",
"react-dom": "^19.0.0" "react-dom": "^19.2.8"
}, },
"devDependencies": { "devDependencies": {
"@tailwindcss/postcss": "^4.3.3",
"@types/node": "^22.0.0", "@types/node": "^22.0.0",
"@types/react": "^19.0.0", "@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0", "@types/react-dom": "^19.0.0",
"typescript": "^5.7.0",
"tailwindcss": "^4.0.0",
"autoprefixer": "^10.4.0", "autoprefixer": "^10.4.0",
"postcss": "^8.4.0" "postcss": "^8.4.0",
"tailwindcss": "^4.0.0",
"typescript": "^5.7.0"
} }
} }

View File

@@ -0,0 +1,5 @@
export default {
plugins: {
'@tailwindcss/postcss': {},
},
};

View File

@@ -1,6 +1,4 @@
@tailwind base; @import 'tailwindcss';
@tailwind components;
@tailwind utilities;
:root { :root {
--color-primary: #2D6A4F; --color-primary: #2D6A4F;

View File

@@ -3,7 +3,7 @@ import type { NextRequest } from 'next/server';
const PUBLIC_PATHS = ['/login', '/api/auth']; const PUBLIC_PATHS = ['/login', '/api/auth'];
export function middleware(request: NextRequest) { export function proxy(request: NextRequest) {
const { pathname } = request.nextUrl; const { pathname } = request.nextUrl;
// Allow public paths // Allow public paths

View File

@@ -8,7 +8,7 @@
], ],
"module": "ESNext", "module": "ESNext",
"moduleResolution": "bundler", "moduleResolution": "bundler",
"jsx": "preserve", "jsx": "react-jsx",
"strict": true, "strict": true,
"noEmit": true, "noEmit": true,
"esModuleInterop": true, "esModuleInterop": true,
@@ -32,7 +32,8 @@
"next.config.ts", "next.config.ts",
"src/**/*.ts", "src/**/*.ts",
"src/**/*.tsx", "src/**/*.tsx",
".next/types/**/*.ts" ".next/types/**/*.ts",
".next/dev/types/**/*.ts"
], ],
"exclude": [ "exclude": [
"node_modules" "node_modules"

View File

@@ -0,0 +1,3 @@
# F-164 — Diseño
Usar las mismas versiones runtime que Admin (`next 16.3.1`, `react/react-dom 19.2.8`) para reducir divergencia. Mantener API App Router y proxy existing. El lockfile de POS es autoritativo para esa app. Validar build production y flujo LAN.

View File

@@ -0,0 +1,3 @@
# F-164
POS alineado con Admin en Next.js 16.3.1/React 19.2.8. Convención `proxy.ts` y Tailwind 4 configurados según documentación local de Next 16.

View File

@@ -0,0 +1,8 @@
# F-164 — Implementer
- POS actualizado a Next 16.3.1 y React/ReactDOM 19.2.8.
- Lockfile actualizado; audit 0 vulnerabilidades.
- Migrado middleware→proxy según docs Next 16.
- Tailwind 4 configurado con @tailwindcss/postcss y `@import 'tailwindcss'`; eliminadas warnings CSS.
- Turbopack/output tracing root explícitos.
- Build/tsc PASS; LAN login/bind/config 200/200/200.

View File

@@ -0,0 +1 @@
{"feature_id":"F-164","agent":"leader","stage":"close","verdict":"APPROVED","checks":[{"item":"all gates/build/audit/runtime","ok":true}],"issues":[]}

View File

@@ -0,0 +1 @@
{"feature_id":"F-164","agent":"qa","stage":"qa_gate","verdict":"APPROVED","checks":[{"item":"Next 16 build","ok":true},{"item":"TypeScript","ok":true},{"item":"Tailwind CSS processing","ok":true},{"item":"login/bind/config","ok":true,"evidence":"200/200/200"}],"issues":[]}

View File

@@ -0,0 +1 @@
{"feature_id":"F-164","agent":"reviewer","stage":"review_gate","verdict":"APPROVED","checks":[{"item":"Next 16 migration","ok":true},{"item":"clean build","ok":true},{"item":"runtime flow","ok":true}],"issues":[]}

View File

@@ -0,0 +1 @@
{"feature_id":"F-164","agent":"security","stage":"security_gate","verdict":"APPROVED","checks":[{"item":"npm audit production","ok":true,"evidence":"0 vulnerabilities"},{"item":"proxy auth flow","ok":true}],"issues":[]}

View File

@@ -1,3 +1,3 @@
# F-166Remove duplicate VAT rate in storefront price # F-164Update outdated POS Next.js
En ficha de producto mantener `PVP inc. IVA` y mostrar el porcentaje solo en el desglose neto: `€14.40 sin IVA · IVA 10%`. Alinear POS con Admin: Next.js `16.3.1`, React/ReactDOM `19.2.8`. Actualizar lockfile, adaptar incompatibilidades de build y validar login/proxy/config.

View File

@@ -1,68 +1,68 @@
{ {
"feature_id": "F-166", "feature_id": "F-164",
"stage": "close", "stage": "close",
"agent": "leader", "agent": "leader",
"action": "Close VAT label fix", "action": "Close POS Next upgrade",
"state": "running", "state": "running",
"next_agent": "leader", "next_agent": "leader",
"waiting_for": "Seleccionar una feature pending y actualizar este estado", "waiting_for": "Seleccionar una feature pending y actualizar este estado",
"updated_at": "2026-08-22T16:20:59Z", "updated_at": "2026-08-22T16:25:00Z",
"timeline": [ "timeline": [
{ {
"ts": "2026-08-22T16:18:46Z", "ts": "2026-08-22T16:21:23Z",
"agent": "leader", "agent": "leader",
"stage": "intake", "stage": "intake",
"state": "running", "state": "running",
"message": "Remove repeated VAT rate from storefront price" "message": "Align POS Next.js with Admin supported version"
}, },
{ {
"ts": "2026-08-22T16:19:03Z", "ts": "2026-08-22T16:21:38Z",
"agent": "architect", "agent": "architect",
"stage": "design", "stage": "design",
"state": "running", "state": "running",
"message": "Keep VAT rate only in price breakdown" "message": "Plan POS framework version alignment"
}, },
{ {
"ts": "2026-08-22T16:19:18Z", "ts": "2026-08-22T16:21:52Z",
"agent": "implementer", "agent": "implementer",
"stage": "build", "stage": "build",
"state": "running", "state": "running",
"message": "Remove duplicate VAT percent label" "message": "Upgrade POS Next and React dependencies"
}, },
{ {
"ts": "2026-08-22T16:19:59Z", "ts": "2026-08-22T16:23:59Z",
"agent": "reviewer", "agent": "reviewer",
"stage": "review_gate", "stage": "review_gate",
"state": "running", "state": "running",
"message": "Review VAT label" "message": "Review POS framework migration"
}, },
{ {
"ts": "2026-08-22T16:20:11Z", "ts": "2026-08-22T16:24:11Z",
"agent": "security", "agent": "security",
"stage": "security_gate", "stage": "security_gate",
"state": "running", "state": "running",
"message": "Check display-only change" "message": "Audit upgraded dependencies"
}, },
{ {
"ts": "2026-08-22T16:20:24Z", "ts": "2026-08-22T16:24:25Z",
"agent": "qa", "agent": "qa",
"stage": "qa_gate", "stage": "qa_gate",
"state": "running", "state": "running",
"message": "Validate one VAT rate label" "message": "Validate upgraded POS build and LAN flow"
}, },
{ {
"ts": "2026-08-22T16:20:36Z", "ts": "2026-08-22T16:24:41Z",
"agent": "documenter", "agent": "documenter",
"stage": "document", "stage": "document",
"state": "running", "state": "running",
"message": "Document VAT label" "message": "Document POS framework upgrade"
}, },
{ {
"ts": "2026-08-22T16:20:59Z", "ts": "2026-08-22T16:25:00Z",
"agent": "leader", "agent": "leader",
"stage": "close", "stage": "close",
"state": "running", "state": "running",
"message": "Close VAT label fix" "message": "Close POS Next upgrade"
} }
] ]
} }