chrome-devtools-frontend 1.0.1716465 → 1.0.1717709

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/.agents/skills/devtools-model-management/SKILL.md +4 -4
  2. package/.agents/skills/devtools-setting-migration/SKILL.md +1 -1
  3. package/.agents/skills/devtools-testing-guidance/SKILL.md +4 -2
  4. package/.agents/skills/devtools-verification/SKILL.md +9 -5
  5. package/.agents/skills/fix-tests/SKILL.md +1 -1
  6. package/.agents/skills/foundation-test-migration/SKILL.md +2 -2
  7. package/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +57 -9
  8. package/.agents/skills/ui-eng-vision-logic-consolidator/SKILL.md +27 -3
  9. package/.agents/skills/ui-eng-vision-orchestrator/SKILL.md +32 -2
  10. package/.agents/skills/ui-eng-vision-test-scaffolder/SKILL.md +39 -10
  11. package/.agents/skills/ui-eng-vision-widget-promoter/SKILL.md +4 -4
  12. package/.agents/skills/ui-widgets/SKILL.md +8 -8
  13. package/docs/README.md +1 -1
  14. package/docs/contributing/README.md +3 -3
  15. package/docs/cookbook/dependencies.md +1 -1
  16. package/docs/get_the_code.md +35 -26
  17. package/docs/ui_engineering.md +34 -0
  18. package/dt +7 -0
  19. package/dt.bat +8 -0
  20. package/front_end/core/common/ParsedURL.ts +1 -1
  21. package/front_end/core/common/Settings.ts +5 -0
  22. package/front_end/core/host/UserMetricsEnums.ts +1 -0
  23. package/front_end/core/sdk/CSSModel.ts +21 -0
  24. package/front_end/core/sdk/CSSPropertyParser.ts +11 -2
  25. package/front_end/core/sdk/DOMModel.ts +1 -1
  26. package/front_end/core/sdk/DebuggerModel.ts +3 -0
  27. package/front_end/core/sdk/EmulationModel.ts +40 -39
  28. package/front_end/core/sdk/NetworkManager.ts +1 -0
  29. package/front_end/core/sdk/NetworkRequest.ts +21 -0
  30. package/front_end/core/sdk/PageResourceLoader.ts +141 -21
  31. package/front_end/core/sdk/ResourceTreeModel.ts +34 -10
  32. package/front_end/core/sdk/RuntimeModel.ts +8 -3
  33. package/front_end/devtools_compatibility.js +1 -0
  34. package/front_end/generated/Deprecation.ts +1 -8
  35. package/front_end/generated/InspectorBackendCommands.ts +2 -1
  36. package/front_end/generated/protocol-mapping.d.ts +8 -1
  37. package/front_end/generated/protocol-proxy-api.d.ts +7 -1
  38. package/front_end/generated/protocol.ts +9 -1
  39. package/front_end/models/ai_assistance/AiAgent2.ts +11 -5
  40. package/front_end/models/ai_assistance/AiConversation.ts +3 -2
  41. package/front_end/models/ai_assistance/AiUtils.ts +5 -2
  42. package/front_end/models/ai_assistance/README.md +2 -2
  43. package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +9 -4
  44. package/front_end/models/ai_assistance/agents/AiAgent.ts +247 -121
  45. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +9 -5
  46. package/front_end/models/ai_assistance/agents/NetworkAgent.snapshot.txt +2 -2
  47. package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +1 -1
  48. package/front_end/models/ai_assistance/contexts/RequestContext.snapshot.txt +2 -2
  49. package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +2 -2
  50. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +9 -6
  51. package/front_end/models/ai_assistance/performance/AIQueries.ts +2 -1
  52. package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +62 -23
  53. package/front_end/models/ai_assistance/tools/RunLighthouse.ts +6 -3
  54. package/front_end/models/ai_assistance/tools/Tool.ts +5 -1
  55. package/front_end/models/bindings/CompilerScriptMapping.ts +40 -8
  56. package/front_end/models/bindings/ResourceScriptMapping.ts +22 -3
  57. package/front_end/models/comment_manager/CommentThread.ts +13 -0
  58. package/front_end/models/computed_style/ComputedStyleModel.ts +1 -0
  59. package/front_end/models/issues_manager/GenericIssue.ts +18 -0
  60. package/front_end/models/issues_manager/descriptions/genericGeolocationPromptWithoutUserGesture.md +5 -0
  61. package/front_end/models/javascript_metadata/NativeFunctions.ts +0 -4
  62. package/front_end/models/lighthouse/RunTypes.ts +16 -0
  63. package/front_end/models/stack_trace/StackTrace.ts +10 -0
  64. package/front_end/models/stack_trace/StackTraceImpl.ts +15 -0
  65. package/front_end/models/stack_trace/StackTraceModel.ts +24 -3
  66. package/front_end/models/trace/Processor.ts +7 -9
  67. package/front_end/models/trace/extras/StackTraceForEvent.ts +1 -2
  68. package/front_end/models/trace/extras/TraceTree.ts +1 -1
  69. package/front_end/models/trace/handlers/AnimationFramesHandler.ts +4 -3
  70. package/front_end/models/trace/handlers/AsyncJSCallsHandler.ts +10 -9
  71. package/front_end/models/trace/handlers/ImagePaintingHandler.ts +6 -6
  72. package/front_end/models/trace/handlers/InitiatorsHandler.ts +6 -6
  73. package/front_end/models/trace/handlers/InvalidationsHandler.ts +2 -4
  74. package/front_end/models/trace/handlers/LayerTreeHandler.ts +3 -3
  75. package/front_end/models/trace/handlers/MetaHandler.ts +1 -1
  76. package/front_end/models/trace/handlers/NetworkRequestsHandler.ts +5 -5
  77. package/front_end/models/trace/handlers/PageLoadMetricsHandler.ts +9 -9
  78. package/front_end/models/trace/handlers/ScriptsHandler.ts +2 -2
  79. package/front_end/models/trace/handlers/UserInteractionsHandler.ts +1 -1
  80. package/front_end/models/trace/handlers/WarningsHandler.ts +3 -3
  81. package/front_end/models/trace/handlers/helpers.ts +8 -5
  82. package/front_end/models/trace/helpers/Timing.ts +20 -26
  83. package/front_end/models/trace/helpers/Trace.ts +41 -14
  84. package/front_end/models/trace/insights/DuplicatedJavaScript.ts +12 -2
  85. package/front_end/models/trace/lantern/core/NetworkAnalyzer.ts +15 -1
  86. package/front_end/models/trace/types/TraceEvents.ts +213 -143
  87. package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingView.ts +46 -0
  88. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +23 -2
  89. package/front_end/panels/ai_assistance/README.md +3 -1
  90. package/front_end/panels/ai_assistance/components/ChatMessage.ts +1 -1
  91. package/front_end/panels/application/AppManifestView.ts +27 -8
  92. package/front_end/panels/application/serviceWorkersView.css +1 -1
  93. package/front_end/panels/comments/CommentsPane.ts +88 -35
  94. package/front_end/panels/comments/comments-meta.ts +1 -1
  95. package/front_end/panels/comments/commentsPane.css +42 -1
  96. package/front_end/panels/common/CommentThreadWidget.ts +67 -25
  97. package/front_end/panels/common/CommentsOverlayWidget.ts +13 -0
  98. package/front_end/panels/elements/DOMTreeElementWidget.ts +508 -747
  99. package/front_end/panels/elements/DOMTreeWidget.ts +418 -502
  100. package/front_end/panels/elements/PropertyRenderer.ts +103 -10
  101. package/front_end/panels/elements/StylePropertiesSection.ts +1 -1
  102. package/front_end/panels/elements/StylePropertyTreeElement.ts +107 -18
  103. package/front_end/panels/elements/stylePropertiesTreeOutline.css +6 -1
  104. package/front_end/panels/emulation/deviceModeView.css +3 -3
  105. package/front_end/panels/layer_viewer/Layers3DView.ts +6 -6
  106. package/front_end/panels/lighthouse/LighthouseController.ts +28 -21
  107. package/front_end/panels/lighthouse/LighthousePanel.ts +5 -6
  108. package/front_end/panels/lighthouse/LighthouseProtocolService.ts +27 -16
  109. package/front_end/panels/recorder/recordingView.css +1 -1
  110. package/front_end/panels/screencast/ScreencastApp.ts +2 -2
  111. package/front_end/panels/screencast/ScreencastView.ts +76 -45
  112. package/front_end/panels/settings/SettingsScreen.ts +6 -1
  113. package/front_end/panels/sources/BreakpointEditDialog.ts +3 -6
  114. package/front_end/panels/sources/DebuggerPlugin.ts +1 -1
  115. package/front_end/panels/sources/SourcesPanel.ts +511 -374
  116. package/front_end/panels/sources/sourcesPanel.css +6 -31
  117. package/front_end/panels/timeline/CountersGraph.ts +6 -5
  118. package/front_end/panels/timeline/Initiators.ts +1 -1
  119. package/front_end/panels/timeline/TimelineFlameChartView.ts +10 -19
  120. package/front_end/panels/timeline/TimelineMiniMap.ts +11 -19
  121. package/front_end/panels/timeline/TimelinePanel.ts +90 -43
  122. package/front_end/panels/timeline/TimelineUIUtils.ts +2 -2
  123. package/front_end/panels/timeline/components/BreadcrumbsUI.ts +109 -87
  124. package/front_end/panels/timeline/components/LayoutShiftDetails.ts +3 -3
  125. package/front_end/panels/timeline/components/breadcrumbsUI.css +43 -24
  126. package/front_end/panels/timeline/overlays/components/TimeRangeOverlay.ts +21 -11
  127. package/front_end/panels/timeline/utils/EntryNodes.ts +1 -1
  128. package/front_end/third_party/chromium/README.chromium +1 -1
  129. package/front_end/third_party/puppeteer/README.chromium +2 -2
  130. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +42 -12
  131. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +154 -26
  132. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.d.ts +47 -7
  133. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.d.ts.map +1 -1
  134. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.js +56 -4
  135. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.js.map +1 -1
  136. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts +6 -4
  137. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts.map +1 -1
  138. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js +5 -2
  139. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js.map +1 -1
  140. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPRequest.d.ts +3 -3
  141. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
  142. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPRequest.js.map +1 -1
  143. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts +2 -1
  144. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts.map +1 -1
  145. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js +23 -11
  146. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js.map +1 -1
  147. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.d.ts +3 -3
  148. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
  149. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.js +1 -2
  150. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.js.map +1 -1
  151. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.d.ts +13 -7
  152. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
  153. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.js +26 -11
  154. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.js.map +1 -1
  155. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts +2 -1
  156. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts.map +1 -1
  157. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js.map +1 -1
  158. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/TargetManager.d.ts.map +1 -1
  159. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/TargetManager.js +69 -13
  160. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/TargetManager.js.map +1 -1
  161. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts +10 -0
  162. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts.map +1 -1
  163. package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.d.ts +3 -3
  164. package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js +3 -3
  165. package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js.map +1 -1
  166. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
  167. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
  168. package/front_end/third_party/puppeteer/package/lib/types.d.ts +42 -12
  169. package/front_end/third_party/puppeteer/package/package.json +4 -4
  170. package/front_end/third_party/puppeteer/package/src/api/HTTPRequest.ts +103 -11
  171. package/front_end/third_party/puppeteer/package/src/api/Page.ts +11 -6
  172. package/front_end/third_party/puppeteer/package/src/bidi/HTTPRequest.ts +4 -4
  173. package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +26 -14
  174. package/front_end/third_party/puppeteer/package/src/cdp/HTTPRequest.ts +7 -7
  175. package/front_end/third_party/puppeteer/package/src/cdp/NetworkManager.ts +40 -18
  176. package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +2 -3
  177. package/front_end/third_party/puppeteer/package/src/cdp/TargetManager.ts +87 -14
  178. package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +10 -0
  179. package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
  180. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  181. package/front_end/third_party/source-map-scopes-codec/README.chromium +2 -2
  182. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/decode/decode.d.ts +2 -0
  183. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/decode/decode.d.ts.map +1 -1
  184. package/front_end/third_party/source-map-scopes-codec/package/deno.json +1 -1
  185. package/front_end/third_party/source-map-scopes-codec/package/package.json +1 -1
  186. package/front_end/third_party/source-map-scopes-codec/package/src/codec.js +2 -2
  187. package/front_end/third_party/source-map-scopes-codec/package/src/codec.ts +2 -2
  188. package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js +19 -1
  189. package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js.map +1 -1
  190. package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.ts +26 -4
  191. package/front_end/ui/comments/CommentAnchorResolver.ts +2 -0
  192. package/front_end/ui/components/buttons/Button.ts +9 -1
  193. package/front_end/ui/components/buttons/button.css +4 -0
  194. package/front_end/ui/components/helpers/scheduled-render.ts +1 -1
  195. package/front_end/ui/legacy/GlassPane.ts +1 -1
  196. package/front_end/ui/legacy/SplitWidget.ts +10 -9
  197. package/front_end/ui/legacy/Toolbar.ts +1 -107
  198. package/front_end/ui/legacy/UIUtils.ts +133 -11
  199. package/front_end/ui/legacy/Widget.ts +5 -1
  200. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +5 -2
  201. package/front_end/ui/legacy/components/object_ui/objectPopover.css +1 -1
  202. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +47 -15
  203. package/front_end/ui/legacy/components/perf_ui/TimelineGrid.ts +1 -1
  204. package/front_end/ui/legacy/components/utils/Linkifier.ts +2 -2
  205. package/front_end/ui/legacy/theme_support/ThemeSupport.ts +6 -5
  206. package/front_end/ui/visual_logging/KnownContextValues.ts +44 -0
  207. package/front_end/ui/visual_logging/LoggingDriver.ts +4 -4
  208. package/package.json +3 -3
  209. package/.agents/skills/devtools-ux-writing-refactor/SKILL.md +0 -143
@@ -9,7 +9,7 @@ This guide outlines the standard procedure for creating a new model or migrating
9
9
 
10
10
  ## 0. Preparation (Before you start)
11
11
  * **Baseline:** Run existing tests for the code you are moving to ensure they pass *before* you touch anything.
12
- * `npm run test -- front_end/<old_location>`
12
+ * `./dt test front_end/<old_location>`
13
13
  * **Impact Analysis:** Search for usages of the class/file to understand the scope of refactoring.
14
14
  * `grep -r "ClassName" front_end/`
15
15
 
@@ -44,10 +44,10 @@ The build system does not auto-detect new modules. You must manually register th
44
44
 
45
45
  ## 5. Verification Checklist
46
46
  1. **Build:** `autoninja -C out/Default` (Ensures BUILD.gn and GRD files are correct).
47
- 2. **Lint:** `npm run lint` (Checks style and formatting).
47
+ 2. **Lint:** `./dt lint` (Checks style and formatting).
48
48
  3. **Test:**
49
- * `npm run test -- front_end/models/<model_name>` (New tests).
50
- * `npm run test -- front_end/<old_location>` (Regression check for previous owner).
49
+ * `./dt test front_end/models/<model_name>` (New tests).
50
+ * `./dt test front_end/<old_location>` (Regression check for previous owner).
51
51
 
52
52
  ## Common Pitfalls
53
53
  * **Circular Dependencies:** Occur when internal files import from the directory's own barrel file.
@@ -144,7 +144,7 @@ const setting = Common.Settings.Settings.instance().resolve(preserveConsoleLogSe
144
144
 
145
145
  ### Step 6: Verify Changes
146
146
  1. Run `autoninja -C out/Default` to check GN build.
147
- 2. Run `npm run lint` to check style and formatting rules.
147
+ 2. Run `./dt lint` to check style and formatting rules.
148
148
  3. Run relevant unit tests for the modified module.
149
149
 
150
150
  ---
@@ -37,7 +37,8 @@ Use API tests for integration tests that verify business logic requiring more co
37
37
  - Tests that require extensive CDP mock setup.
38
38
  - Verifying the "foundational layer" of DevTools models against a real browser/web page.
39
39
  - **Location:** Defined in `front_end/` with `.test.api.ts` extension (e.g. `Universe.test.api.ts`).
40
- - **BUILD.gn**: test file should be added to `devtools_api_test_module("api_tests")` target in the corresponding `BUILD.gn` file.
40
+ - **Test functions:** import `describe`, `it` and `setup` from `test/api/mocha-interface.ts`. They are not available as globals.
41
+ - **BUILD.gn**: test file should be added to `devtools_api_test_module("api_tests")` target in the corresponding `BUILD.gn` file, which needs `test/api` in its `ts_deps`.
41
42
 
42
43
  ---
43
44
 
@@ -49,4 +50,5 @@ Use E2E tests to verify real end-to-end user stories and user journeys.
49
50
  - Verifying full user journeys across DevTools panels and drawers.
50
51
  - Complex UI behaviors that require extensive user interaction setup and benefit from a complete DevTools frontend page connected to an inspected target page over CDP.
51
52
  - **Location:** Defined in `test/e2e/` (e.g. `test/e2e/console/console-log.test.ts`).
52
- - **BUILD.gn**: test file should be added to `ts_e2e_library(ts_e2e_library)` target in the corresponding `BUILD.gn` file. And `node_ts_library` in `test/e2e/BUILD.gn` for its dependencies.
53
+ - **Test functions:** import `describe`, `it` and `setup` from `test/e2e/conductor/mocha-interface.ts` (e.g. `import {describe, it} from '../conductor/mocha-interface.js';`). They are not available as globals.
54
+ - **BUILD.gn**: test file should be added to the `node_ts_library` target in the corresponding `BUILD.gn` file, which needs `"../conductor:implementation"` in its `ts_deps`. And `node_ts_library` in `test/e2e/BUILD.gn` for its dependencies.
@@ -1,15 +1,19 @@
1
1
  ---
2
2
  name: devtools-verification
3
- description: "MANDATORY: Activate this skill ANY TIME you need to build the project, run tests, or verify code health in DevTools. You MUST use this skill before executing commands like npm test, npm run build, autoninja, or linters, as it contains critical, repository-specific instructions on how to correctly format these commands, filter test runs, and interpret failures."
3
+ description: "MANDATORY: Activate this skill ANY TIME you need to build the project, run tests, or verify code health in DevTools. You MUST use this skill before executing commands like ./dt test, ./dt build, autoninja, or linters (never run these through npm or npx), as it contains critical, repository-specific instructions on how to correctly format these commands, filter test runs, and interpret failures."
4
4
  ---
5
5
 
6
6
  # Instructions on how to verify your changes
7
7
 
8
+ ## Running scripts
9
+
10
+ Run the scripts from the root `package.json` (`test`, `lint`, `build`, `start`, and so on) with `./dt <script> [args]` from the repository root (on Windows: `.\dt <script> [args]`). Don't use `npm run`, `npm test`, or `npx` for them. Run `./dt` without arguments to list the available scripts. Arguments after the script name are passed to the script as is, so don't add a `--` separator.
11
+
8
12
  ## Testing
9
13
 
10
- - To test a file, you can run `npm run test -- <FILEPATH>` where `FILEPATH` is a path to a `*.test.ts` file, relative to the working directory.
14
+ - To test a file, you can run `./dt test <FILEPATH>` where `FILEPATH` is a path to a `*.test.ts` file, relative to the working directory.
11
15
  - Test files are usually defined alongside their implementation. So if you are working on `front_end/panels/timeline/TimelinePanel.ts`, you would expect the test file to be defined in `front_end/panels/timeline/TimelinePanel.test.ts`.
12
- - You can also test an entire directory. For example, `npm run test -- front_end/models/trace` will run all tests in that directory.
16
+ - You can also test an entire directory. For example, `./dt test front_end/models/trace` will run all tests in that directory.
13
17
 
14
18
  ## Building & compiling
15
19
 
@@ -17,8 +21,8 @@ description: "MANDATORY: Activate this skill ANY TIME you need to build the proj
17
21
 
18
22
  ## Linting
19
23
 
20
- - `npm run lint` will execute ESLint and StyleLint. It will report any violations and automatically fix them where possible.
21
- - To run the linter on a specific file or directory, you can run `npm run lint -- <PATH>` where `PATH` is a path to a file or directory. This will also automatically fix violations where possible.
24
+ - `./dt lint` will execute ESLint and StyleLint. It will report any violations and automatically fix them where possible.
25
+ - To run the linter on a specific file or directory, you can run `./dt lint <PATH>` where `PATH` is a path to a file or directory. This will also automatically fix violations where possible.
22
26
 
23
27
  ## Fetching Tryjob Results, Failure Logs, & Screenshot Goldens
24
28
 
@@ -22,7 +22,7 @@ First, create and start two sub-agents simultaneously. One called 'local-repro'
22
22
 
23
23
  ### Local reproduction (local-repro)
24
24
 
25
- - Use command: `npm run test -- --repeat=<count> path/to/foo.test.ts:exact_test_id` to locally run the tests repeatedly. Both E2E and unit tests support this. Use the exact test ID printed in the test runner output (usually the suite and test names with spaces replaced by underscores). Do not use `--grep` or a `bash` script with a `for` loop.
25
+ - Use command: `./dt test --repeat=<count> path/to/foo.test.ts:exact_test_id` to locally run the tests repeatedly. Both E2E and unit tests support this. Use the exact test ID printed in the test runner output (usually the suite and test names with spaces replaced by underscores). Do not use `--grep` or a `bash` script with a `for` loop.
26
26
  - First run the test three times to note how long the test runs (on average).
27
27
  - Then run the test continuously for 4 minutes, while noting any failures and failure rates. If the failure rate is still 0% after that, assume the problem does not reproduce locally.
28
28
  - After the local test run completes, then show the results in a table. For example:
@@ -162,10 +162,10 @@ Foundation tests must pass in both Node.js and Browser runtimes.
162
162
 
163
163
  ### Run in Node.js
164
164
  ```bash
165
- npm test -- front_end/core/sdk/NetworkManager.test.ts --node-unit-tests
165
+ ./dt test front_end/core/sdk/NetworkManager.test.ts --node-unit-tests
166
166
  ```
167
167
 
168
168
  ### Run in Browser
169
169
  ```bash
170
- npm test -- front_end/core/sdk/NetworkManager.test.ts
170
+ ./dt test front_end/core/sdk/NetworkManager.test.ts
171
171
  ```
@@ -34,14 +34,18 @@ existing element containers.
34
34
  that method. **Do not** introduce Widget lifecycle methods
35
35
  (`performUpdate`) on classes that do not inherit them.
36
36
 
37
- 3. **Import Modern Templating**:
37
+ 3. **Import Modern Templating (Named Imports Only)**:
38
38
 
39
- * Import the `Lit` rendering system inside the view module:
39
+ * Always use named imports from `../../ui/lit/lit.js`:
40
40
 
41
41
  ```typescript
42
- import {html, render, nothing} from '../../ui/lit/lit.js';
42
+ import {html, nothing, render, Directives, type LitTemplate} from '../../ui/lit/lit.js';
43
43
  ```
44
44
 
45
+ * **NEVER** use namespace imports like `import * as Lit` or reference
46
+ `Lit.nothing` / `Lit.render`. Named imports enable better tree-shaking and
47
+ maintain consistent codebase style.
48
+
45
49
  4. **Modern Component Mapping**:
46
50
  * **MANDATORY**: You **MUST** read and load [ui_engineering.md](../../../docs/ui_engineering.md) first to understand specific component mappings (e.g., Toolbar vs `devtools-toolbar`). Do not assume standard Lit defaults.
47
51
  * If unsure, also consult the [automatic migration code](../../../scripts/eslint_rules/lib/no-imperative-dom-api.ts)
@@ -115,13 +119,53 @@ existing element containers.
115
119
  * The Gerrit Code Review UI cannot identify moved blocks of unchanged code.
116
120
  * If blocks of code need to be reordered, create a "prefactoring" change that first extracts the code that needs to be reordered into a named helper functions and pause the migration, waiting user confirmation.
117
121
 
118
- 12. **Micro-Commit Strategy**:
122
+ 12. **Embedding Pre-Existing `UI.Widget` Instances via `UI.Widget.WrapperWidget`**:
123
+
124
+ * Use `${widget(UI.Widget.WrapperWidget, {widget: input.childWidget})}` when
125
+ embedding widgets owned by `UI.ViewManager`
126
+ (`TabbedViewLocation.tabbedPane()`, `StackLocation.widget()`) or when
127
+ conditionally moving a shared widget instance between containers
128
+ (`{widget: shouldShow ? this.#sharedWidget : null}`).
129
+ * `WrapperWidget` automatically handles showing and detaching the inner
130
+ widget and forwards calculateConstraints without requiring custom wrapper
131
+ classes.
132
+
133
+ 13. **Declarative `<devtools-split-view>` Guidelines**:
134
+
135
+ * **CSS Sizing**: Ensure `<devtools-split-view>` has `flex: auto; height: 100%;`
136
+ in CSS so it fills available container space and doesn't collapse to 0x0.
137
+ * **Reuse Existing Settings for `showMode`**: When binding `show=${...}`
138
+ declaratively on `<devtools-split-view name="...">`, reuse the existing
139
+ `SplitWidget` setting (`{vertical?: {size, showMode}, horizontal?: {size, showMode}}`)
140
+ for `showMode` rather than creating new boolean settings (which loses user
141
+ preferences and requires `KnownContextValues.ts` updates).
142
+ * **Keep Environment Overrides in Templates**: Keep environment overrides
143
+ (like `!input.isTraceApp`) in the `DEFAULT_VIEW` template (e.g.,
144
+ `show=${!input.isTraceApp && input.isSidebarOpen ? 'both' : 'main'}`)
145
+ rather than baking them into the presenter's setting state.
146
+ * **Clean Up Resizers**: Do not leave unused `resizer-widget` classes in
147
+ templates; `<devtools-split-view>` manages its own built-in splitter
148
+ unless custom elements are explicitly registered with `installResizer`.
149
+
150
+ 14. **Declarative Long-Press Action Buttons (`bindToAction`)**:
151
+
152
+ * Legacy `UI.Toolbar.Toolbar.createLongPressActionButton(action, [subButtons])`
153
+ maps declaratively to nesting option `<devtools-button>` elements directly
154
+ inside `<devtools-button ${bindToAction('action-id')}>...</devtools-button>`.
155
+
156
+ 15. **Audit Removed `UIStrings`**:
157
+
158
+ * If a `UIStrings` entry becomes unused during template migration, verify
159
+ that a conditional UI branch (such as a dynamically shown checkbox, button,
160
+ or tooltip) wasn't accidentally dropped before deleting the string.
161
+
162
+ 16. **Micro-Commit Strategy**:
119
163
 
120
164
  * Do not attempt to convert every helper method and UI component in a single monolithic commit. Break the template extraction into **small, self-contained micro-commits** (e.g., migrating one helper method, toolbar button, or list item render at a time).
121
165
  * Verify with build and run tests after each micro-commit to guarantee zero regressions and 100% visual parity before moving to the next compartment.
122
166
  * Provide the exact list of files and commit message when presenting progress so the change history remains atomic and easy to review.
123
167
 
124
- 13. **Wait for confirmation**:
168
+ 17. **Wait for confirmation**:
125
169
 
126
170
  * Wait for an explicit confirmation from the user (or Parent Orchestrator Agent) before proceeding to the next step.
127
171
 
@@ -130,8 +174,12 @@ existing element containers.
130
174
  ## 🔍 Mental Audit (Internal Self-Correction)
131
175
 
132
176
  *Before reporting back or committing, re-read the instructions and verify:*
133
- 1. ❓ **Tag Parity**: Did I accidentally change any `span` to `div` (or vice versa)?
134
- 2. ❓ **Attribute Drop**: Did I drop any `aria-*`, `role`, or custom data attributes?
135
- 3. ❓ **Clang-Off Boundary**: Is the template wrapped in `// clang-format off`?
136
- 4. ❓ **Build**: Does the code compile and do visual tests pass with 0% diff?
177
+ 1. ❓ **Named Imports**: Did I use named imports `{html, nothing, render}` from `ui/lit/lit.js` (and no `import * as Lit`)?
178
+ 2. ❓ **Tag Parity**: Did I accidentally change any `span` to `div` (or vice versa)?
179
+ 3. ❓ **Attribute Drop**: Did I drop any `aria-*`, `role`, or custom data attributes?
180
+ 4. ❓ **Clang-Off Boundary**: Is the template wrapped in `// clang-format off`?
181
+ 5. ❓ **Split Views**: Does `<devtools-split-view>` have `flex: auto; height: 100%;` CSS and reuse existing split settings?
182
+ 6. ❓ **String Audit**: Did I verify that any removed `UIStrings` weren't from accidentally dropped UI branches?
183
+ 7. ❓ **Build**: Does the code compile and do visual tests pass with 0% diff?
184
+
137
185
 
@@ -76,7 +76,29 @@ consolidating them into private helper methods with explicit data contracts.
76
76
  that first extracts the code that needs to be reordered into named
77
77
  helper functions and pause the migration, waiting for user confirmation.
78
78
 
79
- 6. **Wait for confirmation**:
79
+ 6. **No Write-Only State Fields in Prefactor CLs**:
80
+
81
+ * Do not introduce `#state` fields in a logic-consolidation CL that are only
82
+ written to in that CL and only read in the *next* CL's `DEFAULT_VIEW`.
83
+ * Either read them in the prefactor CL (e.g., inside an extracted imperative
84
+ `#render...` helper) or introduce them in the CL that actually adds
85
+ `DEFAULT_VIEW`.
86
+
87
+ 7. **Extract Imperative `#renderSubtreeContent()` Helpers**:
88
+
89
+ * For complex layouts, extracting an imperative `#renderFooContent()`
90
+ helper in Pass 1 (while keeping the outer container imperative) minimizes
91
+ the Pass 2/3 diff when converting `#renderFooContent()` to
92
+ `renderFooContent(input: ViewInput): LitTemplate`.
93
+
94
+ 8. **Preserve Imperative Cleanup Calls**:
95
+
96
+ * When consolidating DOM/widget references (e.g., replacing
97
+ `#tabbedLocationHeader` with `#debuggerSidebarTabbedLocation`), preserve
98
+ imperative cleanup calls like `splitWidget.uninstallResizer(...)` until the
99
+ imperative container itself is removed.
100
+
101
+ 9. **Wait for confirmation**:
80
102
 
81
103
  * Wait for an explicit confirmation from the user (or Parent Orchestrator Agent) before proceeding to the next step.
82
104
 
@@ -86,6 +108,8 @@ consolidating them into private helper methods with explicit data contracts.
86
108
 
87
109
  *Before reporting back or committing, re-read the instructions and verify:*
88
110
  1. ❓ **Minimal Diffs**: Did I move code blocks around unnecessarily?
89
- 2. ❓ **State Completeness**: Are all imperative DOM updates now backed by state variables?
90
- 3. ❓ **Build**: Does the code still compile?
111
+ 2. ❓ **State Completeness & Utility**: Are all state variables actually read in this CL, with no write-only placeholders?
112
+ 3. ❓ **Cleanup Preserved**: Are resizer/listener uninstallation calls preserved during reference consolidation?
113
+ 4. ❓ **Build**: Does the code still compile?
114
+
91
115
 
@@ -76,6 +76,26 @@ principles.
76
76
  clean and focused on high-level orchestration, prefer delegating intense
77
77
  execution tasks (like running tests, debugging compilations, or processing
78
78
  independent classes in parallel) to specialized subagents.
79
+ 13. **Cross-Repo Runtime Coupling Check (`legacy_test_runner` & `blink/web_tests`)**:
80
+ Before converting TypeScript `private` fields/methods to ES `#private` or
81
+ removing widget properties (e.g., `.tabbedPane`, `.sidebarPaneStack`,
82
+ `.threadsSidebarPane`, `.searchInputElement`), search both
83
+ `front_end/legacy_test_runner/**/*.js` and Chromium's
84
+ `third_party/blink/web_tests/http/tests/devtools/**/*.js` (which run on
85
+ `dtf_linux_rel` CQ via `blink_web_tests` and reflectively access private
86
+ members in untyped JS). Keep accessed members as TypeScript `private` with a
87
+ `// Accessed in web_tests / legacy_test_runner` comment, or migrate the
88
+ web_tests first in a dedicated CL.
89
+ 14. **Strict CL Splitting Rules**:
90
+ * **One Class Per CL for Hybrid Files**: When modernizing files containing
91
+ multiple classes, extract or migrate secondary classes (e.g.,
92
+ `QuickSourceView`) into their own dedicated CLs.
93
+ * **Separate Infrastructure CLs**: Keep shared `ui/legacy` or component
94
+ infrastructure changes (e.g., `bindToAction`, `SplitWidget`,
95
+ `WrapperWidget`) in separate, preceding CLs. Always verify with
96
+ `cog_api.py diff` before uploading that no changes from later commits
97
+ leaked into earlier infrastructure CLs.
98
+
79
99
 
80
100
 
81
101
  --------------------------------------------------------------------------------
@@ -129,6 +149,8 @@ The plan you generate **MUST** follow this structure:
129
149
  ## 🛠️ Passes Checklist
130
150
  - [ ] **Pass 0: Baseline & Safety Scaffolding**
131
151
  - Assigned to: `ui-eng-vision-test-scaffolder`
152
+ - [ ] **Pass 0.5: Privatize & Dead-Code Cleanup**
153
+ - Mechanical prefactor: convert TypeScript `private` to ES `#private` and remove dead code
132
154
  - [ ] **Pass 1: Logic Consolidation**
133
155
  - Assigned to: `ui-eng-vision-logic-consolidator`
134
156
  - [ ] **Pass 2: Lit-HTML Rendering**
@@ -149,10 +171,18 @@ The plan you generate **MUST** follow this structure:
149
171
  regressions.
150
172
  2. Pay extra attention not to skip this step.
151
173
 
174
+ ### Privatize & Dead-Code Cleanup (Pass 0.5)
175
+
176
+ * **Trigger Condition**: Baseline tests green.
177
+ * **Actions**:
178
+ 1. Perform the **Cross-Repo Runtime Coupling Check** against `legacy_test_runner` and `blink_web_tests` first.
179
+ 2. Convert internal TypeScript `private` fields/methods to ES `#private` (except those reflectively accessed by web tests).
180
+ 3. Identify and remove unused dead code, redundant containers, or obsolete split widgets in a dedicated prefactor CL so mechanical renames don't clutter logic and view CLs.
181
+ 4. Verify that all tests and lints pass and stage this prefactor CL before proceeding to logic consolidation.
182
+
152
183
  ### Logic Consolidation
153
184
 
154
- * **Trigger Condition**: Baseline tests green (or respective previous pass
155
- staged).
185
+ * **Trigger Condition**: Pass 0.5 staged (or baseline tests green if 0.5 skipped).
156
186
  * **Subskill to Import/Delegate**: `ui-eng-vision-logic-consolidator` (Delegate to a subagent to maintain focus)
157
187
  * **Actions**:
158
188
  1. Extract manual elements, constructor DOM configurations, and imperative
@@ -65,20 +65,23 @@ logical regressions are introduced during modernization.
65
65
 
66
66
  Always detect the execution environment first to run tests successfully:
67
67
 
68
- ### Scenario A: Google-Internal Cog/Cider Workspaces (PRIMARY PATH for Google Workspaces)
68
+ ### Scenario A: Google-Internal Cog Workspaces (PRIMARY PATH for Google Workspaces)
69
69
 
70
70
  * **Detection**: Triggered if the workspace path starts with `/google/cog/` or
71
71
  `/google/src/`.
72
- * **Why it is required**: Raw commands like `npm run test` or `autoninja` fail
73
- because they lack Google cloudtop/virtualization wrapper configurations.
72
+ * **Execution Guide**: Follow [`devtools-verification`](../devtools-verification/SKILL.md).
74
73
  * **Resolution Steps**:
75
74
 
76
- 1. Do not run `npm run test` or standard `autoninja` directly.
77
- 2. Leverage the Google-specific Cider testing script to compile and run
78
- tests in the cloud workspace:
75
+ 1. Ensure `depot_tools` is at the front of your `PATH`:
79
76
 
80
77
  ```bash
81
- python3 internal/infra/scripts/cider/init_workspace.py test /google/cog/cloud/username/workspace_name --test_filter=front_end/panels/application/IndexedDBViews.test.ts
78
+ export PATH="/path/to/depot_tools:$PATH"
79
+ ```
80
+
81
+ 2. Execute tests using `./dt test` directly from `chromium/third_party/devtools-frontend/src`:
82
+
83
+ ```bash
84
+ ./dt test front_end/panels/application/IndexedDBViews.test.ts
82
85
  ```
83
86
 
84
87
  ### Scenario B: Standard Chromium Environment (Fallback)
@@ -107,7 +110,7 @@ Always detect the execution environment first to run tests successfully:
107
110
  3. Execute the tests:
108
111
 
109
112
  ```bash
110
- npm run test -- front_end/panels/application/IndexedDBViews.test.ts
113
+ ./dt test front_end/panels/application/IndexedDBViews.test.ts
111
114
  ```
112
115
 
113
116
  ### Scenario C: ESLint TS Module Resolution Failure (ERR_UNKNOWN_FILE_EXTENSION)
@@ -121,7 +124,7 @@ Always detect the execution environment first to run tests successfully:
121
124
  parse the rules:
122
125
 
123
126
  ```bash
124
- npm run build
127
+ ./dt build
125
128
  ```
126
129
 
127
130
  ### Scenario D: Screenshot Test Fails (Visual Diffs > 0%)
@@ -133,6 +136,33 @@ Always detect the execution environment first to run tests successfully:
133
136
  3. If it's a layout shift, check if you replaced a block element with an inline element (e.g. `div` -> `span`).
134
137
  4. If styles are missing, verify if the test wrapper needs `{includeCommonStyles: true}`.
135
138
 
139
+ ### Scenario E: Lightweight Test Hook Gotchas (`describe` vs `describeWithEnvironment`)
140
+
141
+ * Prefer `describe` with lightweight hooks (`setupLocaleHooks()`, `setupSettingsHooks()`) when full `describeWithEnvironment` is unnecessary.
142
+ * **Always reset singleton registries in `afterEach`**:
143
+ When registering actions, shortcuts, or context menus in tests, singleton registries MUST be reset in `afterEach`:
144
+
145
+ ```typescript
146
+ afterEach(() => {
147
+ UI.ActionRegistration.reset();
148
+ UI.ActionRegistry.ActionRegistry.reset();
149
+ UI.ShortcutRegistry.ShortcutRegistry.removeInstance();
150
+ });
151
+ ```
152
+
153
+ Without these resets, repeated runs (such as `--repeat=10` or CQ flake detection) will fail on iteration 2+ with `Duplicate action ID: '...'`.
154
+
155
+ * **GlassPane Container Setup**:
156
+ If testing UI that opens a `GlassPane` or long-press option menu (e.g. `bindToAction` with long-press buttons) in a test suite using `describe` without `describeWithEnvironment`, call:
157
+
158
+ ```typescript
159
+ beforeEach(() => {
160
+ UI.GlassPane.GlassPane.setContainer(document.body);
161
+ });
162
+ ```
163
+
164
+ Otherwise, menu rendering will fail because `GlassPane` lacks an attached container element.
165
+
136
166
  --------------------------------------------------------------------------------
137
167
 
138
168
  ## 🔍 Mental Audit (Internal Self-Correction)
@@ -141,4 +171,3 @@ Always detect the execution environment first to run tests successfully:
141
171
  1. ❓ **Coverage**: Did I cover all classes in the file, or only the main one?
142
172
  2. ❓ **Stability**: Can the tests run repeatedly without flakiness?
143
173
  3. ❓ **Integrations**: Did I verify that the component mounts correctly?
144
-
@@ -28,11 +28,11 @@ clean `UI.Widget` classes that use native update rendering delegates.
28
28
  2. **Upgrade View Delegates & Inject View**:
29
29
 
30
30
  * Migrate the local Lit template strings into a formally exported default
31
- view layout:
31
+ view layout (using named imports `import {html, render} from '../../ui/lit/lit.js';`):
32
32
 
33
33
  ```typescript
34
34
  export const DEFAULT_VIEW: View = (input, output, target) => {
35
- Lit.render(html`...`, target);
35
+ render(html`...`, target);
36
36
  };
37
37
  ```
38
38
 
@@ -67,10 +67,10 @@ clean `UI.Widget` classes that use native update rendering delegates.
67
67
 
68
68
  * Remove any `LegacyWrapper` bindings or custom wrappable custom elements.
69
69
  * Replace old panel instantiations with standard `<devtools-widget>`
70
- declarative entries:
70
+ declarative entries (using `const {widget} = UI.Widget;`):
71
71
 
72
72
  ```typescript
73
- html`<devtools-widget .widgetConfig=${widgetConfig(MyWidgetClass, [params])}></devtools-widget>`
73
+ html`<devtools-widget ${widget(MyWidgetClass, {params})}></devtools-widget>`
74
74
  ```
75
75
 
76
76
  * Inspect instantiator files (e.g., `ApplicationPanelSidebar.ts`) and
@@ -43,7 +43,7 @@ Complex views can be broken down using helper functions defined inside `DEFAULT_
43
43
  ```ts
44
44
  // clang-format off
45
45
  const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLElement): void => {
46
- const renderHeader = (): Lit.LitTemplate => {
46
+ const renderHeader = (): LitTemplate => {
47
47
  return html`<h1>${input.title}</h1>`;
48
48
  };
49
49
  // ...
@@ -58,10 +58,11 @@ const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLElement)
58
58
 
59
59
  ### Composition
60
60
 
61
- * To render a child widget, the parent's View MUST use lit-html directive `UI.Widget.wiget`
61
+ * To render a child widget, the parent's View MUST use the lit-html directive `UI.Widget.widget`.
62
62
  * Configuration is passed via the parameters.
63
63
  * Properties passed from a parent MUST be declared as public fields on the child presenter class.
64
64
  * The framework automatically updates these properties and calls `requestUpdate()` on the child when the parent re-renders.
65
+ * **Pre-existing Widget Instances (`WrapperWidget`):** To render an existing `UI.Widget` instance (such as locations created by `UI.ViewManager`: `TabbedViewLocation.tabbedPane()`, `StackLocation.widget()`) declaratively without creating a custom wrapper class, use `${widget(UI.Widget.WrapperWidget, {widget: myWidgetInstance})}`. `WrapperWidget` automatically forwards constraints, handles attach/detach lifecycle, and supports dynamic widget replacement.
65
66
 
66
67
  ## Refactoring Legacy Components
67
68
 
@@ -106,7 +107,7 @@ render(html`
106
107
  **Note:** The `{host: input}` option in `render()` is generally **not required** unless you are using specific Shadow DOM patterns that necessitate it. The `@scope` strategy is the preferred method for style isolation in DevTools widgets.
107
108
 
108
109
  ### Legacy Interop & Refs
109
- * **Raw Elements:** Use `Lit.Directives.ref` to obtain a reference to a raw `HTMLElement` if needed for imperative APIs (e.g., `splitWidget.installResizer(element)`).
110
+ * **Raw Elements:** Use `Directives.ref` (from `ui/lit/lit.js`) to obtain a reference to a raw `HTMLElement` if needed for imperative APIs (e.g., `splitWidget.installResizer(element)`).
110
111
  * **Child Widgets:** Use `UI.Widget.widgetRef` to obtain the class instance of a child widget if you need to call methods on it directly (though declarative data flow is preferred).
111
112
 
112
113
  ### Dependencies
@@ -153,12 +154,12 @@ Example: `front_end/panels/my_example/MyExampleWidget.ts`.
153
154
  ```ts
154
155
  // front_end/panels/my_example/MyExampleWidget.ts
155
156
 
156
- import * as Lit from '../../ui/lit/lit.js';
157
+ import {Directives, html, render} from '../../ui/lit/lit.js';
157
158
  import * as UI from '../../ui/legacy/legacy.js';
158
159
 
159
160
  import myExampleWidgetStyles from './myExampleWidget.css.js';
160
161
 
161
- const {html, render, ref} = Lit;
162
+ const {ref} = Directives;
162
163
 
163
164
  // 1. Define Input data shape. (Assuming Child Widget configuration for completeness)
164
165
  export interface ViewInput {
@@ -241,14 +242,13 @@ Example: `front_end/panels/parent/ParentWidget.ts`. Demonstrates passing state v
241
242
  ```ts
242
243
  // front_end/panels/parent/ParentWidget.ts
243
244
 
244
- import * as Lit from '../../ui/lit/lit.js';
245
+ import {html, render} from '../../ui/lit/lit.js';
245
246
  import * as UI from '../../ui/legacy/legacy.js';
246
247
  import {MyExampleWidget} from '../my_example/MyExampleWidget.ts';
247
248
 
248
249
  import parentWidgetStyles from './parentWidgetStyles.css';
249
250
 
250
- const {html, render} = Lit;
251
- const {widgetConfig} = UI.Widget;
251
+ const {widget} = UI.Widget;
252
252
 
253
253
  interface ViewInput {
254
254
  title: string;
package/docs/README.md CHANGED
@@ -71,7 +71,7 @@ below.**
71
71
 
72
72
  Formats all code using clang-format.
73
73
 
74
- `npm test`
74
+ `./dt test`
75
75
 
76
76
  Runs all tests on DevTools code.
77
77
 
@@ -157,9 +157,9 @@ be accepted.
157
157
  If your patch is finished, we have a few helpful tools to make sure your patch looks good.
158
158
 
159
159
  As part of the presubmit check, we will automatically run these. You can also run specific
160
- presubmit checks by using our `npm` commands:
160
+ presubmit checks by using our `./dt` commands:
161
161
 
162
- * `npm run lint` to perform [ESLint](http://eslint.org) and [Stylelint](http://stylelint.io)
162
+ * `./dt lint` to perform [ESLint](http://eslint.org) and [Stylelint](http://stylelint.io)
163
163
  checks.
164
164
 
165
165
  To run these presubmit checks without uploading, you can run `git cl presubmit --upload`.
@@ -252,7 +252,7 @@ If reviewers will ask you to change something in your code, follow these steps:
252
252
  2. Run `gsync client`.
253
253
  3. Optionally, pull latest changes and rebase them with: `git pull --rebase origin main`.
254
254
  4. Commit locally to your branch.
255
- 5. Run the linters on your code (e.g. style, coding conventions) via `npm run lint`.
255
+ 5. Run the linters on your code (e.g. style, coding conventions) via `./dt lint`.
256
256
  6. Finally, upload everything to the server again with `git cl upload`.
257
257
  7. Once complete, add a comment similar to "comments addressed, please take a look".
258
258
  Without a comment, reviewers will not know about your new patchset.
@@ -59,7 +59,7 @@ Chromium licensing to be used, on the basis that it enforces all packages have a
59
59
  license that is compatible with a set of pre-defined licensees.
60
60
 
61
61
  If you want to use a new package as tooling process in engineer workflows, you
62
- can add the package to the `package.json` and run `npm run install-deps` to
62
+ can add the package to the `package.json` and run `./dt install-deps` to
63
63
  check in the new contents.
64
64
 
65
65
  Only add new license types to `LICENSES` after you received approval from