feat: add DB Explorer for read-only SQLite inspection
All checks were successful
Tests / lint (pull_request) Successful in 3s
Tests / test (pull_request) Successful in 29s

Adds /db-explorer page and JSON API to browse all 15 SQLite databases
in data/. Sidebar lists databases with sizes, clicking one renders all
tables as scrollable data tables with row truncation at 200.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Trip T
2026-03-12 10:41:13 -04:00
parent 765e0f79c7
commit bc38fee817
5 changed files with 260 additions and 0 deletions

View File

@@ -2463,3 +2463,33 @@
font-size: 0.7rem;
}
}
/* ═══════════════════════════════════════════════════════════════
DB Explorer
═══════════════════════════════════════════════════════════════ */
.db-explorer-container { max-width: 1400px; margin: 0 auto; padding: 0 1rem; }
.db-explorer-header { margin-bottom: 0.5rem; }
.db-explorer-title { font-size: 1.4rem; font-weight: 700; color: var(--text-bright); letter-spacing: 0.05em; }
.db-explorer-subtitle { font-size: 0.75rem; color: var(--text-dim); }
.db-list { display: flex; flex-direction: column; gap: 2px; }
.db-list-item {
display: flex; justify-content: space-between; align-items: center;
padding: 0.45rem 0.6rem; border-radius: 4px;
color: var(--text); text-decoration: none;
transition: background 0.15s;
}
.db-list-item:hover { background: var(--bg-card); color: var(--text-bright); }
.db-list-item.active { background: var(--purple); color: var(--text-bright); }
.db-name { font-size: 0.8rem; font-weight: 600; }
.db-size { font-size: 0.7rem; color: var(--text-dim); }
.db-list-item.active .db-size { color: var(--text-bright); opacity: 0.7; }
.db-table-wrap { max-height: 500px; overflow: auto; }
.db-table { font-size: 0.75rem; }
.db-table th { position: sticky; top: 0; background: var(--bg-panel); color: var(--green); font-weight: 600; white-space: nowrap; z-index: 1; }
.db-table td { vertical-align: top; }
.db-cell { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-cell:hover { white-space: normal; word-break: break-all; }
.db-truncated { font-size: 0.7rem; color: var(--amber); padding: 0.3rem 0; }