Repository navigation
feat(webui): redesign the model library as a dense list with row actions - #1930
Merged
Merged
Conversation
The Models library printed "Unknown" in the quantization slot for every unquantized checkpoint because nothing in the catalog read the dtype a config declares. CatalogMetadata now carries a nullable dtype, read from config.json torch_dtype (or dtype in newer exports), at the top level and then under text_config, and normalized to a short name (bfloat16 becomes bf16). Anything else passes through only as a lowercase ASCII identifier of at most 32 bytes; auto, non-strings and oversized values are null. The field is required and nullable in docs/webui/api.yaml, the generated DTO and the catalog fixtures carry it, and docs/webui/catalog.md and its Korean translation describe it. The new catalog test asserts the wire shape for twelve config variants and failed before the change (the key was absent). Refs #1918
The Models page showed four rows per 1440x900 viewport, kept Load, Use in Chat and Unload inside the inspector, and printed opaque ids, raw reasons and a Library operations list as copy. Each row is now one line: name, size, quantization or weight dtype, task badges, state and actions (Use in Chat and Unload when ready, Load otherwise, Inspect as the #1901 row primary, Delete for cache rows). Row and inspector share one openAction path, so the stale, capacity and eviction confirmations are unchanged, and a row loads with that entry's own profile. Sorting moved to the column headers in controlled mode with one comparator (ready first, then transitions, then the rest), because alpha.19 re-sorts the page itself. Below 1100 px the inspector is a drawer that opens only on an explicit request, and a confirmation closed from it keeps focus in it. Ids, reasons, profile, removal notes and roots sit in a Details disclosure that renders nothing until opened. Operations are gone except download pseudo-rows and a Load with eviction button after a capacity conflict; the provider summary moved into the sidebar's Connection details. Filters use labels, names in dialog sentences are bidi-isolated, and an overflowing table box becomes a focusable region, clearing the known scrollable-region-focusable violation at 390 px. Refs #1918
Rebuilt with python3 scripts/webui/build_bundle.py from the redesigned sources; build_bundle.py --verify passes. Refs #1918
Review of the library redesign found four places where a row or the drawer lost a required action or keyboard path. - A Ready model without chat (embedding, rerank, transcription) showed a disabled Load and no Unload. The Actions cell now follows the lifecycle: Use in Chat when chat is available, Unload on any Ready row, Load otherwise. After a row Load, focus lands on Use in Chat, or on Unload for a model without chat. - Below 44rem the Size and State columns give way, and download pseudo-rows have no inspector, so a download at 390 px showed no progress or state. The name cell now carries both as a fallback shown only once those columns are hidden. - Escape in a confirmation opened from the inspector drawer also closed the drawer. The Drawer adapter now leaves an Escape inside a native dialog to that dialog, which returns focus to its opener in the drawer. - alpha.19 builds the drawer's Tab trap once on open and omits summary, so the Details disclosure was unreachable by keyboard below 1100 px. The adapter now computes the Tab cycle at key-press time for both drawers. New Vitest and Playwright cases fail with each fix reverted. typecheck, eslint, unit (35 node + 556 Vitest), check:theme-selectors, all 114 Chromium Playwright cases, the contract check and the server::webui Rust tests pass. Refs #1918
Rebuilt with scripts/webui/build_bundle.py after the row, download-progress and drawer keyboard fixes; build_bundle.py --verify and check_binary_assets.py pass. Refs #1918
Member
Author
Implementation Review SummaryIntent
Findings Addressed
Remaining Items
Verification
|
…overs The page behind the Models inspector drawer is not inert, so after a pointer press on the drawer heading left focus on the body, Tab walked the list behind the modal panel. The Drawer adapter now moves a Tab pressed outside an open panel to its first stop (Shift+Tab: last), next to the existing outside-panel Escape handling; a new drawer test fails with the change reverted. The two-column layout now collapses with the same 1100 px boundary the inspector uses (width < 1100px), so an exactly 1100 px window no longer stacks the pane under the list. The Activity connection banner drops its duplicate connection-authenticated-detail test id, which the sidebar's Connection details now carries, and the unused Badge title prop is gone. Refs #1918
Rebuilt with python3 scripts/webui/build_bundle.py; build_bundle.py --verify and check_binary_assets.py pass. Refs #1918
Member
Author
Security and Performance ReviewReviewed at Verified
Remaining (LOW)
Gates
|
…renders Security review follow-ups (all LOW). The catalog printed any short identifier from a downloaded config.json torch_dtype in the Quantization column, so a config could show a word such as verified there; it now reports only recognized tensor dtypes (bf16, fp16, fp32, fp64, the four float8 variants, int8, uint8) and null otherwise, with a new test case and the api.yaml, catalog.md and catalog.ko.md wording updated. The library no longer re-sorts the whole catalog on runtime and operation events (inventory is memoized on catalog, filter and sort), useWideInspector keeps one MediaQueryList instead of creating one per render, and Inspect or a chip request in a wide window no longer leaves drawer state behind that would open the drawer when the window later narrows. Refs #1918
… follow-ups Rebuilt with python3 scripts/webui/build_bundle.py; build_bundle.py --verify and check_binary_assets.py pass. Refs #1918
The Models redesign added two pure functions with no direct test: quantizationValue (Quantization shows the declared quantization, falls back to the declared weight dtype, then nothing) and entryTasks (the Tasks column dedupes repeated capability tasks and orders them by output_tasks, with tasks absent from output_tasks kept last). Every existing fixture happened to declare capabilities in output_tasks order with no duplicates, so the reordering and dedup logic ran untested; the fixed Playwright fixture never exercised a null quantization either. Adds a policy.test.ts case for each function and a screen.test.tsx case that renders the Quantization column with quantization null and dtype set, and with both null. Updates the Vitest count in docs/webui/design-system.md from 558 to 561 and regenerates the embedded bundle manifest digest for the webui/src change. Validation: - pnpm --dir webui run unit (35 node + 561 Vitest) - pnpm --dir webui run typecheck - pnpm --dir webui exec eslint . --max-warnings=0 - pnpm --dir webui run check:theme-selectors - python3 scripts/webui/build_bundle.py --verify - python3 scripts/ci/check_webui_contract.py and scripts/ci/check_binary_assets.py Refs #1918
normalize_dtype maps float64/double/fp64/f64 to fp64, the same way it maps the bfloat16, float16 and float32 aliases, but catalog.md and catalog.ko.md only listed the bf16/fp16/fp32 examples. Add float64 to both so the documented alias list matches the implementation. Refs #1918
Brings in #1928 (Settings tabs). The two doc conflicts keep both sides: the ui-common matrix keeps this branch's Badge row and main's Field/Toggle row, and design-system.md keeps main's Toggle export with this branch's Drawer sentence. The embedded bundle was regenerated from the merged sources rather than hand-merged, and the suite counts were recounted (35 node + 602 Vitest, 116 Chromium Playwright), all passing. Refs #1918
The hosted Linux runner, with DejaVu metrics, fit 14 rows in a 900 px viewport where macOS fit 15, so the acceptance spec failed in CI. With a fine pointer, row controls now use 28 px buttons (above the 24 px target minimum) and 2 px cell padding, which brings a row to 33 px locally and 19 rows into view; touch keeps the 32 px controls. The bundle is regenerated in the same commit. Refs #1918
inureyes
added a commit
that referenced
this pull request
Sep 19, 2026
Rebuilds the Chat route as a conversation view: a conversation list (a pane from 961 px, a Drawer below), user and assistant messages you can tell apart without reading them (alignment, a "You" label and a model badge, timestamps, elapsed seconds while streaming, keyed status labels), a pinned composer that grows from 1 to 8 rows, one settings drawer for conversation settings, next-turn parameters and local history, and Load from Chat. The page itself no longer scrolls; only the message list does. Send, Stop, edit, history and privacy behave as before. Retry re-sends a failed last turn through the same guards. ## Design notes - There is one "New conversation" button, in the page header. A second button with the same name breaks strict role locators in four specs. - The model picker sits in the conversation header, because the ui-common Select always opens its dropdown downward. Its groups are expressed as ordered options (Ready chat models first) with a state description on each, because the Select has no option groups. - Load goes through a confirmation, then `models/load-action.ts`, which sends the same request the Models screen sends. A `conflict` response opens the Models capacity dialog. Selecting a model never loads it. `screen.tsx` changes only at its `load()` call site. - History payloads are now version 2 and add `startedAt`. Version-1 turns import with `startedAt` 0, and the IndexedDB version stays at 1. - Status labels are Generating, Done, Stopped, Did not finish and Failed, so the raw status words never appear. ## Changes during review - The Drawer adapter wraps Tab at the controls that are usable when the key is pressed. Before, Tab escaped both Chat drawers while a response streamed. - An imported time outside the range a `Date` can hold renders as unknown instead of crashing the WebUI. `startedAt` is bounded on import. - Retry is disabled whenever Send would be refused. When clearing the overrides removes the badge that opened the settings drawer, focus falls back to the settings button on close. The model picker now sorts its options only when the catalog or selection changes. ## Validation - Passing at b9fab1b: typecheck, lint, check:theme-selectors, `unit` (58 files, 600 tests), `build_bundle.py --verify`, `check_webui_contract.py` and `check_binary_assets.py`. - Playwright Chromium at b9fab1b, one spec per run: chat 5, shell 14, browser 29, models 8, settings 3, activity 3, theme 23, ui-common-components 14, ui-common-shell 12, all passing. - Passing after merging main with #1928 (e2a5af2): typecheck, lint, theme selectors, unit (62 files, 641 tests), `--verify`, the contract and binary-asset checks, and the chat, shell, settings and browser specs. The Chat drawer's sampling link now opens `#settings/requests`, and the parameter hints use #1928's server-default resolution. - A test for the Clear All focus race failed 3/3 before the fix. `confirmations.test.tsx` then passed 10 consecutive runs. - Not runnable locally: `router-real` and `performance` (selectors updated). ## Measurements (before/after) Mock fixture, 30-turn conversation, page scrolled to the top. Before is main 835a552, after is b9fab1b. The real-binary figures are in the next section. | Viewport | Page height, empty | Page height, 30 turns | Composer visible without scrolling | Scrolling elements | Words, empty | |---|---|---|---|---|---| | 1440x900 before | 967 | 1405 | no (bottom 1113) | transcript box + page | 93 | | 1440x900 after | 900 | 900 | yes (bottom 803) | `.chat-messages` only | 59 | | 390x844 before | 1268 | 1600 | no (bottom 1280) | transcript box + page | 93 | | 390x844 after | 844 | 844 | yes (bottom 743) | `.chat-messages` only | 46 | ## Real-binary acceptance Ran against an isolated bundled `mlxcel-server` built from b9fab1b, with `qwen3-0.6b-4bit` loaded. Every check passed. - `chat-real.spec.ts` (with `MLXCEL_CHAT_REAL_ISOLATED=1`): the reply was "Hello! 🌍" and the status label reads Done. Stop worked: the request lease rose above 0, returned to 0, and the status label reads Stopped. There were no CSP violations and no external requests, and axe found no violations. The harness now reads the model's own catalog entry, because a large catalog puts the model past the first page. The short turn is capped at 64 tokens. - Load from Chat: with the model unloaded, selecting it and opening the confirmation sent no request. Confirming sent exactly one `POST /ui-api/v1/model-actions` with the Models body (`action: load`, `model_id`, `expected_revision`, `idempotency_key`). Once the model reached Ready, the header's Load button was gone and a 32-token turn answered. Stop mid-stream took the lease back to 0 and the status label reads Stopped. - At 1440 and 390: one click in the list switches conversations. At 390 the list opens as a Drawer from the header and closes when you pick a conversation. Setting `max_tokens` shows "Overrides: max_tokens". The badge reopens the drawer on the parameters section, and focus returns to the badge. - At 1440x900 with 30 real turns, the page stays 900 px tall, the composer is visible, only `.chat-messages` scrolls, and the page has 797 words (45 when empty). The live run found one defect, now fixed in 5f50a89: on the current conversation row, the hover tint stacked on the current-row tint and dropped the muted metadata to 4.42:1 contrast. The Chat browser spec runs axe in that state; it failed before the fix and passes after. Merge note: #1930 adds the same end-anchored Drawer variant, as `placement`. This PR adds it as `side` plus `width`. Whichever PR merges second reconciles the Drawer signature and the `ds-drawer--end` CSS. Part of #1910 Closes #1915 ## CI note (GB10 Activity gate) The `WebUI installed artifact` job on `e2a5af2a` (run 35453693578) failed only at the "Run Activity performance gate" step's precheck, `GPU compute processes are already present before Activity gate`, so the gate never measured anything; every other step passed, including the real-router browser harness, the installed-artifact WebUI check and the reverse-proxy check. The precheck has failed for every PR since run 35449824150 was cancelled at 14:59:53Z inside that step, which points at a GPU process left on the runner. This PR changes the Chat screen and does not touch decode or the Activity page, so per the maintainer's decision for this epic it merges with this evidence recorded (gate noise: #1925).
Brings in #1931 (Chat), which added the same end-anchored Drawer variant this branch had. The adapter now has one API, main's `width="medium"` and `side="end"` modifier classes over the constant inline sheet width; the Models inspector drawer uses them and this branch's `placement` prop, its 520 px inline width and the matching layout-gate allowance are gone. There is one Tab-wrap implementation, computed at key-press time: it wraps at the panel's first and last usable stops, counts a Details summary and skips the contents of a closed details, and stops every Tab inside the panel in the capture phase so the package's stale handler cannot wrap early. It keeps main's IME Escape guard and main's rule that an Escape inside an open native dialog belongs to that dialog, and this branch's fixes: a drawer confirmation's Escape leaves the drawer open, and a Tab pressed with focus on no element enters the panel (a Tab from a control outside it, such as a portalled Select list, keeps its own order). The Models Inspect button uses main's info icon, the row load goes through main's load-action.ts, both drawer test sets are kept, and the bundle was regenerated rather than hand-merged. Unit (35 node + 664 Vitest) and all 119 Chromium Playwright tests pass, including chat.spec.ts. Refs #1918
…del-library-redesign
- The drawer's document key handler backs off whenever a native modal is open, not only when the key starts inside it: an Escape or Tab from <body> after a pointer press on a confirmation's text no longer closes or re-enters the drawer beneath it. - A row Load or Unload that is refused or fails no longer leaves its focus intent armed. Focus returns once to the control the user pressed, and the row no longer pulls focus when it becomes ready later by another path. Cancelling a confirmation also drops the intent, and focus moves without scrolling. - Widening past 1100 px forgets that the drawer was open, so narrowing again does not reopen it without a request. - The CatalogMetadata dtype doc names the allowlist the code enforces. Refs #1918 Refs #1930
This was referenced Sep 25, 2026
inureyes
added a commit
that referenced
this pull request
Sep 25, 2026
…#1975) ## Summary Closes the eleven LOW items left open by the #1930 and #1929 hardening, in one PR as the issue asks. - Models: the page before the inspector drawer is inert below 1100 px; row labels and tooltips isolate the display name; a row action whose row re-sorts onto another page turns the pager there and focuses the follow-up control (a failed action's one-shot return never turns the page); search, filters and sort survive a route round trip via `library-view.ts`, scoped to the server instance they were set against and cleared on logout; row callback refs are stable; consuming an inspector request notifies subscribers. - Drawer: a Tab propagates to descendants unless the adapter wraps it, the panel has no stop, or it starts on the package's stale first/last element. - Activity: the slot box is a region and tab stop only while it overflows (shared `useOverflowRegion`); Operations sorts only on operations/locale change; formatters are cached per locale and precision; the plural form follows the rounded count; zero context reads unknown; a re-selected model waits for its first sample instead of showing old tiles under the stale banner. - Gallery: a loading StatCard sample, placed after the lifecycle samples because `browser.spec.ts` pairs the progress samples with their next sibling; `csp.spec.ts` asserts its skeleton. ## Changes during review - The pager-follow first treated focus on `<body>` as still waiting, so in Safari and macOS Firefox (where clicking Next does not focus it) it turned the page back after the user paged away. The intent now remembers the row's page: a re-sort is followed, a user page change ends it. - The security review found the library view outliving logout and a server-instance change (the next session inherited the previous search; a remembered source or task could hide every row on a new catalog). It is now instance-scoped and reset on logout. - A browser spec now checks that the page behind the drawer is inert in Chromium and that focus returns to Inspect after Close. - A bilingual technical report is committed under `TECHNICAL_REPORTS/`. Existing tests that assumed the old behavior were updated: slot-region and tab-order expectations, row-label locators (built from `isolate()`), and Activity fixtures now seed one history sample. ## Test plan - [x] Every new test fails against the main sources and passes here (the CSP skeleton assertion by inspection: main's gallery renders no StatCard) - [x] typecheck, lint, full unit (35 node + 710 Vitest), default Playwright suite (124, includes models, activity, shell) - [x] `build_bundle.py --verify`, `check_binary_assets.py`, `check_webui_contract.py` - [x] CSP spec against a real secured server: `mlxcel-server` built from `dc1845d3` (`--release --features cuda`, GB10, embedded bundle, `--api-key-file --webui`), served `style-src 'self'` without `unsafe-inline`; both themes pass with the skeleton assertion Closes #1974
6 tasks done
17 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1918. Part of #1910.
The Models library becomes a dense list where each row is the unit of work: Load, Use in Chat and Unload are reachable from the row, and internal state is no longer copy.
What changes
title), size, quantization or weight dtype, task badges in declared order, state, and actions. A row shows Use in Chat when chat is available, Unload on any Ready row, and Load otherwise (disabled while it cannot load). Every row has an "Inspect {name}" icon button (the fix(webui): make the whole model library row open the inspector #1901 row primary) and cache rows a danger Delete. Row and inspector share oneopenAction(kind, entry)path, so the stale, capacity and eviction confirmations are unchanged; a row loads with that entry's own profile (loadProfileFor). Focus follows a row action to the control that replaces it (Load after Unload).role="dialog", "Model details", the shared Drawer withwidth="medium" side="end", the same variant Chat's settings drawer uses) below it. Overview and capability badges up top; ids, reasons, profile, removal notes, disabled server actions, roots and the docs link sit in a Details disclosure that renders nothing until opened. In the drawer, Tab stays inside the panel (the Details summary included) and Escape in a confirmation closes only the confirmation. The row Load goes throughload-action.ts(from feat(webui): rebuild Chat as a conversation view #1931), shared with Chat.op:keys), Load with eviction after a capacity conflict, and themodels-pendingstatus line. Roots are the empty state's action.dtypeinCatalogMetadatafromconfig.jsontorch_dtype/dtype(top level, thentext_config), normalized tobf16/fp16/fp32/fp64, withfloat8_*,int8anduint8passed through as written; anything else (includingauto) is null. Required and nullable inapi.yaml; DTO, fixtures andcatalog.md/.ko.mdupdated. No schema-version bump.Drawer reconciliation with #1931
Both PRs added an end-anchored Drawer. The adapter keeps one API, main's
width/sidemodifier classes over the constant inline sheet width, and one Tab wrap computed at key-press time: it wraps at the panel's first and last usable stops, counts a Details summary, skips a closed details' contents, and stops every Tab inside the panel in the capture phase so the package's stale handler cannot wrap early. It keeps main's IME Escape guard and main's rule that an Escape inside an open native dialog belongs to that dialog, plus this PR's fixes: a drawer confirmation's Escape leaves the drawer open, and a Tab pressed with focus on no element enters the panel. Chat's and Models' drawer tests all pass.Deviations from the issue
connection.authenticated.detailinto the sidebar footer. This PR puts it inside the footer's Connection details disclosure (desktop copy only, so the test id names one element).sortComparatorcarrying the lifecycle pin instead of a baresortValueAccessor.SkeletonRowmounts onerole="status"per row, breaking refactor(webui): adopt every shared @lablup/ui-common component #1902's single-status contract; the loading slot keepsLoadingStatuswith 8 decorative rows.scrollable-region-focusableviolation (an overflowing table box becomes a named focusable region) and bidi isolation of names in dialog sentences.Validation
Rust test first, before the fix:
After:
... ok;server::webui(79 tests), clippy and fmt pass.After merging main at
18fda739(#1928 Settings, #1931 Chat): typecheck, lint, unit (35 node + 664 Vitest),check:theme-selectors, Chromium Playwright (119, includingchat.spec.ts),build_bundle.py --verify,check_webui_contract.pyandcheck_binary_assets.pypass. The row spec drives load, chat and unload throughmodels-row-*only; the drawer focus specs fail with their fixes reverted.Page measurements, mock API, 120 entries:
Real-binary acceptance: pass,
mlxcel-serverbuilt from this branch (--release --features cuda, GB10, embedded bundle) with--models-dirover the real 187-checkpoint library,--api-prefix /lab --no-models-autoload --settings --props --metrics --webui, driven by headless Chromium:qwen3-0.6b-4bitand pressing the row's Load reached Ready with Use in Chat and Unload in the row. Use in Chat opened#chat. Back on Models, the row's Unload plus confirmation returned the row to Unloaded with focus on its Load button, and the catalog reportedlifecycle.state: unloadedandworker_exit_observed: true. No page errors, and nomdl_orop_text on the page.bf16,fp16andfp32for unquantized checkpoints.Hardening
<body>(after a pointer press on a confirmation's text) closed the drawer under the confirmation.ctx_size0 and showed "Effective context (tokens) 0". Found in the real-binary run above (that run's binary predates only this one-line change).build_bundle.py --verify, contract and binary-asset checks pass.Known and left as LOW: the page behind the drawer is not
inert(Tab and Escape are handled); row button labels interpolate names without bidi isolation, because the pinnedInspect {name}accessible names would change; a failed download row shows the server'serror.message(pinned byscreen.test.tsx), an accepted exception to the Details-only rule; with the lifecycle pin, an unloaded row returns to its sorted position, which can be a later page when no search is active.