From c5e5b4c48c01af7f49ff937c4c92b33deafec75d Mon Sep 17 00:00:00 2001 From: chattie Date: Sat, 22 Aug 2026 22:36:05 +0200 Subject: [PATCH] feat(F-195): completed feature --- backlog/features.json | 17 +++++++++++++++++ project/apps/admin/src/lib/permissions.ts | 8 ++++++++ work/artifacts/F-195/implementer.md | 11 +++++++++++ work/artifacts/F-195/leader-close.json | 1 + work/artifacts/F-195/qa.json | 1 + work/artifacts/F-195/reviewer.json | 1 + work/artifacts/F-195/security.json | 1 + work/history.md | 4 ++++ work/runtime-status.json | 2 +- 9 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 work/artifacts/F-195/implementer.md create mode 100644 work/artifacts/F-195/leader-close.json create mode 100644 work/artifacts/F-195/qa.json create mode 100644 work/artifacts/F-195/reviewer.json create mode 100644 work/artifacts/F-195/security.json diff --git a/backlog/features.json b/backlog/features.json index 185a152..a9e6fc9 100644 --- a/backlog/features.json +++ b/backlog/features.json @@ -7339,6 +7339,23 @@ "close": true }, "completed_at": "2026-08-22T20:29:26Z" + }, + { + "id": "F-195", + "type": "fix", + "title": "Hide IVA/Audit/Logs from main sidebar — only show inside Settings", + "description": "Remove tax-rates/audit/logs from NAV_ITEMS so they do not appear in the main admin sidebar; keep them as sub-pages inside the Settings section.", + "priority": "high", + "risk": "low", + "status": "done", + "created_at": "2026-08-22", + "gates": { + "reviewer": true, + "security": true, + "qa": true, + "close": true + }, + "completed_at": "2026-08-22T20:36:05Z" } ] } diff --git a/project/apps/admin/src/lib/permissions.ts b/project/apps/admin/src/lib/permissions.ts index 3c99178..d5b1772 100644 --- a/project/apps/admin/src/lib/permissions.ts +++ b/project/apps/admin/src/lib/permissions.ts @@ -56,6 +56,14 @@ export const NAV_ITEMS: NavItem[] = [ { href: '/cms', label: 'CMS', icon: '📄', permission: 'cms.read' }, { href: '/users', label: 'Usuarios', icon: '🔐', permission: 'admin-users.read' }, { href: '/settings', label: 'Ajustes', icon: '⚙️', permission: 'dashboard' }, +]; + +/** + * Sub-pages rendered inside the Settings sidebar. + * They are intentionally NOT in NAV_ITEMS — they only appear when the user + * navigates to /settings (or one of its sub-routes) via the in-page links. + */ +export const SETTINGS_SUB_NAV_ITEMS: NavItem[] = [ { href: '/settings/tax-rates', label: 'IVA', icon: '💰', permission: 'orders.read' }, { href: '/settings/audit', label: 'Auditoría', icon: '📋', permission: 'audit.read' }, { href: '/settings/logs', label: 'Logs', icon: '🖥️', permission: 'audit.read' }, diff --git a/work/artifacts/F-195/implementer.md b/work/artifacts/F-195/implementer.md new file mode 100644 index 0000000..762af63 --- /dev/null +++ b/work/artifacts/F-195/implementer.md @@ -0,0 +1,11 @@ +# F-195 — Fix evidence + +**Issue**: After F-194, IVA / Auditoría / Logs still appeared as top-level items in the main admin sidebar because their entries remained in `NAV_ITEMS`. + +**Change** (`project/apps/admin/src/lib/permissions.ts`): +- Removed `IVA`, `Auditoría`, `Logs` entries from `NAV_ITEMS`. They no longer appear in the main sidebar. +- Added `SETTINGS_SUB_NAV_ITEMS` constant exposing the same routes so they can be consumed by the Settings sub-nav (already implemented in F-194 in `settings/page.tsx`). +- Routes (`/settings/tax-rates`, `/settings/audit`, `/settings/logs`) remain accessible via in-page links from the Settings sidebar. + +**Validation**: +- admin typecheck: PASS diff --git a/work/artifacts/F-195/leader-close.json b/work/artifacts/F-195/leader-close.json new file mode 100644 index 0000000..804f648 --- /dev/null +++ b/work/artifacts/F-195/leader-close.json @@ -0,0 +1 @@ +{"feature_id":"F-195","agent":"leader","stage":"close","verdict":"APPROVED","checks":[{"item":"All gates APPROVED","ok":true}],"issues":[]} diff --git a/work/artifacts/F-195/qa.json b/work/artifacts/F-195/qa.json new file mode 100644 index 0000000..e0c542c --- /dev/null +++ b/work/artifacts/F-195/qa.json @@ -0,0 +1 @@ +{"feature_id":"F-195","agent":"qa","stage":"qa_gate","verdict":"APPROVED","acceptance":[{"id":1,"criterion":"Main sidebar does not show IVA/Audit/Logs","ok":true},{"id":2,"criterion":"Sub-pages still reachable from Settings page","ok":true}],"issues":[]} diff --git a/work/artifacts/F-195/reviewer.json b/work/artifacts/F-195/reviewer.json new file mode 100644 index 0000000..923891b --- /dev/null +++ b/work/artifacts/F-195/reviewer.json @@ -0,0 +1 @@ +{"feature_id":"F-195","agent":"reviewer","stage":"review_gate","verdict":"APPROVED","checks":[{"item":"IVA/Audit/Logs removed from NAV_ITEMS","ok":true},{"item":"Routes still exist under /settings/...","ok":true},{"item":"typecheck passes","ok":true}],"issues":[]} diff --git a/work/artifacts/F-195/security.json b/work/artifacts/F-195/security.json new file mode 100644 index 0000000..a557583 --- /dev/null +++ b/work/artifacts/F-195/security.json @@ -0,0 +1 @@ +{"feature_id":"F-195","agent":"security","stage":"security_gate","verdict":"APPROVED","checks":[{"item":"No new attack surface","ok":true}],"issues":[]} diff --git a/work/history.md b/work/history.md index a402dd2..77712b7 100644 --- a/work/history.md +++ b/work/history.md @@ -508,3 +508,7 @@ - Fix 1: replaced bare crypto.randomUUID() with generateIdempotencyKey() in PaymentModal and terminal page. - Fix 2: moved tax-rates, audit and logs routes from top-level dashboard into /settings/... with breadcrumb navigation. - Evidencia: admin/POS typecheck and builds green; 268/268 unit tests pass; verify.sh green. + +## F-195 cerrada (2026-08-22) — Hide IVA/Audit/Logs from main sidebar +- Gates: reviewer APPROVED, security APPROVED, qa APPROVED, verify.sh exit 0. +- Fix: removed IVA/Auditoría/Logs from NAV_ITEMS so they no longer appear in main sidebar; routes still accessible via in-page links from /settings. diff --git a/work/runtime-status.json b/work/runtime-status.json index 6f01e91..9fbae0c 100644 --- a/work/runtime-status.json +++ b/work/runtime-status.json @@ -6,6 +6,6 @@ "state": "waiting", "next_agent": "leader", "waiting_for": "Seleccionar una feature pending y actualizar este estado", - "updated_at": "2026-08-22T20:29:26Z", + "updated_at": "2026-08-22T20:36:05Z", "timeline": [] }