tractatus/public/js/admin
TheFlow 4b7e50962d fix(admin): Phase 1 - critical auth and navigation fixes
SUMMARY:
Fixed 3 broken admin pages (newsletter, hooks dashboard, migrator) and
standardized navigation links. These pages were completely non-functional
due to localStorage key mismatches.

CRITICAL FIXES:
1. newsletter-management.js:
   - token → admin_token (5 occurrences)
   - admin → admin_user (2 occurrences)
   - Now matches login.js localStorage keys

2. hooks-dashboard.js:
   - tractatus_admin_token → admin_token
   - Now uses correct auth token

3. claude-md-migrator.js:
   - auth_token → admin_token (2 occurrences)
   - Added missing apiRequest() helper function
   - Fixed logout to clear both admin_token and admin_user

NAVIGATION FIXES:
4. newsletter-management.html:
   - dashboard.html → /admin/dashboard.html (absolute path)

5. claude-md-migrator.html:
   - ../css/tailwind.css → /css/tailwind.css?v=1759833751 (absolute + version)
   - Added tractatus-theme.min.css

BEFORE (BROKEN):
- Newsletter Management:  Auth failed (wrong token key)
- Hooks Dashboard:  Auth failed (wrong token key)
- CLAUDE.md Migrator:  Auth failed + missing apiRequest()

AFTER (WORKING):
- Newsletter Management:  Auth works, all API calls function
- Hooks Dashboard:  Auth works, metrics load
- CLAUDE.md Migrator:  Auth works, API requests function

NEXT STEPS (Phase 2):
- Create unified admin navbar component
- Standardize CSS versioning across all pages
- Verify/create missing API endpoints

🤖 Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 21:33:50 +13:00
..
audit-analytics.js feat(csp): add event delegation for all admin interactions 2025-10-19 13:36:53 +13:00
auth-check.js fix(csp): achieve 100% CSP compliance - zero violations 2025-10-19 13:32:24 +13:00
blog-curation.js feat: comprehensive accessibility improvements (WCAG 2.1 AA) 2025-10-12 07:08:40 +13:00
case-moderation.js feat: add case submission portal admin interface and i18n support 2025-10-16 14:50:47 +13:00
claude-md-migrator.js fix(admin): Phase 1 - critical auth and navigation fixes 2025-10-20 21:33:50 +13:00
dashboard.js feat(admin): add publish/unpublish workflow UI to dashboard 2025-10-19 13:42:47 +13:00
hooks-dashboard.js fix(admin): Phase 1 - critical auth and navigation fixes 2025-10-20 21:33:50 +13:00
login.js fix(auth): resolve admin login - token sanitization and missing password field 2025-10-20 21:13:42 +13:00
media-triage.js feat: comprehensive accessibility improvements (WCAG 2.1 AA) 2025-10-12 07:08:40 +13:00
newsletter-management.js fix(admin): Phase 1 - critical auth and navigation fixes 2025-10-20 21:33:50 +13:00
project-editor.js feat(csp): add event delegation for all admin interactions 2025-10-19 13:36:53 +13:00
project-manager.js feat(csp): add event delegation for all admin interactions 2025-10-19 13:36:53 +13:00
project-selector.js feat: implement Rule Manager and Project Manager admin systems 2025-10-11 17:16:51 +13:00
rule-editor.js feat(csp): add event delegation for all admin interactions 2025-10-19 13:36:53 +13:00
rule-manager.js feat(csp): add event delegation for all admin interactions 2025-10-19 13:36:53 +13:00