stage-30 fix: proper responsive nav (hamburger drawer) + cases-pipeline fix
Replaced the horizontal-scroll hack with a real mobile pattern: - Hamburger button (☰) appears below 760px width, animates into an X when open. Tap to slide the full nav into a drawer below the topbar, each link a tap-target-sized row. - Nav links auto-close the drawer on click so navigating dismisses it. - aria-expanded / aria-controls wired up so screen readers track state. - Below 420px the model status chip + family icon hide to keep the topbar compact; brand-sub already hidden by the earlier mobile pass. Discovered while debugging: prod had 377 unclassified cases (only fetch-all was run, not classify-all/prove-all/reindex), so the journey page's Classifier beat skipped the live model verdict entirely. Ran the full pipeline on prod — the psyc-v5 model chip now renders on case journeys. Worth noting for the deploy runbook: after psyc fetch-all on a new env, always also run classify-all + prove-all + reindex to prime the pipeline state. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -809,17 +809,61 @@ body.wide .net-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr
|
||||
.feed-count { color: var(--accent); font-family: ui-monospace, Menlo, monospace; font-weight: 600; }
|
||||
.feed-time { color: var(--muted); font-family: ui-monospace, Menlo, monospace; font-size: 11px; }
|
||||
|
||||
/* ── mobile pass for the rest of the cockpit ────────────────── */
|
||||
@media (max-width: 720px) {
|
||||
.topbar { flex-wrap: wrap; gap: 8px; padding: 8px 14px; }
|
||||
/* ── hamburger toggle (visible only on mobile) ──────────────── */
|
||||
.nav-toggle {
|
||||
display: none;
|
||||
background: transparent; border: 1px solid var(--border); border-radius: 6px;
|
||||
width: 38px; height: 38px; padding: 0; cursor: pointer;
|
||||
flex-direction: column; gap: 5px; align-items: center; justify-content: center;
|
||||
transition: border-color 0.15s;
|
||||
}
|
||||
.nav-toggle:hover, .topbar.nav-open .nav-toggle { border-color: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
|
||||
.nav-toggle-bar {
|
||||
display: block; width: 18px; height: 2px; background: var(--text); border-radius: 1px;
|
||||
transition: transform 0.2s, opacity 0.2s;
|
||||
}
|
||||
.topbar.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
|
||||
.topbar.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
|
||||
.topbar.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
|
||||
|
||||
/* ── mobile pass — proper drawer nav ────────────────────────── */
|
||||
@media (max-width: 760px) {
|
||||
.topbar { flex-wrap: wrap; gap: 8px; padding: 8px 14px; align-items: center; }
|
||||
.brand-icon { height: 36px; width: 120px; }
|
||||
.brand-sub { display: none; }
|
||||
.nav { width: 100%; overflow-x: auto; white-space: nowrap; padding-bottom: 4px; }
|
||||
.nav a { margin-left: 0; margin-right: 14px; font-size: 13px; }
|
||||
.family-icon { height: 32px; }
|
||||
.model-status, .admin-chip { font-size: 9.5px; padding-top: 2px; padding-bottom: 2px; }
|
||||
.nav-toggle { display: inline-flex; order: 99; }
|
||||
|
||||
.nav {
|
||||
order: 100; flex-basis: 100%;
|
||||
display: none; flex-direction: column;
|
||||
margin-top: 8px; padding: 6px 0;
|
||||
border-top: 1px solid var(--border);
|
||||
}
|
||||
.topbar.nav-open .nav { display: flex; }
|
||||
.nav a {
|
||||
margin: 0; padding: 10px 4px;
|
||||
font-size: 14px; color: var(--text);
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
.nav a:last-child { border-bottom: none; }
|
||||
.nav-admin {
|
||||
border: none; background: transparent;
|
||||
padding: 10px 4px; border-bottom: 1px solid var(--border);
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.family-icon { height: 30px; }
|
||||
.model-status { font-size: 9.5px; padding: 2px 6px; }
|
||||
.admin-chip { font-size: 10px; }
|
||||
.admin-chip-body, .admin-chip-lock { padding: 3px 7px; }
|
||||
|
||||
.content { padding: 14px; }
|
||||
.panel { padding: 14px; }
|
||||
/* tables: let horizontal scroll handle wide columns */
|
||||
table.cases, table.ledger { display: block; overflow-x: auto; white-space: nowrap; }
|
||||
}
|
||||
|
||||
@media (max-width: 420px) {
|
||||
.family-icon { display: none; }
|
||||
.model-status { display: none; }
|
||||
.brand-icon { height: 32px; width: 100px; }
|
||||
}
|
||||
|
||||
@@ -22,6 +22,21 @@
|
||||
navigator.serviceWorker.register("/sw.js", { scope: "/" }).catch(() => {});
|
||||
});
|
||||
}
|
||||
// Mobile nav toggle. Topbar gets .nav-open; aria-expanded mirrors it.
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
const btn = document.querySelector(".nav-toggle");
|
||||
const bar = document.querySelector(".topbar");
|
||||
if (!btn || !bar) return;
|
||||
btn.addEventListener("click", () => {
|
||||
const open = bar.classList.toggle("nav-open");
|
||||
btn.setAttribute("aria-expanded", open ? "true" : "false");
|
||||
});
|
||||
// Close the drawer when a nav link is clicked (so navigating dismisses it).
|
||||
document.querySelectorAll(".nav a").forEach(a => a.addEventListener("click", () => {
|
||||
bar.classList.remove("nav-open");
|
||||
btn.setAttribute("aria-expanded", "false");
|
||||
}));
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body class="{% block body_class %}{% endblock %}">
|
||||
@@ -30,7 +45,12 @@
|
||||
<img class="brand-icon" src="/static/psyc-logo.png" alt="psyc">
|
||||
<span class="brand-sub">operations cockpit</span>
|
||||
</a>
|
||||
<nav class="nav">
|
||||
<button class="nav-toggle" type="button" aria-expanded="false" aria-controls="primary-nav" aria-label="Menu">
|
||||
<span class="nav-toggle-bar"></span>
|
||||
<span class="nav-toggle-bar"></span>
|
||||
<span class="nav-toggle-bar"></span>
|
||||
</button>
|
||||
<nav class="nav" id="primary-nav">
|
||||
<a href="/cases">Cases</a>
|
||||
<a href="/lookup">Lookup</a>
|
||||
<a href="/response">Response</a>
|
||||
|
||||
Reference in New Issue
Block a user