Skip to content

feat(ui): editorial overhaul ops/admin data-viz, sortable tables, mobile reflow, unsaved-changes guards - #10398

Merged
mudler merged 7 commits into
masterfrom
worktree-react-ui-overhaul-next
Jun 18, 2026
Merged

feat(ui): editorial overhaul ops/admin data-viz, sortable tables, mobile reflow, unsaved-changes guards#10398
mudler merged 7 commits into
masterfrom
worktree-react-ui-overhaul-next

Conversation

@localai-bot

Copy link
Copy Markdown
Collaborator

Phase 5 of the React UI editorial overhaul (continues #10390, which shipped Phases 1-4). Focus: the ops/admin surface - data visualization legibility, table usability, and protecting unsaved work.

What's in this PR

Data-viz legibility

  • Usage charts: prompt and completion were the same colour (primary at 0.35 opacity), so the stacked token charts read as one blurry blob. Completion now uses a distinct data-viz hue at full opacity across the time chart, the per-model distribution bars, and the tooltip. The source-mix chart is no longer aria-hidden (exposes role="img" + label).

Sortable admin tables

  • Users table: sortable by name/email/provider/role/status/created, with aria-sort, a direction caret, and keyboard activation (Enter/Space).
  • Traces tables: API table by method/path/status, backend table by type/time/model/duration; sort and the expanded row reset on tab switch.

Mobile table reflow

  • New reusable ResponsiveTable: mirrors the <thead> labels onto each body cell (data-label) and a <=640px stylesheet stacks rows into label/value cards instead of a sideways scroll. Scoped to direct children so nested detail tables render normally; overrides inline min-width on mobile; passes through table/container inline styles.
  • Applied to Users, Traces, Models, Manage, and Nodes.

Unsaved-changes guards

  • New reusable UnsavedChangesGuard (router useBlocker + beforeunload + ConfirmDialog) prompts before navigating away or closing the tab with unsaved edits.
  • Wired to Settings, Agent create/edit, and the Fine-Tuning job form (the three expensive forms that previously discarded everything silently).

Testing

  • Full Playwright e2e suite: 195/195 passing.
  • Each change verified against the running app (data injected via request routing, plus mobile-viewport checks for the reflow).
  • No new lint errors.

Notes

Deliberately left for follow-ups (low ROI or backend-blocked): ResourceMonitor CPU meter (no cpu field in /api/resources), per-node VRAM meter (needs live nodes data), and a full MessageList/Composer extraction.

Assisted-by: Claude:claude-opus-4-8 [Claude Code]

🤖 Generated with Claude Code

mudler added 7 commits June 18, 2026 21:17
…art a11y

Prompt and completion were the same color (primary at 0.35 opacity), so the
stacked token charts read as one blurry blob. Completion now uses a distinct
data-viz hue (--color-data-3) at full opacity across the time chart, the
per-model distribution bars, and the tooltip. The source-mix chart is no longer
aria-hidden: it exposes role="img" with a label.

Assisted-by: Claude:claude-opus-4-8 [Claude Code]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
The admin Users table is now sortable by name, email, provider, role, status,
and created date - clickable headers with an aria-sort state, a direction
caret, and keyboard activation (Enter/Space). Permissions and Actions stay
non-sortable.

Assisted-by: Claude:claude-opus-4-8 [Claude Code]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Add a reusable UnsavedChangesGuard (router useBlocker + beforeunload) that
prompts before navigating away or closing the tab with unsaved edits. Wired to
Settings (existing isDirty) and AgentCreate (snapshot the loaded form, compare;
suppressed while saving so the post-save redirect is not blocked). Adds the
common.unsaved i18n keys.

Assisted-by: Claude:claude-opus-4-8 [Claude Code]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Both trace tables are now sortable: the API table by method/path/status and the
backend table by type/time/model/duration, with aria-sort, a direction caret,
and keyboard activation. Sort and the expanded row reset when switching tabs
(the two tables have different columns).

Assisted-by: Claude:claude-opus-4-8 [Claude Code]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Dense admin tables sideways-scroll on phones. Add a reusable ResponsiveTable
that mirrors the <thead> labels onto each body cell (data-label) and a
<=640px stylesheet that stacks rows into label/value cards. Wired to both
Users tables; reusable for the other dense tables next.

Assisted-by: Claude:claude-opus-4-8 [Claude Code]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Apply ResponsiveTable to the remaining dense tables so they stack into
label/value cards on phones instead of scrolling sideways. Harden the
component for these tables: scope label-mirroring and the card CSS to direct
children (nested detail tables render normally), override inline min-width on
mobile, and pass through table/container inline styles. Nested expansion
tables in Nodes/Models/Manage are intentionally left as-is.

Assisted-by: Claude:claude-opus-4-8 [Claude Code]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Editing the long fine-tune job form and navigating away silently discarded
everything. Snapshot the assembled getFormConfig() as a baseline, treat the
open form as dirty when it diverges, and reuse UnsavedChangesGuard to prompt
before leaving. The baseline is rebased after a job is submitted so leaving
afterward does not warn.

Assisted-by: Claude:claude-opus-4-8 [Claude Code]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
@mudler mudler changed the title feat(ui): editorial overhaul Phase 5 - ops/admin data-viz, sortable tables, mobile reflow, unsaved-changes guards feat(ui): editorial overhaul ops/admin data-viz, sortable tables, mobile reflow, unsaved-changes guards Jun 18, 2026
@mudler
mudler merged commit 29dbba7 into master Jun 18, 2026
57 of 60 checks passed
@mudler
mudler deleted the worktree-react-ui-overhaul-next branch June 18, 2026 22:56
@localai-bot localai-bot added the enhancement New feature or request label Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants