Skip to content

refactor(ui): remove unused module exports#101262

Merged
vincentkoc merged 1 commit into
mainfrom
refactor/deadcode-full-sweep-20260706-v21
Jul 7, 2026
Merged

refactor(ui): remove unused module exports#101262
vincentkoc merged 1 commit into
mainfrom
refactor/deadcode-full-sweep-20260706-v21

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Jul 7, 2026

Copy link
Copy Markdown
Member

What Problem This Solves

The Control UI still exported several helpers and types that have no consumers outside their defining modules. One pairing-hint wrapper also duplicated the canonical resolver without adding behavior.

Why This Change Was Made

Keep the UI module surface aligned with actual ownership:

  • localize eight implementation-only symbols
  • remove the unused shouldShowPairingHint wrapper
  • exercise resolvePairingHint directly in the existing tests

This removes 22 net lines without changing runtime behavior.

User Impact

No user-visible behavior change. The UI keeps the same pairing-hint decisions while exposing fewer internal symbols.

Evidence

  • rebased onto current main at d86bb60fbadfb0ebe94d3e88c75c9de78e8e9307
  • codebase-memory graph refreshed after the rebase: 277,545 nodes / 1,098,333 edges
  • fresh Codex autoreview: no accepted or actionable findings, 0.88 confidence
  • current-main AWS Crabbox run run_f4f6f907730c on lease cbx_59dd2f65386c: all four typecheck lanes, core/extensions/scripts lint, app checks, import-cycle checks, and guard suites passed
  • prior exact-patch AWS Crabbox run run_6d2975fb12fa: 8 targeted UI test files / 198 tests passed, plus scoped core and coreTests changed gates
  • Android lint passed on the current production surface
  • strict iOS Periphery baseline passed: https://github.com/openclaw/openclaw/actions/runs/28833919899

@vincentkoc vincentkoc self-assigned this Jul 7, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review July 7, 2026 01:51
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Jul 7, 2026
@vincentkoc
vincentkoc force-pushed the refactor/deadcode-full-sweep-20260706-v21 branch from 1622c2a to 003c0e0 Compare July 7, 2026 02:01
@clawsweeper

clawsweeper Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed July 6, 2026, 10:36 PM ET / 02:36 UTC.

Summary
The PR removes several unused Control UI exports, deletes the redundant shouldShowPairingHint wrapper, and retargets pairing-hint tests to resolvePairingHint.

PR surface: Source -9, Tests -13. Total -22 across 11 files.

Reproducibility: not applicable. this is a cleanup PR, not a bug report with a failing user path. The merge blocker is reproducible from exact-head CI via the plugin SDK surface budget check.

Review metrics: 1 noteworthy metric.

  • Public-surface budget mismatch: branch reports 10458 exports; budget expected 10460. The PR intentionally removes exports, so the pinned/configured surface budget must move with the cleanup before merge.

Stored data model
Persistent data-model change detected: serialized state: ui/src/lib/sessions/custom-groups.ts. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🦐 gold shrimp
Proof: 🌊 off-meta tidepool
Patch quality: 🦐 gold shrimp
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Update the public-surface budget for the intended export-count reduction and rerun the failing surface-report shard or exact-head CI.
  • [P2] Refresh onto current main so the unrelated lint fix at 6273e82 is included.

Risk before merge

  • [P1] Exact-head CI has a branch-relevant public-surface budget failure; the PR should not merge until the intended new budget is updated or the affected exports are preserved.
  • [P1] The branch also needs current-main refresh because current main has already fixed an unrelated lint failure that appears on this head's CI run.

Maintainer options:

  1. Decide the mitigation before merge
    Keep the cleanup, reconcile the public-surface budget for the intended export reduction, refresh onto current main, and merge only after exact-head CI is green or explicitly maintainer-classified.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P2] A narrow mechanical repair can reconcile the public-surface budget and refresh the branch; no product direction is needed.

Security
Cleared: The diff only changes Control UI TypeScript export visibility and one unit-test surface; no concrete security or supply-chain regression was found.

Review findings

  • [P2] Update the public-surface budget for removed exports — ui/src/components/config-form.ts:2
Review details

Best possible solution:

Keep the cleanup, reconcile the public-surface budget for the intended export reduction, refresh onto current main, and merge only after exact-head CI is green or explicitly maintainer-classified.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this is a cleanup PR, not a bug report with a failing user path. The merge blocker is reproducible from exact-head CI via the plugin SDK surface budget check.

Is this the best way to solve the issue?

Not yet: localizing implementation-only UI exports is the right cleanup shape, but the submitted branch is not merge-ready until the public-surface budget and current-main CI drift are reconciled.

Full review comments:

  • [P2] Update the public-surface budget for removed exports — ui/src/components/config-form.ts:2
    This branch removes exports, and exact-head CI now reports the pinned/configured public-surface budget is stale: plugin-sdk-surface-report.test.ts expected exports: 10460 while the branch reports 10458. Please update the intended surface budget for the merged result, or keep the exports if they are still meant to remain public.
    Confidence: 0.91

Overall correctness: patch is incorrect
Overall confidence: 0.88

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 6273e82ca55a.

Label changes

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The author is a repository member and this is an internal cleanup PR, so the external contributor real-behavior proof gate does not apply.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P3: This is a low-risk internal Control UI cleanup with a small validation/baseline blocker and no claimed user-visible behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The author is a repository member and this is an internal cleanup PR, so the external contributor real-behavior proof gate does not apply.
Evidence reviewed

PR surface:

Source -9, Tests -13. Total -22 across 11 files.

View PR surface stats
Area Files Added Removed Net
Source 10 9 18 -9
Tests 1 21 34 -13
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 11 30 52 -22

Acceptance criteria:

  • [P1] Run or request the exact-head CI equivalent for checks-node-compact-small-whole-2, or node scripts/run-vitest.mjs run --config test/vitest/vitest.tooling.config.ts --reporter=verbose.
  • [P1] Confirm test/scripts/plugin-sdk-surface-report.test.ts passes with the intended merged public-surface count.
  • [P1] Confirm exact-head lint is green after rebasing onto current main.

What I checked:

Likely related people:

  • steipete: Merged the recent Control UI PR that owns several touched modules and authored adjacent session-group work used by the affected UI paths. (role: merger and adjacent UI contributor; confidence: high; commits: e5e721fdc5de, 52d929288fb1, 5157446a2c35; files: ui/src/lib/overview-hints.ts, ui/src/lib/sessions/custom-groups.ts, ui/src/lib/sessions/session-options.ts)
  • SnoutFirst: Authored the merged Control UI PR whose squashed merge commit currently owns the overview-hints and config-form modules touched by this cleanup. (role: recent area contributor; confidence: medium; commits: e5e721fdc5de, d4e9d21b3368; files: ui/src/lib/overview-hints.ts, ui/src/lib/overview-hints.node.test.ts, ui/src/components/config-form.ts)
  • vincentkoc: Recent merged export-localization PRs by this author touched the same Control UI cleanup theme, and this PR continues that bounded surface-reduction work. (role: adjacent cleanup owner; confidence: medium; commits: 9d86728795e0, 7399c888e808; files: ui/src/app/config.ts, ui/src/app/context.ts, ui/src/components/config-form.node.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (1 earlier review cycle)
  • reviewed 2026-07-07T02:10:20.429Z sha 003c0e0 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jul 7, 2026
@vincentkoc
vincentkoc force-pushed the refactor/deadcode-full-sweep-20260706-v21 branch from 003c0e0 to 7399c88 Compare July 7, 2026 02:17
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jul 7, 2026
@vincentkoc
vincentkoc force-pushed the refactor/deadcode-full-sweep-20260706-v21 branch from 7399c88 to ff6bf9d Compare July 7, 2026 03:08
@vincentkoc
vincentkoc merged commit 62e5d44 into main Jul 7, 2026
82 checks passed
@vincentkoc
vincentkoc deleted the refactor/deadcode-full-sweep-20260706-v21 branch July 7, 2026 03:20
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant