Requirement 001 phase 6, S0: - Speech: the security class shows as "Sécurité" and is spoken as in maritime radio, "say-cure-ee-tay" three times. A hex run of 7 or more characters with a letter and a digit (commit, session, message ids) is spelled in the NATO alphabet; every other digit is spoken on its own in ICAO pronunciation (42305: four two tree zero fife). The spelling runs inside clip() before the length cut, so a phrase still fits SPEECH_LIMIT; the displayed text keeps its digits and hashes. - English: every orchestrator label, tooltip, message, error, script output, document and test string is English (Regeln -> Firewall, Hierarchie -> Hierarchy, Steuerung -> Controls, Ausführen -> Run, ...); the page declares lang="en" and formats dates as en-GB. Task filter ids are English. German stays only in the skill trigger phrases that quote the operator, and as identifiers: the view keys (view=) and the leitstand id. - tests/test_english.py scans every tracked text file for umlauts and German words, with an allowlist of the quoted trigger phrases. BREAKING CHANGE: the Stream search tokens art: and seit: are now kind: and since:; an old art: or seit: token counts as a plain word. Evidence: make test 657 OK, ruff and markdownlint clean (/tmp/s0-make-test-1.log); e2e 17 OK, none skipped (/tmp/s0-e2e-1.log); MEDUSA 86 files, 24 findings on reworded strings accepted after an independent skeptic (21 path:line, 0 rejected, no behaviour change in signing, approving, rules, denying, offices, events), rescan 0 open. 🎯 Fix: 93 % 💥 Break: 4 % 💸 Cost: 100 % ⏱️ Time: – 🛡️ Security: 100 % 🏆 Score: 89 🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 % Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
46 lines
2.2 KiB
JavaScript
46 lines
2.2 KiB
JavaScript
const Nav = (() => {
|
|
"use strict";
|
|
const TABS = [["stream", "Stream"], ["agents", "Agents"], ["artifacts", "Artifacts"], ["tasks", "Tasks"]];
|
|
const SUBS = {stream: [["inbox", "Inbox"], ["rules", "Firewall"], ["radio", "Radio"]]};
|
|
const VIEWS = [["orbit", "Orbit"], ["chord", "Chord"], ["swimlane", "Swimlane"], ["tree", "Tree"], ["3d", "3D"]];
|
|
const TASK_VIEWS = [["list", "List"], ["board", "Board"], ["rasci", "RASCI"]];
|
|
const OWN = {agents: [["hierarchy", "Hierarchy"]]};
|
|
const ICONS = {
|
|
stream: "bi-activity", inbox: "bi-inbox", rules: "bi-card-checklist", radio: "bi-boombox", agents: "bi-people", artifacts: "bi-git", tasks: "bi-list-check",
|
|
orbit: "bi-globe2", chord: "bi-bezier2", swimlane: "bi-bar-chart-steps", tree: "bi-diagram-3", "3d": "bi-badge-3d", hierarchy: "bi-diagram-2",
|
|
list: "bi-list-task", board: "bi-kanban", rasci: "bi-grid-3x3",
|
|
};
|
|
const OLD = {graph: ["agents", "orbit"], tree: ["artifacts", "tree"]};
|
|
const viewsOf = (screen) => (screen === "tasks" ? TASK_VIEWS : [...VIEWS, ...(OWN[screen] || [])]);
|
|
const known = (screen, view) => viewsOf(screen).some(([id]) => id === view);
|
|
|
|
function tabOf(screen) {
|
|
return Object.keys(SUBS).find((tab) => SUBS[tab].some(([id]) => id === screen)) || screen;
|
|
}
|
|
|
|
function hashOf(screen, view) {
|
|
return tabOf(screen) === screen ? (view ? `#${screen}/${view}` : `#${screen}`) : `#${tabOf(screen)}/${screen}`;
|
|
}
|
|
|
|
function route(hash) {
|
|
const [head, sub] = decodeURIComponent(String(hash).replace(/^#/, "")).split("/");
|
|
if (Object.hasOwn(OLD, head)) {
|
|
const [screen, fallback] = OLD[head];
|
|
const view = known(screen, sub) ? sub : fallback;
|
|
return {screen, view, redirect: hashOf(screen, view)};
|
|
}
|
|
if (Object.hasOwn(SUBS, head) && SUBS[head].some(([id]) => id === sub)) {
|
|
return {screen: sub, view: null, redirect: null};
|
|
}
|
|
if (TABS.some(([id]) => id === head) && head !== "stream") {
|
|
return {screen: head, view: known(head, sub) ? sub : null, redirect: null};
|
|
}
|
|
return {screen: "stream", view: null, redirect: null};
|
|
}
|
|
|
|
return {TABS, SUBS, VIEWS, TASK_VIEWS, ICONS, viewsOf, route, hashOf, tabOf};
|
|
})();
|
|
if (typeof module === "object" && module.exports) {
|
|
module.exports = Nav;
|
|
}
|