fix(browser): remove unused requireRef import and void workaround (#83878)#86847
fix(browser): remove unused requireRef import and void workaround (#83878)#868471052326311 wants to merge 1 commit into
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: the cleanup in this PR is valid, but the same remaining work is now covered by the open replacement at #91185, which removes the same dead import and adds focused coverage plus stronger real CLI proof. Canonical path: Use #91185 as the canonical landing path for the linked cleanup, then let that merged change close the related issue. So I’m closing this here and keeping the remaining discussion on #91185. Review detailsBest possible solution: Use #91185 as the canonical landing path for the linked cleanup, then let that merged change close the related issue. Do we have a high-confidence way to reproduce the issue? Yes for the structural cleanup: current main still imports Is this the best way to solve the issue? No as a standalone landing path now; this patch is a correct minimal cleanup, but the open replacement PR is the better current path because it carries the same deletion plus focused coverage and real CLI proof. Security review: Security review cleared: The diff only removes an unused local import and no longer-used expression; it does not touch dependencies, scripts, secrets, workflows, network behavior, or package metadata. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 4094ef4dcb81. |
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Pearl Review Wisp Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
82e4e81 to
d7883b9
Compare
|
Rebased onto latest upstream/main to get fresh CI. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
d7883b9 to
8cda426
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
…enclaw#83878) The void requireRef expression in register.navigation.ts silences the unused-import lint but does not create a real dependency. The import and its comment are dead code — shared.ts surface documentation belongs in shared.ts or a barrel export, not as a phantom import in an unrelated file. Closes openclaw#83878
8cda426 to
e55907a
Compare
|
ClawSweeper applied the proposed close for this PR.
|
Summary
Removes the unused
requireRefimport and itsvoid requireRefsilencing workaround fromregister.navigation.ts. The import serves no purpose — the file does not callrequireRef, and documenting the public surface ofshared.tsbelongs inshared.tsitself or a barrel export, not as a phantom import.Closes #83878
Change Type
Scope
Linked Issue
Real behavior proof
Behavior or issue addressed:
register.navigation.tsimportsrequireReffrom./shared.jsbut never calls it. Thevoid requireRefexpression at line 84 silences the unused-import lint without creating a real dependency. This is dead code that obscures the actual import graph.Real environment tested: macOS Darwin 25.4.0 arm64, Node v22.22.0, openclaw branch
fix/remove-void-require-refrebased on upstream main commit8e110a21.Exact steps or command run after this patch:
requireReffrom the import and deleted thevoid requireRef+ comment block (4 lines removed, 1 line changed).node scripts/run-tsgo.mjs -p tsconfig.json— exit 0.pnpm exec oxfmt --check extensions/browser/src/cli/browser-cli-actions-input/register.navigation.ts— clean.pnpm exec oxlint extensions/browser/src/cli/browser-cli-actions-input/register.navigation.ts— 0 warnings, 0 errors.requireRef) andvoidexpression do not exist in the patched version. Reverting the patch restores the dead import.Evidence after fix:
Diff (1 file, +1 / -4):
Observed result: After the patch,
register.navigation.tsno longer imports or referencesrequireRef. TypeScript, format, and lint all pass cleanly. The file is functionally identical —resolveBrowserActionContextis still imported and used as before.