Found while implementing #4818 (PR #5366). Unassigned, observation-class — nothing user-visible depends on it. Filed rather than fixed in that PR: deleting a whole file exceeds the ruling on #4818, which authorised removing the dead logokey and its feed lines, not retiring the hook.
Fact, measured on origin/mainbdf8cf76e
apps/console/src/hooks/useBranding.ts exports one function, useBranding, and it is already marked @deprecated in its own header:
* @deprecated Prefer passing `branding` directly to `AppShell` from `@object-ui/layout`.
A repo-wide scan finds no caller at all — the only hits for the identifier are the file's own declaration and its own doc comment:
$ grep -rn "useBranding" --include=*.ts --include=*.tsx apps/ packages/ | grep -v node_modules
apps/console/src/hooks/useBranding.ts:2: * useBranding Hook
apps/console/src/hooks/useBranding.ts:20:export function useBranding(app: { branding?: AppBranding; label?: string } | undefined) {
The migration the deprecation note asks for has evidently already happened: packages/app-shell/src/layout/ConsoleLayout.tsx passes branding straight to AppShell, which is exactly what the note recommends. Nothing was left behind to call the wrapper.
Why it is worth recording
It is the same declared-but-unconsumed family as #4818, one level up: #4818 was a dead key inside a live-looking type; this is a dead file that still compiles, still type-checks, and still shows up in a grep for branding as though it were a live path. #4818's own dispatch had to name it as a feeder precisely because it reads like one.
It is also a small ongoing tax with no upside — PR #5366 had to edit it (twice: the feed line and its local AppBranding interface) purely to keep a file nobody calls compiling.
Suggested disposition
Delete the file. Confirm first that nothing outside this repo imports it — it lives under apps/console/src/, not a published package's src/, so the exposure looks internal, but that is worth one check rather than an assumption.
References
Found while implementing #4818 (PR #5366). Unassigned, observation-class — nothing user-visible depends on it. Filed rather than fixed in that PR: deleting a whole file exceeds the ruling on #4818, which authorised removing the dead
logokey and its feed lines, not retiring the hook.Fact, measured on
origin/mainbdf8cf76eapps/console/src/hooks/useBranding.tsexports one function,useBranding, and it is already marked@deprecatedin its own header:A repo-wide scan finds no caller at all — the only hits for the identifier are the file's own declaration and its own doc comment:
The migration the deprecation note asks for has evidently already happened:
packages/app-shell/src/layout/ConsoleLayout.tsxpassesbrandingstraight toAppShell, which is exactly what the note recommends. Nothing was left behind to call the wrapper.Why it is worth recording
It is the same declared-but-unconsumed family as #4818, one level up: #4818 was a dead key inside a live-looking type; this is a dead file that still compiles, still type-checks, and still shows up in a grep for branding as though it were a live path. #4818's own dispatch had to name it as a feeder precisely because it reads like one.
It is also a small ongoing tax with no upside — PR #5366 had to edit it (twice: the feed line and its local
AppBrandinginterface) purely to keep a file nobody calls compiling.Suggested disposition
Delete the file. Confirm first that nothing outside this repo imports it — it lives under
apps/console/src/, not a published package'ssrc/, so the exposure looks internal, but that is worth one check rather than an assumption.References
apps/console/src/hooks/useBranding.ts(whole file)packages/app-shell/src/layout/ConsoleLayout.tsx— the live path the deprecation note points atAppShellBranding.logo无任何读取方,注释「passed to sidebar/navbar via context」是假的(AppShell 不提供该 context) #4818 / PR refactor(layout): remove the unreadlogokey from AppShellBranding #5366 — where this was found