Generic checklist for reviewing DevTools CLs (your own before upload, or someone else's on Gerrit). Covers test correctness (tautological/vacuous tests, cleanup, leaks), code clarity, CL hygiene, and points to the specialized skills to consult for imports, UI, testing, strings, models, and verification. Use when asked to review a CL, a diff, a patch, or to self-review before `git cl upload`.
84%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
This checklist comes from recurring reviewer feedback on landed DevTools CLs. Use it for self-review before upload and for reviewing other people's CLs.
read_file to inspect enclosing classes/functions/tests and
search_files to verify callers or conventions across the repository.git diff origin/main...HEAD (or git show HEAD for a
single-commit branch). To learn about the branch and upload workflow, see the
devtools-version-control skill.)]}' line from each response to get JSON:
git cl diff (for the current branch), or fetch the patch set.curl -s https://chromium-review.googlesource.com/changes/devtools%2Fdevtools-frontend~<CL_NUMBER>/comments | tail -n +2.../changes/devtools%2Fdevtools-frontend~<CL_NUMBER>/messagesLoad the skill or .agents/rules/ files that match what the diff touches, and apply their rules:
| If the diff touches… | Load skill or rules |
|---|---|
Any import statement, or a new cross-module dependency | devtools-imports |
UI.Widget, lit-html views, components, CSS, or UI layout changes | ui-widgets, visual-regression-audit |
| Reviewing UI and widgets (`front_end/(panels | ui)/**/*.{ts,css}`) |
| Migration of legacy imperative DOM to widgets or Lit | ui-eng-vision-orchestrator (and its sub-skills) |
| New or changed tests: choosing unit, API, or E2E | devtools-testing-guidance |
Reviewing tests (*.test.ts, test/**, front_end/testing/**) | .agents/rules/tests/*.md |
Tests that use describeWithEnvironment or describeWithMockConnection, or foundation modules | foundation-test-migration |
Ported Chromium web tests (web_tests/http/tests/devtools) | migrate-chromium-test |
Flaky or disabled tests, or it.skip / it.skipOnPlatforms | fix-tests |
| Rendering user-controlled strings (URLs, names, console text) | devtools-unicode-escaping |
Adding or modifying UIStrings or @description / @example L10n comments | devtools-uistrings |
front_end/models/*, BUILD.gn, devtools_grd_files.gni, entrypoints | devtools-model-management |
| Reviewing foundation, models, and build configs (`front_end/(core | models |
Merging modules or consolidating BUILD.gn | merging-devtools-module |
Settings registrations and descriptors | devtools-setting-migration |
Stack traces, source maps, DebuggerWorkspaceBinding | devtools-source-maps |
| Building, running tests, or lint | devtools-verification |
foo.ts, foo-meta.ts), GN visibility and dependency edges,
strict core -> models -> ui -> panels layering, SettingDescriptor
placement in the lowest layer where used, public widget/component APIs
(DEFAULT_VIEW input/output contracts), CDP protocol contracts, and test
validity..agents/rules/.Check these guards before reporting any finding (including general review findings):
@SomeEvent=${handler} bindings on <devtools-widget> (or a
widget's element):
@SomeEvent=${handler} as "never fires" or "lowercased
by the HTML parser" when the child widget class is built with
Common.ObjectWrapper.eventMixin(...) on top of UI.Widget.Widget /
UI.Widget.VBox / UI.Widget.HBox:
eventMixin.dispatchEventToListeners (front_end/core/common/Object.ts)
also calls this.dispatchDOMEvent(new CustomEvent(eventType, {detail: eventData[0]})),
and Widget.dispatchDOMEvent dispatches it on widget.element (which
is the <devtools-widget> host element when instantiated with widget()).@, ., and ? binding names by
reading the original template strings (attrNames[] in
front_end/third_party/lit/lib/lit.js), not the lowercased attribute
names from the HTML parser. So @PaintProfilerRequested registers
addEventListener('PaintProfilerRequested', ...), and event.detail
carries the first payload argument.Common.ObjectWrapper.ObjectWrapper directly
or holds one by composition instead of eventMixin on UI.Widget (it
has no dispatchDOMEvent, so no DOM CustomEvent is fired).new CustomEvent(...) in Object.ts does not set
bubbles: true).@SomeEvent handler reads (event as any).data instead of
(event as CustomEvent<T>).detail.html template whitespace (front_end/ui/lit/strip-whitespace.ts):
html templates from ui/lit/lit.js.
DevTools' custom html tag strips \n\s* outside <...> tags at
runtime..css.js imports in <style>${styles}</style>:
*.css.js default imports into <style>
in Lit templates. Generated .css.js files export plain CSS strings, not
CSSStyleSheet objects.DOM.undo that
calls removeSection() directly, followed by an assertion that the section
was removed), the test checks the mock and nothing else. Mock the boundary
instead (for example, have the CDP stub emit CSSModel.Events.StyleSheetChanged)
and let production code react to it.initialize) that skip the code path under
test. These tests pass because nothing happens.assert.isNull(pane.node()) right after pane.setNodeForTest(null). Each
assertion should verify the behavior that the test name describes.Foo.test.ts should exercise
Foo. Move logic-only tests to the model's test file (for example,
CSSMatchedStyles.test.ts). Otherwise, render the UI and assert on the DOM.<body> of the main frame.devtools-testing-guidance.describeWithEnvironment or describeWithMockConnection: Flag newly
added describeWithEnvironment or describeWithMockConnection suite blocks
in new or migrated unit tests; prescribe plain describe (from 'mocha')
with TestUniverse and modular setup hooks (setupLocaleHooks(),
setupSettingsHooks(), setupRuntimeHooks(); see
foundation-test-migration) instead. Do not require a small bugfix CL that
only adds or updates an it() inside an untouched pre-existing
describeWithEnvironment or describeWithMockConnection suite to migrate the
whole file.aria-labels must match the
actual strings, for example "Show user agent shadow DOM" and not "User agent
shadow DOM". Check that the setting being toggled actually affects the
scenario.requestUpdate() state transitions: Bare waitFor('.pane') on an
already-mounted element resolves before the next animation frame runs
performUpdate(). Require a compound state selector such as
waitFor('.pane.minimized') or waitFor('.pane:not(.minimized)').<devtools-split-view> hidden sidebars: <devtools-split-view> hides
collapsed sidebars via hideWidget() (adding .hidden) instead of
detach(). Require :not(.hidden) in waitFor / waitForNone sidebar or
drawer selectors (for example .drawer-tabbed-pane:not(.hidden)).ViewInput callback signature changes, check untouched .test.ts
and .test.api.ts callers across the repository (devtools_entrypoint
bundles with esbuild and --skip-ninja skips tsc, so stale cross-module
callers are missed until front_end:unittests and front_end:api_tests
build). Also inspect untyped sinon.assert.calledOnceWithExactly(...) and
calledWith(...) calls, where TypeScript will not flag stale argument lists.front_end/BUILD.gn: When a CL adds a new
subdirectory :unittests, :foundation_unittests, or :api_tests target,
verify it is wired into the matching root group(...) in front_end/BUILD.gn
(see devtools-testing-guidance).TreeOutline, DataGrid, ListControl,
ListWidget), check that DOM/tree inspection is encapsulated in local test
helpers (dumpTree(), findTreeItem(), activateRow()) rather than
repeated across every it() block, and ask for assertScreenshot(...) golden
tests so visual regressions are caught independently of the legacy widget
implementation.beforeEach singleton creation with a cleanup in afterEach
(for example, CSSWorkspaceBinding.removeInstance() or
WorkspaceImpl.removeInstance()) so that state does not leak between tests.try { … } finally { clock.restore(); } or
afterEach(() => sinon.restore()) boilerplate: front_end/testing/test_setup.ts
automatically drains and restores Sinon fake timers, stubs, and spies after
every test, and @devtools/no-manual-sinon-restore flags .restore() inside
afterEach/after. Only call .restore() mid-test when re-stubbing a method
or returning to real timers inside the same it() block.restore() first. Sinon
throws Attempted to wrap … which is already wrapped when the object is the
same instance.if (!stub.called) … in a test that stubs the method only once).TextUtils.TextRange.TextRange.fromObject(...) directly instead of going
through rule.style.range.constructor.DEFAULT_VIEW or
*_VIEW functions that have zero production callers in the CL (unused views
staged for a later CL), stateless single-row/item child UI.Widget subclasses
where a LitTemplate helper in the parent view suffices, and call sites that
inline non-trivial shared helpers (such as UI.UIUtils.maybeCreateNewBadge)
instead of converting the shared helper to return LitTemplate.Bug: or Fixed: trailer, or Bug: None. Keep lines under 72
characters, and keep diffs at or under 350 changed lines (insertions + deletions)
where practical.<= 72
chars) must describe what the CL changes functionally, never which step or
pass of a migration it is (no Pass 1:, (2/6), or Step 3 of migration in
the subject; place stack context in the body if needed). Flag split CLs that
defer unit tests to a follow-up test-only CL or defer dead-code removal to a
cleanup-only tail CL.KEY=VALUE tags: Flag any column-0 lines matching
TAG=, CONV=, BUG=, FIXED=, or MARKDOWN=true. DevTools commit
descriptions must use standard Git trailers (such as Bug:, Fixed:, and
Ai-Assisted: true for AI-assisted CLs) rather than Piper tags, which break
Git trailer parsing and are rejected by PRESUBMIT.py. Agent conversations
should be linked out of band via
git config --global cl.upload-conversation-id true.Fixed: vs Bug:: Flag
Fixed: <id> on UI Eng Vision migration CLs when core violations remain in
the target file: legacy UI.TreeOutline or extends UI.TreeOutline.TreeElement
subclasses, UI.ListControl, UI.ListWidget, UI.InplaceEditor, non-MVP
constructors (missing element?: HTMLElement or injectable view = DEFAULT_VIEW),
missing static override readonly INJECT for Universe dependencies, custom
#renderView() helpers bypassing override performUpdate() +
this.requestUpdate(), constructor-bound model/setting listeners instead of
non-destructive wasShown()/willHide() subscriptions, synchronous
this.performUpdate() calls in presenter methods, or TypeScript private
fields not required by legacy_test_runner/blink/web_tests. Note
explicitly that a clean @devtools/no-imperative-dom-api lint pass does
not prove completeness because ESLint misses TreeElement subclasses and
UI.ListControl. Intermediate CLs in a multi-CL migration must use
Bug: <id>, reserving Fixed: <id> for the final CL.http/tests/devtools web tests: Flag presenters that
call synchronous this.performUpdate() solely to keep legacy chromium/src
http/tests/devtools/** web tests passing (when production code does not
immediately focus or measure rendered DOM). Update the web test or
*TestRunner.js helper to await UI.Widget.Widget.allUpdatesComplete (and
devtoolsTree.flushPendingUpdatesForTesting() when dumping <devtools-tree>)
instead.front_end/ui/legacy/ component contracts (such as exporting internal
classes or turning *ForTest() or *ForTesting() methods on Treeoutline.ts
into public APIs)..agents/ rules, skills, & docs/ changes: Whenever a CL adds a new
.agents/rules/<group>/*.md file, require registering its path in the root
DIR_METADATA agentic_review block (CheckDirMetadataFormat in
PRESUBMIT.py) so ChromiumCodeReviewAgent loads it. Verify that code
snippets in .agents/ and docs/ use valid TypeScript/GN syntax, reference
real repository class, method, and GN target names, and preserve coverage from
existing rule examples.devtools-verification.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.