Uh oh!
There was an error while loading. Please reload this page.
Delete the deprecated zero-caller useBranding hook - #5651
Merged
Conversation
`apps/console/src/hooks/useBranding.ts` was a `@deprecated` thin wrapper around `useAppShellBranding`, with no caller anywhere in the repo. The migration its own deprecation note asked for had already happened: `ConsoleLayout` passes `branding` straight to `AppShell`, and nothing was left behind to call the wrapper. It was not free to keep. PR #5366 had to edit this file twice — the feed line and its local `AppBranding` interface — purely to keep a file nobody calls compiling. The hook was the only file in the console's hooks directory, so the directory goes with it. `skills/objectui/guides/console-development.md` stated both coordinates in backtick code spans, which `scripts/check-skills-paths.mjs` resolves against disk; both are updated, and the caveat about the first row's differing prefix is dropped because every remaining hook now lives in `@object-ui/app-shell`. Fixes#5368
Contributor
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
os-sales
marked this pull request as ready for review
August 22, 2026 01:09
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#5368
apps/console/src/hooks/useBranding.tswas a@deprecatedthin wrapper arounduseAppShellBrandingwith no caller anywhere in the repository. The migration its owndeprecation note asked for had already happened —
ConsoleLayoutpassesbrandingstraight to
AppShell— and nothing was left behind to call the wrapper.It was not free to keep. PR #5366 had to edit this file twice (the feed line and its
local
AppBrandinginterface) purely to keep a file nobody calls compiling. That is therecurring tax this removes.
Premise re-measured on the current tip
The card's zero-caller reading was taken on
bdf8cf76e. Re-measured onaa3b81062(this branch's merge-base), the file was still present, still
@deprecated, and stilluncalled.
Caller sweep — fixed-string, whole repo, all file types, build outputs excluded:
Two further sweeps for the module coordinate rather than the identifier:
grep -rnF 'hooks/useBranding'andgrep -rnF 'useBranding.ts'.Positive control. A zero count is only evidence when the pattern is proven able to
match, so absence was never concluded from a bare zero: the same command returned the
file's own declaration (
useBranding.ts:19) and its doc comment (:2), plus the twoguide hits and three historical CHANGELOG lines. Seven hits, no importer among them —
not a silently-zeroed anchor.
The published-surface check, and a correction
The suggested disposition asked for one check before deleting: is any of this reachable
from outside? The check does not come back the way the framing assumed —
apps/consoleis a published package (@object-ui/console,publishConfig.access: public), not merely an application. The conclusion survives anyway, by a stronger route:exportsmap has exactly one entry,.→./plugin.js/./plugin.d.ts. Nosubpath exports and no wildcard exports exist anywhere in the workspace.
plugin.jsis compiled fromtsconfig.plugin.json, whoseincludeis["plugin.ts"]— one file.
plugin.tsimports nothing fromsrc/and never names the hook.filesis["dist", "plugin.ts", "plugin.js", "plugin.d.ts", "README.md"], sosrcnever enters the npm tarball at all.
disttoo.So the file was unreachable from any published entry point — but on the strength of the
exports map and
files, not on the premise that the console is unpublished.The guide edit is required, not cosmetic
useBrandingwas the only file in the console's hooks directory, so the directory goeswith it.
skills/objectui/guides/console-development.mdstated both coordinates inbacktick code spans, and
scripts/check-skills-paths.mjsresolves exactly those spansagainst disk. Leaving either would have turned that gate red — verified by observing the
directory disappear from the working tree the moment the file was removed.
The caveat sentence about the first row's differing prefix is dropped rather than
rewritten: with the row gone, every remaining hook lives in
@object-ui/app-shell, sothe exception it existed to explain no longer exists.
Published skills surface — both readings, and both go down:
console-development.md(whole file).mdunderskills/)Changeset
Empty frontmatter.
apps/consoleis in the changesetfixedgroup, so this deletion isa guarded-source change and
check-changeset-presence.mjsdemands a declaration — butnothing published changes, and the gate's empty-frontmatter exemption is the accurate
answer rather than a release.
Verification
Run on the final commit; exit codes captured before any pipe, and each verdict quoted
from the gate's own line.
check-skills-paths✅ OK (93/94 stated path(s) resolve across 18 guide file(s); 1 baselined)check-changeset-presence✅ 1 source file(s) of 1 released package(s) changed … EMPTY frontmattercheck-changeset-fixed✅ All workspace packages are in the changeset fixed group.check-changeset-no-major✅ No changeset declares a major bump.check-control-bytes✅ OK (scanned 4695 tracked text file(s); skipped 85 binary)check-lint-coverage✅ 46/46 packages linted, 0 with outstanding errorscheck-type-check-coverage✅ 45/46 via type-checkcheck-package-self-import✅ No package names itself inside its own src/.check-doc-links@object-ui/consoletype-check@object-ui/consolelintno-explicit-anyin files this diff does not touchcheck-skills-paths+check-changeset-presenceunit testsThe type-check green was measured, not assumed. A green compile after deleting a file
only means something if it could have gone red, so the control got its own mutation leg:
an
import { useBranding } from './hooks/useBranding'was appended toapps/console/src/App.tsx, the injection confirmed on disk by grep count (0 → 1) ratherthan by the editor's exit code, and the type-check then failed with
src/App.tsx(381,29): error TS2307: Cannot find module './hooks/useBranding'(exit 2).The restore leg ran from a
trap … EXIT INT TERM, and the tree was confirmed back to a0 count and a clean
git statusbefore the final green was re-read.The 67-file
apps/consolesuite is not included above: it was started, exceeded theforeground cap under concurrent load, and was reaped by its own timeout. It is declared
as a narrowing rather than reported as a pass. Nothing in it can reach the deleted module
— the sweep above found no importer in any file type — and CI runs the full farm.
Generated by Claude Code