v0.25.0 — Debug page: operator testing & diagnostics dashboard
Debug-mode-only dashboard (/debug) with 8 collapsible sections: system diagnostics, notification testing, backup triggers, storage simulation, hub & connectivity, self-update dry-run, DR/setup wizard, and in-memory log viewer. Migrates debug dump from API router to web server. Adds ring buffer log capture, storage disconnect simulation, event history tracking, and cross-drive/self-update test methods. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2787,3 +2787,199 @@ a.stat-card:hover {
|
||||
margin-left: .15rem;
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
/* ── Debug page ────────────────────────────────────────── */
|
||||
.debug-banner {
|
||||
background: rgba(255, 152, 0, 0.12);
|
||||
border: 1px solid rgba(255, 152, 0, 0.35);
|
||||
border-radius: var(--radius);
|
||||
padding: 0.75rem 1rem;
|
||||
margin-bottom: 1.5rem;
|
||||
color: var(--yellow);
|
||||
font-size: 0.85rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
.debug-banner strong { color: var(--orange); }
|
||||
|
||||
.debug-section {
|
||||
background: var(--bg-card);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius);
|
||||
margin-bottom: 0.75rem;
|
||||
overflow: hidden;
|
||||
}
|
||||
.debug-section-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0.75rem 1rem;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
transition: background .15s;
|
||||
}
|
||||
.debug-section-header:hover { background: rgba(255,255,255,0.03); }
|
||||
.debug-section-header h3 {
|
||||
font-size: 0.95rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
margin: 0;
|
||||
}
|
||||
.debug-section-toggle {
|
||||
color: var(--text-muted);
|
||||
font-size: 0.8rem;
|
||||
transition: transform .2s;
|
||||
}
|
||||
.debug-section.open .debug-section-toggle { transform: rotate(180deg); }
|
||||
.debug-section-body {
|
||||
display: none;
|
||||
padding: 0 1rem 1rem;
|
||||
border-top: 1px solid var(--border-color);
|
||||
}
|
||||
.debug-section.open .debug-section-body { display: block; }
|
||||
|
||||
.debug-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5rem;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
.debug-actions .btn { font-size: 0.8rem; padding: 0.35rem 0.75rem; }
|
||||
|
||||
.debug-result {
|
||||
font-size: 0.8rem;
|
||||
padding: 0.5rem 0.75rem;
|
||||
border-radius: 6px;
|
||||
margin-top: 0.5rem;
|
||||
font-family: 'JetBrains Mono', monospace;
|
||||
}
|
||||
.debug-result-ok {
|
||||
color: var(--green);
|
||||
background: var(--green-bg);
|
||||
border: 1px solid rgba(35, 134, 54, 0.3);
|
||||
}
|
||||
.debug-result-error {
|
||||
color: var(--red);
|
||||
background: var(--red-bg);
|
||||
border: 1px solid rgba(218, 54, 51, 0.3);
|
||||
}
|
||||
.debug-result-pending {
|
||||
color: var(--yellow);
|
||||
background: var(--yellow-bg);
|
||||
border: 1px solid rgba(210, 153, 34, 0.3);
|
||||
}
|
||||
|
||||
.debug-kv-grid {
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr;
|
||||
gap: 0.25rem 1rem;
|
||||
font-size: 0.85rem;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
.debug-kv-grid dt { color: var(--text-muted); font-weight: 500; white-space: nowrap; }
|
||||
.debug-kv-grid dd { color: var(--text-primary); margin: 0; }
|
||||
|
||||
.debug-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 0.8rem;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
.debug-table th {
|
||||
text-align: left;
|
||||
color: var(--text-muted);
|
||||
font-weight: 600;
|
||||
font-size: 0.75rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
padding: 0.35rem 0.5rem;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
.debug-table td {
|
||||
padding: 0.35rem 0.5rem;
|
||||
color: var(--text-primary);
|
||||
border-bottom: 1px solid rgba(48, 54, 61, 0.4);
|
||||
}
|
||||
.debug-table tr:last-child td { border-bottom: none; }
|
||||
|
||||
.debug-log-viewer {
|
||||
background: var(--bg-primary);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 6px;
|
||||
padding: 0.5rem;
|
||||
max-height: 400px;
|
||||
overflow-y: auto;
|
||||
font-family: 'JetBrains Mono', monospace;
|
||||
font-size: 0.75rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.debug-log-entry { white-space: pre-wrap; word-break: break-all; }
|
||||
.debug-log-debug { color: var(--text-muted); }
|
||||
.debug-log-info { color: var(--text-primary); }
|
||||
.debug-log-warn { color: var(--yellow); }
|
||||
.debug-log-error { color: var(--red); }
|
||||
|
||||
.debug-log-controls {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
margin-bottom: 0.5rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.debug-log-controls .btn {
|
||||
font-size: 0.75rem;
|
||||
padding: 0.25rem 0.5rem;
|
||||
}
|
||||
.debug-log-controls .btn.active {
|
||||
background: var(--accent-blue);
|
||||
color: #fff;
|
||||
}
|
||||
.debug-log-count {
|
||||
font-size: 0.75rem;
|
||||
color: var(--text-muted);
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.debug-confirm-input {
|
||||
background: var(--bg-primary);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 6px;
|
||||
padding: 0.4rem 0.75rem;
|
||||
color: var(--text-primary);
|
||||
font-family: 'JetBrains Mono', monospace;
|
||||
font-size: 0.85rem;
|
||||
width: 120px;
|
||||
}
|
||||
.debug-confirm-input:focus {
|
||||
outline: none;
|
||||
border-color: var(--red);
|
||||
box-shadow: 0 0 0 2px rgba(218, 54, 51, 0.2);
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
background: var(--red);
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
padding: 0.4rem 0.85rem;
|
||||
cursor: pointer;
|
||||
font-size: 0.85rem;
|
||||
font-weight: 600;
|
||||
transition: background .15s, opacity .15s;
|
||||
}
|
||||
.btn-danger:hover { background: #e5534b; }
|
||||
.btn-danger:disabled { opacity: 0.5; cursor: not-allowed; }
|
||||
|
||||
.debug-spinner {
|
||||
display: inline-block;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
border: 2px solid var(--text-muted);
|
||||
border-top-color: var(--accent-blue);
|
||||
border-radius: 50%;
|
||||
animation: debug-spin 0.6s linear infinite;
|
||||
vertical-align: middle;
|
||||
margin-right: 0.3rem;
|
||||
}
|
||||
@keyframes debug-spin { to { transform: rotate(360deg); } }
|
||||
|
||||
Reference in New Issue
Block a user