Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Promotes legacy views to modern UI.Widget classes, hooks up performUpdate() rendering, and exports default views.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 22% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 56% | 0% |
| case-12 | ✗→✓ | ▲ Improved | -28% | 0% |
| case-15 | ✗→✓ | ▲ Improved | -26% | 0% |
| case-17 | ✗→✓ | ▲ Improved | -2% | 0% |
This subskill completes the architectural transition, upgrading the component from legacy base classes (like SimpleView or custom wrapper layouts) into clean UI.Widget classes that use native update rendering delegates.
devtools-ui-widgets.UI.Widget (or specializedsub-layouts like UI.Widget.VBox).
initializations or access .element directly for manual append operations.
VBox and HBox inherit directly from Widget. They fully support view injection (view = DEFAULT_VIEW), performUpdate(), and requestUpdate() without modification.view layout:
typescript export const DEFAULT_VIEW: View = (input, output, target) => { Lit.render(html..., target); };
docs/ui_engineering.md), and use static INJECT if requesting dependencies from Universe:typescript class MyWidget extends UI.Widget.VBox { static override readonly INJECT = SDK.TargetManager.TargetManager] as const;
#targetManager: SDK.TargetManager.TargetManager; #view: View; constructor( element?: HTMLElement, targetManager]: UI.Widget.WidgetDependencies<typeof MyWidget> = ], view: View = DEFAULT_VIEW, ) { super(element); this.#targetManager = targetManager; this.#view = view; }
performUpdate() override on the widget:typescript override performUpdate(): void { this.#view(this.viewInput, this.viewOutput, this.contentElement); }
LegacyWrapper bindings or custom wrappable custom elements.<devtools-widget>declarative entries:
typescript html<devtools-widget .widgetConfig=${widgetConfig(MyWidgetClass, params])}></devtools-widget>
ApplicationPanelSidebar.ts) anddecouple any direct accesses to .element.
Before reporting back or committing, re-read the instructions and verify:
.element or .contentElement couplings from instantiator files?UI.Widget or its variants?Other measured skills in the registry, with their headline benchmark lift.