Skip to content

refactor(ui): extract sidebar session-list render functions - #112753

Merged
steipete merged 6 commits into
mainfrom
sidebar-flatten-1-list-render
Jul 22, 2026
Merged

steipete merged 6 commits into
mainfrom
sidebar-flatten-1-list-render

Conversation

@steipete

@steipete steipete commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Control UI sidebar's session-list layer mixes DOM rendering with inherited element state, which makes the planned reactive-controller flattening harder to review safely. This is PR 1 of the planned controller-flattening series and isolates the low-risk List render boundary first.

Why This Change Was Made

The seven List render routines now live as pure free functions fed by one explicit state snapshot and callback context. renderSessions and the externally consumed pinned-session renderer remain thin class entry points; DOM order, CSS classes, keyed directives, and event semantics are unchanged.

AI-assisted change; the implementation and proof were reviewed with the repository autoreview workflow.

User Impact

None. This is a behavior-neutral refactor with no intended DOM or interaction changes.

Evidence

  • node scripts/run-vitest.mjs ui/src/components/app-sidebar.test.ts: 158 passed
  • node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.test.ui.json: passed on Blacksmith Testbox
  • node scripts/run-oxlint.mjs <touched files>: passed on the same Testbox
  • OPENCLAW_BUILD_PRIVATE_QA=1 node scripts/build-all.mjs qaRuntime && pnpm ui:build: passed, including the unchanged 315.0 KiB startup-JS guard
  • $HOME/.claude/skills/autoreview/scripts/autoreview --mode uncommitted: clean, no accepted/actionable findings
  • git diff --numstat origin/main...HEAD: +973/-749 across 7 files (net +224, primarily the explicit render context/callback contract); class file shrank from 711 to 204 lines and both new modules remain below 700 lines

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XL maintainer Maintainer-authored PR labels Jul 22, 2026
@steipete steipete self-assigned this Jul 22, 2026
@steipete
steipete marked this pull request as ready for review July 22, 2026 20:51
@steipete
steipete force-pushed the sidebar-flatten-1-list-render branch from e29413a to b6b767a Compare July 22, 2026 22:14
@steipete
steipete force-pushed the sidebar-flatten-1-list-render branch from 5167cd3 to 2b0f00f Compare July 22, 2026 22:51
@steipete
steipete merged commit db5e59d into main Jul 22, 2026
92 checks passed
@steipete
steipete deleted the sidebar-flatten-1-list-render branch July 22, 2026 23:30
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 23, 2026
…#112753)

* refactor(ui): extract sidebar session-list render functions

* refactor(ui): trim obsolete sidebar render wrappers

* refactor(ui): compact sidebar render snapshot

* refactor(ui): add sidebar startup margin

* refactor(ui): reduce sidebar render duplication

* refactor(ui): reduce sidebar render overhead
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 size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant