web: add omni-search results and routing (S1/S2)

This commit is contained in:
2026-10-19 04:27:59 +01:00
parent 9555bfe58f
commit 26eaec2531
9 changed files with 2003 additions and 10 deletions
+89
View File
@@ -1028,3 +1028,92 @@ code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-
.diff-add { color: var(--ok); }
.diff-remove { color: var(--bad); }
.diff-context { color: var(--muted); }
/* --- Omni-search (S1/S2) ------------------------------------------------- */
/* The panel sits in normal flow under the top bar; the wrapper disappears
entirely while the search is closed. */
.search-host { background: var(--surface); border-bottom: 1px solid var(--border); }
.search-host:empty { display: none; }
.search-panel { padding: 10px 16px 12px; display: grid; gap: 8px; }
.search-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search-field { display: flex; gap: 6px; align-items: center; }
.search-field-label { color: var(--muted); font-size: 12px; }
.search-select {
padding: 5px 8px;
background: var(--surface-2);
color: var(--text);
border: 1px solid var(--border);
border-radius: 8px;
font: inherit;
}
.search-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.search-summary { flex: 1 1 160px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-clear { padding: 5px 10px; font-size: 12px; }
.search-input { flex: 1 1 260px; }
.search-close { white-space: nowrap; }
/* A bounded, self-scrolling result surface: the panel never pushes the page
body around however many hits come back. */
.search-results {
max-height: min(50vh, 420px);
overflow-y: auto;
border: 1px solid var(--border);
border-radius: 10px;
background: var(--surface-2);
}
/* The refresh indicator: shown above retained results rather than replacing
them, so a re-query never blanks the list. */
.search-progress {
height: 3px;
background: var(--accent);
border-radius: 2px;
transform-origin: left;
animation: search-progress 1.1s ease-in-out infinite;
}
@keyframes search-progress {
0% { opacity: 0.3; transform: scaleX(0.2); }
50% { opacity: 1; transform: scaleX(1); }
100% { opacity: 0.3; transform: scaleX(0.2); }
}
@media (prefers-reduced-motion: reduce) {
.search-progress { animation: none; }
}
/* A flat list of rows, with no grouping headers, matching the app. */
.search-row {
display: flex;
gap: 10px;
align-items: baseline;
padding: 8px 12px;
border-bottom: 1px solid var(--border);
}
.search-row:last-child { border-bottom: 0; }
.search-row.clickable { cursor: pointer; }
.search-row.clickable:hover { background: var(--surface); }
.search-row.clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.search-row.readonly { opacity: 0.85; }
.search-kind { flex: 0 0 auto; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; padding-top: 2px; }
.search-row-main { flex: 1 1 auto; min-width: 0; }
.search-row-title { font-weight: 600; }
.search-row-secondary, .search-row-snippet {
font-size: 12px;
margin-top: 2px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.search-match { color: var(--accent); }
.search-searching { display: flex; gap: 8px; align-items: center; padding: 12px; }
.search-error { padding: 12px; color: var(--bad); }
.search-empty { padding: 12px; }
@media (max-width: 760px) {
.search-input { flex-basis: 100%; }
.search-summary { flex-basis: 100%; }
}