High-level orchestrator for managing multi-pass migration of Chrome DevTools legacy components to the modern UI engineering vision (UI.Widget & Lit-html).
68%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.agents/skills/ui-eng-vision-orchestrator/SKILL.mdThis meta-skill acts as the central coordinator for modernizing legacy Chrome
DevTools views into declarative UI.Widget components based on lit-html,
managing a multi-pass sequential CL pipeline to ensure each code modification is
small, testable, and highly reviewable.
Refer to ui_engineering.md for general principles.
< 150 LOC leaf widgets). Keep CLs small and focused.migration_plan.md listing
the exact transformations, file targets, and subskills allocated for each
pass.front_end/ui/components/**, front_end/ui/kit/** — shared buttons, menus, dialogs, links, badges, or trees reused across panels) must remain custom elements (HTMLElement). Do not migrate them to UI.Widget or DEFAULT_VIEW.extends HTMLElement or LitElement under front_end/panels/**/components/ used solely for encapsulation in one feature or panel) should migrate to UI.Widget + DEFAULT_VIEW + @scope to (devtools-widget > *)..element or .contentElement couplings. If found,
include the decoupling of these references in the plan.DOMStorageItemsView.ts or
KeyValueStorageItemsView.ts for storage-like components) to find proven
patterns for toolbar and data-grid configurations.~35–200 LOC Target, <= 350 Ceiling) & 100% Live-Code Rule:
Aim for ~35–200 LOC in-place CLs (small < 150 LOC leaf widgets may
complete in one CL), and keep every CL at or under 350 changed lines
(insertions + deletions). Every CL must
execute 100% of its new view and presenter code in production, remove the
imperative code it replaces, and include unit tests covering that behavior in
the same CL. Never create a CL that adds an unused DEFAULT_VIEW or
*_VIEW export, defers unit tests to a follow-up test-only CL, or defers
imperative dead-code removal to a cleanup-only tail CL. The agent must stop
and report back after each step or substep to allow verification.legacy_test_runner & blink/web_tests):
Before converting TypeScript private fields/methods to ES #private or
removing widget properties (e.g., .tabbedPane, .sidebarPaneStack,
.threadsSidebarPane, .searchInputElement), search both
front_end/legacy_test_runner/**/*.js and Chromium's
third_party/blink/web_tests/http/tests/devtools/**/*.js (which run on
dtf_linux_rel CQ via blink_web_tests and reflectively access private
members in untyped JS). Keep accessed members as TypeScript private with a
// Accessed in web_tests / legacy_test_runner comment, or migrate the
web_tests first in a dedicated CL.<= 350 Lines): When a migration exceeds 350 lines, split using one of three live-code patterns: (a) one live class or low-fanout shared helper per CL (leaf-to-root, wired to callers and tested immediately), (b) 2-pass Local Lit in performUpdate() -> UI.Widget + DEFAULT_VIEW promotion (Pass 1 renders Lit templates live in performUpdate(), removes imperative DOM, and tests behavior; Pass 2 promotes to DEFAULT_VIEW and createViewFunctionStub tests), or (c) vertical UI compartment slices (migrating one toolbar, settings pane, split pane, or formatter batch end-to-end per CL).ui/legacy, ui/kit, or UI.UIUtils changes (e.g., converting a low-fanout helper like UI.UIUtils.maybeCreateNewBadge to return LitTemplate across its callers, or adding an HTML-native ID/attribute API to <devtools-menu>) in separate, preceding CLs rather than inlining helper internals or adding ref(...) workarounds at call sites. Always verify with cog_api.py diff before uploading that no changes from later commits leaked into earlier infrastructure CLs.Bug: <id> on intermediate CLs, Fixed: <id> only on the final complete CL). Write descriptive <= 72-character subject lines stating what each CL changes functionally, without pass or step numbers (Pass 1:, (2/6)) in the subject line.@scope CLs: Migrating a Light DOM widget includes
ensuring its stylesheet is wrapped in @scope to (devtools-widget > *)
(removing the file from the @devtools/no-unscoped-light-dom-styles
burndown list in eslint.config.mjs once scoped). Always land this
in a small, standalone CSS CL separate from logic, template, or
widget-promotion CLs for bisectability, with screenshot baselines
established beforehand.ReportView, ToolbarButton, DataGrid, TreeOutline), and
actual class inheritance. Deconstruct the file mentally (or in the plan)
into Business Logic (state, event handlers) and Rendering Logic
(DOM creation, CSS classes). Reference code elements by Name (not
line numbers) to ensure the plan remains valid as the codebase evolves.
Check if the class dependencies have been migrated to the ui eng vision
or not. If the file contains multiple classes, plan the migration
separately for each class, starting with the leaves and going up the
dependency chain.ViewInput
interface first provides a clean data contract, making the
subsequent template conversion highly deterministic.migration_plan.md using the Structured Plan Template below.The plan you generate MUST follow this structure:
# Migration Plan: [FileName.ts]
## 📊 Current State
- **Hybrid File**: [Yes/No]
- **Classes Found**: [ClassA, ClassB]
- **Strategy Selection**: [Option A (Logic First) | Option B (Tech First)]
## 🛠️ Passes Checklist
- [ ] **Pass 0: Baseline & Safety Scaffolding**
- Assigned to: `ui-eng-vision-test-scaffolder`
- [ ] **Pass 0.5: Privatize & Dead-Code Cleanup**
- Mechanical prefactor: convert TypeScript `private` to ES `#private` and remove dead code
- [ ] **Pass 0.75: Light DOM CSS @scope Wrapping (Standalone CL)**
- Ensure stylesheet is wrapped in `@scope to (devtools-widget > *)` and remove entry from the `@devtools/no-unscoped-light-dom-styles` burndown list in `eslint.config.mjs`
- [ ] **Pass 1: Logic Consolidation**
- Assigned to: `ui-eng-vision-logic-consolidator`
- [ ] **Pass 2: Lit-HTML Rendering**
- Assigned to: `ui-eng-vision-local-lit-renderer`
- [ ] **Pass 3: Widget Promotion**
- Assigned to: `ui-eng-vision-widget-promoter`ui-eng-vision-test-scaffolder (Delegate to a subagent to encapsulate verbose test logs)legacy_test_runner and blink_web_tests first.private fields/methods to ES #private (except those reflectively accessed by web tests).
@devtools/prefer-private-class-members ignore list in eslint.config.mjs (never combine a top-level inline /* eslint-disable @devtools/prefer-private-class-members */ with an eslint.config.mjs ignore entry, because eslint --fix strips the inline disable while the rule is off in eslint.config.mjs)../dt lint <file> to apply the AST autofixer, then manually convert cross-instance other.m() calls and rewrite this.#fn = this.#fn.bind(this) to arrow properties (#fn = (): void => { ... }). Preserve TypeScript private with // eslint-disable-next-line @devtools/prefer-private-class-members only for Object.create prototypes or legacy *TestRunner.js / blink/web_tests hooks.@scope to (devtools-widget > *).@devtools/no-unscoped-light-dom-styles burndown list in eslint.config.mjs.ui-eng-vision-logic-consolidator (Delegate to a subagent to maintain focus)ui-eng-vision-local-lit-renderer (Delegate to a subagent for isolated template generation)ui-eng-vision-widget-promoter (Delegate to a subagent for final architectural cleanup)UI.Widget classes, hook up
performUpdate() delegates, export the default view layout, and clean
up legacy wrappers.UI.TreeOutline → <devtools-tree>)For complex widgets with deeply nested item hierarchies, custom tree element
subclasses, or inline editing (such as NavigatorView or SearchResultsPane),
monolithic migrations introduce high review friction and regression risk.
Decompose the work into a 4-phase sequence of small, self-contained CLs
(~50–250 lines of diff each):
dumpTree(), findTreeItem(), activateRow(), openContextMenuOnRow())
rather than scattering direct tree-outline element queries across tests.assertScreenshot(...) golden tests covering
critical visual states (grouping modes, icons/badges, selection, dimmed
items) to establish baselines that catch visual regressions independently of
the underlying widget engine.Bug: <id>)updateTrailingIcons(), updateIcon()) from
presenter nodes once state moves to DEFAULT_VIEW.WeakSet), and
lazy population in the presenter via tree events rather than overriding
TreeElement.onpopulate() or onselect().TreeElement subclasses one
class per CL, using plain UI.TreeOutline.TreeElement instances paired with
a WeakMap<TreeElement, Node> bridge and computing presenter node state
(title, tooltip, badges) independently of TreeElement creation.<devtools-prompt> & <devtools-tree> Swap (Bug: <id>)<devtools-prompt ?editing>: Migrate inline renaming or
editing (UI.InplaceEditor) to a persistent <devtools-prompt ?editing> in
its own CL, updating E2E tests waiting on .being-edited to wait on
devtools-prompt[editing].front_end/legacy_test_runner/** or
blink_web_tests walk internal tree elements, update test helpers to flush
innerView.performUpdate() and flushPendingUpdatesForTesting() after
expanding nodes.<devtools-tree> Swap: Replace TreeOutlineInShadow with
<devtools-tree autofocus> in DEFAULT_VIEW without widening
front_end/ui/legacy/Treeoutline.ts contracts. Host editable
<devtools-prompt ?editing> rows in a child UI.Widget (${widget(...)})
so <devtools-tree>'s light-DOM MutationObserver does not re-clone the
row and blur the active input. Use asynchronous this.requestUpdate() across
all presenter methods and remove
/* eslint-disable @devtools/no-imperative-dom-api */.INJECT DI & Final Polish (Fixed: <id> on Final CL Only)constructor() into wasShown() / willHide(),
reconciling incremental changes that occurred while hidden rather than
calling reset() and wiping open folders or selection on every re-show.Universe dependencies are used,
add static override readonly INJECT and the standard MVP constructor
(element?: HTMLElement, [...]: WidgetDependencies, view: View = DEFAULT_VIEW)
(omit the WidgetDependencies parameter when INJECT is empty).private
members to #private (after verifying they are not reflectively accessed in
legacy_test_runner or blink/web_tests), and mark Fixed: <id> on this
final CL.Bug: vs Fixed: Completeness Gate[!WARNING] A clean
@devtools/no-imperative-dom-apiESLint run does NOT prove a UI Eng Vision migration is complete. The rule does not flagextends UI.TreeOutline.TreeElementsubclasses,new MyTreeElementSubclass(...),UI.InplaceEditor, unchainedcreateIcon()calls (for example, passed directly tothis.setLeadingIcons([icon])), or unattachednew UI.{TabbedPane,TextPrompt,FilterBar}instances (when not attached tothis.elementorthis.contentElement). Conversely, non-UI.Widgethelper classes that ownthis.elementorthis.contentElementare flagged. To inspect suppressed violations despite a file-level disable, run from thedevtools-frontendroot:vpython3 third_party/node/node.py --output node_modules/eslint/bin/eslint.js --no-inline-config --rule '@devtools/no-imperative-dom-api: error' -f json <file>
Before closing a UI Eng Vision migration issue with Fixed: <id>, verify every
requirement below. If any item remains incomplete, use Bug: <id> and address
it in a follow-up CL:
UI.TreeOutline, TreeElement
subclasses, UI.ListControl, UI.ListWidget, or UI.InplaceEditor.element?: HTMLElement as
its first parameter, receives [...]: UI.Widget.WidgetDependencies<typeof MyWidget>
as parameter #2 only when static override readonly INJECT is non-empty,
and accepts an injectable view: View = DEFAULT_VIEW last.override performUpdate(): void
and this.requestUpdate() (no custom #renderView() bypasses or synchronous
performUpdate() calls in presenter methods).wasShown() and detached symmetrically in
willHide(), preserving populated UI state across hide/show cycles.<devtools-tree>, <devtools-list>,
persistent <devtools-prompt ?editing>, ?hidden=${...} exclusively
(without .hidden classes), and declarative autofocus for default focus.#private fields and
methods for all internal members not on Object.create prototypes or
accessed by legacy_test_runner / blink/web_tests, removes the file from
the @devtools/prefer-private-class-members ignore list in
eslint.config.mjs, and passes ./dt lint <file>.ChromeDevTools/devtools-frontend
9d90722
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.