diff --git a/webui/src/components/FaIcon.vue b/webui/src/components/FaIcon.vue index b9f477f..692ef33 100644 --- a/webui/src/components/FaIcon.vue +++ b/webui/src/components/FaIcon.vue @@ -20,6 +20,7 @@ const view = computed(() => { :data-prefix="icon.prefix" :data-icon="icon.iconName" :role="title ? 'img' : undefined" + :aria-label="title" :aria-hidden="title ? undefined : 'true'" focusable="false" :viewBox="view.box" diff --git a/webui/src/components/SnippetBlock.vue b/webui/src/components/SnippetBlock.vue index e6a43ae..7a388a6 100644 --- a/webui/src/components/SnippetBlock.vue +++ b/webui/src/components/SnippetBlock.vue @@ -12,7 +12,7 @@ import { useToastsStore } from '@/stores/toasts' * paste into a file" surface every ChangeHelper form and ConfigTree.vue * share — a `
` plus a copy button (lib/clipboard.ts's copyText, same
* Clipboard-API-with-selection-fallback convention CsvExportButton.vue's
- * download path and ModelChip.vue's own click-to-copy already use).
+ * download path already uses).
*/
const props = defineProps<{
/** The exact text to display and copy — YAML (lib/snippets.ts) or a single-line JSON fragment, verbatim, never re-formatted by this component. */
@@ -29,8 +29,7 @@ async function onCopy(): Promise {
const result = await copyText(props.text, preRef.value ?? undefined)
setCopyFeedback(result)
// Only a FAILURE also gets a toast (states-plan.md item 3) — see
- // ModelChip.vue's own identical doc comment: 'copied'/'selected'
- // already have clear inline feedback (the button's own icon/label
+ // 'copied'/'selected' already have clear inline feedback (the button's own icon/label
// swap right below), so a success toast would double-notify.
if (result === 'failed') toasts.push({ kind: 'error', message: 'Could not copy the snippet.' })
}
diff --git a/webui/src/components/forms/UserForm.vue b/webui/src/components/forms/UserForm.vue
index afc1a1f..64bcd26 100644
--- a/webui/src/components/forms/UserForm.vue
+++ b/webui/src/components/forms/UserForm.vue
@@ -36,8 +36,8 @@ const toasts = useToastsStore()
* the copy-to-clipboard actions elsewhere in this panel, nothing else on
* screen visibly draws the eye to the API-key input changing (it is one
* field among many, above the fold but easy to miss), so this one gets a
- * success toast, not just the failure-only treatment ModelChip/
- * SnippetBlock/CsvExportButton use. generateApiKey (lib/snippets.ts) reads
+ * success toast, not just the failure-only treatment SnippetBlock/
+ * CsvExportButton use. generateApiKey (lib/snippets.ts) reads
* crypto.getRandomValues, which can theoretically throw in a context with
* no Web Crypto — caught defensively rather than left to bubble into an
* unhandled click-handler rejection.
diff --git a/webui/src/composables/useCopyFeedback.ts b/webui/src/composables/useCopyFeedback.ts
index 5496097..6877184 100644
--- a/webui/src/composables/useCopyFeedback.ts
+++ b/webui/src/composables/useCopyFeedback.ts
@@ -1,9 +1,9 @@
import { onUnmounted, ref, type Ref } from 'vue'
-/** RESET_MS is how long a copy-feedback state (`copied`/`selected`/`failed`) stays visible before reverting to `idle` — SnippetBlock.vue's and ModelChip.vue's own identical 1500ms. */
+/** RESET_MS is how long a copy-feedback state (`copied`/`selected`/`failed`) stays visible before reverting to `idle` */
const RESET_MS = 1500
-/** CopyFeedbackState mirrors lib/clipboard.ts's copyText own return union, plus the resting `idle` state neither SnippetBlock.vue nor ModelChip.vue had a name for before this composable. */
+/** CopyFeedbackState mirrors lib/clipboard.ts's copyText own return union, plus the resting `idle` state. */
export type CopyFeedbackState = 'idle' | 'copied' | 'selected' | 'failed'
export interface UseCopyFeedback {
@@ -15,10 +15,9 @@ export interface UseCopyFeedback {
/**
* useCopyFeedback (reuse-audit.md F10) is the ONE "show a transient copy
- * outcome, then revert to idle after 1500ms" composable SnippetBlock.vue
- * and ModelChip.vue used to each hand-roll — the same `state` ref/
- * `resetTimer`/`clearTimeout`-on-unmount triple, with the identical
- * 1500ms magic number declared independently in both. Calls
+ * outcome, then revert to idle after 1500ms" composable: one `state` ref/
+ * `resetTimer`/`clearTimeout`-on-unmount triple behind a single 1500ms
+ * constant. Calls
* `onUnmounted` itself (this composable is only ever invoked from a
* component's own `setup()`/`
diff --git a/webui/src/lib/model-filter.ts b/webui/src/lib/model-filter.ts
index 9923622..3196f4f 100644
--- a/webui/src/lib/model-filter.ts
+++ b/webui/src/lib/model-filter.ts
@@ -5,7 +5,7 @@ import type { ModelCatalogRow } from '@/lib/model-table-columns'
* (lib/model-table-columns.ts's ModelCatalogRow, built from GET
* /admin/api/catalog + usage/models + performance) to whichever match a
* free-text query (redesign-plan.md section 3.1's Models page `q` param) —
- * against the canonical id (ModelChip's own copyable text) OR any of the
+ * against the canonical id (the copyable model name) OR any of the
* model's own aliases, case-insensitively. An empty/whitespace-only query
* is "no filter", returning `rows` unchanged (the pre-redesign
* filterModelsByPrefix this function replaces made the identical choice).
diff --git a/webui/src/lib/provider-rate.ts b/webui/src/lib/provider-rate.ts
index fd6e455..abdaeb3 100644
--- a/webui/src/lib/provider-rate.ts
+++ b/webui/src/lib/provider-rate.ts
@@ -66,7 +66,7 @@ export function providerRateStatus(rate: number | null): ProviderRateStatus {
/**
* isModelDegraded reports whether a model's OWN day-window rate should
- * show a badge beside its ModelChip at all — the spec's "only when that
+ * show a badge beside its model name at all — the spec's "only when that
* model is degraded (<99% w/ attempts>0)" rule: a healthy or no-traffic
* model gets no badge, so the accordion is not cluttered with a badge
* beside every single model.
diff --git a/webui/src/panels/RouterPanel.vue b/webui/src/panels/RouterPanel.vue
index 4efa04a..f59eaca 100644
--- a/webui/src/panels/RouterPanel.vue
+++ b/webui/src/panels/RouterPanel.vue
@@ -3,7 +3,7 @@ import { Badge, Button, DescriptionItem, DescriptionList, Heatmap, StatBar } fro
import { computed, ref, watch } from 'vue'
import RouterForm from '@/components/forms/RouterForm.vue'
-import { formatCompactCount } from '@/lib/format'
+import { formatCompactCount, formatExactInt } from '@/lib/format'
import { formatSel } from '@/lib/panel-selection'
import { routerPanelModel } from '@/lib/router-panel'
import { useModelsStore } from '@/stores/models'
@@ -35,7 +35,6 @@ const agreement = computed(() => {
return total > 0 ? Math.round((same * 100) / total) : null
})
-const num = (n: number): string => n.toLocaleString('en-US')
const tierValue = (count: number, pct: number): string => `${formatCompactCount(count)} · ${pct}%`
function openModel(id: string): void {
@@ -57,7 +56,7 @@ watch(() => props.id, () => (snippetOpen.value = false))
{{ t.name }}
default
- min score {{ num(t.minScore) }}
+ min score {{ formatExactInt(t.minScore) }}
-
@@ -77,7 +76,7 @@ watch(() => props.id, () => (snippetOpen.value = false))
-
+
No routed requests yet.
props.id, () => (snippetOpen.value = false))
No reasons recorded.
- {{ num(r.count) }} · {{ reasonTotal > 0 ? Math.round((r.count * 100) / reasonTotal) : 0 }}%
+ {{ formatExactInt(r.count) }} · {{ reasonTotal > 0 ? Math.round((r.count * 100) / reasonTotal) : 0 }}%
@@ -122,7 +121,7 @@ watch(() => props.id, () => (snippetOpen.value = false))
- {{ num(e.count) }}
+ {{ formatExactInt(e.count) }}
@@ -142,7 +141,7 @@ watch(() => props.id, () => (snippetOpen.value = false))
:min="0"
show-legend
label="Live tier by shadow tier request counts"
- :cell-title="(v: number | null, r: string, c: string) => `live ${r}, shadow ${c}: ${num(v ?? 0)}`"
+ :cell-title="(v: number | null, r: string, c: string) => `live ${r}, shadow ${c}: ${formatExactInt(v ?? 0)}`"
/>