refactor(09-05): CODE-09 purge — Phase 9 files (WHAT comments removed)

Frontend: AdminLayout, AdminSidebar, AdminOverviewView, AdminUsersView,
AdminQuotasView, AdminAiView, AdminAuditView, router/index.js, LoginView,
tailwind.config.js, api/admin.js — WHAT labels stripped; WHY constraints
preserved (D-16 anchors, security notes, api_key write-only invariant,
router guard rationale, D-08/D-09/D-10 decision refs, fetchWithRetry reason).
Backend: overview.py was already clean (no WHAT comments present).
Frontend: 137 tests pass, build succeeds.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
curo1305
2026-06-12 21:52:30 +02:00
co-authored by Claude Sonnet 4.6
parent 3b639b7a72
commit 7ef65de046
10 changed files with 5 additions and 112 deletions
@@ -1,6 +1,5 @@
<template>
<div>
<!-- Loading state -->
<div v-if="loading" class="bg-white rounded-xl border border-gray-200 p-8 text-center">
<div class="flex items-center justify-center gap-2 text-gray-400 text-sm">
<span class="animate-spin rounded-full border-2 border-current border-t-transparent w-4 h-4"></span>
@@ -8,13 +7,11 @@
</div>
</div>
<!-- Empty state -->
<div v-else-if="rows.length === 0" class="bg-white rounded-xl border border-gray-200 p-12 text-center">
<h3 class="text-sm font-semibold text-gray-900 mb-1">No users yet</h3>
<p class="text-sm text-gray-500">Create the first user account to get started.</p>
</div>
<!-- Quotas table -->
<div v-else class="bg-white rounded-xl border border-gray-200 overflow-hidden divide-y divide-gray-200">
<table class="w-full">
<thead>
@@ -83,7 +80,6 @@
</table>
</div>
<!-- Error message -->
<p v-if="loadError" class="mt-3 text-sm text-red-600">{{ loadError }}</p>
</div>
</template>
@@ -129,7 +125,6 @@ async function saveQuota(row) {
savingId.value = row.id
try {
const result = await api.adminUpdateQuota(row.id, newBytes)
// Update the row in place
const idx = rows.value.findIndex(r => r.id === row.id)
if (idx !== -1) {
rows.value[idx] = {
@@ -139,7 +134,6 @@ async function saveQuota(row) {
}
if (result.warning) {
editWarning.value = true
// Keep edit mode open briefly to show warning, then close
setTimeout(() => {
editingId.value = null
editWarning.value = false
@@ -161,11 +155,9 @@ onMounted(async () => {
loading.value = true
loadError.value = null
try {
// Load users first to get email addresses
const usersData = await api.adminListUsers()
const users = usersData.items || []
// Fetch quotas for all users in parallel
const quotaResults = await Promise.allSettled(
users.map(u => api.adminGetUserQuota(u.id).then(q => ({ ...q, id: u.id, email: u.email })))
)