chrome-devtools-frontend 1.0.1732697 → 1.0.1733843

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 (65) hide show
  1. package/front_end/core/host/AidaClientTypes.ts +5 -1
  2. package/front_end/core/host/AidaGcaTranslation.ts +29 -1
  3. package/front_end/core/platform/browser/HostRuntime.ts +5 -1
  4. package/front_end/design_system_tokens.css +5 -0
  5. package/front_end/generated/InspectorBackendCommands.ts +5 -5
  6. package/front_end/generated/SupportedCSSProperties.ts +6 -0
  7. package/front_end/generated/protocol.ts +29 -7
  8. package/front_end/models/ai_assistance/AiConversation.ts +1 -0
  9. package/front_end/models/ai_assistance/agents/AiAgent.ts +59 -6
  10. package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +2 -1
  11. package/front_end/models/web_mcp/WebMCPModel.ts +1 -1
  12. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +35 -17
  13. package/front_end/panels/ai_assistance/components/chatMessage.css +1 -1
  14. package/front_end/panels/ai_assistance/components/exploreWidget.css +1 -1
  15. package/front_end/panels/application/backgroundServiceView.css +2 -2
  16. package/front_end/panels/application/deviceBoundSessionsView.css +1 -1
  17. package/front_end/panels/application/frameDetailsReportView.css +0 -4
  18. package/front_end/panels/application/resourcesPanel.css +0 -4
  19. package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +346 -286
  20. package/front_end/panels/common/CommentsOverlayWidget.ts +3 -2
  21. package/front_end/panels/console/consoleView.css +1 -1
  22. package/front_end/panels/elements/components/cssPropertyDocsView.css +1 -1
  23. package/front_end/panels/elements/components/stylePropertyEditor.css +1 -5
  24. package/front_end/panels/elements/layoutPane.css +1 -1
  25. package/front_end/panels/elements/stylesSidebarPane.css +3 -2
  26. package/front_end/panels/issues/issuesTree.css +4 -3
  27. package/front_end/panels/lighthouse/LighthousePanel.ts +16 -1
  28. package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +10 -6
  29. package/front_end/panels/linear_memory_inspector/components/linearMemoryHighlightChipList.css +1 -26
  30. package/front_end/panels/media/playerListView.css +3 -4
  31. package/front_end/panels/network/networkTimingTable.css +0 -4
  32. package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +114 -18
  33. package/front_end/panels/recorder/stepEditor.css +1 -1
  34. package/front_end/panels/search/searchResultsPane.css +1 -1
  35. package/front_end/panels/security/mainView.css +1 -1
  36. package/front_end/panels/settings/AISettingsTab.ts +1 -0
  37. package/front_end/panels/sources/NavigatorView.ts +120 -49
  38. package/front_end/panels/sources/components/HeadersView.css +2 -2
  39. package/front_end/panels/timeline/TimelinePanel.ts +24 -3
  40. package/front_end/panels/timeline/components/metricCard.css +1 -1
  41. package/front_end/panels/timeline/timelineMiniMap.css +1 -1
  42. package/front_end/panels/web_audio/WebAudioModel.ts +14 -5
  43. package/front_end/panels/web_audio/WebAudioView.ts +34 -1
  44. package/front_end/panels/web_audio/webAudio.css +17 -3
  45. package/front_end/panels/webauthn/webauthnPane.css +2 -4
  46. package/front_end/panels/whats_new/ReleaseNoteText.ts +19 -1
  47. package/front_end/panels/whats_new/ReleaseNoteView.ts +15 -1
  48. package/front_end/panels/whats_new/releaseNoteView.css +49 -0
  49. package/front_end/third_party/chromium/README.chromium +1 -1
  50. package/front_end/third_party/puppeteer-replay/README.chromium +9 -1
  51. package/front_end/third_party/puppeteer-replay/package/lib/main.d.ts +2 -2
  52. package/front_end/ui/components/markdown_view/codeBlock.css +1 -1
  53. package/front_end/ui/components/markdown_view/markdownView.css +1 -5
  54. package/front_end/ui/components/panel_introduction_steps/panelIntroductionSteps.css +1 -1
  55. package/front_end/ui/components/switch/switch.css +2 -1
  56. package/front_end/ui/legacy/TabbedPane.ts +1 -1
  57. package/front_end/ui/legacy/components/inline_editor/bezierEditor.css +10 -3
  58. package/front_end/ui/legacy/inspectorCommon.css +3 -2
  59. package/front_end/ui/legacy/listWidget.css +1 -1
  60. package/front_end/ui/legacy/reportView.css +1 -1
  61. package/front_end/ui/legacy/searchableView.css +2 -1
  62. package/front_end/ui/legacy/suggestBox.css +2 -1
  63. package/front_end/ui/legacy/tabbedPane.css +1 -1
  64. package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
  65. package/package.json +1 -1
@@ -318,6 +318,25 @@ export function renderGroupTrailingIcons(project: Workspace.Workspace.Project|nu
318
318
  return [];
319
319
  }
320
320
 
321
+ export interface SourceTitleViewInput {
322
+ title: string;
323
+ editing: boolean;
324
+ onCommit: (newTitle: string) => void;
325
+ onCancel: () => void;
326
+ }
327
+
328
+ export const renderSourceTitle = (input: SourceTitleViewInput, _output: undefined, target: HTMLElement): void => {
329
+ // clang-format off
330
+ render(html`
331
+ <devtools-prompt
332
+ value=${input.title}
333
+ ?editing=${input.editing}
334
+ @commit=${(event: UI.TextPrompt.TextPromptElement.CommitEvent) => input.onCommit(event.detail)}
335
+ @cancel=${input.onCancel}
336
+ >${input.title}</devtools-prompt>`, target);
337
+ // clang-format on
338
+ };
339
+
321
340
  export const enum Events {
322
341
  UI_SOURCE_CODE_ADDED = 'ui-source-code-added',
323
342
  SOURCE_SELECTED = 'source-selected',
@@ -363,6 +382,7 @@ export class NavigatorView extends NavigatorViewBase implements SDK.TargetManage
363
382
  private selectedNode: NavigatorTreeNode|null = null;
364
383
  private expandedNodes = new WeakSet<NavigatorTreeNode>();
365
384
  private readonly treeElementNodes = new WeakMap<UI.TreeOutline.TreeElement, NavigatorTreeNode>();
385
+ #renamingNode: NavigatorUISourceCodeTreeNode|null = null;
366
386
  #view: View;
367
387
 
368
388
  constructor(
@@ -1101,11 +1121,11 @@ export class NavigatorView extends NavigatorViewBase implements SDK.TargetManage
1101
1121
  return null;
1102
1122
  }
1103
1123
  if (this.selectedNode) {
1104
- // If the tree outline is being marked as "being edited" (i.e. we're renaming a file
1105
- // or choosing the name for a new snippet), we shall not proceed with revealing here,
1106
- // as that will steal focus from the input widget and thus cancel editing. The
1107
- // test/e2e/snippets/breakpoint.test.ts exercises this.
1108
- if (UI.UIUtils.isBeingEdited(this.scriptsTree.element)) {
1124
+ // If a file is currently being renamed (or choosing the name for a new snippet),
1125
+ // we shall not proceed with revealing here, as that will steal focus from the
1126
+ // input widget and thus cancel editing. The test/e2e/snippets/breakpoint.test.ts
1127
+ // exercises this.
1128
+ if (this.isRenaming()) {
1109
1129
  return null;
1110
1130
  }
1111
1131
  this.selectedNode.treeNode().deselect();
@@ -1215,6 +1235,7 @@ export class NavigatorView extends NavigatorViewBase implements SDK.TargetManage
1215
1235
  this.scriptsTree.removeChildren();
1216
1236
  this.scriptsTree.setFocusable(false);
1217
1237
  this.selectedNode = null;
1238
+ this.#renamingNode = null;
1218
1239
  this.expandedNodes = new WeakSet();
1219
1240
  this.uiSourceCodeNodes.clear();
1220
1241
  this.subfolderNodes.clear();
@@ -1286,8 +1307,21 @@ export class NavigatorView extends NavigatorViewBase implements SDK.TargetManage
1286
1307
  if (!node.uiSourceCode().canRename() || !node.treeElement) {
1287
1308
  return false;
1288
1309
  }
1289
- return this.selectedNode === node && this.scriptsTree.element.hasFocus() &&
1290
- !UI.UIUtils.isBeingEdited(this.scriptsTree.element);
1310
+ return this.selectedNode === node && this.scriptsTree.element.hasFocus() && !this.isRenaming();
1311
+ }
1312
+
1313
+ startRenamingNode(node: NavigatorUISourceCodeTreeNode): void {
1314
+ this.#renamingNode = node;
1315
+ }
1316
+
1317
+ stopRenamingNode(node: NavigatorUISourceCodeTreeNode): void {
1318
+ if (this.#renamingNode === node) {
1319
+ this.#renamingNode = null;
1320
+ }
1321
+ }
1322
+
1323
+ isRenaming(): boolean {
1324
+ return this.#renamingNode !== null;
1291
1325
  }
1292
1326
 
1293
1327
  handleFileContextMenu(event: Event, node: NavigatorUISourceCodeTreeNode): void {
@@ -1838,6 +1872,9 @@ export class NavigatorRootTreeNode extends NavigatorTreeNode {
1838
1872
  export class NavigatorUISourceCodeTreeNode extends NavigatorTreeNode {
1839
1873
  #uiSourceCode: Workspace.UISourceCode.UISourceCode;
1840
1874
  treeElement: UI.TreeOutline.TreeElement|null;
1875
+ isEditing = false;
1876
+ #renameCallback?: ((committed: boolean) => void);
1877
+ #disposed = false;
1841
1878
  private eventListeners: Common.EventTarget.EventDescriptor[];
1842
1879
  readonly #frame: SDK.ResourceTreeModel.ResourceTreeFrame|null;
1843
1880
  constructor(
@@ -1901,6 +1938,7 @@ export class NavigatorUISourceCodeTreeNode extends NavigatorTreeNode {
1901
1938
  }
1902
1939
 
1903
1940
  this.treeElement = new UI.TreeOutline.TreeElement('', false, this.#uiSourceCode.contentType().name());
1941
+ this.treeElement.title = this.treeElement.titleElement;
1904
1942
  this.treeElement.listItemElement.classList.add(
1905
1943
  'navigator-' + this.#uiSourceCode.contentType().name() + '-tree-item', 'navigator-file-tree-item');
1906
1944
  this.treeElement.listItemElement.draggable = true;
@@ -1970,7 +2008,13 @@ export class NavigatorUISourceCodeTreeNode extends NavigatorTreeNode {
1970
2008
  return;
1971
2009
  }
1972
2010
 
1973
- this.treeElement.title = this.title;
2011
+ renderSourceTitle({
2012
+ title: this.title,
2013
+ editing: this.isEditing,
2014
+ onCommit: this.#handlePromptCommit.bind(this),
2015
+ onCancel: this.#handlePromptCancel.bind(this),
2016
+ },
2017
+ undefined, this.treeElement.titleElement as HTMLElement);
1974
2018
  this.updateIcon();
1975
2019
  this.updateTrailingIcons();
1976
2020
 
@@ -2013,6 +2057,16 @@ export class NavigatorUISourceCodeTreeNode extends NavigatorTreeNode {
2013
2057
 
2014
2058
  override dispose(): void {
2015
2059
  Common.EventTarget.removeEventListeners(this.eventListeners);
2060
+ if (this.isEditing) {
2061
+ this.isEditing = false;
2062
+ this.navigatorView.stopRenamingNode(this);
2063
+ }
2064
+ const callback = this.#renameCallback;
2065
+ this.#renameCallback = undefined;
2066
+ if (callback) {
2067
+ callback(false);
2068
+ }
2069
+ this.#disposed = true;
2016
2070
  }
2017
2071
 
2018
2072
  reveal(select?: boolean): void {
@@ -2029,7 +2083,7 @@ export class NavigatorUISourceCodeTreeNode extends NavigatorTreeNode {
2029
2083
  }
2030
2084
 
2031
2085
  rename(callback?: ((committed: boolean) => void)): void {
2032
- if (!this.treeElement) {
2086
+ if (this.#disposed || !this.treeElement) {
2033
2087
  return;
2034
2088
  }
2035
2089
 
@@ -2039,51 +2093,68 @@ export class NavigatorUISourceCodeTreeNode extends NavigatorTreeNode {
2039
2093
  return;
2040
2094
  }
2041
2095
 
2042
- // Tree outline should be marked as edited as well as the tree element to prevent search from starting.
2043
- const treeOutlineElement = this.treeElement.treeOutline.element;
2044
- UI.UIUtils.markBeingEdited(treeOutlineElement, true);
2045
-
2046
- const commitHandler = (_element: Element, newTitle: string, oldTitle: string|null): void => {
2047
- if (newTitle !== oldTitle) {
2048
- if (this.treeElement) {
2049
- this.treeElement.title = newTitle;
2050
- }
2051
- // necessary cast to RawPathString as alternative would be altering type of Config<T>
2052
- void this.#uiSourceCode.rename(newTitle as Platform.DevToolsPath.RawPathString).then(renameCallback);
2053
- return;
2054
- }
2055
- afterEditing(true);
2056
- };
2096
+ this.#renameCallback = callback;
2097
+ this.navigatorView.startRenamingNode(this);
2098
+ this.isEditing = true;
2099
+ this.updateTitle(true);
2100
+ }
2057
2101
 
2058
- const renameCallback = (success: boolean): void => {
2059
- if (!success) {
2060
- UI.UIUtils.markBeingEdited(treeOutlineElement, false);
2061
- this.updateTitle();
2062
- this.rename(callback);
2063
- return;
2064
- }
2065
- if (this.treeElement) {
2066
- const {parent} = this.treeElement;
2067
- if (parent) {
2068
- parent.removeChild(this.treeElement);
2069
- parent.appendChild(this.treeElement);
2070
- this.navigatorView.selectNode(this);
2071
- }
2072
- }
2073
- afterEditing(true);
2074
- };
2102
+ #handlePromptCommit(newTitle: string): void {
2103
+ if (this.#disposed || !this.treeElement?.treeOutline) {
2104
+ return;
2105
+ }
2106
+ const oldTitle = this.title;
2107
+ if (newTitle !== oldTitle) {
2108
+ this.isEditing = false;
2109
+ this.title = newTitle;
2110
+ this.navigatorView.stopRenamingNode(this);
2111
+ this.updateTreeElement();
2112
+ // necessary cast to RawPathString as alternative would be altering type of Config<T>
2113
+ void this.#uiSourceCode.rename(newTitle as Platform.DevToolsPath.RawPathString)
2114
+ .then(this.#handleRenameCallback.bind(this));
2115
+ return;
2116
+ }
2117
+ this.#afterEditing(true);
2118
+ }
2075
2119
 
2076
- const afterEditing = (committed: boolean): void => {
2077
- UI.UIUtils.markBeingEdited(treeOutlineElement, false);
2120
+ #handleRenameCallback(success: boolean): void {
2121
+ if (this.#disposed) {
2122
+ return;
2123
+ }
2124
+ if (!success) {
2125
+ this.isEditing = false;
2126
+ this.navigatorView.stopRenamingNode(this);
2078
2127
  this.updateTitle();
2079
- if (callback) {
2080
- callback(committed);
2128
+ this.rename(this.#renameCallback);
2129
+ return;
2130
+ }
2131
+ if (this.treeElement) {
2132
+ const {parent} = this.treeElement;
2133
+ if (parent) {
2134
+ parent.removeChild(this.treeElement);
2135
+ parent.appendChild(this.treeElement);
2136
+ this.navigatorView.selectNode(this);
2081
2137
  }
2082
- };
2138
+ }
2139
+ this.#afterEditing(true);
2140
+ }
2083
2141
 
2084
- this.updateTitle(true);
2085
- this.treeElement.startEditingTitle(
2086
- new UI.InplaceEditor.Config(commitHandler, () => afterEditing(false), undefined));
2142
+ #handlePromptCancel(): void {
2143
+ if (this.#disposed) {
2144
+ return;
2145
+ }
2146
+ this.#afterEditing(false);
2147
+ }
2148
+
2149
+ #afterEditing(committed: boolean): void {
2150
+ this.isEditing = false;
2151
+ this.navigatorView.stopRenamingNode(this);
2152
+ this.updateTitle();
2153
+ const callback = this.#renameCallback;
2154
+ this.#renameCallback = undefined;
2155
+ if (callback) {
2156
+ callback(committed);
2157
+ }
2087
2158
  }
2088
2159
  }
2089
2160
 
@@ -41,8 +41,8 @@
41
41
  cursor: text;
42
42
  color: var(--sys-color-on-surface);
43
43
  overflow-wrap: break-word;
44
- min-height: 18px;
45
- line-height: 18px;
44
+ min-height: var(--sys-size-8);
45
+ line-height: var(--sys-size-8);
46
46
  min-width: 0.5em;
47
47
  background: transparent;
48
48
  border: none;
@@ -3189,17 +3189,38 @@ export class TimelinePanel extends TimelinePanelBase implements Client, Timeline
3189
3189
  }
3190
3190
  }
3191
3191
 
3192
- static async executeRecordAndReload(): Promise<Trace.TraceModel.ParsedTrace> {
3192
+ static async executeRecordAndReload(options?: {signal?: AbortSignal}): Promise<Trace.TraceModel.ParsedTrace> {
3193
+ if (options?.signal?.aborted) {
3194
+ throw new Error('Recording was aborted');
3195
+ }
3193
3196
  await UI.ViewManager.ViewManager.instance().showView('timeline');
3194
3197
  await SDK.TargetManager.TargetManager.instance().primaryPageTarget()?.pageAgent().invoke_bringToFront();
3198
+ if (options?.signal?.aborted) {
3199
+ throw new Error('Recording was aborted');
3200
+ }
3195
3201
  const panelInstance = TimelinePanel.instance();
3196
3202
 
3197
- const result: EventTypes[Events.RECORDING_COMPLETED] = await new Promise(resolve => {
3203
+ const result: EventTypes[Events.RECORDING_COMPLETED] = await new Promise((resolve, reject) => {
3204
+ function cleanup(): void {
3205
+ panelInstance.removeEventListener(Events.RECORDING_COMPLETED, listener);
3206
+ options?.signal?.removeEventListener('abort', onAbort);
3207
+ }
3198
3208
  function listener(e: Common.EventTarget.EventTargetEvent<EventTypes[Events.RECORDING_COMPLETED]>): void {
3209
+ cleanup();
3199
3210
  resolve(e.data);
3200
- panelInstance.removeEventListener(Events.RECORDING_COMPLETED, listener);
3211
+ }
3212
+ function onAbort(): void {
3213
+ cleanup();
3214
+ // Only stop once State.RECORDING is reached; calling stopRecording()
3215
+ // during State.START_PENDING nulls out this.controller while
3216
+ // #startTraceRecording() is still awaiting setup.
3217
+ if (panelInstance.state === State.RECORDING) {
3218
+ void panelInstance.stopRecording();
3219
+ }
3220
+ reject(new Error('Recording was aborted'));
3201
3221
  }
3202
3222
  panelInstance.addEventListener(Events.RECORDING_COMPLETED, listener);
3223
+ options?.signal?.addEventListener('abort', onAbort, {once: true});
3203
3224
  panelInstance.recordReload();
3204
3225
  });
3205
3226
 
@@ -170,7 +170,7 @@ details.environment-recs[open] > summary::before {
170
170
  }
171
171
 
172
172
  .tooltip-contents {
173
- width: 350px;
173
+ width: var(--sys-size-32);
174
174
  max-width: max-content;
175
175
  }
176
176
 
@@ -100,7 +100,7 @@
100
100
  position: absolute;
101
101
  right: 0;
102
102
  bottom: 0;
103
- font-size: 9px;
103
+ font-size: var(--sys-size-5);
104
104
  color: var(--sys-color-token-subtle);
105
105
  white-space: nowrap;
106
106
  padding: 0 var(--sys-size-3);
@@ -8,11 +8,13 @@ import type * as Protocol from '../../generated/protocol.js';
8
8
 
9
9
  export class WebAudioModel extends SDK.SDKModel.SDKModel<EventTypes> implements ProtocolProxyApi.WebAudioDispatcher {
10
10
  private enabled: boolean;
11
+ #suspended: boolean;
11
12
  private readonly agent: ProtocolProxyApi.WebAudioApi;
12
13
  constructor(target: SDK.Target.Target) {
13
14
  super(target);
14
15
 
15
16
  this.enabled = false;
17
+ this.#suspended = target.suspended();
16
18
 
17
19
  this.agent = target.webAudioAgent();
18
20
  target.registerWebAudioDispatcher(this);
@@ -34,23 +36,27 @@ export class WebAudioModel extends SDK.SDKModel.SDKModel<EventTypes> implements
34
36
  }
35
37
 
36
38
  override async suspendModel(): Promise<void> {
39
+ this.#suspended = true;
37
40
  this.dispatchEventToListeners(Events.MODEL_SUSPEND);
38
41
  await this.agent.invoke_disable();
42
+ this.flushContexts();
39
43
  }
40
44
 
41
45
  override async resumeModel(): Promise<void> {
42
- if (!this.enabled) {
43
- return await Promise.resolve();
46
+ if (this.enabled) {
47
+ await this.agent.invoke_enable();
44
48
  }
45
- await this.agent.invoke_enable();
49
+ this.#suspended = false;
46
50
  }
47
51
 
48
52
  ensureEnabled(): void {
49
53
  if (this.enabled) {
50
54
  return;
51
55
  }
52
- void this.agent.invoke_enable();
53
56
  this.enabled = true;
57
+ if (!this.#suspended) {
58
+ void this.agent.invoke_enable();
59
+ }
54
60
  }
55
61
 
56
62
  contextCreated({context}: Protocol.WebAudio.ContextCreatedEvent): void {
@@ -114,8 +120,11 @@ export class WebAudioModel extends SDK.SDKModel.SDKModel<EventTypes> implements
114
120
 
115
121
  async requestRealtimeData(contextId: Protocol.WebAudio.GraphObjectId):
116
122
  Promise<Protocol.WebAudio.ContextRealtimeData|null> {
123
+ if (this.#suspended) {
124
+ return null;
125
+ }
117
126
  const realtimeResponse = await this.agent.invoke_getRealtimeData({contextId});
118
- return realtimeResponse.realtimeData;
127
+ return this.#suspended ? null : realtimeResponse.realtimeData;
119
128
  }
120
129
  }
121
130
 
@@ -32,6 +32,10 @@ const UIStrings = {
32
32
  * @description Text shown in the audio context selector when no recordings exist.
33
33
  */
34
34
  noRecordings: '(no recordings)',
35
+ /**
36
+ * @description Status shown while Web Audio inspection is suspended, for example during a Performance recording.
37
+ */
38
+ webAudioInspectionPaused: 'Web Audio inspection paused',
35
39
  /**
36
40
  * @description Label prefix for an audio context selection.
37
41
  * @example {realtime (1e03ec)} PH1
@@ -79,6 +83,7 @@ const WEBAUDIO_EXPLANATION_URL =
79
83
  'https://developer.chrome.com/docs/devtools/webaudio' as Platform.DevToolsPath.UrlString;
80
84
 
81
85
  export interface ViewInput {
86
+ suspended: boolean;
82
87
  contexts: Protocol.WebAudio.BaseAudioContext[];
83
88
  selectedContextIndex: number;
84
89
  onContextSelectorSelectionChanged: (contextId: string) => void;
@@ -106,7 +111,7 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
106
111
  // clang-format off
107
112
  render(html`
108
113
  <style>${webAudioStyles}</style>
109
- <div class="web-audio-toolbar-container vbox" role="toolbar">
114
+ <div class="web-audio-toolbar-container vbox" role="toolbar" ?hidden=${input.suspended}>
110
115
  <devtools-toolbar class="web-audio-toolbar" role="presentation"
111
116
  jslog=${VisualLogging.toolbar()}>
112
117
  <devtools-button ${bindToAction('components.collect-garbage')}></devtools-button>
@@ -126,6 +131,9 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
126
131
  </devtools-toolbar>
127
132
  </div>
128
133
  <div class="web-audio-content-container vbox flex-auto">
134
+ ${input.suspended ? html`
135
+ <div class="web-audio-paused" role="status">${i18nString(UIStrings.webAudioInspectionPaused)}</div>
136
+ ` : html`
129
137
  ${!selectedContext ? html`
130
138
  <div class="web-audio-details-container vbox flex-auto">
131
139
  ${widget(UI.EmptyWidget.EmptyWidget,
@@ -179,6 +187,7 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
179
187
  (contextRealtimeData.renderCapacity * 100).toFixed(3)} %</span>
180
188
  </div>` : ''}
181
189
  </div>
190
+ `}
182
191
  </div>`, target, {container: {attributes: {jslog: `${VisualLogging.panel('web-audio').track({resize: true})}`}}});
183
192
  // clang-format on
184
193
  };
@@ -191,6 +200,7 @@ export class WebAudioView extends UI.Widget.VBox<ShadowRoot> implements
191
200
  private readonly view: View;
192
201
  private selectedContextIndex = -1;
193
202
  private readonly pollRealtimeDataThrottler: Common.Throttler.Throttler;
203
+ #suspended = false;
194
204
 
195
205
  constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
196
206
  super({useShadowDom: 'pure'});
@@ -206,13 +216,18 @@ export class WebAudioView extends UI.Widget.VBox<ShadowRoot> implements
206
216
 
207
217
  override wasShown(): void {
208
218
  super.wasShown();
219
+ SDK.TargetManager.TargetManager.instance().addEventListener(SDK.TargetManager.Events.SUSPEND_STATE_CHANGED,
220
+ this.#updateSuspendedState, this);
209
221
  for (const model of SDK.TargetManager.TargetManager.instance().models(WebAudioModel)) {
210
222
  this.addEventListeners(model);
211
223
  }
224
+ this.#updateSuspendedState();
212
225
  }
213
226
 
214
227
  override willHide(): void {
215
228
  super.willHide();
229
+ SDK.TargetManager.TargetManager.instance().removeEventListener(SDK.TargetManager.Events.SUSPEND_STATE_CHANGED,
230
+ this.#updateSuspendedState, this);
216
231
  for (const model of SDK.TargetManager.TargetManager.instance().models(WebAudioModel)) {
217
232
  this.removeEventListeners(model);
218
233
  }
@@ -230,6 +245,7 @@ export class WebAudioView extends UI.Widget.VBox<ShadowRoot> implements
230
245
 
231
246
  override performUpdate(): void {
232
247
  const input = {
248
+ suspended: this.#suspended,
233
249
  contexts: [...this.contextSelectorItems],
234
250
  selectedContextIndex: this.selectedContextIndex,
235
251
  onContextSelectorSelectionChanged: this.onContextSelectorSelectionChanged.bind(this),
@@ -238,6 +254,16 @@ export class WebAudioView extends UI.Widget.VBox<ShadowRoot> implements
238
254
  this.view(input, undefined, this.contentElement);
239
255
  }
240
256
 
257
+ #updateSuspendedState(): void {
258
+ this.#suspended = SDK.TargetManager.TargetManager.instance().allTargetsSuspended();
259
+ if (this.#suspended) {
260
+ this.reset();
261
+ } else {
262
+ void this.pollRealtimeDataThrottler.schedule(this.pollRealtimeData.bind(this));
263
+ }
264
+ this.requestUpdate();
265
+ }
266
+
241
267
  private addEventListeners(webAudioModel: WebAudioModel): void {
242
268
  webAudioModel.ensureEnabled();
243
269
  webAudioModel.addEventListener(ModelEvents.CONTEXT_CREATED, this.contextCreated, this);
@@ -305,6 +331,7 @@ export class WebAudioView extends UI.Widget.VBox<ShadowRoot> implements
305
331
  private reset(): void {
306
332
  this.contextSelectorItems.replaceAll([]);
307
333
  this.selectedContextIndex = -1;
334
+ this.contextRealtimeData = null;
308
335
 
309
336
  this.knownContexts.clear();
310
337
  this.requestUpdate();
@@ -316,6 +343,9 @@ export class WebAudioView extends UI.Widget.VBox<ShadowRoot> implements
316
343
  }
317
344
 
318
345
  private async pollRealtimeData(): Promise<void> {
346
+ if (this.#suspended || !this.isShowing()) {
347
+ return;
348
+ }
319
349
  if (this.selectedContextIndex < 0) {
320
350
  this.setContextRealtimeData(null);
321
351
  return;
@@ -334,6 +364,9 @@ export class WebAudioView extends UI.Widget.VBox<ShadowRoot> implements
334
364
  continue;
335
365
  }
336
366
  const realtimeData = await model.requestRealtimeData(context.contextId);
367
+ if (this.#suspended || !this.isShowing()) {
368
+ return;
369
+ }
337
370
  if (realtimeData) {
338
371
  this.setContextRealtimeData(realtimeData);
339
372
  }
@@ -14,10 +14,24 @@
14
14
  min-height: fit-content;
15
15
  }
16
16
 
17
+ .web-audio-toolbar-container[hidden] {
18
+ display: none;
19
+ }
20
+
17
21
  .web-audio-content-container {
18
22
  overflow-y: auto;
19
23
  }
20
24
 
25
+ .web-audio-paused {
26
+ flex: 1;
27
+ display: flex;
28
+ align-items: center;
29
+ justify-content: center;
30
+ font: var(--sys-typescale-headline5);
31
+ color: var(--sys-color-on-surface-subtle);
32
+ background-color: var(--sys-color-cdt-base-container);
33
+ }
34
+
21
35
  .web-audio-details-container {
22
36
  min-height: fit-content;
23
37
  }
@@ -71,9 +85,9 @@
71
85
  }
72
86
 
73
87
  .context-summary-container {
74
- flex: 0 0 27px;
75
- line-height: 27px;
76
- padding-left: 5px;
88
+ /* 28px summary bar height minus 1px top border. */
89
+ line-height: calc(var(--sys-size-12) - var(--sys-size-1));
90
+ padding-left: var(--sys-size-4);
77
91
  background-color: var(--sys-color-cdt-base-container);
78
92
  border-top: var(--sys-size-1) solid var(--sys-color-divider);
79
93
  white-space: nowrap;
@@ -6,7 +6,6 @@
6
6
  @scope to (devtools-widget > *) {
7
7
  .webauthn-pane {
8
8
  overflow: auto;
9
- min-width: 500px;
10
9
  }
11
10
 
12
11
  .webauthn-toolbar-container {
@@ -72,7 +71,7 @@
72
71
  }
73
72
 
74
73
  .webauthn-pane select {
75
- width: 120px;
74
+ width: var(--sys-size-20);
76
75
  }
77
76
  /* Active Authenticator Section */
78
77
  .authenticator-section {
@@ -136,8 +135,7 @@
136
135
  font: var(--sys-typescale-body5-medium);
137
136
  padding-right: var(--sys-size-6);
138
137
  text-align: left;
139
- min-width: 152px;
140
- line-height: 18px;
138
+ min-width: var(--sys-size-23);
141
139
  }
142
140
 
143
141
  ::part(action-button) {
@@ -11,9 +11,19 @@ import * as MarkdownView from '../../ui/components/markdown_view/markdown_view.j
11
11
 
12
12
  let registeredLinks = false;
13
13
 
14
+ export interface ReleaseNoteAnnouncement {
15
+ title: string;
16
+ description: string;
17
+ link?: {
18
+ url: Platform.DevToolsPath.UrlString,
19
+ text: string,
20
+ };
21
+ }
22
+
14
23
  export interface ReleaseNote {
15
24
  version: number;
16
25
  header: string;
26
+ announcement?: ReleaseNoteAnnouncement;
17
27
  markdownLinks: Array<{key: string, link: string}>;
18
28
  videoLinks: Array<{description: string, link: Platform.DevToolsPath.UrlString, type?: VideoType}>;
19
29
  link: string;
@@ -40,8 +50,16 @@ export function getReleaseNote(): ReleaseNote {
40
50
  }
41
51
 
42
52
  let releaseNote: ReleaseNote = {
43
- version: 156,
53
+ version: 158,
44
54
  header: 'New in DevTools (November 2026)',
55
+ announcement: {
56
+ title: 'Modern Web Guidance is now stable!',
57
+ description: 'Upgrade your coding agents with expert-vetted web development best practices.',
58
+ link: {
59
+ url: 'https://goo.gle/mwg-stable' as Platform.DevToolsPath.UrlString,
60
+ text: 'Read the announcement',
61
+ },
62
+ },
45
63
  markdownLinks: [
46
64
  {
47
65
  key: 'mcp',
@@ -11,7 +11,7 @@ import * as Marked from '../../third_party/marked/marked.js';
11
11
  import * as Buttons from '../../ui/components/buttons/buttons.js';
12
12
  import * as UIHelpers from '../../ui/helpers/helpers.js';
13
13
  import * as UI from '../../ui/legacy/legacy.js';
14
- import {html, render} from '../../ui/lit/lit.js';
14
+ import {html, nothing, render} from '../../ui/lit/lit.js';
15
15
  import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
16
16
 
17
17
  import {getReleaseNote, type ReleaseNote, VideoType} from './ReleaseNoteText.js';
@@ -85,6 +85,20 @@ export class ReleaseNoteView extends UI.Panel.Panel {
85
85
  </div>
86
86
 
87
87
  <div class="feature-container">
88
+ ${releaseNote.announcement ? html`
89
+ <div class="feature announcement">
90
+ <div class="announcement-content">
91
+ <h3>${releaseNote.announcement.title}</h3>
92
+ <p>
93
+ ${releaseNote.announcement.description}${
94
+ releaseNote.announcement.link ? html`${' '}<devtools-link
95
+ href=${releaseNote.announcement.link.url}
96
+ jslogcontext="learn-more"
97
+ >${releaseNote.announcement.link.text}</devtools-link>` : nothing}
98
+ </p>
99
+ </div>
100
+ </div>
101
+ ` : nothing}
88
102
  <div class="video-container">
89
103
  ${releaseNote.videoLinks.map((value: {description: string, link: Platform.DevToolsPath.UrlString, type?: VideoType}) => {
90
104
  return html`