From 03faedfb38a2d550ade4bf8bba2c0b75a0e63dc8 Mon Sep 17 00:00:00 2001 From: TheFlow Date: Mon, 20 Oct 2025 21:51:09 +1300 Subject: [PATCH] feat(admin): Phase 2 - standardize admin UI with unified navbar component MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SUMMARY: Completed Phase 2 of admin UI overhaul: Created unified navbar component for simple pages, standardized CSS versioning across all pages, and fixed broken navigation. Pragmatic approach preserves valuable cross-page navigation while ensuring consistency. CHANGES - Simple Pages (Unified Navbar Component): - newsletter-management.html: Replaced custom navbar with component - hooks-dashboard.html: Replaced custom navbar with component - audit-analytics.html: Fixed wrong navbar (was using public site component) CHANGES - Complex Pages (Standardized CSS Only): - case-moderation.html: Added CSS version v=1759833751 - media-triage.html: Added CSS version v=1759833751 - project-manager.html: Updated CSS version to v=1759833751 - rule-manager.html: Updated CSS version to v=1759833751 (These pages retained custom navbars to preserve cross-page navigation UX) COMPONENT ENHANCEMENTS: - navbar-admin.js: Added 'hooks' icon for Framework Hooks Dashboard - Newsletter management JS: Removed manual admin-name and logout handling CSS STANDARDIZATION: Target version: /css/tailwind.css?v=1759833751 - 7 pages now use standardized version (was 3 different versions + missing) RESULTS: - All admin pages now have consistent navbar styling - Simple pages use unified component (3 pages) - Complex pages use standardized custom navbars (6 pages) - All pages have correct CSS versioning - audit-analytics.html fixed (was using wrong component) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .claude/metrics/hooks-metrics.json | 237 ++++++++++++++++++++++- public/admin/audit-analytics.html | 5 +- public/admin/case-moderation.html | 2 +- public/admin/hooks-dashboard.html | 29 +-- public/admin/media-triage.html | 2 +- public/admin/newsletter-management.html | 25 +-- public/admin/project-manager.html | 2 +- public/admin/rule-manager.html | 2 +- public/js/admin/newsletter-management.js | 16 +- public/js/components/navbar-admin.js | 2 +- 10 files changed, 249 insertions(+), 73 deletions(-) diff --git a/.claude/metrics/hooks-metrics.json b/.claude/metrics/hooks-metrics.json index 5bbe280c..00c42cbd 100644 --- a/.claude/metrics/hooks-metrics.json +++ b/.claude/metrics/hooks-metrics.json @@ -6194,6 +6194,237 @@ "file": "/home/theflow/projects/tractatus/docs/outreach/PUBLISHING_RIGHTS_ANALYSIS.md", "result": "error", "reason": "checkPreActionCheckRecency is not defined" + }, + { + "hook": "validate-file-write", + "timestamp": "2025-10-20T07:35:46.209Z", + "file": "/home/theflow/projects/tractatus/scripts/analyze-instruction-violations.js", + "result": "error", + "reason": "checkPreActionCheckRecency is not defined" + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:02:57.779Z", + "file": "/home/theflow/projects/tractatus/BACKEND_FRONTEND_MAPPING.md", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:03:20.274Z", + "file": "/home/theflow/projects/tractatus/BACKEND_FRONTEND_MAPPING.md", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:10:19.490Z", + "file": "/home/theflow/projects/tractatus/scripts/fix-admin-user.js", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:10:28.901Z", + "file": "/home/theflow/projects/tractatus/scripts/fix-admin-user.js", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:11:29.949Z", + "file": "/home/theflow/projects/tractatus/src/controllers/auth.controller.js", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:12:20.833Z", + "file": "/home/theflow/projects/tractatus/src/controllers/auth.controller.js", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:13:08.774Z", + "file": "/home/theflow/projects/tractatus/public/js/admin/login.js", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:13:09.050Z", + "file": "/home/theflow/projects/tractatus/public/js/admin/login.js", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:13:19.073Z", + "file": "/home/theflow/projects/tractatus/src/controllers/auth.controller.js", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:31:59.652Z", + "file": "/home/theflow/projects/tractatus/public/js/admin/newsletter-management.js", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:31:59.896Z", + "file": "/home/theflow/projects/tractatus/public/js/admin/newsletter-management.js", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:32:00.150Z", + "file": "/home/theflow/projects/tractatus/public/js/admin/newsletter-management.js", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:32:00.464Z", + "file": "/home/theflow/projects/tractatus/public/js/admin/newsletter-management.js", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:32:00.695Z", + "file": "/home/theflow/projects/tractatus/public/js/admin/newsletter-management.js", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:32:00.937Z", + "file": "/home/theflow/projects/tractatus/public/js/admin/newsletter-management.js", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:32:24.456Z", + "file": "/home/theflow/projects/tractatus/public/js/admin/hooks-dashboard.js", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:32:36.871Z", + "file": "/home/theflow/projects/tractatus/public/js/admin/claude-md-migrator.js", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:32:37.256Z", + "file": "/home/theflow/projects/tractatus/public/js/admin/claude-md-migrator.js", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:32:46.387Z", + "file": "/home/theflow/projects/tractatus/public/js/admin/claude-md-migrator.js", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:33:11.140Z", + "file": "/home/theflow/projects/tractatus/public/admin/newsletter-management.html", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:33:19.149Z", + "file": "/home/theflow/projects/tractatus/public/admin/claude-md-migrator.html", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-write", + "timestamp": "2025-10-20T08:37:41.494Z", + "file": "/home/theflow/projects/tractatus/public/js/components/navbar-admin.js", + "result": "error", + "reason": "checkPreActionCheckRecency is not defined" + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:44:41.923Z", + "file": "/home/theflow/projects/tractatus/public/admin/newsletter-management.html", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:44:42.328Z", + "file": "/home/theflow/projects/tractatus/public/js/admin/newsletter-management.js", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:44:42.600Z", + "file": "/home/theflow/projects/tractatus/public/js/admin/newsletter-management.js", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:47:40.427Z", + "file": "/home/theflow/projects/tractatus/public/js/components/navbar-admin.js", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:47:54.521Z", + "file": "/home/theflow/projects/tractatus/public/admin/hooks-dashboard.html", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:50:09.907Z", + "file": "/home/theflow/projects/tractatus/public/admin/audit-analytics.html", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:50:23.417Z", + "file": "/home/theflow/projects/tractatus/public/admin/case-moderation.html", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:50:23.890Z", + "file": "/home/theflow/projects/tractatus/public/admin/media-triage.html", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:50:24.257Z", + "file": "/home/theflow/projects/tractatus/public/admin/rule-manager.html", + "result": "passed", + "reason": null + }, + { + "hook": "validate-file-edit", + "timestamp": "2025-10-20T08:50:24.479Z", + "file": "/home/theflow/projects/tractatus/public/admin/project-manager.html", + "result": "passed", + "reason": null } ], "blocks": [ @@ -6481,10 +6712,10 @@ } ], "session_stats": { - "total_edit_hooks": 676, + "total_edit_hooks": 707, "total_edit_blocks": 39, - "last_updated": "2025-10-20T05:34:10.755Z", - "total_write_hooks": 209, + "last_updated": "2025-10-20T08:50:24.479Z", + "total_write_hooks": 211, "total_write_blocks": 8, "total_bash_hooks": 3, "total_bash_blocks": 2 diff --git a/public/admin/audit-analytics.html b/public/admin/audit-analytics.html index 439ddf1f..0d7eebe8 100644 --- a/public/admin/audit-analytics.html +++ b/public/admin/audit-analytics.html @@ -5,7 +5,7 @@ Audit Analytics | Tractatus Admin - +