fix(settings): order plugins before system (#1844)

This commit is contained in:
José Almeida
2026-07-21 16:32:55 +01:00
committed by GitHub
parent a43cd19902
commit b78cd1ce40
2 changed files with 19 additions and 3 deletions
@@ -222,7 +222,10 @@ describe("SettingsTree integration status", () => {
});
describe("SettingsTree standalone leaves", () => {
afterEach(() => cleanup());
afterEach(() => {
cleanup();
state.features.plugins = false;
});
it("keeps Voice Mode in the settings tree as a standalone active leaf", () => {
render(<SettingsTree pathname="/settings" />);
@@ -240,6 +243,19 @@ describe("SettingsTree standalone leaves", () => {
);
expect(screen.queryByRole("link", { name: "Appearance" })).toBeNull();
});
it("puts Plugins immediately before System when plugins are enabled", () => {
state.features.plugins = true;
render(<SettingsTree pathname="/settings" />);
expect(
screen
.getAllByRole("link")
.slice(-2)
.map((link) => link.textContent),
).toEqual(["Plugins", "System"]);
});
});
describe("WorkspacesGroup active workspace presentation", () => {
@@ -108,7 +108,7 @@ export function SettingsTree({ pathname }: { pathname: string }) {
icon={IconPlugConnected}
isActive={pathname === EXT_MCP_HREF}
/>
<SystemGroup pathname={pathname} {...groupProps("system")} />
<PluginSlot name="settings-nav" />
{pluginsEnabled && (
<SettingsLeaf
href={PLUGINS_HREF}
@@ -117,7 +117,7 @@ export function SettingsTree({ pathname }: { pathname: string }) {
isActive={pathname === PLUGINS_HREF}
/>
)}
<PluginSlot name="settings-nav" />
<SystemGroup pathname={pathname} {...groupProps("system")} />
</>
);
}