Skip to content

feat(addons): add-ons UI direction B: one name, Turn on and Turn off, preview pane - #12858

Merged
mudler merged 12 commits into
masterfrom
feat/addons-direction-b
Oct 23, 2026
Merged

mudler merged 12 commits into
masterfrom
feat/addons-direction-b

Conversation

@mudler-agent

@mudler-agent mudler-agent commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

What this changes

The add-ons UI follows the approved "direction B" design: one name (Add-ons), one verb pair (Turn on and Turn off), three tabs (My add-ons, Find add-ons, Sources), a preview pane that explains an add-on, install and turn on in one step, clear first-run and error states, and the chat tools control next to MCP.

Design reference: https://claude.ai/artifact/7WUR4tR2CVo4Xw6UWxSwB7 (artboards 1 to 5). The screenshots in the mock are placeholders. The app draws a screenshot slot only when the host lists images for an add-on, and the host lists none today, so no slot is drawn.

PR #12850 (page titles and empty states) is merged. This branch is based on master after it and keeps its changes.

Per task (one commit each)

  1. Naming. The sidebar item, page title, tabs and buttons say Add-ons. Tabs are My add-ons, Find add-ons, Sources. Turn on and Turn off replace Enable, Start, Disable and Stop as labels. States read On and Off. The subtitle no longer names the owner. Locales: the main labels are translated; every other new key carries the English text until a translator refines it.
  2. Cards. A card shows the description, "Adds a page" and "N chat tools" when they apply. The pin button and the bare arrows become one overflow menu: Show in sidebar, Details, Remove. Move earlier and Move later stay in the same menu for a pinned card. Remove asks first and runs the typed uninstall action (data is kept); only administrators see it.
  3. Preview pane. Selecting a card, or Details, opens a pane beside the list: name, state, description, screenshot slots (only if images are listed), what it adds, Turn on or Turn off, Remove, version and source. It uses the apps list. The source is not in that list, so an administrator's pane reads the installed list the host already serves. No new API call and no server change.
  4. Empty states and first run. With nothing installed, an administrator sees three add-ons from the sources, each with Install and turn on, and a link to Find add-ons. A search with no result says no add-on matches and offers to clear the search.
  5. Find add-ons. Each entry has a description, "Adds a page" when the library entry declares a main page, and one button: Install and turn on (Turn on for an add-on that is installed but off). Details is folded into the entry. A backend keeps a plain Install because it has no on or off.
  6. One dialog. Install and turn on asks once, then the same dialog shows the two steps (install, turn on) and ends on the result or on the reason a step failed, with Try again. A failed turn on keeps the install and the retry only turns it on. Each step is its own action with its own operation identity, so the unknown-outcome rules still apply. The two-step flow is a plain function with unit tests.
  7. Installed folded into My add-ons. The pane holds the operator facts for administrators under "Health, trust and updates" (health, trust, compatibility, storage, data recovery, Check for updates, Upgrade). ?tab=installed opens My add-ons and ?manage=ID opens that add-on's details. A card shows an update mark when the host reports one.
  8. Add-on not available page. By state: off (" is off" with Turn on for an administrator), not installed (link to Find add-ons for an administrator), failed (the reason and a link to its details). The title is the add-on's name, with a capital first letter when the host lists no title, not the bare id.
  9. Chat tools control. It moves next to the MCP control and its menu starts with one line: an add-on that is off here does nothing in this chat. Only add-ons that ship tools appear. The MCP control lives in the composer toolbar, not in the chat header, so the add-ons control moved there from the header.

Also in this PR: docs under docs/content (labels, tabs, card menu, pane, Install and turn on), a docs commit, a lint cleanup commit and a spec fix for the backend library specs. inline-style-baseline.txt is refreshed: master's count had drifted from 182 to 174 before this change.

API gaps found (no server change in this PR)

  • Library entries carry no tool count, so Find add-ons cannot say "N chat tools". The label shows on My add-ons, where the list has toolCount.
  • Library entries have no page count; "Adds a page" uses ui.mainPage only.
  • No add-on field carries images, so the pane reads an optional screenshots list of same-origin paths and draws nothing when it is absent.
  • The sources mark no entry as featured; the first three add-on entries in source order are used.
  • The apps list has no source or channel; see task 3.

Tests

  • Unit tests: 196 pass (187 before). New: locale key parity for the add-on, navigation and chat tools keys across all nine locales, labels, what an add-on adds, screenshots, list states, featured entries and the two-step install flow.
  • vite build succeeds. npm run lint has no new errors (the two existing errors are in coverage-fixtures.js). The inline style gate passes.
  • Playwright specs that mock their own routes, run in headless Chrome against the vite dev server: 278 tests in the chat, navigation, add-on navigation, add-ons gallery, Studio add-on, home and chrome audit specs, 267 passed and 11 failed; plus chat-addons 10 of 10 and addons-backend-library 9 of 9. The 11 failures:
    • 1 gallery test counts list requests and the dev server runs effects twice (React StrictMode). It passes on a production build.
    • 9 Studio and Talk tests assert an empty browser console and the dev server logs 401s and React key warnings. The two I re-ran on a production build pass.
    • 1 canvas test (chat-canvas-find, an iframe preview). It also fails on a production build here. It does not touch files of this PR; I did not run it on master.
  • Not run here: the specs that need the Go UI test server or real add-on packages (addons-foundation, addons-recovery, addons-upgrade, addons-runtime, addons-shell, addons-slots, addons-proposals, library-sources) and the scripts/addons/gallery_ui.sh runner. Their labels and routes are updated by search and by hand, and the case inventory in scripts/addons/suites.json follows the renamed gallery tests.

Screenshots checked

Rendered with headless Chrome after tasks 2, 3, 4 and 9 and opened one by one:

  • My add-ons cards in dark theme: three cards (running with page and two tools and an Open link, failed, off headless with three tools), the overflow menu open with Show in sidebar or Remove from sidebar, Move earlier, Move later, Details and Remove.
  • Preview pane: a running add-on, an off add-on with Turn on, light theme with two screenshot slots (test images), and a 390 px phone view where the pane fills the screen.
  • First run: three featured cards with Install and turn on and a Find add-ons button, in dark, light and 390 px width; and the no-match state for a search.
  • Find add-ons list, the install dialog, and the opened Details of an administrator.
  • Chat composer: the Add-ons control right after MCP, the menu with the one-line note (dark, light, 390 px).

🤖 Generated with Claude Code

mudler added 12 commits October 23, 2026 12:40
The sidebar, the page and the tabs now say Add-ons. The tabs are My
add-ons, Find add-ons and Sources. Turn on and Turn off replace Enable,
Start, Disable and Stop wherever they label a button, and the state words
read On and Off. The subtitle no longer names the owner.

Other locales get the new keys; the main labels are translated and the
rest carry the English text until a translator refines them. A unit test
checks that every locale has the keys of English.

Assisted-by: Claude:claude-sonnet-5-5 [Claude Code]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
…o a menu

A card now shows the add-on description, an "Adds a page" line and the
number of chat tools when they apply. The pin button and the bare arrows
are replaced by one overflow menu with Show in sidebar, Details and
Remove. Reordering a pinned add-on stays in the same menu. Remove asks
first and runs the typed uninstall action; only administrators see it.

Assisted-by: Claude:claude-sonnet-5-5 [Claude Code]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Selecting a card, or choosing Details in its menu, opens a pane beside
the list. It shows the name and state, the description, what the add-on
adds, Turn on or Turn off and Remove, and its version and source. The pane
replaces the modal sheet and uses the data the list already has. The
source comes from the installed list that the host already serves to
administrators. Screenshot slots show only when the host lists images for
the add-on; today it lists none, so no slot is drawn.

Assisted-by: Claude:claude-sonnet-5-5 [Claude Code]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
With nothing installed, an administrator now sees three add-ons from the
sources, each with Install and turn on, and a link to Find add-ons. A
search that finds nothing says that no add-on matches and offers to clear
the search, instead of saying that nothing is installed. Install and turn
on is one action of the user: it installs, then turns the add-on on, with
a separate operation identity for each step and the progress or the reason
for a failure shown on the card.

Assisted-by: Claude:claude-sonnet-5-5 [Claude Code]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Each entry shows its description, an "Adds a page" label when the library
entry declares a main page, and one button: Install and turn on. An
add-on that is installed but off offers Turn on. Details is folded into
the entry and shows the trust and build facts the entry already carries,
so the separate details sheet is gone. A backend keeps a plain Install,
because a backend has no on or off.

The library entry carries no tool count, so the entry cannot say how many
chat tools an add-on adds. That label appears on My add-ons, where the
list knows it.

Assisted-by: Claude:claude-sonnet-5-5 [Claude Code]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Install and turn on now asks once. The dialog then stays open and shows
two steps, the install and the turn on, and ends on the result or on the
reason a step failed with a way to try again. A failed turn on keeps the
install and the retry only turns the add-on on. Each step is its own
action with its own operation identity, so an unknown outcome still
blocks further actions on the add-on until it is read or dismissed. The
first-run cards use the same dialog. The two-step flow is a plain function
with unit tests.

Assisted-by: Claude:claude-sonnet-5-5 [Claude Code]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
The page now has three tabs: My add-ons, Find add-ons and Sources. What
the Installed tab showed is in the preview pane of each add-on, under
More details for administrators: health, trust, compatibility, storage,
data recovery and updates, with Check for updates and Upgrade. Remove
and Turn on or Turn off are on the card and in the pane. An old
?tab=installed address opens My add-ons, and the management link
?manage=ID opens the details of that add-on. A card shows an update mark
when the host reports one. Closing the pane returns focus to its card.

Assisted-by: Claude:claude-sonnet-5-5 [Claude Code]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Update the add-ons feature page and the pages that point at it: the
sidebar item and the page are called Add-ons, the tabs are My add-ons,
Find add-ons and Sources, Turn on and Turn off replace Start and Stop,
the card menu replaces the pin control, and the preview pane holds what
the Installed tab showed.

Assisted-by: Claude:claude-sonnet-5-5 [Claude Code]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
…open

The page of an add-on that cannot open now depends on the add-on. One
that is installed but off says "<name> is off" and offers Turn on to an
administrator. One that is not installed says so and sends an
administrator to Find add-ons. One that failed shows the reason and a link
to its details. A reader gets a line that says who can fix it, and no
button. The page title is the name of the add-on, with a capital first
letter when the host lists no title, and no longer the bare identifier.

Assisted-by: Claude:claude-sonnet-5-5 [Claude Code]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
… means

The add-on tools control moves from the chat header to the composer, right
after the MCP control, because both decide what the model may call in this
chat. Its menu starts with one line: an add-on that is off here does
nothing in this chat. Only add-ons that ship tools appear in it, as
before.

Assisted-by: Claude:claude-sonnet-5-5 [Claude Code]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Add the lint header the add-on components use for JSX-only imports, drop
an unneeded directive, stop exporting a helper from a component file and
extract the dependencies of an effect.

Assisted-by: Claude:claude-sonnet-5-5 [Claude Code]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
…etails

A backend says its kind on the entry, an add-on says it under Details,
Details is a fold of the entry and an installed backend has no Install
button.

Assisted-by: Claude:claude-sonnet-5-5 [Claude Code]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
@mudler
mudler merged commit c6687ce into master Oct 23, 2026
1 of 39 checks passed
@mudler
mudler deleted the feat/addons-direction-b branch October 23, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants