chrome-devtools-frontend 1.0.1657855 → 1.0.1661063

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 (370) hide show
  1. package/.agents/skills/evaluate-ai-css-completion/SKILL.md +133 -0
  2. package/.agents/skills/evaluate-ai-css-completion/scripts/evaluate.js +76 -0
  3. package/.agents/skills/migrate-chromium-test/SKILL.md +15 -70
  4. package/.agents/skills/ui-eng-vision-orchestrator/SKILL.md +37 -18
  5. package/.agents/skills/version-control/SKILL.md +8 -1
  6. package/AUTHORS +1 -0
  7. package/SECURITY.md +3 -0
  8. package/docs/get_the_code.md +6 -0
  9. package/eslint.config.mjs +7 -0
  10. package/extension-api/ExtensionAPI.d.ts +88 -0
  11. package/front_end/Tests.js +6 -6
  12. package/front_end/core/common/Gzip.ts +12 -5
  13. package/front_end/core/host/AidaClient.ts +35 -9
  14. package/front_end/core/host/GdpClient.ts +10 -7
  15. package/front_end/core/host/InspectorFrontendHost.ts +1 -0
  16. package/front_end/core/host/InspectorFrontendHostStub.ts +2 -0
  17. package/front_end/core/platform/StringUtilities.ts +55 -4
  18. package/front_end/core/sdk/AccessibilityModel.snapshot.txt +17 -0
  19. package/front_end/core/sdk/AccessibilityModel.ts +132 -2
  20. package/front_end/core/sdk/CPUThrottlingManager.ts +10 -5
  21. package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +2 -5
  22. package/front_end/core/sdk/ConsoleModel.ts +5 -5
  23. package/front_end/core/sdk/DOMDebuggerModel.ts +7 -1
  24. package/front_end/core/sdk/DOMModel.ts +33 -18
  25. package/front_end/core/sdk/DebuggerModel.ts +4 -4
  26. package/front_end/core/sdk/EventBreakpointsModel.ts +2 -0
  27. package/front_end/core/sdk/FrameManager.ts +1 -0
  28. package/front_end/core/sdk/IsolateManager.ts +1 -0
  29. package/front_end/core/sdk/NetworkManager.ts +59 -11
  30. package/front_end/core/sdk/NetworkRequest.ts +38 -1
  31. package/front_end/core/sdk/OverlayModel.ts +45 -6
  32. package/front_end/core/sdk/PageResourceLoader.ts +2 -0
  33. package/front_end/core/sdk/ResourceTreeModel.ts +6 -7
  34. package/front_end/core/sdk/ScreenCaptureModel.ts +2 -2
  35. package/front_end/core/sdk/ServerTiming.ts +17 -13
  36. package/front_end/core/sdk/ServiceWorkerCacheModel.ts +4 -2
  37. package/front_end/core/sdk/ServiceWorkerManager.ts +19 -5
  38. package/front_end/core/sdk/SourceMap.ts +5 -5
  39. package/front_end/core/sdk/SourceMapManager.ts +3 -2
  40. package/front_end/core/sdk/TargetManager.ts +14 -1
  41. package/front_end/core/sdk/TraceObject.ts +4 -2
  42. package/front_end/core/sdk/sdk-meta.ts +170 -0
  43. package/front_end/design_system_tokens.css +0 -5
  44. package/front_end/entrypoints/formatter_worker/FormattedContentBuilder.ts +5 -2
  45. package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +26 -4
  46. package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +8 -3
  47. package/front_end/entrypoints/inspector_main/InspectorMain.ts +4 -4
  48. package/front_end/entrypoints/inspector_main/OutermostTargetSelector.ts +2 -2
  49. package/front_end/entrypoints/inspector_main/RenderingOptions.ts +36 -37
  50. package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +15 -33
  51. package/front_end/entrypoints/js_app/js_app.ts +6 -5
  52. package/front_end/entrypoints/main/GlobalAiButton.ts +4 -4
  53. package/front_end/entrypoints/main/MainImpl.ts +20 -22
  54. package/front_end/entrypoints/main/main-meta.ts +42 -42
  55. package/front_end/entrypoints/node_app/node_app.ts +3 -2
  56. package/front_end/entrypoints/worker_app/WorkerMain.ts +1 -1
  57. package/front_end/foundation/Universe.ts +44 -1
  58. package/front_end/generated/InspectorBackendCommands.ts +2 -2
  59. package/front_end/generated/SupportedCSSProperties.js +19 -12
  60. package/front_end/generated/protocol.ts +3 -1
  61. package/front_end/models/ai_assistance/AiConversation.ts +19 -17
  62. package/front_end/models/ai_assistance/AiHistoryStorage.ts +37 -14
  63. package/front_end/models/ai_assistance/AiUtils.ts +38 -42
  64. package/front_end/models/ai_assistance/agents/AiAgent.ts +5 -1
  65. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +3 -2
  66. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +2 -1
  67. package/front_end/models/ai_assistance/agents/StorageAgent.ts +7 -5
  68. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +270 -286
  69. package/front_end/models/ai_assistance/data_formatters/UnitFormatters.ts +20 -0
  70. package/front_end/models/ai_assistance/performance/AICallTree.ts +3 -1
  71. package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +3 -2
  72. package/front_end/models/autofill_manager/AutofillManager.ts +3 -1
  73. package/front_end/models/bindings/CompilerScriptMapping.ts +7 -7
  74. package/front_end/models/bindings/ContentProviderBasedProject.ts +4 -4
  75. package/front_end/models/bindings/DebuggerLanguagePlugins.ts +5 -5
  76. package/front_end/models/bindings/DefaultScriptMapping.ts +3 -3
  77. package/front_end/models/bindings/NetworkProject.ts +5 -10
  78. package/front_end/models/bindings/PresentationConsoleMessageHelper.ts +2 -1
  79. package/front_end/models/bindings/ResourceMapping.ts +3 -4
  80. package/front_end/models/bindings/ResourceScriptMapping.ts +2 -3
  81. package/front_end/models/bindings/ResourceUtils.ts +1 -1
  82. package/front_end/models/bindings/SASSSourceMapping.ts +11 -9
  83. package/front_end/models/bindings/StylesSourceMapping.ts +3 -3
  84. package/front_end/models/bindings/TempFile.ts +8 -3
  85. package/front_end/models/emulation/EmulatedDevices.ts +389 -8
  86. package/front_end/models/extensions/ExtensionAPI.ts +116 -52
  87. package/front_end/models/extensions/LanguageExtensionEndpoint.ts +13 -12
  88. package/front_end/models/formatter/ScriptFormatter.ts +8 -11
  89. package/front_end/models/issues_manager/BounceTrackingIssue.ts +1 -1
  90. package/front_end/models/issues_manager/ClientHintIssue.ts +1 -1
  91. package/front_end/models/issues_manager/ConnectionAllowlistIssue.ts +1 -1
  92. package/front_end/models/issues_manager/ContentSecurityPolicyIssue.ts +7 -7
  93. package/front_end/models/issues_manager/CookieDeprecationMetadataIssue.ts +2 -2
  94. package/front_end/models/issues_manager/CookieIssue.ts +27 -16
  95. package/front_end/models/issues_manager/CorsIssue.ts +3 -3
  96. package/front_end/models/issues_manager/CrossOriginEmbedderPolicyIssue.ts +2 -2
  97. package/front_end/models/issues_manager/DeprecationIssue.ts +3 -3
  98. package/front_end/models/issues_manager/EmailVerificationRequestIssue.ts +1 -1
  99. package/front_end/models/issues_manager/FederatedAuthRequestIssue.ts +1 -1
  100. package/front_end/models/issues_manager/FederatedAuthUserInfoRequestIssue.ts +1 -1
  101. package/front_end/models/issues_manager/GenericIssue.ts +7 -7
  102. package/front_end/models/issues_manager/HeavyAdIssue.ts +3 -3
  103. package/front_end/models/issues_manager/Issue.ts +11 -12
  104. package/front_end/models/issues_manager/IssueAggregator.ts +0 -9
  105. package/front_end/models/issues_manager/IssueResolver.ts +2 -2
  106. package/front_end/models/issues_manager/IssuesManager.ts +136 -137
  107. package/front_end/models/issues_manager/MixedContentIssue.ts +1 -1
  108. package/front_end/models/issues_manager/PartitioningBlobURLIssue.ts +3 -3
  109. package/front_end/models/issues_manager/QuirksModeIssue.ts +1 -1
  110. package/front_end/models/issues_manager/SRIMessageSignatureIssue.ts +2 -2
  111. package/front_end/models/issues_manager/SelectivePermissionsInterventionIssue.ts +2 -2
  112. package/front_end/models/issues_manager/SharedArrayBufferIssue.ts +2 -2
  113. package/front_end/models/issues_manager/SharedDictionaryIssue.ts +1 -1
  114. package/front_end/models/issues_manager/UnencodedDigestIssue.ts +3 -3
  115. package/front_end/models/issues_manager/issues_manager.ts +0 -2
  116. package/front_end/models/javascript_metadata/NativeFunctions.js +5 -1
  117. package/front_end/models/persistence/AutomaticFileSystemWorkspaceBinding.ts +5 -0
  118. package/front_end/models/source_map_scopes/FunctionCodeResolver.ts +13 -10
  119. package/front_end/models/stack_trace/StackTraceModel.ts +3 -3
  120. package/front_end/models/text_utils/ContentData.ts +27 -0
  121. package/front_end/models/trace/helpers/SamplesIntegrator.ts +21 -5
  122. package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +29 -14
  123. package/front_end/models/web_mcp/WebMCPModel.ts +24 -6
  124. package/front_end/models/workspace/IgnoreListManager.ts +6 -6
  125. package/front_end/models/workspace/UISourceCode.ts +3 -3
  126. package/front_end/models/workspace/WorkspaceImpl.ts +10 -1
  127. package/front_end/models/workspace_diff/WorkspaceDiff.ts +10 -4
  128. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +25 -22
  129. package/front_end/panels/ai_assistance/ExportConversation.ts +3 -4
  130. package/front_end/panels/ai_assistance/ai_assistance-meta.ts +3 -3
  131. package/front_end/panels/ai_assistance/components/ChatInput.ts +2 -2
  132. package/front_end/panels/ai_assistance/components/ChatMessage.ts +9 -1
  133. package/front_end/panels/ai_assistance/components/DisabledWidget.ts +2 -2
  134. package/front_end/panels/animation/AnimationTimeline.ts +17 -19
  135. package/front_end/panels/animation/AnimationUI.ts +5 -5
  136. package/front_end/panels/animation/animation-meta.ts +2 -2
  137. package/front_end/panels/application/ApplicationPanelSidebar.ts +4 -3
  138. package/front_end/panels/application/DeviceBoundSessionsView.ts +2 -6
  139. package/front_end/panels/application/FrameDetailsView.ts +1 -1
  140. package/front_end/panels/application/IndexedDBViews.ts +220 -266
  141. package/front_end/panels/application/OpenedWindowDetailsView.ts +1 -1
  142. package/front_end/panels/application/ResourcesPanel.ts +9 -2
  143. package/front_end/panels/application/ServiceWorkersView.ts +252 -211
  144. package/front_end/panels/application/StorageView.ts +97 -33
  145. package/front_end/panels/application/WebMCPView.ts +53 -44
  146. package/front_end/panels/application/components/AdsView.ts +201 -30
  147. package/front_end/panels/application/components/adsView.css +25 -0
  148. package/front_end/panels/application/indexedDBViews.css +38 -9
  149. package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +2 -2
  150. package/front_end/panels/application/preloading/helper/PreloadingForward.ts +2 -1
  151. package/front_end/panels/application/storageView.css +26 -9
  152. package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +5 -1
  153. package/front_end/panels/browser_debugger/browser_debugger-meta.ts +8 -6
  154. package/front_end/panels/common/DOMLinkifier.ts +1 -1
  155. package/front_end/panels/common/ExtensionServer.ts +119 -14
  156. package/front_end/panels/console/ConsoleContextSelector.ts +1 -1
  157. package/front_end/panels/console/ConsolePinPane.ts +2 -2
  158. package/front_end/panels/console/ConsolePrompt.ts +2 -2
  159. package/front_end/panels/console/ConsoleView.ts +3 -2
  160. package/front_end/panels/console/PromptBuilder.ts +2 -1
  161. package/front_end/panels/console/SymbolizedErrorWidget.ts +2 -1
  162. package/front_end/panels/console_counters/WarningErrorCounter.ts +2 -2
  163. package/front_end/panels/coverage/CoverageListView.ts +28 -28
  164. package/front_end/panels/coverage/CoverageModel.ts +2 -1
  165. package/front_end/panels/coverage/CoverageView.ts +22 -22
  166. package/front_end/panels/coverage/coverage-meta.ts +5 -5
  167. package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +36 -36
  168. package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +1 -1
  169. package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +2 -2
  170. package/front_end/panels/css_overview/CSSOverviewStartView.ts +6 -6
  171. package/front_end/panels/css_overview/CSSOverviewUnusedDeclarations.ts +6 -6
  172. package/front_end/panels/css_overview/css_overview-meta.ts +2 -2
  173. package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +1 -1
  174. package/front_end/panels/elements/AccessibilityTreeUtils.ts +8 -102
  175. package/front_end/panels/elements/AccessibilityTreeView.ts +163 -70
  176. package/front_end/panels/elements/ElementsPanel.ts +17 -11
  177. package/front_end/panels/elements/ElementsTreeElement.ts +4 -1
  178. package/front_end/panels/elements/ElementsTreeOutline.ts +4 -4
  179. package/front_end/panels/elements/LayoutPane.ts +1 -1
  180. package/front_end/panels/elements/MetricsSidebarPane.ts +100 -34
  181. package/front_end/panels/elements/StylePropertiesSection.ts +2 -2
  182. package/front_end/panels/elements/StylePropertyTreeElement.ts +8 -2
  183. package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
  184. package/front_end/panels/elements/components/AccessibilityTreeNode.ts +7 -18
  185. package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +2 -2
  186. package/front_end/panels/elements/components/QueryContainer.ts +1 -1
  187. package/front_end/panels/emulation/DeviceModeView.ts +52 -70
  188. package/front_end/panels/issues/AffectedDirectivesView.ts +1 -1
  189. package/front_end/panels/issues/AffectedResourcesView.ts +2 -1
  190. package/front_end/panels/issues/IssueView.ts +0 -2
  191. package/front_end/panels/issues/IssuesPane.ts +1 -8
  192. package/front_end/panels/js_timeline/js_timeline-meta.ts +3 -2
  193. package/front_end/panels/layer_viewer/LayerViewHost.ts +1 -1
  194. package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorController.ts +3 -3
  195. package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +5 -5
  196. package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +4 -4
  197. package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +2 -2
  198. package/front_end/panels/linear_memory_inspector/components/LinearMemoryNavigator.ts +6 -6
  199. package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +3 -3
  200. package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplay.ts +8 -9
  201. package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplayUtils.ts +2 -2
  202. package/front_end/panels/linear_memory_inspector/components/ValueInterpreterSettings.ts +1 -1
  203. package/front_end/panels/linear_memory_inspector/linear_memory_inspector-meta.ts +2 -2
  204. package/front_end/panels/network/NetworkDataGridNode.ts +124 -36
  205. package/front_end/panels/network/NetworkLogView.ts +9 -1
  206. package/front_end/panels/network/NetworkLogViewColumns.ts +18 -0
  207. package/front_end/panels/network/NetworkPanel.ts +2 -1
  208. package/front_end/panels/network/RequestPayloadView.ts +68 -20
  209. package/front_end/panels/network/RequestPreviewView.ts +7 -1
  210. package/front_end/panels/network/RequestTimingView.ts +95 -127
  211. package/front_end/panels/network/components/ResponseHeaderSection.ts +1 -1
  212. package/front_end/panels/network/forward/UIFilter.ts +1 -0
  213. package/front_end/panels/network/requestPayloadView.css +10 -0
  214. package/front_end/panels/performance_monitor/PerformanceMonitor.ts +12 -12
  215. package/front_end/panels/performance_monitor/performance_monitor-meta.ts +7 -7
  216. package/front_end/panels/profiler/HeapDetachedElementsView.ts +2 -2
  217. package/front_end/panels/profiler/HeapProfileView.ts +563 -51
  218. package/front_end/panels/profiler/HeapSnapshotView.ts +14 -9
  219. package/front_end/panels/profiler/ProfilesPanel.ts +13 -7
  220. package/front_end/panels/profiler/WritableProfileHeader.ts +152 -0
  221. package/front_end/panels/profiler/profiler.ts +2 -2
  222. package/front_end/panels/recorder/{components/ControlButton.ts → ControlButton.ts} +9 -10
  223. package/front_end/panels/recorder/{components/CreateRecordingView.ts → CreateRecordingView.ts} +59 -58
  224. package/front_end/panels/recorder/ExtensionView.ts +123 -0
  225. package/front_end/panels/recorder/RecorderController.ts +102 -92
  226. package/front_end/panels/recorder/{components/RecordingListView.ts → RecordingListView.ts} +22 -23
  227. package/front_end/panels/recorder/{components/RecordingView.ts → RecordingView.ts} +99 -96
  228. package/front_end/panels/recorder/{components/ReplaySection.ts → ReplaySection.ts} +20 -20
  229. package/front_end/panels/recorder/{components/SelectorPicker.ts → SelectorPicker.ts} +13 -13
  230. package/front_end/panels/recorder/{components/StepEditor.ts → StepEditor.ts} +367 -336
  231. package/front_end/panels/recorder/{components/StepView.ts → StepView.ts} +48 -49
  232. package/front_end/panels/recorder/{components/TimelineSection.ts → TimelineSection.ts} +2 -2
  233. package/front_end/panels/recorder/models/RecorderSettings.ts +2 -2
  234. package/front_end/panels/recorder/recorder-meta.ts +7 -7
  235. package/front_end/panels/recorder/recorder.ts +23 -1
  236. package/front_end/panels/recorder/{components/recordingView.css → recordingView.css} +1 -1
  237. package/front_end/panels/recorder/util/util.ts +113 -0
  238. package/front_end/panels/screencast/ScreencastApp.ts +1 -1
  239. package/front_end/panels/screencast/ScreencastView.ts +12 -12
  240. package/front_end/panels/search/SearchResultsPane.ts +4 -4
  241. package/front_end/panels/search/SearchView.ts +20 -20
  242. package/front_end/panels/security/SecurityModel.ts +7 -7
  243. package/front_end/panels/security/SecurityPanel.ts +99 -107
  244. package/front_end/panels/security/SecurityPanelSidebar.ts +7 -7
  245. package/front_end/panels/security/security-meta.ts +2 -2
  246. package/front_end/panels/sensors/LocationsSettingsTab.ts +19 -19
  247. package/front_end/panels/sensors/SensorsView.ts +27 -27
  248. package/front_end/panels/sensors/sensors-meta.ts +13 -167
  249. package/front_end/panels/settings/AISettingsTab.ts +98 -56
  250. package/front_end/panels/settings/EditFileSystemView.ts +2 -2
  251. package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +20 -20
  252. package/front_end/panels/settings/KeybindsSettingsTab.ts +20 -21
  253. package/front_end/panels/settings/SettingsScreen.ts +11 -11
  254. package/front_end/panels/settings/WorkspaceSettingsTab.ts +5 -5
  255. package/front_end/panels/settings/components/SyncSection.ts +12 -12
  256. package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +13 -13
  257. package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +31 -31
  258. package/front_end/panels/settings/emulation/emulation-meta.ts +1 -1
  259. package/front_end/panels/settings/settings-meta.ts +14 -14
  260. package/front_end/panels/sources/InplaceFormatterEditorAction.ts +2 -2
  261. package/front_end/panels/sources/NavigatorView.ts +7 -6
  262. package/front_end/panels/sources/ScopeChainSidebarPane.ts +83 -37
  263. package/front_end/panels/sources/SourcesNavigator.ts +22 -21
  264. package/front_end/panels/sources/SourcesView.ts +10 -1
  265. package/front_end/panels/sources/TabbedEditorContainer.ts +1 -1
  266. package/front_end/panels/sources/scopeChainSidebarPane.css +12 -4
  267. package/front_end/panels/sources/sources-meta.ts +4 -4
  268. package/front_end/panels/timeline/CompatibilityTracksAppender.ts +5 -2
  269. package/front_end/panels/timeline/IsolateSelector.ts +10 -8
  270. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +2 -1
  271. package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +2 -1
  272. package/front_end/panels/timeline/TimelineFlameChartView.ts +1 -1
  273. package/front_end/panels/timeline/TimelinePanel.ts +20 -8
  274. package/front_end/panels/timeline/TimelineUIUtils.ts +149 -131
  275. package/front_end/panels/timeline/components/NetworkRequestDetails.ts +4 -2
  276. package/front_end/panels/timeline/components/NetworkRequestTooltip.ts +4 -2
  277. package/front_end/panels/timeline/components/insights/ImageRef.ts +2 -1
  278. package/front_end/panels/timeline/timeline-meta.ts +3 -2
  279. package/front_end/panels/utils/utils.ts +7 -3
  280. package/front_end/panels/web_audio/WebAudioView.ts +17 -18
  281. package/front_end/panels/web_audio/web_audio-meta.ts +3 -3
  282. package/front_end/panels/whats_new/ReleaseNoteView.ts +1 -1
  283. package/front_end/panels/whats_new/whats_new-meta.ts +11 -11
  284. package/front_end/third_party/chromium/README.chromium +1 -1
  285. package/front_end/third_party/lit/lib/async-directive.d.ts +2 -1
  286. package/front_end/third_party/lit/lib/async-directive.js +1 -1
  287. package/front_end/third_party/lit/lib/async-directive.js.map +1 -1
  288. package/front_end/third_party/lit/lib/decorators.d.ts +2 -1
  289. package/front_end/third_party/lit/lib/decorators.js.map +1 -1
  290. package/front_end/third_party/lit/lib/directive.d.ts +2 -1
  291. package/front_end/third_party/lit/lib/directive.js.map +1 -1
  292. package/front_end/third_party/lit/lib/directives.d.ts +2 -1
  293. package/front_end/third_party/lit/lib/directives.js +8 -8
  294. package/front_end/third_party/lit/lib/directives.js.map +1 -1
  295. package/front_end/third_party/lit/lib/lit.d.ts +2 -1
  296. package/front_end/third_party/lit/lib/lit.js +1 -1
  297. package/front_end/third_party/lit/lib/lit.js.map +1 -1
  298. package/front_end/third_party/lit/lib/static-html.d.ts +2 -1
  299. package/front_end/third_party/lit/lib/static-html.js +1 -1
  300. package/front_end/third_party/lit/lib/static-html.js.map +1 -1
  301. package/front_end/third_party/lit/package.json +2 -2
  302. package/front_end/third_party/lit/rebuild.sh +1 -1
  303. package/front_end/third_party/lit/src/async-directive.ts +5 -0
  304. package/front_end/ui/components/dialogs/Dialog.ts +1 -1
  305. package/front_end/ui/components/dialogs/ShortcutDialog.ts +1 -1
  306. package/front_end/ui/components/diff_view/DiffView.ts +2 -2
  307. package/front_end/ui/components/issue_counter/IssueCounter.ts +3 -3
  308. package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +5 -5
  309. package/front_end/ui/components/lists/List.ts +2 -2
  310. package/front_end/ui/components/panel_feedback/PreviewToggle.ts +1 -1
  311. package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +5 -5
  312. package/front_end/ui/components/settings/SettingCheckbox.ts +1 -1
  313. package/front_end/ui/components/snackbars/Snackbar.ts +1 -1
  314. package/front_end/ui/components/survey_link/SurveyLink.ts +3 -3
  315. package/front_end/ui/components/text_editor/config.ts +2 -2
  316. package/front_end/ui/components/tree_outline/TreeOutline.ts +34 -1
  317. package/front_end/ui/legacy/ReportView.ts +5 -0
  318. package/front_end/ui/legacy/Treeoutline.ts +6 -0
  319. package/front_end/ui/legacy/View.ts +1 -1
  320. package/front_end/ui/legacy/Widget.ts +14 -15
  321. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +2 -0
  322. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +8 -3
  323. package/front_end/ui/legacy/components/data_grid/data_grid.ts +1 -0
  324. package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +1 -1
  325. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +106 -38
  326. package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +7 -1
  327. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +2 -1
  328. package/front_end/ui/legacy/components/utils/ImagePreview.ts +4 -2
  329. package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +10 -1
  330. package/front_end/ui/legacy/inspectorCommon.css +5 -0
  331. package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
  332. package/mcp/mcp.ts +2 -0
  333. package/package.json +4 -4
  334. package/front_end/models/issues_manager/AttributionReportingIssue.ts +0 -247
  335. package/front_end/models/issues_manager/descriptions/arInsecureContext.md +0 -7
  336. package/front_end/models/issues_manager/descriptions/arInvalidInfoHeader.md +0 -5
  337. package/front_end/models/issues_manager/descriptions/arInvalidRegisterOsSourceHeader.md +0 -5
  338. package/front_end/models/issues_manager/descriptions/arInvalidRegisterOsTriggerHeader.md +0 -5
  339. package/front_end/models/issues_manager/descriptions/arInvalidRegisterSourceHeader.md +0 -5
  340. package/front_end/models/issues_manager/descriptions/arInvalidRegisterTriggerHeader.md +0 -5
  341. package/front_end/models/issues_manager/descriptions/arNavigationRegistrationUniqueScopeAlreadySet.md +0 -5
  342. package/front_end/models/issues_manager/descriptions/arNavigationRegistrationWithoutTransientUserActivation.md +0 -6
  343. package/front_end/models/issues_manager/descriptions/arNoRegisterOsSourceHeader.md +0 -5
  344. package/front_end/models/issues_manager/descriptions/arNoRegisterOsTriggerHeader.md +0 -5
  345. package/front_end/models/issues_manager/descriptions/arNoRegisterSourceHeader.md +0 -5
  346. package/front_end/models/issues_manager/descriptions/arNoRegisterTriggerHeader.md +0 -5
  347. package/front_end/models/issues_manager/descriptions/arNoWebOrOsSupport.md +0 -4
  348. package/front_end/models/issues_manager/descriptions/arOsSourceIgnored.md +0 -18
  349. package/front_end/models/issues_manager/descriptions/arOsTriggerIgnored.md +0 -19
  350. package/front_end/models/issues_manager/descriptions/arPermissionPolicyDisabled.md +0 -8
  351. package/front_end/models/issues_manager/descriptions/arSourceAndTriggerHeaders.md +0 -9
  352. package/front_end/models/issues_manager/descriptions/arSourceIgnored.md +0 -13
  353. package/front_end/models/issues_manager/descriptions/arTriggerIgnored.md +0 -12
  354. package/front_end/models/issues_manager/descriptions/arUntrustworthyReportingOrigin.md +0 -10
  355. package/front_end/models/issues_manager/descriptions/arWebAndOsHeaders.md +0 -11
  356. package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +0 -182
  357. package/front_end/panels/profiler/ProfileView.ts +0 -611
  358. package/front_end/panels/recorder/components/ExtensionView.ts +0 -132
  359. package/front_end/panels/recorder/components/components.ts +0 -25
  360. package/front_end/panels/recorder/components/util.ts +0 -116
  361. /package/front_end/panels/recorder/{components/controlButton.css → controlButton.css} +0 -0
  362. /package/front_end/panels/recorder/{components/createRecordingView.css → createRecordingView.css} +0 -0
  363. /package/front_end/panels/recorder/{components/extensionView.css → extensionView.css} +0 -0
  364. /package/front_end/panels/recorder/{components/recordingListView.css → recordingListView.css} +0 -0
  365. /package/front_end/panels/recorder/{components/replaySection.css → replaySection.css} +0 -0
  366. /package/front_end/panels/recorder/{components/selectorPicker.css → selectorPicker.css} +0 -0
  367. /package/front_end/panels/recorder/{components/startView.css → startView.css} +0 -0
  368. /package/front_end/panels/recorder/{components/stepEditor.css → stepEditor.css} +0 -0
  369. /package/front_end/panels/recorder/{components/stepView.css → stepView.css} +0 -0
  370. /package/front_end/panels/recorder/{components/timelineSection.css → timelineSection.css} +0 -0
@@ -0,0 +1,133 @@
1
+ ---
2
+ name: evaluate-ai-css-completion
3
+ description: Expose a temporary evaluation hook in DevTools and run a Puppeteer script to validate CSS code completion trigger rates.
4
+ ---
5
+
6
+ # Evaluate CSS Completion Skill
7
+
8
+ This skill allows you to temporarily expose an evaluation hook in DevTools to measure CSS code completion trigger rates using a Puppeteer script.
9
+
10
+ > [!WARNING]
11
+ > **NEVER commit the `devtools_app.ts` patch.** It is only for local evaluation. Always revert it before uploading your CL.
12
+
13
+ ## Step 1: Apply the Temporary Patch
14
+
15
+ Modify `front_end/entrypoints/devtools_app/devtools_app.ts` to expose the global `testCssCompletion` hook.
16
+
17
+ Add the following code at the end of `front_end/entrypoints/devtools_app/devtools_app.ts`:
18
+
19
+ ```typescript
20
+ // --- TEMPORARY EVALUATION HOOK ---
21
+ // TEMPORARY PATCH - REMOVE BEFORE COMMIT
22
+
23
+ import * as Host from '../../core/host/host.js';
24
+ import * as AiCodeCompletion from '../../models/ai_code_completion/ai_code_completion.js';
25
+
26
+ (self as any).testCss = {
27
+ getCases() {
28
+ return [
29
+ {
30
+ name: 'Generic CSS Test Case',
31
+ url: null,
32
+ prefix: 'h1 { font-s',
33
+ suffix: ' }',
34
+ },
35
+ // Add more test cases here
36
+ ];
37
+ },
38
+
39
+ async evaluate(uiSourceCodeUrl: string | null, prefix: string, suffix: string, additionalFiles?: any[]) {
40
+ const aidaClient = new Host.AidaClient.AidaClient();
41
+ const completion = new AiCodeCompletion.AiCodeCompletion.AiCodeCompletion(
42
+ {aidaClient},
43
+ AiCodeCompletion.AiCodeCompletion.ContextFlavor.STYLES
44
+ );
45
+
46
+ const formattedAdditionalFiles = additionalFiles?.map(f => ({
47
+ path: f.path || f.name,
48
+ content: f.content || f.text,
49
+ included_reason: f.included_reason ?? Host.AidaClient.Reason.RELATED_FILE,
50
+ }));
51
+
52
+ const result = await completion.completeCode(
53
+ prefix,
54
+ suffix,
55
+ prefix.length,
56
+ Host.AidaClient.AidaInferenceLanguage.CSS,
57
+ formattedAdditionalFiles
58
+ );
59
+
60
+ return {
61
+ hasSuggestion: result.response !== null && result.response.generatedSamples.length > 0,
62
+ suggestions: result.response?.generatedSamples.map(s => s.generationString) ?? [],
63
+ injectedFiles: formattedAdditionalFiles?.map(f => f.path) ?? [],
64
+ };
65
+ }
66
+ };
67
+ // ----------------------------------
68
+ ```
69
+
70
+ ## Step 2: Launch Chrome with Local DevTools
71
+
72
+ Use the `npm start` script to build DevTools, launch Chrome Canary with remote debugging, and automatically load your local build.
73
+
74
+ You must specify a persistent user data directory so you can log in once and reuse the session:
75
+
76
+ ```bash
77
+ npm start -- --browser=canary --remote-debugging-port=9222 --user-data-dir=/tmp/devtools-ai-evaluate-css-completion
78
+ ```
79
+
80
+ > [!IMPORTANT]
81
+ > **Instructions for the Agent:**
82
+ > After launching Chrome, you MUST print the following checklist to the user and wait for their explicit confirmation before running the evaluation script:
83
+ > 1. Sign in to Chrome with your corporate account in the new window.
84
+ > 2. Open DevTools, go to **Settings** (gear icon) > **AI Innovations**, and ensure **Code Completions** is enabled.
85
+ > 3. Ask the user to reply when they are ready.
86
+
87
+ * Keep this process running (it will watch and rebuild changes).
88
+
89
+ ## Step 3: Configure Test Cases
90
+
91
+ Before running the evaluation, configure your test cases directly in `front_end/entrypoints/devtools_app/devtools_app.ts` inside the `getCases()` method of the patch you applied in Step 1.
92
+
93
+ For example, to test spacing sensitivity, update the returned array:
94
+ ```typescript
95
+ getCases() {
96
+ return [
97
+ {
98
+ name: 'With CSS Context',
99
+ url: null,
100
+ prefix: 'h1 { font-s',
101
+ suffix: ' }',
102
+ additionalFiles: [
103
+ {
104
+ path: 'other.css',
105
+ content: 'body { color: red; }',
106
+ }
107
+ ]
108
+ }
109
+ ];
110
+ }
111
+ ```
112
+
113
+ ## Step 4: Run the Evaluation Script
114
+
115
+ Run the Puppeteer script to execute the evaluation:
116
+
117
+ ```bash
118
+ node .agents/skills/evaluate-ai-css-completion/scripts/evaluate.js
119
+ ```
120
+
121
+ > [!IMPORTANT]
122
+ > **Instructions for the Agent:**
123
+ > Since the evaluation script runs asynchronously as a background task, you MUST use the `schedule` tool to check the log file of the evaluation task every 10 seconds until it completes. Do not poll using status checks in a loop.
124
+
125
+ The script will connect to the DevTools instance, trigger completions, and output the results.
126
+
127
+ ## Step 5: Revert the Patch
128
+
129
+ Once the evaluation is complete and you have recorded the results, revert the patch in `devtools_app.ts`:
130
+
131
+ ```bash
132
+ git checkout front_end/entrypoints/devtools_app/devtools_app.ts
133
+ ```
@@ -0,0 +1,76 @@
1
+ // Copyright 2026 The Chromium Authors
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ /* eslint-disable no-console */
6
+
7
+ const puppeteer = require('puppeteer-core');
8
+
9
+ async function runEvaluation() {
10
+ console.log('Connecting to Chrome...');
11
+ const browser = await puppeteer.connect({browserURL: 'http://127.0.0.1:9222', defaultViewport: null});
12
+
13
+ try {
14
+ console.log('Opening test page (example.com)...');
15
+ const testPage = await browser.newPage();
16
+ await testPage.goto('https://example.com');
17
+
18
+ console.log('Waiting for DevTools target...');
19
+ const devtoolsTarget = await browser.waitForTarget(t => {
20
+ return t.url().startsWith('devtools://') || t.url().includes('inspector.html');
21
+ }, {timeout: 10000});
22
+
23
+ console.log('Connecting to DevTools page...');
24
+ const devtoolsPage = await devtoolsTarget.page();
25
+ if (!devtoolsPage) {
26
+ throw new Error('Could not get DevTools page object. Make sure DevTools is undocked or opened in a tab.');
27
+ }
28
+ console.log('DevTools URL:', devtoolsPage.url());
29
+
30
+ console.log('Reloading DevTools to ensure patch is loaded...');
31
+ await devtoolsPage.reload();
32
+
33
+ console.log('Waiting for DevTools to initialize and hook to be available...');
34
+ try {
35
+ await devtoolsPage.waitForFunction(() => typeof self.testCss?.getCases === 'function', {timeout: 15000});
36
+ } catch {
37
+ throw new Error('testCss.getCases hook not found. Did you apply the patch and build? Is this the local build?');
38
+ }
39
+
40
+ console.log('Fetching test cases from DevTools...');
41
+ const testCases = await devtoolsPage.evaluate(() => self.testCss.getCases());
42
+ console.log(`Found ${testCases.length} test cases.`);
43
+
44
+ let testCount = 0;
45
+ for (const tc of testCases) {
46
+ console.log(`\nRunning: ${tc.name}`);
47
+ // Delay to avoid rate limiting
48
+ await new Promise(resolve => setTimeout(resolve, 1000));
49
+
50
+ try {
51
+ const result = await devtoolsPage.evaluate(async (url, prefix, suffix, additionalFiles) => {
52
+ return await self.testCss.evaluate(url, prefix, suffix, additionalFiles);
53
+ }, tc.url, tc.prefix, tc.suffix, tc.additionalFiles);
54
+
55
+ console.log(' Result:', result);
56
+ } catch (e) {
57
+ console.error(' Failed to run test case:', e.message);
58
+ }
59
+
60
+ testCount++;
61
+ if (testCount % 20 === 0 && testCount < testCases.length) {
62
+ console.log('\n[INFO] Pausing for 10 seconds to avoid rate limiting...');
63
+ await new Promise(resolve => setTimeout(resolve, 10000));
64
+ }
65
+ }
66
+
67
+ // Cleanup tabs
68
+ await devtoolsPage.close();
69
+ await testPage.close();
70
+ } finally {
71
+ console.log('Disconnecting from Chrome...');
72
+ await browser.disconnect();
73
+ }
74
+ }
75
+
76
+ runEvaluation().catch(console.error);
@@ -1,22 +1,18 @@
1
1
  ---
2
2
  name: devtools-migrate-chromium-test
3
- description: Use when migrating chromium `third_party/blink/web_tests/http/tests/devtools/` tests to modern unit tests in `third_party/devtools-frontend/src/front_end/`.
3
+ description: Use when migrating Chromium layout tests to DevTools unit tests
4
4
  ---
5
5
 
6
- # Migrating Legacy DevTools Tests
7
-
8
- The skill should be used from within a Chromium check out. The agent should make a devtools CL for the changes in `third_party/devtools-frontend`.
9
-
10
6
  ## Workflow
11
7
 
12
8
  1. **Identify the Test to Move**:
13
9
 
14
- - Locate the legacy test file (usually `.js`) and its expectation file (`-expected.txt`) in `third_party/blink/web_tests/http/tests/devtools/`.
15
- - Example: `unit/datagrid-editable-longtext.js`
10
+ - You should have already received the issue ID, the test title, and the exact local paths of the downloaded legacy test file (`.js`) and its expectation file (`-expected.txt`) in your initial prompt.
11
+ - Refer to these local copies as you write the new modern test.
16
12
 
17
13
  2. **Identify the Target Location**:
18
14
 
19
- - Find the file being tested in `third_party/devtools-frontend/src/front_end/`.
15
+ - Find the file being tested in `front_end/`.
20
16
  - Place the new test file next to the file being tested, following the naming convention `[FileName].test.ts`.
21
17
  - Example: If testing `ui/legacy/components/data_grid/DataGrid.ts`, the test should be `ui/legacy/components/data_grid/DataGrid.test.ts`.
22
18
 
@@ -35,21 +31,23 @@ The skill should be used from within a Chromium check out. The agent should make
35
31
 
36
32
  5. **Verify the Changes**:
37
33
 
38
- - Build the unittests target: `autoninja -C out/Default <target_path>:unittests`
39
- - Run the test using the DevTools test runner: `npm run test -- <relative_path_to_test>`
34
+ - Use the `verification` skill to correctly build the project and run the new test.
40
35
  - Ensure the test passes.
41
36
 
42
- 6. **Clean Up**:
37
+ 6. **Evaluate Test Completeness and Utility**:
43
38
 
44
- - Delete the original legacy test file and its expectation file from `third_party/blink/web_tests/...`.
45
- - _(Optional)_ If instructed by the user, you may leave the files or handle them differently.
39
+ - Critically review the newly created test to ensure it provides meaningful coverage. Cross-reference it with the original Chromium layout test to verify that all original behaviors, edge cases, and assertions have been fully migrated and are actively being tested.
40
+ - If the newly added test does not test any logic from the component but just the getters from the mocked data explain to the user that this test does not add value and it's better to close it without adding the test. Provide a command without executing it to close the issue as "Fixed".
41
+ - If the newly added test uses too extensive mocks of CDP objects and methods explain to the user that the test should be foundation e2e test instead of unit test and we won't migrate it. Provide a command without executing it to close the issue as "Won't Fix (Infeasible)".
42
+
43
+ 7. Upload a CL with your changes using the `version-control` skill. Make sure the CL description has a `Fixed: <issue number>` trailer instead of `Bug: <issue number>`.
46
44
 
47
45
  ## Example Conversion
48
46
 
49
47
  ### Legacy Test (`datagrid-editable-longtext.js`)
50
48
 
51
49
  ```javascript
52
- import { TestRunner } from 'test_runner';
50
+ import {TestRunner} from 'test_runner';
53
51
  import * as DataGrid from 'devtools/ui/legacy/components/data_grid/data_grid.js';
54
52
 
55
53
  (async function () {
@@ -65,8 +63,8 @@ import * as DataGrid from 'devtools/ui/legacy/components/data_grid/data_grid.js'
65
63
 
66
64
  ```typescript
67
65
  import * as DataGrid from './data_grid.js';
68
- import { renderElementIntoDOM } from '../../../../testing/DOMHelpers.js';
69
- import { describeWithEnvironment } from '../../../../testing/EnvironmentHelpers.js';
66
+ import {renderElementIntoDOM} from '../../../../testing/DOMHelpers.js';
67
+ import {describeWithEnvironment} from '../../../../testing/EnvironmentHelpers.js';
70
68
 
71
69
  describeWithEnvironment('DataGrid', () => {
72
70
  it('tests long text in datagrid', () => {
@@ -86,59 +84,6 @@ describeWithEnvironment('DataGrid', () => {
86
84
  - **Ignoring Environment Failures**: In some environments, `npm run test` may exit with code 1 due to memory leaks (e.g., `WebFrame LEAKED`) or infrastructure issues (e.g., `gpkg` or `Corp Airlock` logs), even if the tests themselves passed. Always check the end of the test log for `TOTAL: X SUCCESS` to confirm if the test logic was successful.
87
85
  - **Rendering issue**: If you encounter an issue where checking values never gives correct information it may be due to async rendering. To resolve that you may trying using `raf()` from `front_end/testing/DOMHelpers.ts` to wait for the next rendering cycle.
88
86
 
89
- ## Creating a DevTools CL from a Chromium Checkout
90
-
91
- To create a DevTools Change List (CL) from a Chromium checkout, you'll be working within the devtools-frontend repository, which is located inside your Chromium source tree. The depot_tools package (which includes git cl) must be in your PATH.
92
-
93
- Here's the typical workflow:
94
-
95
- 1. **Navigate to the DevTools Frontend Directory**:
96
- The DevTools frontend code resides in `third_party/devtools-frontend/src/` within your Chromium checkout (`chromium/src`).
97
-
98
- ```bash
99
- cd path/to/chromium/src/third_party/devtools-frontend/src/
100
- ```
101
-
102
- 2. **Create a New Branch**:
103
- It's best practice to create a new branch for your changes:
104
-
105
- ```bash
106
- git new-branch my-devtools-feature
107
- ```
108
-
109
- (Or use `git checkout -b my-devtools-feature`)
110
-
111
- 3. **Make Your Code Changes**:
112
- Edit the files as needed for your feature or bug fix.
113
-
114
- 4. **Commit Changes Locally**:
115
- Stage and commit your changes using standard Git commands:
116
-
117
- ```bash
118
- git add .
119
- git commit -m "My DevTools feature description"
120
- ```
121
-
122
- _See the Chromium guide on commit messages for best practices on formatting descriptions, including the use of tags like Bug:. _
123
-
124
- 5. **Upload the CL for Review**:
125
- Use `git cl upload` to send your changes to the Chromium Gerrit code review system:
126
-
127
- ```bash
128
- git cl upload
129
- ```
130
-
131
- This command will create a CL on `https://chromium-review.googlesource.com`. Follow the prompts to add a description, reviewers, etc. You can also add reviewers and trigger builds through the Gerrit web UI.
132
-
133
- 6. **Code Review Process**:
134
- Your CL will be reviewed by DevTools owners. You may need to address feedback by amending your commit and uploading new patch sets using `git cl upload` again. Once approved, you can land the change via the Commit Queue (CQ).
135
-
136
- ### Working on Changes Across DevTools and Chromium Core
137
-
138
- - DevTools frontend (`third_party/devtools-frontend/src/`) and the main Chromium codebase (`chromium/src`) are distinct Git repositories.
139
- - If your work involves changes in both areas, you generally need to create separate CLs: one within the devtools-frontend repo and one within the main `chromium/src` repo.
140
- - The "Juggling the git submodules" section of the DevTools documentation provides guidance on managing these cross-repository changes.
141
-
142
87
  ## After finishing the migration
143
88
 
144
- Identify any helping tips that you discovered during the migration and add them to this skill.
89
+ If you encountered any novel issues, workarounds, or helpful tips during the migration that are not already documented, please report them to the user so they can be added to the skill documentation.
@@ -11,7 +11,8 @@ DevTools views into declarative `UI.Widget` components based on lit-html,
11
11
  managing a multi-pass sequential CL pipeline to ensure each code modification is
12
12
  small, testable, and highly reviewable.
13
13
 
14
- Refer to [ui_engineering.md](../../../docs/ui_engineering.md) for general principles.
14
+ Refer to [ui_engineering.md](../../../docs/ui_engineering.md) for general
15
+ principles.
15
16
 
16
17
  --------------------------------------------------------------------------------
17
18
 
@@ -28,9 +29,12 @@ Refer to [ui_engineering.md](../../../docs/ui_engineering.md) for general princi
28
29
  file matches older patterns or generic examples. Always perform a structure
29
30
  analysis of the active file first and adapt the plan to the actual, current
30
31
  code.
31
- 4. **Hybrid Files**: Files may contain multiple classes in different states of
32
- modernization (e.g., one partially migrated class and one fully legacy
33
- class). Propose modifications only for classes with actual violations.
32
+ 4. **Hybrid Files/Multiple Classes**: Files may contain multiple classes in
33
+ different states of modernization (e.g., one partially migrated class and
34
+ one fully legacy class). If the file being migrated contains several
35
+ classes, the migration needs to be done separately for each class, starting
36
+ with the leaves and going up the dependency chain. Propose modifications
37
+ only for classes with actual violations.
34
38
  5. **Coupling Analysis**: Always check the integration files (e.g., sidebar
35
39
  files, parent panel files) where the target class is instantiated to see if
36
40
  there are any direct `.element` or `.contentElement` couplings. If found,
@@ -43,12 +47,21 @@ Refer to [ui_engineering.md](../../../docs/ui_engineering.md) for general princi
43
47
  single responsibility per CL. Do not combine technology migrations (e.g.,
44
48
  converting imperative DOM to Lit-html) with base class refactoring in the
45
49
  same diff.
46
- 8. **Never Break Compilation**: Run a compiler build and execute the DevTools
47
- test suite between every pass.
50
+ 8. **Strict Intermediate Stability**: The code must compile and work correctly,
51
+ and all tests must pass after each step. We should not split the class API
52
+ update from its usage update.
48
53
  9. **Establish Comprehensive Guardrails First**: Ensure both **logic tests**
49
- (verifying presenter interactions and state updates) and **screenshot tests**
50
- (verifying layout/styling) exist before rewriting code. If coverage is
51
- missing, scaffold it first.
54
+ (verifying presenter interactions and state updates) and **screenshot
55
+ tests** (verifying layout/styling) exist before rewriting code. If coverage
56
+ is missing, scaffold it first.
57
+ 10. **Pre-flight Clarification**: Before starting, verify if the task is
58
+ underspecified or ambiguous. If so, point this out and ask for
59
+ clarifications before proceeding.
60
+ 11. **Step Sizing & Complexity Assessment**: Assess the complexity of each step
61
+ beforehand. Aim for intermediate steps that involve changing or adding
62
+ roughly 300 lines of code. If a step is predicted to be too complex, break
63
+ it down into smaller substeps. The agent must stop and report back after
64
+ each step or substep to allow verification.
52
65
 
53
66
  --------------------------------------------------------------------------------
54
67
 
@@ -57,17 +70,22 @@ Refer to [ui_engineering.md](../../../docs/ui_engineering.md) for general princi
57
70
  ### Plan Generation (Gated)
58
71
 
59
72
  * **Actions**:
60
- 1. Scan the target file to determine size, complexity, legacy elements
73
+ 1. Verify if the task is underspecified or ambiguous. If so, ask for
74
+ clarifications first.
75
+ 2. Scan the target file to determine size, complexity, legacy elements
61
76
  (e.g., `ReportView`, `ToolbarButton`, `DataGrid`, `TreeOutline`), and
62
77
  actual class inheritance. Deconstruct the file mentally (or in the plan)
63
78
  into **Business Logic** (state, event handlers) and **Rendering Logic**
64
79
  (DOM creation, CSS classes). Reference code elements by **Name** (not
65
80
  line numbers) to ensure the plan remains valid as the codebase evolves.
66
- Check if the class dependencies have been migrated to the ui eng vision or not.
67
- 2. Check the files depending on this file, to understand how the code in
81
+ Check if the class dependencies have been migrated to the ui eng vision
82
+ or not. If the file contains multiple classes, plan the migration
83
+ separately for each class, starting with the leaves and going up the
84
+ dependency chain.
85
+ 3. Check the files depending on this file, to understand how the code in
68
86
  this file is being used.
69
- 3. **Dynamic Ordering Decision**: Determine whether to run
70
- Logic Consolidation first or Local lit-html rendering first:
87
+ 4. **Dynamic Ordering Decision**: Determine whether to run Logic
88
+ Consolidation first or Local lit-html rendering first:
71
89
  * **Option A (Logic First)**: Choose this if the component has a
72
90
  complex, nested state model or highly coupled event-handlers.
73
91
  Consolidating the state variables and defining the `ViewInput`
@@ -78,9 +96,9 @@ Refer to [ui_engineering.md](../../../docs/ui_engineering.md) for general princi
78
96
  DOM construction. Converting the layout to declarative Lit templates
79
97
  first (using temporary inline or local state) makes it much easier
80
98
  to isolate and group the remaining state updates afterward.
81
- 4. Generate a `migration_plan.md` reflecting this ordering and outlining
99
+ 5. Generate a `migration_plan.md` reflecting this ordering and outlining
82
100
  the target steps.
83
- 5. Halt execution and print the formatted plan in Markdown to the chat.
101
+ 6. Halt execution and print the formatted plan in Markdown to the chat.
84
102
  Wait for user approval.
85
103
 
86
104
  ### Baseline & Safety Scaffolding
@@ -90,8 +108,9 @@ Refer to [ui_engineering.md](../../../docs/ui_engineering.md) for general princi
90
108
  * **Subskill to Import**: `ui-eng-vision-test-scaffolder`
91
109
  * **Actions**:
92
110
  1. Verify existing test coverage. Propose and add missing **logic tests**
93
- for interactions and **screenshot tests** for visual validation to avoid regressions.
94
- 2. Pay extra attention not to skip this step.
111
+ for interactions and **screenshot tests** for visual validation to avoid
112
+ regressions.
113
+ 2. Pay extra attention not to skip this step.
95
114
 
96
115
  ### Logic Consolidation
97
116
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: devtools-version-control
3
- description: Use when starting a new task, creating a branch, switching branches, managing branches, creating and uploading CLs, or handling stacked changes in the DevTools Gerrit-based workflow. ALWAYS use this instead of running standard git checkout/switch commands for branch creation.
3
+ description: Use when starting a new task, creating a branch, switching branches, managing branches, creating and uploading CLs, handling stacked changes, or checking release and roll status in the DevTools Gerrit-based workflow. ALWAYS use this instead of running standard git checkout/switch commands for branch creation.
4
4
  ---
5
5
 
6
6
  # DevTools Version Control
@@ -73,6 +73,12 @@ To upload an updated CL:
73
73
  git cl upload -d -t "<one sentence patch set description>"
74
74
  ```
75
75
 
76
+ ## Release and Roll Status
77
+
78
+ To check whether a DevTools commit (`devtools/devtools-frontend`) has rolled into `chromium/src` (`Roll status`) and what version or channel it is deployed to (`Release status`), look it up via the Chromium Dash API:
79
+
80
+ `https://chromiumdash.appspot.com/fetch_commit?commit=<sha>`
81
+
76
82
  ## Quick Reference
77
83
 
78
84
  | Action | Command |
@@ -83,6 +89,7 @@ git cl upload -d -t "<one sentence patch set description>"
83
89
  | Upload to Gerrit | `git cl upload` |
84
90
  | Change branch parent | `git reparent-branch <new-parent>` |
85
91
  | Sync all branches | `git rebase-update` |
92
+ | Check release & roll status | Query `https://chromiumdash.appspot.com/fetch_commit?commit=<sha>` |
86
93
 
87
94
  ## Common Mistakes
88
95
  - **Multiple commits on one branch:** Gerrit expects one commit per CL. Always `commit --amend`.
package/AUTHORS CHANGED
@@ -82,6 +82,7 @@ Nourhan Hasan <nourhan.m.hasan@gmail.com>
82
82
  Paras Awasthi <awasthiparas6@gmail.com>
83
83
  Paul Fisher <paul@pfish.zone>
84
84
  Peng Zhou <zhoupeng.1996@bytedance.com>
85
+ Percy Wang <a945970854@gmail.com>
85
86
  Per-Olov Jernberg <possan@possan.se>
86
87
  PhistucK <phistuck@gmail.com>
87
88
  Pradhuman Singh Baid <pradhumansinghbaid@gmail.com>
package/SECURITY.md CHANGED
@@ -54,3 +54,6 @@ Chrome DevTools is a privileged web app running in a sandboxed renderer process,
54
54
 
55
55
  ### Side-Effect Free Evaluation
56
56
  * Side-effect free JavaScript evaluation is a best-effort developer heuristic to prevent accidental state changes, not a security boundary. Bypassing it to cause side effects on the debugged page is not a vulnerability.
57
+
58
+ ### Self-XSS Paste Gate
59
+ * The self-XSS paste gate is not a security boundary. It is supposed to reduce the chance for abuse, not to fully prevent it. Issues around bypassing it are social engineering, and outside of our threat model.
@@ -499,3 +499,9 @@ ln -s src/third_party/devtools-frontend/src devtools-frontend
499
499
  If you did run `gclient sync` first, remove the devtools-frontend directory and start over.
500
500
 
501
501
  Run `gclient sync` after creating the link to fetch the dependencies for the standalone checkout.
502
+
503
+ ### Known issues
504
+
505
+ - GN/Siso wrappers in `depot_tools` don't assume the side-by-side solutions, and
506
+ always use the binaries in Chromium. Please make sure updating Chromium when
507
+ you get a build error.
package/eslint.config.mjs CHANGED
@@ -691,6 +691,13 @@ export default defineConfig([
691
691
  'lit/quoted-expressions': ['error', 'never'],
692
692
  },
693
693
  },
694
+ {
695
+ name: 'Front-end core files',
696
+ files: ['front_end/core/**/*.ts'],
697
+ rules: {
698
+ '@devtools/no-instance-of-migrated-singletons': 'error',
699
+ },
700
+ },
694
701
  {
695
702
  name: 'Front-end meta files',
696
703
  files: ['front_end/**/*-meta.ts'],
@@ -148,12 +148,69 @@ export namespace Chrome {
148
148
 
149
149
  export interface ExtensionSidebarPane extends ExtensionView {
150
150
  setHeight(height: string): void;
151
+
152
+ /**
153
+ * Sets an object to be displayed in the sidebar pane.
154
+ *
155
+ * If a `callback` is provided, it is invoked when the object has been set
156
+ * and the method returns `void`. If no `callback` is provided, the method
157
+ * returns a `Promise`.
158
+ *
159
+ * @param jsonObject The JSON object to display in the pane (as a string).
160
+ * @param rootTitle Optional title of the root node.
161
+ * @param callback Optional callback to be invoked when the object has been set.
162
+ * @returns A Promise that resolves when the object has been set if no callback is
163
+ * provided, otherwise void. Rejects with an error object on failure.
164
+ */
165
+ setObject(jsonObject: string, rootTitle?: string): Promise<void>;
151
166
  setObject(jsonObject: string, rootTitle?: string, callback?: () => unknown): void;
167
+
168
+ /**
169
+ * Evaluates an expression in the context of the inspected page and displays the
170
+ * result in the sidebar pane.
171
+ *
172
+ * If a `callback` is provided, it is invoked when the expression has been evaluated
173
+ * and the method returns `void`. If no `callback` is provided, the method
174
+ * returns a `Promise`.
175
+ *
176
+ * @param expression The expression to evaluate.
177
+ * @param rootTitle Optional title of the root node.
178
+ * @param evaluateOptions Options for evaluating the expression.
179
+ * @param callback Optional callback to be invoked when the expression has been evaluated.
180
+ * @returns A Promise that resolves when the expression has been evaluated if no callback is
181
+ * provided, otherwise void. Rejects with an error object on failure.
182
+ */
183
+ setExpression(expression: string, rootTitle?: string, evaluateOptions?: {
184
+ frameURL?: string,
185
+ useContentScriptContext?: boolean,
186
+ scriptExecutionContext?: string,
187
+ }): Promise<void>;
188
+ setExpression(expression: string, rootTitle?: string, evaluateOptions?: {
189
+ frameURL?: string,
190
+ useContentScriptContext?: boolean,
191
+ scriptExecutionContext?: string,
192
+ },
193
+ callback?: () => unknown): void;
194
+
152
195
  setPage(path: string): void;
153
196
  }
154
197
 
155
198
  export interface PanelWithSidebar {
199
+ /**
200
+ * Creates a sidebar pane in the Elements or Sources panel.
201
+ *
202
+ * If a `callback` is provided, it is invoked with the sidebar pane
203
+ * and the method returns `void`. If no `callback` is provided, the method
204
+ * returns a `Promise`.
205
+ *
206
+ * @param title The title of the sidebar pane.
207
+ * @param callback Optional callback to be invoked when the sidebar pane has been created.
208
+ * @returns A Promise that resolves to the created ExtensionSidebarPane if no callback is
209
+ * provided, otherwise void. Rejects with an error object on failure.
210
+ */
211
+ createSidebarPane(title: string): Promise<ExtensionSidebarPane>;
156
212
  createSidebarPane(title: string, callback?: (result: ExtensionSidebarPane) => unknown): void;
213
+
157
214
  onSelectionChanged: EventSink<() => unknown>;
158
215
  }
159
216
 
@@ -163,7 +220,38 @@ export namespace Chrome {
163
220
  network: NetworkPanel;
164
221
  themeName: string;
165
222
 
223
+ /**
224
+ * Creates an extension panel.
225
+ *
226
+ * If a `callback` is provided, it is invoked with the panel
227
+ * and the method returns `void`. If no `callback` is provided, the method
228
+ * returns a `Promise`.
229
+ *
230
+ * @param title The title of the panel.
231
+ * @param iconPath The path to the icon for the panel.
232
+ * @param pagePath The path to the page for the panel.
233
+ * @param callback Optional callback to be invoked when the panel has been created.
234
+ * @returns A Promise that resolves to the created ExtensionPanel if no callback is
235
+ * provided, otherwise void. Rejects with an error object on failure.
236
+ */
237
+ create(title: string, iconPath: string, pagePath: string): Promise<ExtensionPanel>;
166
238
  create(title: string, iconPath: string, pagePath: string, callback?: (panel: ExtensionPanel) => unknown): void;
239
+
240
+ /**
241
+ * Opens a resource in the Sources panel.
242
+ *
243
+ * If a `callback` is provided, it is invoked when the resource has been opened
244
+ * and the method returns `void`. If no `callback` is provided, the method
245
+ * returns a `Promise`.
246
+ *
247
+ * @param url The URL of the resource.
248
+ * @param lineNumber The line number to highlight.
249
+ * @param columnNumber Optional column number to highlight.
250
+ * @param callback Optional callback to be invoked when the resource has been opened.
251
+ * @returns A Promise that resolves when the resource has been opened if no callback is
252
+ * provided, otherwise void. Rejects with an error object on failure.
253
+ */
254
+ openResource(url: string, lineNumber: number, columnNumber?: number): Promise<void>;
167
255
  openResource(url: string, lineNumber: number, columnNumber?: number, callback?: () => unknown): void;
168
256
 
169
257
  setOpenResourceHandler(