Skip to content

Your lightweight open-source personal agent.

fix(webui): align catalog headings and simplify skill labels

Xubin Ren66370b170eef
diff --git a/webui/src/components/settings/SkillsCatalogSettings.tsx b/webui/src/components/settings/SkillsCatalogSettings.tsx
index 621d1c86d..1bdf7643f 100644
--- a/webui/src/components/settings/SkillsCatalogSettings.tsx
+++ b/webui/src/components/settings/SkillsCatalogSettings.tsx
@@ -151,10 +151,10 @@ export function SkillsCatalogSettings({ skills }: { skills: SkillSummary[] }) {
{groupedSkills.map((group) => (
<section key={group.key} className="space-y-1">
<div className="flex items-center gap-2 px-2 py-1.5">
- <h2 className="text-[11px] font-semibold uppercase tracking-[0.08em] text-muted-foreground">
+ <h2 className="text-[13px] font-medium leading-5 text-muted-foreground">
{group.label}
</h2>
- <span className="text-[11px] tabular-nums text-muted-foreground/60">
+ <span className="text-[12px] leading-5 tabular-nums text-muted-foreground/60">
{group.skills.length}
</span>
</div>
diff --git a/webui/src/components/settings/system/AppsSettings.tsx b/webui/src/components/settings/system/AppsSettings.tsx
index 4733d7c45..f7148fbc1 100644
--- a/webui/src/components/settings/system/AppsSettings.tsx
+++ b/webui/src/components/settings/system/AppsSettings.tsx
@@ -291,13 +291,13 @@ export function AppsCatalogSettings({
) : null}
<section className="rounded-panel bg-settings-surface px-3 py-3 sm:px-4">
- <div className="flex items-center justify-between border-b border-border/45 pb-3">
+ <div className="settings-section-heading border-b border-border/45 pb-2">
<SettingsSectionTitle>
{filter === "mcp"
? tx("settings.apps.mcpTools", "MCP tools")
: tx("settings.apps.featured", "Tools")}
</SettingsSectionTitle>
- <span className="rounded-full bg-muted px-2.5 py-1 text-[12px] font-medium text-muted-foreground">
+ <span className="text-[12px] tabular-nums text-muted-foreground">
{items.length}
</span>
</div>
diff --git a/webui/src/tests/settings-system.test.tsx b/webui/src/tests/settings-system.test.tsx
index c4a7654c3..8bbd357c9 100644
--- a/webui/src/tests/settings-system.test.tsx
+++ b/webui/src/tests/settings-system.test.tsx
@@ -1,6 +1,8 @@
-import { act, fireEvent, screen, waitFor, within } from "@testing-library/react";
+import { act, fireEvent, render, screen, waitFor, within } from "@testing-library/react";
import { expect, it, vi } from "vitest";
import { installedMcpPresetsFromPayload } from "@/lib/mcp-preset-events";
+import { SkillsCatalogSettings } from "@/components/settings/SkillsCatalogSettings";
+import { ClientProvider } from "@/providers/ClientProvider";
import { requestMutationMock, jsonResponse, settingsPayload, renderSettingsView, installSettingsViewTestHooks } from "@/tests/settings-test-utils";
@@ -162,6 +164,50 @@ describe("Settings system domains", () => {
expect(screen.getByTestId("settings-section-transition")).not.toHaveClass("settings-feature-page");
});
+ it("uses the inline section heading layout to align Apps titles and counts", async () => {
+ vi.stubGlobal("fetch", vi.fn(async (input: RequestInfo | URL) => {
+ const url = String(input);
+ if (url === "/api/settings") return jsonResponse(settingsPayload());
+ if (url === "/api/settings/cli-apps") return jsonResponse({ apps: [installedAnyGen], installed_count: 1 });
+ if (url === "/api/settings/mcp-presets") return jsonResponse({ presets: [], installed_count: 0 });
+ return jsonResponse({});
+ }));
+ renderSettingsView({ initialSection: "apps", initialSettings: settingsPayload() });
+ await screen.findByText("AnyGen");
+ const title = screen.getByRole("heading", { name: "Tools" });
+ expect(title.parentElement).toHaveClass("settings-section-heading");
+ expect(title.nextElementSibling).toHaveTextContent("1");
+ expect(title.nextElementSibling).toHaveClass("tabular-nums");
+ expect(title.nextElementSibling).not.toHaveClass("rounded-full", "bg-muted");
+
+ fireEvent.click(screen.getByRole("button", { name: "MCP", exact: true }));
+ const mcpTitle = screen.getByRole("heading", { name: "MCP tools" });
+ expect(mcpTitle.parentElement).toHaveClass("settings-section-heading");
+ expect(mcpTitle.nextElementSibling).toHaveTextContent("0");
+ });
+
+ it("keeps skill group labels natural without changing grouping or filtering", () => {
+ render(<ClientProvider client={{} as never} token="tok">
+ <SkillsCatalogSettings skills={[
+ { name: "pr-review", description: "Review pull requests", source: "workspace", available: true },
+ { name: "cron", description: "Schedule reminders", source: "builtin", available: true },
+ { name: "team-guide", description: "Team conventions", source: "team", available: true },
+ ]} />
+ </ClientProvider>);
+ for (const name of ["Custom", "Built-in", "Other"]) {
+ const title = screen.getByRole("heading", { name, exact: true });
+ expect(title).toHaveClass("text-[13px]", "font-medium", "leading-5");
+ expect(title).not.toHaveClass("uppercase", "tracking-[0.08em]");
+ expect(title.nextElementSibling).toHaveTextContent("1");
+ expect(title.nextElementSibling).toHaveClass("leading-5");
+ }
+ fireEvent.change(screen.getByRole("textbox", { name: "Search installed skills" }), { target: { value: "cron" } });
+ expect(screen.queryByRole("heading", { name: "Custom" })).not.toBeInTheDocument();
+ expect(screen.queryByRole("heading", { name: "Other" })).not.toBeInTheDocument();
+ expect(screen.getByRole("heading", { name: "Built-in" })).toBeVisible();
+ expect(screen.getByRole("button", { name: "Open details for cron" })).toBeVisible();
+ });
+
it("opens a chat from the standalone automations empty state", async () => {
const onBackToChat = vi.fn();
vi.stubGlobal("fetch", vi.fn(async (input: RequestInfo | URL) => {