chrome-devtools-frontend 1.0.1616061 → 1.0.1621064

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 (318) hide show
  1. package/AUTHORS +1 -0
  2. package/docs/checklist/README.md +8 -7
  3. package/eslint.config.mjs +7 -0
  4. package/front_end/core/common/Object.ts +11 -2
  5. package/front_end/core/dom_extension/DOMExtension.ts +11 -8
  6. package/front_end/core/host/AidaClient.ts +8 -0
  7. package/front_end/core/host/AidaGcaTranslation.ts +1 -0
  8. package/front_end/core/host/UserMetrics.ts +0 -1
  9. package/front_end/core/platform/api/HostRuntime.ts +2 -2
  10. package/front_end/core/platform/browser/HostRuntime.ts +4 -2
  11. package/front_end/core/platform/node/HostRuntime.ts +2 -2
  12. package/front_end/core/root/ExperimentNames.ts +0 -1
  13. package/front_end/core/sdk/NetworkManager.ts +30 -4
  14. package/front_end/core/sdk/NetworkRequest.ts +2 -10
  15. package/front_end/core/sdk/Resource.ts +2 -1
  16. package/front_end/core/sdk/ServerSentEventsProtocol.ts +1 -1
  17. package/front_end/core/sdk/TraceObject.ts +7 -2
  18. package/front_end/entrypoint_template.html +1 -2
  19. package/front_end/entrypoints/greendev_floaty/FloatyEntrypoint.ts +119 -15
  20. package/front_end/entrypoints/greendev_floaty/greendev_floaty.ts +0 -2
  21. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +43 -33
  22. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotLoader.ts +2 -1
  23. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotWorkerDispatcher.ts +9 -6
  24. package/front_end/entrypoints/main/MainImpl.ts +0 -2
  25. package/front_end/generated/InspectorBackendCommands.ts +8 -7
  26. package/front_end/generated/SupportedCSSProperties.js +119 -100
  27. package/front_end/generated/protocol-mapping.d.ts +1 -9
  28. package/front_end/generated/protocol-proxy-api.d.ts +1 -9
  29. package/front_end/generated/protocol.ts +24 -1
  30. package/front_end/legacy/legacy-defs.d.ts +1 -1
  31. package/front_end/models/ai_assistance/AiConversation.ts +1 -0
  32. package/front_end/models/ai_assistance/AiHistoryStorage.ts +39 -0
  33. package/front_end/models/ai_assistance/agents/AiAgent.ts +2 -0
  34. package/front_end/models/ai_assistance/agents/ConversationSummaryAgent.ts +28 -16
  35. package/front_end/models/ai_assistance/agents/GreenDevAgent.ts +512 -0
  36. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +112 -145
  37. package/front_end/models/ai_assistance/agents/README.md +0 -5
  38. package/front_end/models/ai_assistance/agents/StylingAgent.ts +9 -16
  39. package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
  40. package/front_end/models/ai_code_completion/AiCodeCompletion.ts +19 -1
  41. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +48 -13
  42. package/front_end/models/bindings/SymbolizedError.ts +95 -8
  43. package/front_end/models/emulation/DeviceModeModel.ts +42 -13
  44. package/front_end/models/emulation/EmulatedDevices.ts +1 -1
  45. package/front_end/models/issues_manager/IssuesManager.ts +13 -6
  46. package/front_end/models/issues_manager/IssuesManagerEvents.ts +1 -0
  47. package/front_end/models/javascript_metadata/NativeFunctions.js +2 -2
  48. package/front_end/models/live-metrics/web-vitals-injected/web-vitals-injected.ts +1 -0
  49. package/front_end/models/stack_trace/DetailedErrorStackParser.ts +49 -10
  50. package/front_end/models/stack_trace/ErrorStackParser.ts +18 -0
  51. package/front_end/models/stack_trace/StackTraceModel.ts +5 -1
  52. package/front_end/models/text_utils/ContentData.ts +71 -10
  53. package/front_end/models/trace/types/File.ts +8 -1
  54. package/front_end/models/web_mcp/WebMCPModel.ts +22 -0
  55. package/front_end/models/workspace/UISourceCode.ts +4 -4
  56. package/front_end/panels/accessibility/ARIAAttributesView.ts +4 -4
  57. package/front_end/panels/accessibility/AccessibilitySubPane.ts +3 -2
  58. package/front_end/panels/accessibility/SourceOrderView.ts +4 -4
  59. package/front_end/panels/ai_assistance/ai_assistance.ts +1 -0
  60. package/front_end/panels/ai_assistance/components/ChatInput.ts +66 -0
  61. package/front_end/panels/ai_assistance/components/ChatMessage.ts +144 -21
  62. package/front_end/panels/ai_assistance/components/ChatView.ts +43 -8
  63. package/front_end/panels/ai_assistance/components/ExportForAgentsDialog.ts +1 -0
  64. package/front_end/panels/ai_assistance/components/WalkthroughUtils.ts +74 -0
  65. package/front_end/panels/ai_assistance/components/WalkthroughView.ts +34 -5
  66. package/front_end/panels/ai_assistance/components/chatMessage.css +11 -0
  67. package/front_end/panels/ai_assistance/components/walkthroughView.css +7 -0
  68. package/front_end/panels/application/ApplicationPanelTreeElement.ts +1 -1
  69. package/front_end/panels/application/CookieItemsView.ts +8 -9
  70. package/front_end/panels/application/DOMStorageItemsView.ts +3 -3
  71. package/front_end/panels/application/DeviceBoundSessionsModel.ts +7 -0
  72. package/front_end/panels/application/DeviceBoundSessionsTreeElement.ts +21 -0
  73. package/front_end/panels/application/DeviceBoundSessionsView.ts +2 -2
  74. package/front_end/panels/application/ExtensionStorageItemsView.ts +1 -1
  75. package/front_end/panels/application/KeyValueStorageItemsView.ts +32 -14
  76. package/front_end/panels/application/ResourcesPanel.ts +5 -5
  77. package/front_end/panels/application/StorageItemsToolbar.ts +0 -19
  78. package/front_end/panels/application/WebMCPView.ts +285 -86
  79. package/front_end/panels/application/components/BounceTrackingMitigationsView.ts +4 -4
  80. package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +4 -4
  81. package/front_end/panels/application/webMCPView.css +261 -182
  82. package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +9 -5
  83. package/front_end/panels/changes/ChangesSidebar.ts +2 -2
  84. package/front_end/panels/changes/ChangesView.ts +9 -14
  85. package/front_end/panels/console/ConsolePanel.ts +10 -3
  86. package/front_end/panels/console/ConsoleSidebar.ts +5 -5
  87. package/front_end/panels/console/ConsoleView.ts +11 -4
  88. package/front_end/panels/console/ConsoleViewMessage.ts +1 -19
  89. package/front_end/panels/coverage/CoverageView.ts +4 -5
  90. package/front_end/panels/elements/ElementsPanel.ts +9 -12
  91. package/front_end/panels/elements/ElementsSidebarPane.ts +4 -5
  92. package/front_end/panels/elements/ElementsTreeElement.ts +61 -0
  93. package/front_end/panels/elements/ElementsTreeOutline.ts +46 -0
  94. package/front_end/panels/elements/LayersWidget.ts +2 -2
  95. package/front_end/panels/elements/MetricsSidebarPane.ts +5 -4
  96. package/front_end/panels/elements/StylePropertiesSection.ts +1 -1
  97. package/front_end/panels/elements/StylePropertyTreeElement.ts +11 -6
  98. package/front_end/panels/elements/StylesSidebarPane.ts +4 -1
  99. package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +19 -20
  100. package/front_end/panels/elements/components/ElementsBreadcrumbsUtils.ts +29 -29
  101. package/front_end/panels/elements/components/QueryContainer.ts +5 -6
  102. package/front_end/panels/elements/components/components.ts +0 -2
  103. package/front_end/panels/emulation/MediaQueryInspector.ts +4 -7
  104. package/front_end/panels/layer_viewer/LayerDetailsView.ts +4 -7
  105. package/front_end/panels/layer_viewer/Layers3DView.ts +2 -2
  106. package/front_end/panels/lighthouse/LighthouseStartView.ts +2 -2
  107. package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +47 -66
  108. package/front_end/panels/network/NetworkConfigView.ts +11 -11
  109. package/front_end/panels/network/RequestConditionsDrawer.ts +6 -4
  110. package/front_end/panels/network/RequestCookiesView.ts +2 -2
  111. package/front_end/panels/network/RequestDeviceBoundSessionsView.ts +2 -2
  112. package/front_end/panels/network/RequestHeadersView.ts +2 -2
  113. package/front_end/panels/network/components/DirectSocketConnectionView.ts +4 -5
  114. package/front_end/panels/performance_monitor/PerformanceMonitor.ts +6 -9
  115. package/front_end/panels/profiler/HeapProfileView.ts +29 -4
  116. package/front_end/panels/profiler/ProfilesPanel.ts +1 -1
  117. package/front_end/panels/protocol_monitor/JSONEditor.css +8 -1
  118. package/front_end/panels/protocol_monitor/JSONEditor.ts +7 -2
  119. package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +6 -4
  120. package/front_end/panels/recorder/components/ControlButton.ts +4 -4
  121. package/front_end/panels/recorder/components/StepView.ts +6 -6
  122. package/front_end/panels/search/SearchView.ts +4 -7
  123. package/front_end/panels/sources/DebuggerPausedMessage.ts +18 -22
  124. package/front_end/panels/sources/SourcesView.ts +1 -1
  125. package/front_end/panels/sources/TabbedEditorContainer.ts +2 -2
  126. package/front_end/panels/sources/ThreadsSidebarPane.ts +2 -4
  127. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +24 -20
  128. package/front_end/panels/timeline/StatusDialog.ts +5 -8
  129. package/front_end/panels/timeline/ThirdPartyTreeView.ts +10 -0
  130. package/front_end/panels/timeline/TimelineLoader.ts +3 -4
  131. package/front_end/panels/timeline/TimelineSelectorStatsView.ts +2 -2
  132. package/front_end/panels/timeline/components/TimelineRangeSummaryView.ts +2 -0
  133. package/front_end/panels/timeline/components/TimelineSummary.ts +9 -1
  134. package/front_end/panels/timeline/components/timelineSummary.css +4 -0
  135. package/front_end/panels/timeline/overlays/components/TimespanBreakdownOverlay.ts +2 -2
  136. package/front_end/panels/timeline/thirdPartyTreeView.css +8 -1
  137. package/front_end/panels/web_audio/WebAudioView.ts +5 -4
  138. package/front_end/panels/whats_new/ReleaseNoteText.ts +9 -9
  139. package/front_end/panels/whats_new/resources/WNDT.md +9 -6
  140. package/front_end/third_party/chromium/README.chromium +1 -1
  141. package/front_end/third_party/puppeteer/README.chromium +2 -2
  142. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts +41 -2
  143. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts.map +1 -1
  144. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js.map +1 -1
  145. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.d.ts +13 -1
  146. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.d.ts.map +1 -1
  147. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.js +21 -1
  148. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.js.map +1 -1
  149. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.d.ts.map +1 -1
  150. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.js +1 -0
  151. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.js.map +1 -1
  152. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +2 -2
  153. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
  154. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +5 -5
  155. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
  156. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
  157. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js +2 -2
  158. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js.map +1 -1
  159. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.d.ts.map +1 -1
  160. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.js +1 -0
  161. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.js.map +1 -1
  162. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.d.ts +1 -1
  163. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.d.ts.map +1 -1
  164. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.js +2 -2
  165. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.js.map +1 -1
  166. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts +1 -1
  167. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts.map +1 -1
  168. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js +52 -1
  169. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js.map +1 -1
  170. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.d.ts.map +1 -1
  171. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.js.map +1 -1
  172. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts +25 -0
  173. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts.map +1 -1
  174. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
  175. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  176. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +2 -2
  177. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
  178. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
  179. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +0 -1
  180. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
  181. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +2 -2
  182. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +2 -2
  183. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
  184. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
  185. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
  186. package/front_end/third_party/puppeteer/package/lib/cjs/third_party/urlpattern-polyfill/urlpattern-polyfill.d.ts +1 -0
  187. package/front_end/third_party/puppeteer/package/lib/cjs/third_party/urlpattern-polyfill/urlpattern-polyfill.js +853 -0
  188. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +91 -11
  189. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +1046 -33
  190. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts +41 -2
  191. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts.map +1 -1
  192. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js.map +1 -1
  193. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.d.ts +13 -1
  194. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.d.ts.map +1 -1
  195. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.js +21 -1
  196. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.js.map +1 -1
  197. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.d.ts.map +1 -1
  198. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js +1 -0
  199. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js.map +1 -1
  200. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +2 -2
  201. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
  202. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +5 -5
  203. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
  204. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
  205. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js +2 -2
  206. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js.map +1 -1
  207. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.d.ts.map +1 -1
  208. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.js +1 -0
  209. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.js.map +1 -1
  210. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.d.ts +1 -1
  211. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.d.ts.map +1 -1
  212. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.js +2 -2
  213. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.js.map +1 -1
  214. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts +1 -1
  215. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts.map +1 -1
  216. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js +52 -1
  217. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js.map +1 -1
  218. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.d.ts.map +1 -1
  219. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.js.map +1 -1
  220. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts +25 -0
  221. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts.map +1 -1
  222. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/injected.d.ts +1 -1
  223. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  224. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +2 -2
  225. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
  226. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
  227. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +0 -1
  228. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
  229. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +2 -2
  230. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +2 -2
  231. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/Mutex.d.ts +2 -2
  232. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
  233. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
  234. package/front_end/third_party/puppeteer/package/lib/esm/third_party/urlpattern-polyfill/urlpattern-polyfill.d.ts +1 -0
  235. package/front_end/third_party/puppeteer/package/lib/esm/third_party/urlpattern-polyfill/urlpattern-polyfill.js +805 -0
  236. package/front_end/third_party/puppeteer/package/lib/types.d.ts +91 -11
  237. package/front_end/third_party/puppeteer/package/package.json +3 -2
  238. package/front_end/third_party/puppeteer/package/src/api/ElementHandle.ts +53 -11
  239. package/front_end/third_party/puppeteer/package/src/api/Extension.ts +29 -1
  240. package/front_end/third_party/puppeteer/package/src/bidi/ElementHandle.ts +1 -0
  241. package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +6 -0
  242. package/front_end/third_party/puppeteer/package/src/cdp/BrowserConnector.ts +2 -0
  243. package/front_end/third_party/puppeteer/package/src/cdp/ElementHandle.ts +1 -0
  244. package/front_end/third_party/puppeteer/package/src/cdp/Extension.ts +9 -2
  245. package/front_end/third_party/puppeteer/package/src/cdp/TargetManager.ts +59 -0
  246. package/front_end/third_party/puppeteer/package/src/cdp/WebMCP.ts +6 -1
  247. package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +26 -0
  248. package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +2 -0
  249. package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +0 -1
  250. package/front_end/third_party/puppeteer/package/src/revisions.ts +2 -2
  251. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  252. package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +2 -1
  253. package/front_end/third_party/web-vitals/README.chromium +2 -2
  254. package/front_end/third_party/web-vitals/package/README.md +21 -10
  255. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onCLS.js +2 -4
  256. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFCP.js +1 -2
  257. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.d.ts +4 -0
  258. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.js +44 -39
  259. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.js +25 -19
  260. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onTTFB.js +1 -2
  261. package/front_end/third_party/web-vitals/package/dist/modules/lib/doubleRAF.js +1 -1
  262. package/front_end/third_party/web-vitals/package/dist/modules/lib/getActivationStart.js +1 -2
  263. package/front_end/third_party/web-vitals/package/dist/modules/lib/getLoadState.js +16 -18
  264. package/front_end/third_party/web-vitals/package/dist/modules/lib/getVisibilityWatcher.js +2 -1
  265. package/front_end/third_party/web-vitals/package/dist/modules/lib/initMetric.d.ts +1 -1
  266. package/front_end/third_party/web-vitals/package/dist/modules/lib/observe.js +1 -1
  267. package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/interactionCountPolyfill.d.ts +1 -1
  268. package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/interactionCountPolyfill.js +1 -3
  269. package/front_end/third_party/web-vitals/package/dist/modules/lib/whenActivated.js +1 -1
  270. package/front_end/third_party/web-vitals/package/dist/modules/lib/whenIdleOrHidden.js +11 -7
  271. package/front_end/third_party/web-vitals/package/dist/modules/onCLS.js +1 -1
  272. package/front_end/third_party/web-vitals/package/dist/modules/types/inp.d.ts +4 -0
  273. package/front_end/third_party/web-vitals/package/dist/modules/types.d.ts +1 -2
  274. package/front_end/third_party/web-vitals/package/dist/modules/types.js +0 -1
  275. package/front_end/third_party/web-vitals/package/package.json +24 -27
  276. package/front_end/third_party/web-vitals/package/src/attribution/onCLS.ts +2 -7
  277. package/front_end/third_party/web-vitals/package/src/attribution/onFCP.ts +1 -2
  278. package/front_end/third_party/web-vitals/package/src/attribution/onINP.ts +49 -43
  279. package/front_end/third_party/web-vitals/package/src/attribution/onLCP.ts +27 -24
  280. package/front_end/third_party/web-vitals/package/src/attribution/onTTFB.ts +1 -2
  281. package/front_end/third_party/web-vitals/package/src/lib/doubleRAF.ts +1 -1
  282. package/front_end/third_party/web-vitals/package/src/lib/getActivationStart.ts +1 -2
  283. package/front_end/third_party/web-vitals/package/src/lib/getLoadState.ts +21 -20
  284. package/front_end/third_party/web-vitals/package/src/lib/getVisibilityWatcher.ts +2 -3
  285. package/front_end/third_party/web-vitals/package/src/lib/observe.ts +1 -1
  286. package/front_end/third_party/web-vitals/package/src/lib/polyfills/interactionCountPolyfill.ts +2 -4
  287. package/front_end/third_party/web-vitals/package/src/lib/whenActivated.ts +1 -1
  288. package/front_end/third_party/web-vitals/package/src/lib/whenIdleOrHidden.ts +13 -7
  289. package/front_end/third_party/web-vitals/package/src/onCLS.ts +1 -1
  290. package/front_end/third_party/web-vitals/package/src/types/inp.ts +4 -0
  291. package/front_end/third_party/web-vitals/package/src/types.ts +1 -2
  292. package/front_end/third_party/web-vitals/patches/0001-Add-onEachInteraction-to-onINP-options.patch +13 -74
  293. package/front_end/third_party/web-vitals/rebuild.sh +3 -3
  294. package/front_end/third_party/web-vitals/web-vitals-tsconfig.json +0 -1
  295. package/front_end/ui/components/icon_button/iconButton.css +1 -0
  296. package/front_end/ui/components/legacy_wrapper/LegacyWrapper.ts +6 -6
  297. package/front_end/ui/components/lists/list.css +4 -0
  298. package/front_end/ui/legacy/Dialog.ts +21 -2
  299. package/front_end/ui/legacy/SoftContextMenu.ts +3 -3
  300. package/front_end/ui/legacy/SplitWidget.ts +9 -9
  301. package/front_end/ui/legacy/TabbedPane.ts +12 -12
  302. package/front_end/ui/legacy/View.ts +24 -22
  303. package/front_end/ui/legacy/ViewManager.ts +12 -12
  304. package/front_end/ui/legacy/ViewRegistration.ts +2 -2
  305. package/front_end/ui/legacy/Widget.ts +165 -119
  306. package/front_end/ui/legacy/components/source_frame/ImageView.ts +10 -5
  307. package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +9 -6
  308. package/front_end/ui/legacy/components/utils/Linkifier.ts +37 -11
  309. package/front_end/ui/legacy/components/utils/jsUtils.css +1 -0
  310. package/front_end/ui/legacy/inspectorCommon.css +0 -6
  311. package/front_end/ui/lit/render.ts +11 -9
  312. package/front_end/ui/visual_logging/KnownContextValues.ts +36 -0
  313. package/package.json +1 -1
  314. package/front_end/Images/src/dots-circle.svg +0 -10
  315. package/front_end/panels/elements/components/Helper.ts +0 -35
  316. package/front_end/third_party/web-vitals/package/dist/modules/types/polyfills.d.ts +0 -4
  317. package/front_end/third_party/web-vitals/package/dist/modules/types/polyfills.js +0 -16
  318. package/front_end/third_party/web-vitals/package/src/types/polyfills.ts +0 -24
@@ -16,7 +16,7 @@ import {Directives, html, nothing, render} from '../../../ui/lit/lit.js';
16
16
  import {PatchWidget} from '../PatchWidget.js';
17
17
 
18
18
  import {ChatInput} from './ChatInput.js';
19
- import {ChatMessage, type Message, type ModelChatMessage} from './ChatMessage.js';
19
+ import {ChatMessage, ChatMessageEntity, type Message, type ModelChatMessage} from './ChatMessage.js';
20
20
  import chatViewStyles from './chatView.css.js';
21
21
  import {ExportForAgentsDialog} from './ExportForAgentsDialog.js';
22
22
 
@@ -47,6 +47,33 @@ const lockedString = i18n.i18n.lockedString;
47
47
 
48
48
  const SCROLL_ROUNDING_OFFSET = 1;
49
49
 
50
+ /**
51
+ * Determines which message should display the CSS change summary.
52
+ *
53
+ * If the AI is actively loading a new response, the summary is anchored to the
54
+ * last completed model response. Otherwise, it's anchored to the latest model
55
+ * message.
56
+ */
57
+ export function getCSSChangeSummaryMessage(messages: Message[], isLoading: boolean): Message|undefined {
58
+ const modelMessages = messages.filter(m => m.entity === ChatMessageEntity.MODEL);
59
+ const lastModelMessage = modelMessages.at(-1);
60
+
61
+ if (!lastModelMessage) {
62
+ return undefined;
63
+ }
64
+
65
+ // If we are loading and the last message in the list is the one being loaded,
66
+ // we anchor the summary to the previous model message.
67
+ // If the last message is NOT a model message (e.g. it's the user's follow-up),
68
+ // we keep the summary on the current last model message until the new response
69
+ // starts appearing.
70
+ if (isLoading && messages.at(-1) === lastModelMessage) {
71
+ return modelMessages.at(-2);
72
+ }
73
+
74
+ return lastModelMessage;
75
+ }
76
+
50
77
  interface ViewOutput {
51
78
  mainElement?: HTMLElement;
52
79
  input?: UI.Widget.WidgetElement<ChatInput>;
@@ -119,6 +146,8 @@ const DEFAULT_VIEW: View = (input, output, target) => {
119
146
 
120
147
  const shouldShowPatchWidget = !hasAiV2 && !input.isLoading;
121
148
 
149
+ const cssChangeSummaryMessage = getCSSChangeSummaryMessage(input.messages, input.isLoading);
150
+
122
151
  // clang-format off
123
152
  render(html`
124
153
  <style>${chatViewStyles}</style>
@@ -126,15 +155,21 @@ const DEFAULT_VIEW: View = (input, output, target) => {
126
155
  <main @scroll=${input.handleScroll} ${ref(element => { output.mainElement = element as HTMLElement; } )}>
127
156
  ${input.messages.length > 0 ? html`
128
157
  <div class="messages-container" ${ref(input.handleMessageContainerRef)}>
129
- ${repeat(input.messages, message =>
130
- widget(ChatMessage, {
158
+ ${repeat(input.messages, (message, index) => {
159
+ const prevMessage = index > 0 ? input.messages[index - 1] : null;
160
+ const prompt = (message.entity === ChatMessageEntity.MODEL && prevMessage?.entity === ChatMessageEntity.USER) ?
161
+ prevMessage.text :
162
+ '';
163
+ return widget(ChatMessage, {
131
164
  message,
132
- isLoading: input.isLoading && input.messages.at(-1) === message,
165
+ isLoading: input.isLoading && index === input.messages.length - 1,
133
166
  isReadOnly: input.isReadOnly,
134
167
  canShowFeedbackForm: input.canShowFeedbackForm,
135
168
  markdownRenderer: input.markdownRenderer,
136
- isLastMessage: input.messages.at(-1) === message,
137
- isFirstMessage: input.messages.at(0) === message,
169
+ isLastMessage: index === input.messages.length - 1,
170
+ isFirstMessage: index === 0,
171
+ prompt,
172
+ shouldShowCSSChangeSummary: message === cssChangeSummaryMessage,
138
173
  onSuggestionClick: input.handleSuggestionClick,
139
174
  onFeedbackSubmit: input.onFeedbackSubmit,
140
175
  onCopyResponseClick: input.onCopyResponseClick,
@@ -143,8 +178,8 @@ const DEFAULT_VIEW: View = (input, output, target) => {
143
178
  walkthrough: {
144
179
  ...input.walkthrough,
145
180
  }
146
- })
147
- )}
181
+ });
182
+ })}
148
183
  ${shouldShowPatchWidget ? widget(PatchWidget, {
149
184
  changeSummary: input.changeSummary ?? '',
150
185
  changeManager: input.changeManager,
@@ -99,6 +99,7 @@ export const DEFAULT_VIEW: View = (input, _output, target): void => {
99
99
  value="prompt"
100
100
  name="export-state"
101
101
  .checked=${isPrompt}
102
+ autofocus
102
103
  aria-label=${i18nString(UIStrings.asPrompt)}
103
104
  @change=${() => input.onStateChange(StateType.PROMPT)}
104
105
  >
@@ -0,0 +1,74 @@
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
+ /**
6
+ * Truncates a string to a target length, attempting to cut at the nearest word boundary (space).
7
+ * If the string is truncated, it returns the truncated string and the number of characters removed.
8
+ *
9
+ * @param text The string to truncate.
10
+ * @param targetLength The desired length of the string.
11
+ * @returns An object containing the potentially truncated text and the number of characters removed.
12
+ */
13
+ function smartTruncate(text: string, targetLength: number): {truncatedText: string, moreCharacters: number} {
14
+ if (text.length <= targetLength) {
15
+ return {truncatedText: text, moreCharacters: 0};
16
+ }
17
+
18
+ const lastSpaceBefore = text.lastIndexOf(' ', targetLength);
19
+ const firstSpaceAfter = text.indexOf(' ', targetLength);
20
+
21
+ let cutIndex = targetLength;
22
+ if (lastSpaceBefore === -1 && firstSpaceAfter === -1) {
23
+ cutIndex = targetLength;
24
+ } else if (lastSpaceBefore === -1) {
25
+ cutIndex = firstSpaceAfter;
26
+ } else if (firstSpaceAfter === -1) {
27
+ cutIndex = lastSpaceBefore;
28
+ } else {
29
+ // Both lastSpaceBefore and firstSpaceAfter exist.
30
+ // Choose the one that is closer to the targetLength.
31
+ const distanceToSpaceBefore = targetLength - lastSpaceBefore;
32
+ const distanceToSpaceAfter = firstSpaceAfter - targetLength;
33
+ cutIndex = distanceToSpaceBefore <= distanceToSpaceAfter ? lastSpaceBefore : firstSpaceAfter;
34
+ }
35
+
36
+ let truncatedText = text;
37
+ let moreCharacters = 0;
38
+ if (cutIndex < text.length) {
39
+ truncatedText = text.slice(0, cutIndex);
40
+ moreCharacters = text.length - cutIndex;
41
+ }
42
+
43
+ return {truncatedText, moreCharacters};
44
+ }
45
+
46
+ /**
47
+ * Returns a label for the walkthrough toggle button.
48
+ * The label includes the current action (Show/Hide) and a smart-truncated version of the prompt.
49
+ */
50
+ export function getButtonLabel(input: {
51
+ isExpanded: boolean,
52
+ isLoading: boolean,
53
+ hasWidgets: boolean,
54
+ prompt: string,
55
+ stepTitle?: string,
56
+ }): string {
57
+ let labelBase = '';
58
+ if (input.isLoading && !input.isExpanded && input.stepTitle) {
59
+ labelBase = input.stepTitle;
60
+ } else {
61
+ const action = input.isExpanded ? 'Hide' : 'Show';
62
+ const type = input.hasWidgets ? 'AI walkthrough' : 'thinking';
63
+ labelBase = `${action} ${type}`;
64
+ }
65
+
66
+ if (input.isLoading) {
67
+ return `Loading: ${labelBase}`;
68
+ }
69
+
70
+ const TARGET_LENGTH = 50;
71
+ const {truncatedText, moreCharacters} = smartTruncate(input.prompt, TARGET_LENGTH);
72
+ const promptSuffix = moreCharacters > 0 ? ` (and ${moreCharacters} more characters)` : '';
73
+ return `${labelBase} for prompt ${truncatedText}${promptSuffix}`;
74
+ }
@@ -12,7 +12,14 @@ import * as Lit from '../../../ui/lit/lit.js';
12
12
  import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
13
13
 
14
14
  import chatMessageStyles from './chatMessage.css.js';
15
- import {type ModelChatMessage, renderStep, type Step, titleForStep} from './ChatMessage.js';
15
+ import {
16
+ getDeduplicatedWidgetsMessage,
17
+ type ModelChatMessage,
18
+ renderStep,
19
+ type Step,
20
+ titleForStep
21
+ } from './ChatMessage.js';
22
+ import {getButtonLabel} from './WalkthroughUtils.js';
16
23
  import walkthroughViewStyles from './walkthroughView.css.js';
17
24
 
18
25
  const lockedString = i18n.i18n.lockedString;
@@ -60,6 +67,7 @@ export interface ViewInput {
60
67
  markdownRenderer: MarkdownLitRenderer;
61
68
  isInlined: boolean;
62
69
  isExpanded: boolean;
70
+ prompt: string;
63
71
  onToggle: (isOpen: boolean, message: ModelChatMessage) => void;
64
72
  onOpen: (message: ModelChatMessage) => void;
65
73
  handleScroll: (ev: Event) => void;
@@ -128,13 +136,22 @@ function renderInlineWalkthrough(input: ViewInput, stepsOutput: Lit.LitTemplate,
128
136
  }
129
137
  </span>
130
138
  <details class="walkthrough-inline" ?open=${input.isExpanded} @toggle=${onToggle} jslog=${VisualLogging.expand('walkthrough').track({click: true})}>
131
- <summary ?data-has-widgets=${!input.isLoading && hasWidgets}>
132
- <span class="walkthrough-inline-title">
139
+ <summary
140
+ ?data-has-widgets=${!input.isLoading && hasWidgets}
141
+ aria-label=${getButtonLabel({
142
+ isExpanded: input.isExpanded,
143
+ isLoading: input.isLoading,
144
+ hasWidgets,
145
+ prompt: input.prompt,
146
+ stepTitle: titleForStep(lastStep),
147
+ })}
148
+ >
149
+ <h2 class="walkthrough-inline-title">
133
150
  ${input.isExpanded ?
134
151
  walkthroughCloseTitle({hasWidgets, isInlined: true}) :
135
152
  walkthroughTitle({isLoading: input.isLoading, lastStep, hasWidgets})
136
153
  }
137
- </span>
154
+ </h2>
138
155
  <devtools-icon name="chevron-right"></devtools-icon>
139
156
  </summary>
140
157
 
@@ -240,6 +257,7 @@ export class WalkthroughView extends UI.Widget.Widget {
240
257
  #onOpen: (message: ModelChatMessage) => void = () => {};
241
258
  #isInlined = false;
242
259
  #isExpanded = false;
260
+ #prompt = '';
243
261
 
244
262
  #pinScrollToBottom = true;
245
263
  #isProgrammaticScroll = false;
@@ -386,10 +404,20 @@ export class WalkthroughView extends UI.Widget.Widget {
386
404
  this.requestUpdate();
387
405
  }
388
406
 
407
+ get prompt(): string {
408
+ return this.#prompt;
409
+ }
410
+
411
+ set prompt(prompt: string) {
412
+ this.#prompt = prompt;
413
+ this.requestUpdate();
414
+ }
415
+
389
416
  override performUpdate(): void {
390
417
  if (!this.#markdownRenderer) {
391
418
  return;
392
419
  }
420
+ const message = this.#message ? getDeduplicatedWidgetsMessage(this.#message) : null;
393
421
  this.#view(
394
422
  {
395
423
  isLoading: this.#isLoading,
@@ -398,7 +426,8 @@ export class WalkthroughView extends UI.Widget.Widget {
398
426
  onOpen: this.#onOpen,
399
427
  isInlined: this.#isInlined,
400
428
  isExpanded: this.#isExpanded,
401
- message: this.#message,
429
+ prompt: this.#prompt,
430
+ message,
402
431
  handleScroll: this.#handleScroll,
403
432
  },
404
433
  this.#output, this.contentElement);
@@ -263,6 +263,7 @@
263
263
  align-items: center;
264
264
 
265
265
  .title {
266
+ margin: 0;
266
267
  text-overflow: ellipsis;
267
268
  white-space: nowrap;
268
269
  overflow: hidden;
@@ -352,6 +353,10 @@
352
353
  &[open] {
353
354
  width: auto;
354
355
 
356
+ summary {
357
+ margin-bottom: var(--sys-size-2);
358
+ }
359
+
355
360
  .summary .title {
356
361
  white-space: normal;
357
362
  overflow: unset;
@@ -368,6 +373,11 @@
368
373
 
369
374
  summary {
370
375
  border-radius: 16px;
376
+
377
+ &:focus-visible {
378
+ outline: var(--sys-size-2) solid var(--sys-color-state-focus-ring);
379
+ outline-offset: var(--sys-size-2);
380
+ }
371
381
  }
372
382
 
373
383
  .step-details {
@@ -452,6 +462,7 @@
452
462
 
453
463
  .widget-name {
454
464
  font: var(--sys-typescale-body4-regular);
465
+ margin: 0;
455
466
  max-width: 80%;
456
467
  overflow: hidden;
457
468
  text-overflow: ellipsis;
@@ -158,11 +158,18 @@
158
158
  }
159
159
 
160
160
  > .walkthrough-inline-title {
161
+ font: var(--sys-typescale-body4-regular);
162
+ font-weight: var(--ref-typeface-weight-medium);
161
163
  overflow: hidden;
162
164
  text-overflow: ellipsis;
163
165
  white-space: nowrap;
164
166
  min-width: 0;
165
167
  }
168
+
169
+ &:focus-visible {
170
+ outline: var(--sys-size-2) solid var(--sys-color-state-focus-ring);
171
+ outline-offset: calc(-1 * var(--sys-size-2));
172
+ }
166
173
  }
167
174
 
168
175
  .walkthrough-inline[open] > summary {
@@ -53,7 +53,7 @@ export class ApplicationPanelTreeElement extends UI.TreeOutline.TreeElement {
53
53
  return false;
54
54
  }
55
55
 
56
- showView(view: UI.Widget.Widget|null): void {
56
+ showView(view: UI.Widget.AnyWidget|null): void {
57
57
  this.resourcesPanel.showView(view);
58
58
  }
59
59
  }
@@ -128,7 +128,7 @@ export const DEFAULT_COOKIE_PREVIEW_WIDGET_VIEW: CookiePreviewWidgetView = (inpu
128
128
  </div>
129
129
  `,
130
130
  // clang-format on
131
- target);
131
+ target, {container: {attributes: {jslog: `${VisualLogging.pane('cookie-preview')}`}}});
132
132
  };
133
133
 
134
134
  class CookiePreviewWidget extends UI.Widget.VBox {
@@ -137,7 +137,7 @@ class CookiePreviewWidget extends UI.Widget.VBox {
137
137
  private showDecodedSetting: Common.Settings.Setting<boolean>;
138
138
 
139
139
  constructor(element?: HTMLElement, view: CookiePreviewWidgetView = DEFAULT_COOKIE_PREVIEW_WIDGET_VIEW) {
140
- super(element, {jslog: `${VisualLogging.section('cookie-preview')}`});
140
+ super(element);
141
141
  this.view = view;
142
142
  this.setMinimumSize(230, 45);
143
143
  this.#cookie = null;
@@ -186,12 +186,11 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
186
186
  // clang-format off
187
187
  render(html`<style>${cookieItemsViewStyles}</style>
188
188
  <devtools-widget class="storage-view" ${widget(UI.Widget.VBox, {minimumSize: new Size(0, 50)})}>
189
- <devtools-widget ${widget(StorageItemsToolbar, {
190
- onDeleteSelectedCallback: input.onDeleteSelectedItems,
191
- onDeleteAllCallback: input.onDeleteAllItems,
192
- onRefreshCallback: input.onRefreshItems,
193
- })}
189
+ <devtools-widget ${widget(StorageItemsToolbar, {filterRegex: null})}
194
190
  class=flex-none
191
+ @Refresh=${input.onRefreshItems}
192
+ @DeleteAll=${input.onDeleteAllItems}
193
+ @DeleteSelected=${input.onDeleteSelectedItems}
195
194
  ${UI.Widget.widgetRef(StorageItemsToolbar, toolbar => { output.toolbar = toolbar; })}
196
195
  ></devtools-widget>
197
196
  <devtools-split-view sidebar-position="second" name="cookie-items-split-view-state">
@@ -221,7 +220,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
221
220
  </devtools-widget>
222
221
  `,
223
222
  // clang-format on
224
- target);
223
+ target, {container: {attributes: {jslog: `${VisualLogging.pane('cookies-data')}`}}});
225
224
  };
226
225
 
227
226
  export class CookieItemsView extends UI.Widget.VBox {
@@ -235,7 +234,7 @@ export class CookieItemsView extends UI.Widget.VBox {
235
234
  #toolbar?: StorageItemsToolbar;
236
235
 
237
236
  constructor(model: SDK.CookieModel.CookieModel, cookieDomain: string, view: View = DEFAULT_VIEW) {
238
- super({jslog: `${VisualLogging.pane('cookies-data')}`});
237
+ super();
239
238
 
240
239
  this.view = view;
241
240
 
@@ -62,15 +62,15 @@ export class DOMStorageItemsView extends KeyValueStorageItemsView {
62
62
  private eventListeners: Common.EventTarget.EventDescriptor[];
63
63
 
64
64
  constructor(domStorage: DOMStorage) {
65
- super(i18nString(UIStrings.domStorageItems), 'dom-storage', true);
65
+ super(
66
+ i18nString(UIStrings.domStorageItems), 'dom-storage', true, /* view=*/ undefined, /* metadataView=*/ undefined,
67
+ /* jslog=*/ undefined, ['storage-view', 'table']);
66
68
 
67
69
  this.domStorage = domStorage;
68
70
  if (domStorage.storageKey) {
69
71
  this.toolbar?.setStorageKey(domStorage.storageKey);
70
72
  }
71
73
 
72
- this.element.classList.add('storage-view', 'table');
73
-
74
74
  this.showPreview(null, null);
75
75
 
76
76
  this.eventListeners = [];
@@ -100,6 +100,13 @@ export class DeviceBoundSessionsModel extends Common.ObjectWrapper.ObjectWrapper
100
100
  DeviceBoundSessionModelEvents.CLEAR_EVENTS, {emptySessions, emptySites, noLongerFailedSessions});
101
101
  }
102
102
 
103
+ deleteSession(site: string, id: string): void {
104
+ for (const networkManager of SDK.TargetManager.TargetManager.instance().models(
105
+ SDK.NetworkManager.NetworkManager, {scoped: true})) {
106
+ void networkManager.deleteDeviceBoundSession({site, id});
107
+ }
108
+ }
109
+
103
110
  isSiteVisible(site: string): boolean {
104
111
  return this.#visibleSites.has(site);
105
112
  }
@@ -57,6 +57,10 @@ const UIStrings = {
57
57
  *@example {session_1} sessionName
58
58
  */
59
59
  sessionWithErrors: '{sessionName}, Session has errors',
60
+ /**
61
+ *@description Context menu item for clearing a session.
62
+ */
63
+ clear: 'Clear',
60
64
  } as const;
61
65
 
62
66
  const str_ = i18n.i18n.registerUIStrings('panels/application/DeviceBoundSessionsTreeElement.ts', UIStrings);
@@ -217,6 +221,23 @@ export class RootTreeElement extends ApplicationPanelTreeElement {
217
221
  return false;
218
222
  };
219
223
 
224
+ sessionElement.listItemElement.addEventListener('keydown', (event: Event) => {
225
+ const keyboardEvent = event as KeyboardEvent;
226
+ if ((keyboardEvent.key === 'Delete' || keyboardEvent.key === 'Backspace') && sessionId !== undefined) {
227
+ this.#model.deleteSession(site, sessionId);
228
+ event.consume(true);
229
+ }
230
+ });
231
+
232
+ sessionElement.listItemElement.addEventListener('contextmenu', (event: MouseEvent) => {
233
+ if (sessionId !== undefined) {
234
+ const contextMenu = new UI.ContextMenu.ContextMenu(event);
235
+ contextMenu.defaultSection().appendItem(
236
+ i18nString(UIStrings.clear), () => this.#model.deleteSession(site, sessionId), {jslogContext: 'clear'});
237
+ void contextMenu.show();
238
+ }
239
+ });
240
+
220
241
  if (sessionId === undefined) {
221
242
  // The "No session" session is always listed at the top.
222
243
  siteMapEntry.siteTreeElement.insertChild(sessionElement, 0);
@@ -586,7 +586,7 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: ViewOutput, target: HTML
586
586
  <devtools-widget ${widget(UI.EmptyWidget.EmptyWidget, {header: defaultTitle, text: defaultDescription})} jslog=${
587
587
  VisualLogging.pane('device-bound-sessions-empty')}></devtools-widget>
588
588
  `,
589
- target);
589
+ target, {container: {attributes: {jslog: `${VisualLogging.pane('device-bound-sessions')}`}}});
590
590
  return;
591
591
  }
592
592
 
@@ -848,7 +848,7 @@ export class DeviceBoundSessionsView extends UI.Widget.VBox {
848
848
  #selectedEvent?: Protocol.Network.DeviceBoundSessionEventOccurredEvent;
849
849
 
850
850
  constructor(view: typeof DEFAULT_VIEW = DEFAULT_VIEW) {
851
- super({jslog: `${VisualLogging.pane('device-bound-sessions')}`});
851
+ super();
852
852
  this.#view = view;
853
853
  }
854
854
 
@@ -75,7 +75,7 @@ export class ExtensionStorageItemsView extends KeyValueStorageItemsView {
75
75
  constructor(extensionStorage: ExtensionStorage, view?: KeyValueStorageItemsViewFunction) {
76
76
  super(
77
77
  i18nString(UIStrings.extensionStorageItems), 'extension-storage', true, view, undefined,
78
- {jslog: `${VisualLogging.pane().context('extension-storage-data')}`, classes: ['storage-view', 'table']});
78
+ `${VisualLogging.pane().context('extension-storage-data')}`, ['storage-view', 'table']);
79
79
 
80
80
  this.extensionStorageItemsDispatcher =
81
81
  new Common.ObjectWrapper.ObjectWrapper<ExtensionStorageItemsDispatcher.EventTypes>();
@@ -31,7 +31,6 @@
31
31
  import * as i18n from '../../core/i18n/i18n.js';
32
32
  import * as Geometry from '../../models/geometry/geometry.js';
33
33
  import * as UI from '../../ui/legacy/legacy.js';
34
- import type {WidgetOptions} from '../../ui/legacy/Widget.js';
35
34
  import {Directives as LitDirectives, html, nothing, render} from '../../ui/lit/lit.js';
36
35
  import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
37
36
 
@@ -81,9 +80,13 @@ export interface ViewInput {
81
80
  onSelect: (item: {key: string, value: string}|null) => void;
82
81
  onSort: (ascending: boolean) => void;
83
82
  onCreate: (key: string, value: string) => void;
84
- onReferesh: () => void;
83
+ onRefresh: () => void;
85
84
  onEdit: (key: string, value: string, columnId: string, valueBeforeEditing: string, newText: string) => void;
86
85
  onDelete: (key: string) => void;
86
+ onDeleteSelected: () => void;
87
+ onDeleteAll: () => void;
88
+ jslog?: string;
89
+ classes?: string[];
87
90
  }
88
91
 
89
92
  interface ViewOutput {
@@ -108,10 +111,18 @@ export abstract class KeyValueStorageItemsView extends UI.Widget.VBox {
108
111
  #editable: boolean;
109
112
  #toolbar: StorageItemsToolbar|undefined;
110
113
  readonly metadataView: ApplicationComponents.StorageMetadataView.StorageMetadataView;
114
+ #jslog?: string;
115
+ #classes?: string[];
111
116
 
112
117
  constructor(
113
- title: string, id: string, editable: boolean, view?: View,
114
- metadataView?: ApplicationComponents.StorageMetadataView.StorageMetadataView, opts?: WidgetOptions) {
118
+ title: string,
119
+ id: string,
120
+ editable: boolean,
121
+ view?: View,
122
+ metadataView?: ApplicationComponents.StorageMetadataView.StorageMetadataView,
123
+ jslog?: string,
124
+ classes?: string[],
125
+ ) {
115
126
  metadataView ??= new ApplicationComponents.StorageMetadataView.StorageMetadataView();
116
127
  if (!view) {
117
128
  view = (input: ViewInput, output: ViewOutput, target: HTMLElement) => {
@@ -120,6 +131,9 @@ export abstract class KeyValueStorageItemsView extends UI.Widget.VBox {
120
131
  <devtools-widget
121
132
  ${widget(StorageItemsToolbar, {metadataView})}
122
133
  class=flex-none
134
+ @Refresh=${input.onRefresh}
135
+ @DeleteAll=${input.onDeleteAll}
136
+ @DeleteSelected=${input.onDeleteSelected}
123
137
  ${UI.Widget.widgetRef(StorageItemsToolbar, view => {output.toolbar = view;})}
124
138
  ></devtools-widget>
125
139
  <devtools-split-view sidebar-position="second" name="${id}-split-view-state">
@@ -131,7 +145,7 @@ export abstract class KeyValueStorageItemsView extends UI.Widget.VBox {
131
145
  striped
132
146
  style="flex: auto"
133
147
  @sort=${(e: CustomEvent<{columnId: string, ascending: boolean}>) => input.onSort(e.detail.ascending)}
134
- @refresh=${input.onReferesh}
148
+ @refresh=${input.onRefresh}
135
149
  @create=${(e: CustomEvent<{key: string, value: string}>) => input.onCreate(e.detail.key, e.detail.value)}
136
150
  @deselect=${() => input.onSelect(null)}
137
151
  >
@@ -166,12 +180,14 @@ export abstract class KeyValueStorageItemsView extends UI.Widget.VBox {
166
180
  </devtools-widget>
167
181
  </devtools-split-view>`,
168
182
  // clang-format on
169
- target);
183
+ target, {container: {attributes: {jslog: input.jslog}, classes: input.classes}});
170
184
  };
171
185
  }
172
- super(opts);
186
+ super();
173
187
  this.metadataView = metadataView;
174
188
  this.#editable = editable;
189
+ this.#jslog = jslog;
190
+ this.#classes = classes;
175
191
  this.#view = view;
176
192
  this.performUpdate();
177
193
 
@@ -191,13 +207,7 @@ export abstract class KeyValueStorageItemsView extends UI.Widget.VBox {
191
207
  const that = this;
192
208
  const viewOutput = {
193
209
  set toolbar(toolbar: StorageItemsToolbar) {
194
- that.#toolbar?.removeEventListener(StorageItemsToolbar.Events.DELETE_SELECTED, that.deleteSelectedItem, that);
195
- that.#toolbar?.removeEventListener(StorageItemsToolbar.Events.DELETE_ALL, that.deleteAllItems, that);
196
- that.#toolbar?.removeEventListener(StorageItemsToolbar.Events.REFRESH, that.refreshItems, that);
197
210
  that.#toolbar = toolbar;
198
- that.#toolbar.addEventListener(StorageItemsToolbar.Events.DELETE_SELECTED, that.deleteSelectedItem, that);
199
- that.#toolbar.addEventListener(StorageItemsToolbar.Events.DELETE_ALL, that.deleteAllItems, that);
200
- that.#toolbar.addEventListener(StorageItemsToolbar.Events.REFRESH, that.refreshItems, that);
201
211
  }
202
212
  };
203
213
  const viewInput = {
@@ -205,6 +215,8 @@ export abstract class KeyValueStorageItemsView extends UI.Widget.VBox {
205
215
  selectedKey: this.#selectedKey,
206
216
  editable: this.#editable,
207
217
  preview: this.#preview,
218
+ jslog: this.#jslog,
219
+ classes: this.#classes,
208
220
  onSelect: (item: {key: string, value: string}|null) => {
209
221
  this.#toolbar?.setCanDeleteSelected(Boolean(item));
210
222
  if (!item) {
@@ -225,7 +237,13 @@ export abstract class KeyValueStorageItemsView extends UI.Widget.VBox {
225
237
  onDelete: (key: string) => {
226
238
  this.#deleteCallback(key);
227
239
  },
228
- onReferesh: () => {
240
+ onDeleteSelected: () => {
241
+ this.deleteSelectedItem();
242
+ },
243
+ onDeleteAll: () => {
244
+ this.deleteAllItems();
245
+ },
246
+ onRefresh: () => {
229
247
  this.refreshItems();
230
248
  },
231
249
  };
@@ -28,8 +28,8 @@ let resourcesPanelInstance: ResourcesPanel;
28
28
 
29
29
  export class ResourcesPanel extends UI.Panel.PanelWithSidebar {
30
30
  private readonly resourcesLastSelectedItemSetting: Common.Settings.Setting<Platform.DevToolsPath.UrlString[]>;
31
- visibleView: UI.Widget.Widget|null;
32
- private pendingViewPromise: Promise<UI.Widget.Widget>|null;
31
+ visibleView: UI.Widget.AnyWidget|null;
32
+ private pendingViewPromise: Promise<UI.Widget.AnyWidget>|null;
33
33
  private categoryView: StorageCategoryView|null;
34
34
  storageViews: HTMLElement;
35
35
  private readonly storageViewToolbar: UI.Toolbar.Toolbar;
@@ -84,7 +84,7 @@ export class ResourcesPanel extends UI.Panel.PanelWithSidebar {
84
84
  return resourcesPanelInstance;
85
85
  }
86
86
 
87
- private static shouldCloseOnReset(view: UI.Widget.Widget): boolean {
87
+ private static shouldCloseOnReset(view: UI.Widget.AnyWidget): boolean {
88
88
  const viewClassesToClose = [
89
89
  SourceFrame.ResourceSourceFrame.ResourceSourceFrame,
90
90
  SourceFrame.ImageView.ImageView,
@@ -117,7 +117,7 @@ export class ResourcesPanel extends UI.Panel.PanelWithSidebar {
117
117
  }
118
118
  }
119
119
 
120
- showView(view: UI.Widget.Widget|null): void {
120
+ showView(view: UI.Widget.AnyWidget|null): void {
121
121
  this.pendingViewPromise = null;
122
122
  if (this.visibleView === view) {
123
123
  return;
@@ -142,7 +142,7 @@ export class ResourcesPanel extends UI.Panel.PanelWithSidebar {
142
142
  }
143
143
  }
144
144
 
145
- async scheduleShowView(viewPromise: Promise<UI.Widget.Widget>): Promise<UI.Widget.Widget|null> {
145
+ async scheduleShowView(viewPromise: Promise<UI.Widget.AnyWidget>): Promise<UI.Widget.AnyWidget|null> {
146
146
  this.pendingViewPromise = viewPromise;
147
147
  const view = await viewPromise;
148
148
  if (this.pendingViewPromise !== viewPromise) {