docs(09): capture phase context
This commit is contained in:
@@ -0,0 +1,122 @@
|
||||
# Phase 9: Admin Panel Rearchitecture - Discussion Log
|
||||
|
||||
> **Audit trail only.** Do not use as input to planning, research, or execution agents.
|
||||
> Decisions are captured in CONTEXT.md — this log preserves the alternatives considered.
|
||||
|
||||
**Date:** 2026-06-12
|
||||
**Phase:** 09-admin-panel-rearchitecture
|
||||
**Areas discussed:** Admin overview page, Admin sidebar design, AuditLog + existing tab components, CODE-09 comment purge scope
|
||||
|
||||
---
|
||||
|
||||
## Admin Overview Page
|
||||
|
||||
| Option | Description | Selected |
|
||||
|--------|-------------|----------|
|
||||
| Stat cards + table | Top row: 3-4 stat cards; below: last 10 audit entries as table | ✓ |
|
||||
| Single scrollable page | All data in a simple vertical stack | |
|
||||
| You decide | Researcher/planner picks | |
|
||||
|
||||
**User's choice:** Stat cards + table
|
||||
|
||||
| Option | Description | Selected |
|
||||
|--------|-------------|----------|
|
||||
| New overview.py in api/admin/ | Single GET /api/admin/overview endpoint | ✓ |
|
||||
| Separate endpoints per stat | One endpoint per stat | |
|
||||
| Inline in __init__.py | Against Phase 8 aggregator-only rule | |
|
||||
|
||||
**User's choice:** New overview.py in api/admin/
|
||||
|
||||
| Option | Description | Selected |
|
||||
|--------|-------------|----------|
|
||||
| Inline in aggregate response | Single HTTP request, stats + last 10 entries | ✓ |
|
||||
| Separate /api/audit call | Two requests from overview component | |
|
||||
| You decide | Researcher/planner picks | |
|
||||
|
||||
**User's choice:** Inline in aggregate response
|
||||
|
||||
---
|
||||
|
||||
## Admin Sidebar Design
|
||||
|
||||
| Option | Description | Selected |
|
||||
|--------|-------------|----------|
|
||||
| Yes, SVG icons for each nav item | Consistent with AppSidebar | ✓ |
|
||||
| Text-only nav | Simpler, operator-only context | |
|
||||
| You decide | Researcher/planner picks | |
|
||||
|
||||
**User's choice:** Yes, SVG icons
|
||||
|
||||
| Option | Description | Selected |
|
||||
|--------|-------------|----------|
|
||||
| Subtle — 'Admin' badge in header | Same indigo brand color, low noise | ✓ |
|
||||
| Accent color change | Different background or accent | |
|
||||
| No special signaling | Identical to user sidebar | |
|
||||
|
||||
**User's choice:** Subtle — 'Admin' badge/label below DocuVault logo
|
||||
|
||||
| Option | Description | Selected |
|
||||
|--------|-------------|----------|
|
||||
| Muted link with left-arrow icon | Secondary styling | |
|
||||
| Standard nav item | Same as Overview/Users/etc. | |
|
||||
|
||||
**User's choice:** Free text — "I don't want the admin user to have the app at all. I want the admins sole purpose to be administration. If the admin wants to use the app he/she needs a normal user account. So please just create the admin controls for the admin user and no user view for the admin user."
|
||||
|
||||
**Notes:** Major product decision — admin role is administration-only. No "Back to app" link. Admin users are redirected to /admin if they attempt to access user routes. After login, admin role lands on /admin. This overrides ADMIN-09's "Back to app link" requirement.
|
||||
|
||||
Confirmed strict separation: admin accounts cannot access user routes, redirected to /admin.
|
||||
|
||||
---
|
||||
|
||||
## AuditLog + Existing Tab Components
|
||||
|
||||
| Option | Description | Selected |
|
||||
|--------|-------------|----------|
|
||||
| Structural extraction only | Strip padding, rename, wire as router children | ✓ |
|
||||
| Light refactor during extraction | Strip padding + clean tab-context artifacts | |
|
||||
|
||||
**User's choice:** Structural extraction only
|
||||
|
||||
| Option | Description | Selected |
|
||||
|--------|-------------|----------|
|
||||
| Promoted as-is — no new features | Existing filters and CSV export sufficient | ✓ |
|
||||
| Add missing filters | Add any missing features during promotion | |
|
||||
|
||||
**User's choice:** Promoted as-is
|
||||
|
||||
| Option | Description | Selected |
|
||||
|--------|-------------|----------|
|
||||
| Yes, delete the tab components | Dead code after views exist | ✓ |
|
||||
| Keep as wrappers | Old Tab files re-exported by views | |
|
||||
|
||||
**User's choice:** Yes, delete original AdminXxxTab.vue files
|
||||
|
||||
---
|
||||
|
||||
## CODE-09 Comment Purge Scope
|
||||
|
||||
| Option | Description | Selected |
|
||||
|--------|-------------|----------|
|
||||
| One dedicated plan at the end | All Phase 9 files + Phase 8 retroactive in one pass | ✓ |
|
||||
| Applied per-file as each plan touches files | Inline + separate retroactive plan | |
|
||||
|
||||
**User's choice:** One dedicated plan at the end
|
||||
|
||||
| Option | Description | Selected |
|
||||
|--------|-------------|----------|
|
||||
| Remove what-code-does; keep constraint/pitfall comments | Generic docstrings gone; non-obvious constraints stay | ✓ |
|
||||
| Remove everything except TODO-style notes | Aggressive purge | |
|
||||
|
||||
**User's choice:** Remove what-the-code-does comments; keep constraint/pitfall/non-obvious comments
|
||||
|
||||
---
|
||||
|
||||
## Claude's Discretion
|
||||
|
||||
- Exact SVG icon choices for admin sidebar nav items
|
||||
- Exact Python query patterns for the overview aggregate endpoint
|
||||
- Whether to use `views/admin/` directory structure for new admin views
|
||||
|
||||
## Deferred Ideas
|
||||
|
||||
None — discussion stayed within phase scope.
|
||||
Reference in New Issue
Block a user