Skip to content

fix(ui): reduce layout stalls during chat and sidebar interactions - #154179

Merged
steipete merged 2 commits into
mainfrom
codex/ui-hover-performance
Sep 21, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/ui-hover-performance

Conversation

@steipete

@steipete steipete commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes sluggish sidebar hover and chat interactions when repeated panel updates force browser layout during rendering.

User Impact

Chat and sidebar interactions spend less time waiting for panel layout. Tab overflow hints, scrolling, keyboard focus, panel docking, and retained content keep their existing behavior. No configuration or migration is needed.

Why This Change Was Made

A live Chrome DevTools trace recorded 20.9 seconds of forced reflow in a 50.8-second capture. Tab-label measurements during Lit commits were the largest contributor; the side-panel region then measured again immediately after rendering.

The tab strip now retains one measurement owner across renders, batches reads before writes, and observes actual content/size/scroll changes. Panel geometry commits coalesce after nested renders. Files announces hosted-tab changes only when its header presentation or selection changes.

Evidence

  • Regression tests fail on the old behavior: unchanged tab renders read and write geometry, four region commits repeat geometry reads, and content-only Files updates announce unchanged headers. All pass with the repairs.
  • 98 focused tests pass, including Chromium tab selection/focus and transcript geometry siblings. The existing bundled task-panel layout E2E also passes, covering docking, swapping, expanding, resizing, narrow layouts, and live content continuity (26.1 s invocation; 11.0 s scenario).
  • Real-profile Chrome mock check: 30 unchanged region renders fell from 67.9 ms total (2.2 ms median) to 52.1 ms total (1.7 ms median). This small synthetic check is not a production deployment benchmark.
  • Changed test costs with one worker: tab unit suite 3.09 s final invocation / 0.16 s tests; Files suite 6.17 s wall / 2.4 s tests; region suite plus tab/hosted-tab siblings 9.94 s wall / 1.2 s tests. Browser tab lifecycle 0.56 s; transcript geometry 5.34 s. Hosted CI UI shard wall times: 328 s, 420 s, and 313 s (whole jobs, including setup and sibling tests); the Control UI performance job passed in 107 s. All 13 bundled UI E2E shards passed.
  • Production UI build, bundled E2E, changed-scope typechecks/guards, targeted lint/stylelint, and final independent review pass. The initial local gate caught a test cleanup return type and a fixture map-spread lint error; both were fixed and their affected checks rerun successfully.
  • Live production was inspected through the shared DevTools relay. Deployment is separate from this PR.

Inspected synthetic screenshots demonstrate preserved hover and panel presentation.

Before:

Before: sidebar hover and panel tabs

After:

After: sidebar hover and panel tabs

@clawsweeper

clawsweeper Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: L maintainer Maintainer-authored PR labels Sep 20, 2026
@steipete
steipete marked this pull request as ready for review September 20, 2026 23:58
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 Sep 21, 2026
@clawsweeper

clawsweeper Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 20, 2026, 8:29 PM ET / September 21, 2026, 00:29 UTC (Revision 2).

ClawSweeper review

What this changes

The PR batches Control UI tab and sidebar measurements and suppresses redundant Files header notifications to reduce chat interaction stalls.

Merge readiness

✅ Ready for maintainer review

This remains useful work: current main retains the reported measurement churn, and the earlier merged performance fix addressed different paths. No blocking correctness or security findings were identified.

Priority: P2
Reviewed head: d883c5b4b4554a47314c66653faa277701e9cb08

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused performance repair with meaningful regression coverage, supporting browser evidence, and no identified blocking defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The ordinary external-contributor proof gate does not apply to this verified repository-admin author. Inspected screenshots support preserved presentation, while reported browser and E2E checks exercise the changed UI owners; production after-fix timing is not claimed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The ordinary external-contributor proof gate does not apply to this verified repository-admin author. Inspected screenshots support preserved presentation, while reported browser and E2E checks exercise the changed UI owners; production after-fix timing is not claimed.
Evidence reviewed 9 items Introduced production changes: Reviewed the pinned merge-base-to-head patch and affected production modules. Tab measurements retain one directive owner, collect reads before writes, and cancel subscriptions and queued work on directive disconnection; sidebar geometry is coalesced after rendering.
Still necessary on current main: All three production files have identical blobs at fetched main and the introduction merge base. Main therefore still contains synchronous tab overflow measurements, immediate sidebar geometry reads, and unconditional Files header notifications.
Latest-release check: The supplied latest release, v2026.9.5, also retains the synchronous label-overflow ref implementation; this optimization is not already present there.
Findings None None.
Security None None.

How this fits together

The Control UI renders chat alongside tabbed panels. These components translate panel updates, scrolling, and resizing into overflow indicators and geometry notifications used by the chat transcript.

flowchart TD
  A[Panel content and selection updates] --> B[Files header change detection]
  B --> C[Sidebar rendering]
  C --> D[Batched geometry measurements]
  E[Tab content resize and scroll] --> D
  D --> F[Tab overflow indicators]
  D --> G[Transcript geometry notification]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +88, Tests +295. Total +383 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 3 157 69 +88
Tests 3 301 6 +295
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 458 75 +383

Review metrics

Metric Value Why it matters
Production versus test growth Production +88 net lines; tests +295 net lines Production growth supports persistent measurement ownership and cleanup; test growth protects the batching and invalidation contracts.

Technical review

Best possible solution:

Keep measurement ownership within the existing UI components, batch geometry work, and preserve tab focus, overflow hints, and retained panel content.

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

Yes, source establishes repeated synchronous geometry work during unchanged tab and sidebar renders, and the added regressions target those paths. This review did not independently reproduce the reported browser timing.

Is this the best way to solve the issue?

Yes. The patch repairs measurement scheduling and notification ownership in the existing components without adding configuration, changing persisted state, or duplicating a supported capability.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 647e62369ffb.

Labels

Label justifications:

  • P2: This addresses bounded but user-visible chat and sidebar responsiveness problems.
  • 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: The ordinary external-contributor proof gate does not apply to this verified repository-admin author. Inspected screenshots support preserved presentation, while reported browser and E2E checks exercise the changed UI owners; production after-fix timing is not claimed.

Evidence

What I checked:

  • Introduced production changes: Reviewed the pinned merge-base-to-head patch and affected production modules. Tab measurements retain one directive owner, collect reads before writes, and cancel subscriptions and queued work on directive disconnection; sidebar geometry is coalesced after rendering. (ui/src/components/panel-tab-strip.ts:73, d883c5b4b455)
  • Still necessary on current main: All three production files have identical blobs at fetched main and the introduction merge base. Main therefore still contains synchronous tab overflow measurements, immediate sidebar geometry reads, and unconditional Files header notifications. (ui/src/components/panel-tab-strip.ts:73, 647e62369ffb)
  • Latest-release check: The supplied latest release, v2026.9.5, also retains the synchronous label-overflow ref implementation; this optimization is not already present there. (ui/src/components/panel-tab-strip.ts:73, ec9c1a13db89)
  • Geometry consumer and regression coverage: The transcript consumer still synchronizes its position rail and skips row remeasurement when widthChanged is false. Added tests cover unchanged renders, read-before-write batching, physical overflow edges in both directions, disconnection/reconnection, geometry coalescing, and Files presentation changes. Tests were inspected, not executed. (ui/src/pages/chat/components/chat-transcript-virtualizer-host.ts:142, d883c5b4b455)
  • Dependency boundary: The introduced AsyncDirective import establishes a Lit lifecycle dependency; ui/package.json pins Lit 3.3.3. Nothing in the patch or its behavior claims establishes a Codex runtime dependency. (ui/src/components/panel-tab-strip.ts:2, d883c5b4b455)
  • Lit lifecycle contract: Inspected AsyncDirective source at [email protected]. It initializes connection state before update and invokes lifecycle callbacks when containing parts are cleared or their connection state changes. Repository ownership and the tag's commit were verified through GitHub. (packages/lit-html/src/async-directive.ts, 20afabd3c5bf)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-21T00:15:04.314Z sha d883c5b :: needs maintainer review before merge. :: none

@steipete
steipete merged commit 2969f4b into main Sep 21, 2026
169 of 170 checks passed
@steipete
steipete deleted the codex/ui-hover-performance branch September 21, 2026 00:33
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 21, 2026
…penclaw#154179)

* fix(ui): reduce layout stalls during chat and sidebar interactions

* test(ui): keep fresh tab fixtures without map spreads
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 P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L 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