openclaw - 💡(How to fix) Fix void requireRef silences dead-import lint via side-effect expression [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#83878Fetched 2026-05-20 03:47:47
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
1
Timeline (top)
labeled ×5commented ×1

Error Message

requireRef is imported but not called in register.navigation.ts. The void expression prevents lint from flagging the unused import, but it does not create a real compile-time or runtime dependency. If requireRef is renamed or removed from shared.ts, the import will become a broken reference that TypeScript will catch, but the void expression itself will never warn about intent drift. More importantly, the motivation ('shared utilities are intended for other modules too') is not a sound reason to pin a dependency in a file that does not use it — that relationship should be expressed by the actual callers.

Fix Action

Fix / Workaround

Severity: low / Confidence: high / Category: maintainability Triage: risk Detected against: openclaw v2026.5.18 (latest stable at time of scan, 2026-05-18) Tooling: clawpatch 0.3.0 + acpx/claude-sonnet-4-5 via Brad Mills protocol

Recommendation

Remove the import and void workaround from register.navigation.ts. If the intent is to document that requireRef is part of the public surface of shared.ts, that belongs in a comment in shared.ts or in a barrel export, not as a phantom import in an unrelated file.


Standardized clawpatch finding. Persistent in v2026.5.18 (not resolved by upgrading from v2026.5.12). Finding ID: fnd_sig-feat-cli-command-0029f9d57b-_b1c98ff96e.

Code Example

// Keep `requireRef` reachable; shared utilities are intended for other modules too.
  void requireRef;
RAW_BUFFERClick to expand / collapse

Severity: low / Confidence: high / Category: maintainability Triage: risk Detected against: openclaw v2026.5.18 (latest stable at time of scan, 2026-05-18) Tooling: clawpatch 0.3.0 + acpx/claude-sonnet-4-5 via Brad Mills protocol

Evidence

  • extensions/browser/src/cli/browser-cli-actions-input/register.navigation.ts:171-172 (requireRef)
// Keep `requireRef` reachable; shared utilities are intended for other modules too.
  void requireRef;

Reasoning

requireRef is imported but not called in register.navigation.ts. The void expression prevents lint from flagging the unused import, but it does not create a real compile-time or runtime dependency. If requireRef is renamed or removed from shared.ts, the import will become a broken reference that TypeScript will catch, but the void expression itself will never warn about intent drift. More importantly, the motivation ('shared utilities are intended for other modules too') is not a sound reason to pin a dependency in a file that does not use it — that relationship should be expressed by the actual callers.

Recommendation

Remove the import and void workaround from register.navigation.ts. If the intent is to document that requireRef is part of the public surface of shared.ts, that belongs in a comment in shared.ts or in a barrel export, not as a phantom import in an unrelated file.

Why existing tests miss this

This is a structural code smell, not a behavioral bug — tests do not exercise import graph relationships.

Minimum fix scope

register.navigation.ts: remove the requireRef import and the void requireRef statement.


Standardized clawpatch finding. Persistent in v2026.5.18 (not resolved by upgrading from v2026.5.12). Finding ID: fnd_sig-feat-cli-command-0029f9d57b-_b1c98ff96e.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix void requireRef silences dead-import lint via side-effect expression [1 comments, 2 participants]