Skip to content

finding: apps/console/src/hooks/useBranding.ts is a deprecated hook with zero callers — dead file, not just a dead key #5368

Description

@os-support-ai

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

Metadata

Metadata

Assignees

Labels

domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatpm:dispatched

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions