fix(settings): order plugins before system (#1844)
This commit is contained in:
@@ -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")} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user