Repository navigation
refactor(ui): split browser panel into chrome renderers and a lifecycle controller - #113017
Conversation
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: refactor(ui): split browser panel into chrome renderers and a lifecycle controller This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: refactor(ui): split browser panel into chrome renderers and a lifecycle controller This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: refactor(ui): split browser panel into chrome renderers and a lifecycle controller This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Land-ready proof for exact head
The file-local max-lines suppression and baseline entry are removed. Resulting source files are 259, 700, 348, and 147 lines; the existing lazy browser-panel chunk boundary is preserved. |
0051ed4 to
ba5d64b
Compare
|
Merged via squash.
|
…le controller (openclaw#113017) * refactor(ui): split browser panel into chrome renderers and a lifecycle controller * fix(ui): keep browser panel mode internal * refactor(ui): clarify normalized browser panel request
What Problem This Solves
The embedded browser panel had grown to 1,312 lines and mixed dock chrome/rendering with browser-session lifecycle, remote navigation, screenshot capture, devtools inspection, and annotation state. It therefore remained behind a grandfathered max-lines suppression and was difficult to review or change safely.
Why This Change Was Made
This behavior-neutral split keeps dock/open/resize ownership in the custom element, moves browser-session and embedded-surface lifecycle into one Lit
ReactiveControllerwith a narrowBrowserPanelControllerHost, and moves chrome/toolbar templates plus pure surface geometry/compositing into free sibling functions. The existinglazy-custom-element.ts -> import(browser-panel.ts)boundary is unchanged, so all new siblings remain in the existing lazy browser-panel chunk.AI-assisted. I reviewed the complete original module, its direct importers, its importer suites, the browser client/annotation dependencies, and the sidebar-series controller/render precedents before cutting.
User Impact
None. This is a behavior-neutral ownership split; existing assertions and user-visible behavior are unchanged.
Evidence
browser-panel.test.ts,app-host.test.ts,lazy-custom-element.test.ts,browser-client.test.ts,browser-annotation.test.ts). No assertions were edited.node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.test.ui.jsonpassed on Blacksmith Testbox.node scripts/check-changed.mjs -- <five touched files>passed, including UI/core-test types, formatting, i18n, lint/guards, and the max-lines ratchet. After rebasing across the sibling suppression removals, the ratchet reports 1,133 grandfathered suppressions.pnpm ui:buildpassed. Startup JS is 323,394 bytes gzip versus the 323,435-byte baseline (-41 bytes), with 9 startup JS requests. The lazy browser-panel chunk is 10.13 KiB gzip. No[INEFFECTIVE_DYNAMIC_IMPORT]warning was emitted, and no static import of the lazy panel was introduced.origin/mainreported no accepted/actionable findings.max-linesdisable andconfig/max-lines-baseline.txtentry; every resulting source file is at most 700 lines.browser-panel.ts259,browser-panel-controller.ts700,browser-panel-render.ts348,browser-panel-surface.ts147.git diff --numstat origin/main...HEAD:0 1 config/max-lines-baseline.txt700 0 ui/src/components/browser/browser-panel-controller.ts348 0 ui/src/components/browser/browser-panel-render.ts147 0 ui/src/components/browser/browser-panel-surface.ts33 1086 ui/src/components/browser/browser-panel.tsNo screenshots are included because the refactor intentionally produces no visual change.