Skip to content

test: trim UI and tooling test seams - #126937

Merged
steipete merged 1 commit into
mainfrom
test/trim-ui-tooling-test-seams
Aug 21, 2026
Merged

steipete merged 1 commit into
mainfrom
test/trim-ui-tooling-test-seams

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

UI and tooling suites had accumulated a paired write/read round trip, exact assertions on private reconciliation calls, duplicated workflow-string checks, and a direct helper assertion that kept an internal recorder renderer exported. These checks were weaker than the observable state and emitted-command coverage beside them.

Why This Change Was Made

This removes the self-generated lazy-action round trip, keeps session lineage assertions on canonical placement and presentation state instead of private call shape, and deletes exact Mantis workflow checks that remain in their narrowly named owner tests. The Telegram recorder test continues to prove the real open → minimize → capture ordering, allowing the window-hide renderer to return to module-private scope.

User Impact

No user-visible behavior changes. UI recovery, session reconciliation, Telegram capture privacy ordering, and Mantis workflow policy remain covered at their behavior-owning boundaries.

AI-assisted: yes.

Evidence

  • Focused 7-file run — 73 tests passed across tooling, UI, and mocked browser E2E shards.
  • pnpm test:changed — 66 tests passed across 2 Vitest shards.
  • pnpm check:changed — passed formatting, UI i18n verification, typechecking, lint, script erasability, dead-export scans, Docker boundaries, and repository guards.
  • git diff --check — clean.
  • Fresh structured autoreview — no accepted or actionable findings.

Production/tooling delta: one visibility-only substitution (+1/-1). Test delta: +1/-43. No screenshots are needed because runtime and rendered behavior are unchanged.

@clawsweeper

clawsweeper Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete
steipete marked this pull request as ready for review August 21, 2026 01:49
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui scripts Repository scripts size: XS maintainer Maintainer-authored PR labels Aug 21, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 Aug 21, 2026
@clawsweeper

clawsweeper Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 20, 2026, 9:55 PM ET / August 21, 2026, 01:55 UTC.

ClawSweeper review

What this changes

The PR removes redundant UI, Mantis workflow, and Telegram-recorder test assertions while making a recorder-rendering helper private.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep this maintainer-owned cleanup open for normal merge review. The reviewed removals leave the behavior-owning UI/session, recorder-order, and workflow safety assertions intact; no concrete patch defect was found.

Priority: P3
Reviewed head: 4521dd412573fb8f9aee00147ec99ec618eb0a99

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-supported cleanup with no correctness finding; exact-head CI remains the normal landing gate.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored, behavior-neutral test cleanup is not subject to the external-contributor real-behavior-proof gate.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored, behavior-neutral test cleanup is not subject to the external-contributor real-behavior-proof gate.
Evidence reviewed 6 items Recorder behavior remains covered: The helper is now private, has one production caller before recording begins, and the retained test verifies target-chat open, window minimize, then x11 capture ordering rather than calling the helper directly.
Current-main baseline confirms export-only change: The recorded current-main base contains the same window-minimize command as an exported helper; the PR only narrows that visibility, with no command-body change.
Session reconciliation is asserted at the owner boundary: The sidebar publishes its selected row through the session capability, and the retained supplemental tests assert the resulting canonical placement and archived-row state instead of spying on the private call shape.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs ui/src/app/lazy-shell-action.test.ts test/scripts/telegram-desktop-recorder.test.ts ui/src/lib/sessions/index-supplemental-reconcile.test.ts ui/src/components/app-sidebar.lineage-freshness.test.ts

Result: FAIL (partial) — step 2 expect_output lazy shell action storage: expected terminal output was not visible within 30 seconds: "lazy shell action storage"

node scripts/run-vitest.mjs ui/src/app/lazy-shell-action.test.ts test/scripts/telegram-desktop-recorder.test.ts ui/src/lib/sessions/index-supplemental-reconcile
.test.ts ui/src/components/app-sidebar.lineage-freshness.test.ts
runner@runnervm76f27:/tmp/clawsweeper-live-proof-126937-y7WPDG/target$ node scripts/run-vitest.mjs ui/src/app/lazy-shell-action.test.ts test/scripts/telegram-de
sktop-recorder.test.ts ui/src/lib/sessions/index-supplemental-reconcile.test.ts ui/src/components/app-sidebar.lineage-freshness.test.ts
node scripts/run-vitest.mjs ui/src/app/lazy-shell-action.test.ts test/scripts/telegram-desktop-recorder.test.ts ui/src/lib/sessions/index-supplemental-reconcile
.test.ts ui/src/components/app-sidebar.lineage-freshness.test.ts
[test] starting test/vitest/vitest.tooling.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-126937-y7WPDG/target

 ✓  tooling  test/scripts/telegram-desktop-recorder.test.ts (28 tests) 63ms

 Test Files  1 passed (1)
      Tests  28 passed (28)
   Start at  01:56:06
   Duration  665ms (transform 313ms, setup 61ms, import 169ms, tests 63ms, environment 0ms)

[test] starting test/vitest/vitest.ui.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-126937-y7WPDG/target

 ✓  ui  ui/src/lib/sessions/index-supplemental-reconcile.test.ts (4 tests) 16ms
 ✓  ui  ui/src/app/lazy-shell-action.test.ts (6 tests) 128ms
stderr | ui/src/components/app-sidebar.lineage-freshness.test.ts › sidebar routed-lineage freshness › refreshes canonical placement while retaining same-session
 presentation
Element openclaw-app-sidebar scheduled an update (generally because a property was set) after an update completed, causing a new update to be scheduled. This is
 inefficient and should be avoided unless the next update can only be scheduled as a side effect of the previous update. See https://lit.dev/msg/change-in-updat
e for more information.

 ✓  ui  ui/src/components/app-sidebar.lineage-freshness.test.ts (1 test) 638ms
     ✓ refreshes canonical placement while retaining same-session presentation  636ms

 Test Files  3 passed (3)
      Tests  11 passed (11)
   Start at  01:56:07
   Duration  4.89s (transform 7.72s, setup 604ms, import 7.14s, tests 782ms, environment 1.83s)

[test] passed 2 Vitest shards in 12.20s
runner@runnervm76f27:/tmp/clawsweeper-live-proof-126937-y7WPDG/target$ node scripts/run-vitest.mjs ui/src/app/lazy-shell-action.test.ts test/scripts/telegram-de
sktop-recorder.test.ts ui/src/lib/sessions/index-supplemental-reconcile.test.ts ui/src/components/app-sidebar.lineage-freshness.test.ts
[test] starting test/vitest/vitest.tooling.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-126937-y7WPDG/target

 ✓  tooling  test/scripts/telegram-desktop-recorder.test.ts (28 tests) 65ms

 Test Files  1 passed (1)
      Tests  28 passed (28)
   Start at  01:56:19
   Duration  435ms (transform 87ms, setup 29ms, import 93ms, tests 65ms, environment 0ms)

[test] starting test/vitest/vitest.ui.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-126937-y7WPDG/target

 ✓  ui  ui/src/lib/sessions/index-supplemental-reconcile.test.ts (4 tests) 12ms
 ✓  ui  ui/src/app/lazy-shell-action.test.ts (6 tests) 131ms
stderr | ui/src/components/app-sidebar.lineage-freshness.test.ts › sidebar routed-lineage freshness › refreshes canonical placement while retaining same-session
 presentation
Element openclaw-app-sidebar scheduled an update (generally because a property was set) after an update completed, causing a new update to be scheduled. This is
 inefficient and should be avoided unless the next update can only be scheduled as a side effect of the previous update. See https://lit.dev/msg/change-in-updat
e for more information.

 ✓  ui  ui/src/components/app-sidebar.lineage-freshness.test.ts (1 test) 512ms
     ✓ refreshes canonical placement while retaining same-session presentation  510ms

 Test Files  3 passed (3)
      Tests  11 passed (11)
   Start at  01:56:19
   Duration  2.98s (transform 2
… output truncated …

Assertions:

  • FAIL expect_output: lazy shell action storage

How this fits together

Control UI turns browser events and Gateway session records into visible panels and session rows, while Telegram/Mantis tooling drives and verifies desktop recording workflows. This PR trims tests that restate private implementation details while retaining state, ordering, and policy checks at those owners.

flowchart LR
  A[Cleanup PR] --> B[UI and session tests]
  A --> C[Telegram recorder tests]
  A --> D[Mantis workflow tests]
  B --> E[Visible panel and session state]
  C --> F[Open minimize capture ordering]
  D --> G[Workflow safety policy]
  E --> H[Maintainer CI review]
  F --> H
  G --> H
Loading

Before merge

  • Resolve merge risk (P1) - GitHub was unavailable during this review, so the latest filtered ClawSweeper comment and any Rank-up moves could not be read; confirm them before landing.
  • Complete next step (P2) - No repair lane is needed: this is a maintainer-owned cleanup with no supported defect; it needs ordinary exact-head merge checks.
Agent review details

Security

None.

PR surface

Tests -42, Other 0. Total -42 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 5 1 43 -42
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 1 0
Total 6 2 44 -42

Review metrics

Metric Value Why it matters
Production versus test delta production +1/-1; tests +1/-43 The only production edit removes a test-only export; the net reduction is confined to redundant test seams.

Stored data model

Persistent data-model change detected: serialized state: ui/src/app/lazy-shell-action.test.ts, serialized state: ui/src/lib/sessions/index-supplemental-reconcile.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

  • The supplied exact-head CI state still has queued and running checks; merge only after the required checks are green.

Maintainer options:

  1. Decide the mitigation before merge
    Retain the owner-boundary assertions, keep the recorder renderer private, and merge after exact-head CI plus the latest ClawSweeper guidance are confirmed.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain the owner-boundary assertions, keep the recorder renderer private, and merge after exact-head CI plus the latest ClawSweeper guidance are confirmed.

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

Not applicable: this PR does not report a runtime failure; source inspection shows the surviving tests cover the relevant observable state, order, and workflow policy.

Is this the best way to solve the issue?

Yes: removing implementation-coupled assertions while retaining owner-boundary state and ordering checks is the most maintainable test shape; deleting all related coverage would not be.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 2ebd80cc96df.

Labels

Label changes:

  • add P3: This is a behavior-neutral test and tooling cleanup with no supported user-facing regression.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored, behavior-neutral test cleanup is not subject to the external-contributor real-behavior-proof gate.

Label justifications:

  • P3: This is a behavior-neutral test and tooling cleanup with no supported user-facing regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored, behavior-neutral test cleanup is not subject to the external-contributor real-behavior-proof gate.

Evidence

What I checked:

  • Recorder behavior remains covered: The helper is now private, has one production caller before recording begins, and the retained test verifies target-chat open, window minimize, then x11 capture ordering rather than calling the helper directly. (scripts/e2e/telegram-desktop-recorder.ts:615, 4521dd412573)
  • Current-main baseline confirms export-only change: The recorded current-main base contains the same window-minimize command as an exported helper; the PR only narrows that visibility, with no command-body change. (scripts/e2e/telegram-desktop-recorder.ts:181, 2ebd80cc96df)
  • Session reconciliation is asserted at the owner boundary: The sidebar publishes its selected row through the session capability, and the retained supplemental tests assert the resulting canonical placement and archived-row state instead of spying on the private call shape. (ui/src/components/app-sidebar-child-session-data.ts:186, 4521dd412573)
  • Lazy-action behavior has stronger surviving coverage: The shell persists the lazy event when requesting an unloaded element, while existing shell tests cover reload/context handling and structured terminal-event restoration; the removed storage round trip added no separate behavior. (ui/src/app/app-shell-chrome.ts:618, 4521dd412573)
  • Mantis safety checks remain in dedicated assertions: The workflow still routes fork candidates through explicit approval, and dedicated tests still assert both the fork condition and the visible-proof skip/run decision; removed checks were duplicates. (test/scripts/mantis-telegram-desktop-proof-workflow.test.ts:424, 4521dd412573)
  • Feature-history provenance: History associates the lazy-surface repair with commit 5eda48e and the standalone recorder with commit 97e3136; the present cleanup is commit 4521dd4. (5eda48ed9996)

Likely related people:

  • steipete: Authored the current cleanup and the prior lazy-surface repair found in the affected-path history. (role: recent area contributor; confidence: high; commits: 4521dd412573, 5eda48ed9996; files: ui/src/app/lazy-shell-action.ts, ui/src/app/app-host.test.ts, test/scripts/mantis-telegram-desktop-proof-workflow.test.ts)
  • Ayaan Zaidi: History identifies the standalone Telegram Desktop recorder introduction as the predecessor for the recorder seam being narrowed. (role: introduced recorder behavior; confidence: high; commits: 97e3136b9e6f; files: scripts/e2e/telegram-desktop-recorder.ts, test/scripts/telegram-desktop-recorder.test.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Wait for the exact-head CI checks to finish green.
  • Read the latest ClawSweeper comment and address or explicitly skip any Rank-up moves before landing.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

@steipete
steipete merged commit ab2bbd4 into main Aug 21, 2026
213 checks passed
@steipete
steipete deleted the test/trim-ui-tooling-test-seams branch August 21, 2026 02:04
@steipete

Copy link
Copy Markdown
Contributor 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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant