fix(ui-models): close the media block that swallowed the fetch dialog's styles

The `@media (prefers-reduced-motion: reduce)` block never closed, so every
rule after it — the whole fetch dialog, its candidate list, and the rows
inside — applied only to viewers whose system asks for reduced motion. The
sheet still parsed and the classes still attached, so the list painted with
the browser's own bullets, indentation, and inline label, and the reported
model id ran straight into the capacity beside it.

Report the id alone: it is the string adoption writes, and the capacities the
endpoint disclosed are adopted with it and editable in the row that appears.
The candidate row's remaining font name is the one the theme declares.

The styles gate now checks that the sheet's braces balance, and reads every
theme sheet rather than the platform tokens alone, so a name declared in a
sibling is not called undeclared and a `--dsh-` typo cannot pass as a token.
This commit is contained in:
Yichen Jiang
2026-08-05 20:33:19 +08:00
committed by imccyu
parent 44484ec5f6
commit dc7510a902
3 changed files with 26 additions and 16 deletions
@@ -427,10 +427,10 @@ export function ModelListEditor(props: ModelListEditorProps): ReactNode {
checked={picked.has(candidate.id)}
onChange={() => { toggle(candidate.id) }}
/>
{/* The id alone: it is the string adoption writes, and the
capacities the endpoint reported are adopted with it and
editable in the row that appears. */}
<span className={styles['candidateId']}>{candidate.id}</span>
{candidate.contextWindow === undefined
? null
: <span className={styles['candidateMeta']}>{candidate.contextWindow}</span>}
</label>
</li>
))}
@@ -583,6 +583,7 @@ select.input {
.customizedSummary::before {
transition: none;
}
}
.fetchDialog {
max-width: 520px;
@@ -620,13 +621,7 @@ select.input {
.candidateId {
flex: 1 1 auto;
font-family: var(--dsh-font-mono, monospace);
font-family: var(--ds-font-family-code);
font-size: 13px;
overflow-wrap: anywhere;
}
.candidateMeta {
color: var(--dsh-text-tertiary, #888);
font-size: 12px;
font-variant-numeric: tabular-nums;
}