mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-01 04:42:10 +03:00
- sidebarVisibility.ts: replace cli-tools with cli-code, add cli-agents, keep acp-agents order cli-code→cli-agents→acp-agents→cloud-agents in TOOLS_GROUP; update HIDEABLE_SIDEBAR_ITEM_IDS and DEVELOPER_SHOWN preset - next.config.mjs: 4 permanent (308) redirects for /dashboard/cli-tools→/dashboard/cli-code and /dashboard/agents→/dashboard/acp-agents (with :path* wildcards) - pt-BR.json + en.json: add cliCommon, cliCode, cliAgents, acpAgents namespaces (~140 keys each) + sidebar keys for the 3 new IDs - request.ts: merge EN as namespace-level fallback so 39 non-EN/pt-BR locales display new namespaces in English until translations ship - Header.tsx: update HEADER_DESCRIPTIONS map to use new HideableSidebarItemId values - tests: 4 new unit test files (38 assertions), update sidebar-visibility.test.ts omni-proxy item order
42 lines
1.5 KiB
TypeScript
42 lines
1.5 KiB
TypeScript
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
|
|
const sidebarVisibility = await import("../../src/shared/constants/sidebarVisibility.ts");
|
|
|
|
test("HIDEABLE_SIDEBAR_ITEM_IDS includes cli-code (plan 14 rename)", () => {
|
|
assert.ok(
|
|
(sidebarVisibility.HIDEABLE_SIDEBAR_ITEM_IDS as readonly string[]).includes("cli-code"),
|
|
"expected 'cli-code' in HIDEABLE_SIDEBAR_ITEM_IDS"
|
|
);
|
|
});
|
|
|
|
test("HIDEABLE_SIDEBAR_ITEM_IDS includes cli-agents (plan 14 new entry)", () => {
|
|
assert.ok(
|
|
(sidebarVisibility.HIDEABLE_SIDEBAR_ITEM_IDS as readonly string[]).includes("cli-agents"),
|
|
"expected 'cli-agents' in HIDEABLE_SIDEBAR_ITEM_IDS"
|
|
);
|
|
});
|
|
|
|
test("HIDEABLE_SIDEBAR_ITEM_IDS includes acp-agents (renamed from agents)", () => {
|
|
assert.ok(
|
|
(sidebarVisibility.HIDEABLE_SIDEBAR_ITEM_IDS as readonly string[]).includes("acp-agents"),
|
|
"expected 'acp-agents' in HIDEABLE_SIDEBAR_ITEM_IDS"
|
|
);
|
|
});
|
|
|
|
test("HIDEABLE_SIDEBAR_ITEM_IDS does NOT include legacy cli-tools", () => {
|
|
assert.equal(
|
|
(sidebarVisibility.HIDEABLE_SIDEBAR_ITEM_IDS as readonly string[]).includes("cli-tools"),
|
|
false,
|
|
"expected 'cli-tools' to be removed from HIDEABLE_SIDEBAR_ITEM_IDS (plan 14 rename to cli-code)"
|
|
);
|
|
});
|
|
|
|
test("HIDEABLE_SIDEBAR_ITEM_IDS does NOT include legacy agents", () => {
|
|
assert.equal(
|
|
(sidebarVisibility.HIDEABLE_SIDEBAR_ITEM_IDS as readonly string[]).includes("agents"),
|
|
false,
|
|
"expected 'agents' to be removed from HIDEABLE_SIDEBAR_ITEM_IDS (plan 14 rename to acp-agents)"
|
|
);
|
|
});
|