Answer prose round 1: 0 🔴, 0 🟡 (0 misread); apply the nits

This commit is contained in:
2026-11-08 19:25:57 +01:00
parent 777c0bd86d
commit a558f8340f
6 changed files with 8 additions and 12 deletions
+1 -2
View File
@@ -90,8 +90,7 @@ export interface PluginManifest<S extends readonly SettingDecl[] = readonly Sett
hooks?: PluginHooks<S>;
nav?: NavNode[]; // fragment merged into the menu (composeNav); node `icon` is a Lucide sprite id (src/ui/icons.ts), node ids must be globally unique
permissions?: PermissionDecl[];
// Links added above Sign out in the profile dropdown, each gated like a nav node and shown only to a
// signed-in visitor; `icon` is a Lucide sprite id, and a `label` naming a catalog key is translated.
// Links above Sign out in the profile dropdown, each gated like a nav node; only a signed-in visitor sees any.
profileMenu?: ProfileMenuEntry[];
routes?: Route[];
// Operator-supplied configuration, one PLUGIN_SETTING_<ID>_<KEY> variable per key; the resolved
+1 -3
View File
@@ -26,7 +26,7 @@ export interface ProfileMenuEntry extends ProfileLink, Gate {}
export interface ShellUser {
email: string;
initials: string;
menu?: ProfileLink[]; // permission-filtered, translated and locale-carried; the host always sets it, a hand-built fixture may omit it
menu?: ProfileLink[]; // gate-filtered, translated, locale-carried. The host always sets it; a hand-built fixture may omit it
name: string;
}
@@ -83,8 +83,6 @@ export function buildPluginChrome(opts: ChromeOptions): PageChrome {
};
}
// A plugin's labels are keys in *its* catalog, hence its own translator. Only a signed-in visitor
// has a profile menu; the gate then decides per entry.
function profileLinks(opts: ChromeOptions, t: Translate, carryLocale: (href: string) => string): ProfileLink[] {
const user = opts.user ?? null;
if (!user) return [];