fix(browser): remove dead requireRef import and void expression in register.navigation.ts#91185
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 8, 2026, 1:03 PM ET / 17:03 UTC. Summary PR surface: Source -3, Tests +14. Total +11 across 2 files. Reproducibility: yes. Current main source shows Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land one narrow cleanup branch that removes the phantom import while preserving browser command registration, then close the duplicate PR path. Do we have a high-confidence way to reproduce the issue? Yes. Current main source shows Is this the best way to solve the issue? Yes. Removing the dead import and void expression is the narrow maintainable fix; the added registration test is acceptable, with the only remaining choice being which duplicate cleanup PR to land. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 4094ef4dcb81. Label changesLabel justifications:
Evidence reviewedPR surface: Source -3, Tests +14. Total +11 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
1611b48 to
33d91dc
Compare
|
@clawsweeper re-review Updated:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
🦞👀 Command router queued. I will update this comment with the next step. |
33d91dc to
52e30bc
Compare
…gister.navigation.ts The 'void requireRef' expression was used to suppress lint warnings about an unused import, but it does not create a real compile-time or runtime dependency. Remove both the import and the void workaround. Fixes openclaw#83878
…fter dead import removal Verify that navigate and resize commands are still registered after removing the dead requireRef import. Also verify that requireRef is still exported from shared.js for other modules. Fixes openclaw#83878
52e30bc to
cd59b2d
Compare
vincentkoc
left a comment
There was a problem hiding this comment.
No blocking findings.
Best-fix verdict: best. The deleted import/void anchor is not a real runtime or compile-time dependency; requireRef remains exported from shared.ts and remains used by sibling element commands.
Alternatives considered: keeping the phantom import preserves noise in the plugin import graph; moving the export assertion to production code would be worse than the focused registration test already added here.
Proof: local git diff --check, oxfmt, oxlint, focused Vitest; autoreview clean; GitHub CI exact head cd59b2d green.
Summary
Remove the unused
requireRefimport andvoid requireRefexpression fromregister.navigation.ts. The void expression was used to suppress lint warnings but does not create a real compile-time or runtime dependency.Linked context
Closes #83878
Real behavior proof (required for external PRs)
Real CLI output:
Unit test output (3/3 passing):
requireRefis still exported fromshared.jsfor other modules.Tests and validation
Which commands did you run?
node scripts/run-vitest.mjs run extensions/browser/src/cli/browser-cli-actions-input/register.navigation.test.ts --reporter=verbose # 3 passed (1 test file)What regression coverage was added or updated?
Added
"navigate and resize commands are registered after removing dead import"— verifies both commands register correctly after the import removal.Risk checklist
Did user-visible behavior change? No
Did config, environment, or migration behavior change? No
Did security, auth, secrets, network, or tool execution behavior change? No
What is the highest-risk area? None — dead code removal only.
How is that risk mitigated? Existing tests + new regression test pass. CLI commands work correctly.
Current review state
What is the next action? Maintainer review.
What is still waiting on author, maintainer, CI, or external proof? None.
🤖 Generated with Claude Code
Co-Authored-By: Claude Code [email protected]