Skip to content

fix(ci): clear the unused Control UI chat export - #207270

Merged
steipete merged 1 commit into
mainfrom
steipete/perf-micro-ui-chat-snapshot-dead-export-20260919
Nov 28, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/perf-micro-ui-chat-snapshot-dead-export-20260919

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Related: #207173

What Problem This Solves

The production unused-export check flags a Control UI chat history helper after #207173 moved both production callers into the same module. A direct test import was the only remaining external reference.

User Impact

The production scan no longer reports the chat snapshot helper. The Control UI still opens and prefetches chat history through the same code.

Why This Change Was Made

Keep requestChatSessionSnapshot private to its owner. Exercise navigation-intent prefetch through the existing fixture and assert the cached messages and the unchanged Gateway response. The earlier-page test still asserts the same message preparation. Production LOC is flat. Test LOC is +20.

Evidence

  • Two clean-main runs found the UI export. The same production Knip scan after this change reports zero UI findings. The remaining harness finding reproduces on the same main parent and is tracked in fix(ci): keep the harness request type internal #207239.
  • Focused Vitest passed 76 tests in 5.24 seconds. The Control UI unit and Chromium run passed 62 tests in 7.75 seconds. Both production-build prefetch E2E cases passed in 20.59 seconds.
  • pnpm check:changed --staged --timed passed, including zero findings in all three Knip export scans, with the exact fix(ci): keep the harness request type internal #207239 harness patch temporarily applied for integration proof.
  • Codex autoreview found zero actionable findings through P2 on the exact staged UI diff against d8c456001c10d8.

Keep the history request helper private after #207173 and cover the cached snapshot through navigation-intent prefetch.
@clawsweeper

clawsweeper Bot commented Nov 28, 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 November 28, 2026 05:39
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-28T05:40:45.603911Z ea0f163 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added the P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. label Nov 28, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Nov 28, 2026
@clawsweeper

clawsweeper Bot commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

This PR makes the chat snapshot request helper private and moves its coverage to navigation-intent prefetch.

Example: Prefetch agent:main:quiet-activity with a quiet sessions_yield result.

  • Before: A test imports the snapshot helper directly, keeping an unused production export.
  • After: Navigation intent exercises the private helper and verifies prepared cached messages without modifying the response.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The minimal patch preserves meaningful coverage, but the failed UI gate remains unattributed.
Proof confidence 🐚 platinum hermit (4/6) This internal export cleanup changes no user-visible behavior; reported focused tests and production-build prefetch checks support the unchanged path.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Product

Kind: Maintenance · Worth it: Yes · Fix scope: Complete
User problem: The production unused-export scan reports an internal chat helper whose production consumers now share its module.
Reason: The maintainer-authored cleanup removes a test-only export without changing runtime behavior or public contracts.

Merge readiness

✅ Ready for maintainer review

Keep open: this is a focused cleanup still needed on the fetched main, with no actionable code findings.

Reviewed head: ea0f1637ae58eba816aa704ed2a7fc52906f89b2

Before merge

None.

Findings

None.

Agent review details

How this fits together

Control UI navigation intent triggers background chat.history requests, prepares returned messages, and stores snapshots for later conversation opening.

flowchart LR
  A[Navigation intent] --> B[Session prefetch]
  B --> C[Private snapshot helper]
  C --> D[Shared history request]
  D --> E[Gateway]
  E --> D
  C --> F[Chat snapshot cache]
Loading

Technical review

Best possible solution:

Keep the helper private and retain the replacement coverage through the existing prefetch owner.

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

Source confirms the exported helper has only same-module production callers and a direct external test consumer on the base; the unused-export scan was reported by the author and was not rerun during this read-only review.

Is this the best way to solve the issue?

This is the smallest complete cleanup: remove the unused export and exercise its existing behavior through the production prefetch boundary.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 63c0dff88bb8.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 7126225 adds ui/src/pages/chat/session-prefetch.test.ts:49 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 712622517abb; files: ui/src/pages/chat/session-prefetch.test.ts)

PR surface

Source 0, Tests +20. Total +20 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 1 1 0
Tests 2 25 5 +20
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 26 6 +20

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 28, 2026, 12:54 AM ET / 05:54 UTC.

@steipete
steipete merged commit 30bbc0a into main Nov 28, 2026
197 of 201 checks passed
@steipete
steipete deleted the steipete/perf-micro-ui-chat-snapshot-dead-export-20260919 branch November 28, 2026 06:10
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 29, 2026
Keep the history request helper private after openclaw#207173 and cover the cached snapshot through navigation-intent prefetch.
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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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