chrome-devtools-frontend 1.0.1473514 → 1.0.1506453
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.
- package/.gemini/commands/migrate-e2e-non-hosted.toml +43 -0
- package/.gemini/commands/review.toml +85 -0
- package/.geminiignore +6 -0
- package/.github/workflows/auto-close-prs.yml +30 -0
- package/.stylelintignore +0 -1
- package/.vscode/devtools-workspace-settings.json +2 -1
- package/AUTHORS +3 -0
- package/WATCHLISTS +0 -4
- package/config/gni/devtools_grd_files.gni +92 -47
- package/config/gni/devtools_image_files.gni +8 -0
- package/config/gni/i18n.gni +3 -2
- package/config/owner/COMMON_OWNERS +2 -0
- package/docs/README.md +2 -2
- package/docs/architecture_of_devtools.md +8 -8
- package/docs/committers_policy.md +2 -0
- package/docs/contributing/README.md +29 -5
- package/docs/contributing/changes.md +1 -1
- package/docs/contributing/images/quickstart-vscode-tsversion.png +0 -0
- package/docs/contributing/infrastructure.md +89 -0
- package/docs/cookbook/localization.md +86 -79
- package/docs/get_the_code.md +9 -9
- package/docs/styleguide/ux/components.md +190 -2
- package/docs/styleguide/ux/glossary.md +16 -0
- package/docs/styleguide/ux/images/context-menu-example.png +0 -0
- package/docs/ui_engineering.md +80 -19
- package/eslint.config.mjs +64 -23
- package/extension-api/ExtensionAPI.d.ts +3 -0
- package/extensions/cxx_debugging/CMakeLists.txt +0 -6
- package/extensions/cxx_debugging/e2e/MochaRootHooks.ts +3 -1
- package/extensions/cxx_debugging/e2e/TestDriver.ts +1 -2
- package/extensions/cxx_debugging/src/GlobMatch.ts +1 -1
- package/extensions/cxx_debugging/src/ModuleConfiguration.ts +2 -2
- package/extensions/cxx_debugging/third_party/llvm/README.chromium +2 -0
- package/extensions/cxx_debugging/tools/bootstrap.py +7 -0
- package/front_end/Images/generate-css-vars.js +1 -1
- package/front_end/Images/readme.md +1 -2
- package/front_end/Images/rollup.config.mjs +12 -1
- package/front_end/Images/src/baseline-high-availability.svg +17 -0
- package/front_end/Images/src/baseline-limited-availability.svg +19 -0
- package/front_end/Images/src/baseline-low-availability.svg +31 -0
- package/front_end/Images/src/bucket.svg +4 -0
- package/front_end/Images/src/label-auto.svg +3 -0
- package/front_end/Images/src/shield.svg +3 -0
- package/front_end/Images/src/smart-assistant.svg +3 -1
- package/front_end/Images/src/speculative-loads.svg +1 -0
- package/front_end/Images/src/text-analysis.svg +3 -0
- package/front_end/Tests.js +78 -230
- package/front_end/application_tokens.css +7 -1
- package/front_end/core/common/Base64.test.ts +1 -1
- package/front_end/core/common/Base64.ts +3 -3
- package/front_end/core/common/Color.ts +38 -0
- package/front_end/core/common/Debouncer.ts +3 -3
- package/front_end/core/common/EventTarget.test.ts +1 -0
- package/front_end/core/common/Gzip.test.ts +63 -0
- package/front_end/core/common/Gzip.ts +72 -0
- package/front_end/core/common/ResourceType.ts +29 -29
- package/front_end/core/common/ReturnToPanel.ts +15 -0
- package/front_end/core/common/Revealer.ts +10 -10
- package/front_end/core/common/SettingRegistration.ts +22 -22
- package/front_end/core/common/Settings.test.ts +151 -18
- package/front_end/core/common/Settings.ts +99 -8
- package/front_end/core/common/SimpleHistoryManager.ts +0 -17
- package/front_end/core/common/common.ts +4 -0
- package/front_end/core/host/AidaClient.test.ts +103 -2
- package/front_end/core/host/AidaClient.ts +161 -31
- package/front_end/core/host/InspectorFrontendHost.ts +57 -48
- package/front_end/core/host/InspectorFrontendHostAPI.ts +11 -0
- package/front_end/core/host/ResourceLoader.ts +15 -15
- package/front_end/core/host/UserMetrics.ts +27 -13
- package/front_end/core/i18n/NumberFormatter.test.ts +92 -0
- package/front_end/core/i18n/NumberFormatter.ts +9 -9
- package/front_end/core/i18n/collect-ui-strings.js +3 -3
- package/front_end/core/i18n/time-utilities.ts +3 -14
- package/front_end/core/platform/Brand.ts +8 -1
- package/front_end/core/platform/DevToolsPath.ts +1 -1
- package/front_end/core/platform/StringUtilities.test.ts +54 -1
- package/front_end/core/platform/StringUtilities.ts +34 -8
- package/front_end/core/protocol_client/InspectorBackend.ts +9 -9
- package/front_end/core/root/Runtime.ts +52 -8
- package/front_end/core/sdk/AnimationModel.test.ts +0 -24
- package/front_end/core/sdk/AnimationModel.ts +1 -95
- package/front_end/core/sdk/AutofillModel.ts +8 -2
- package/front_end/core/sdk/CPUProfilerModel.ts +2 -2
- package/front_end/core/sdk/CSSContainerQuery.test.ts +15 -0
- package/front_end/core/sdk/CSSContainerQuery.ts +3 -1
- package/front_end/core/sdk/CSSMatchedStyles.test.ts +2 -1
- package/front_end/core/sdk/CSSMatchedStyles.ts +79 -50
- package/front_end/core/sdk/CSSModel.ts +20 -7
- package/front_end/core/sdk/CSSPropertyParser.test.ts +4 -3
- package/front_end/core/sdk/CSSPropertyParser.ts +12 -4
- package/front_end/core/sdk/CSSPropertyParserMatchers.test.ts +46 -15
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +131 -58
- package/front_end/core/sdk/CSSRule.ts +44 -44
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +2 -6
- package/front_end/core/sdk/ChildTargetManager.ts +1 -1
- package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +3 -8
- package/front_end/core/sdk/Connections.ts +17 -30
- package/front_end/core/sdk/ConsoleModel.ts +9 -9
- package/front_end/core/sdk/DOMModel.ts +45 -16
- package/front_end/core/sdk/DebuggerModel.test.ts +7 -4
- package/front_end/core/sdk/DebuggerModel.ts +55 -11
- package/front_end/core/sdk/EmulationModel.ts +13 -0
- package/front_end/core/sdk/EventBreakpointsModel.ts +2 -2
- package/front_end/core/sdk/IOModel.ts +28 -2
- package/front_end/core/sdk/NetworkManager.test.ts +0 -27
- package/front_end/core/sdk/NetworkManager.ts +137 -105
- package/front_end/core/sdk/NetworkRequest.ts +747 -616
- package/front_end/core/sdk/OverlayModel.ts +4 -8
- package/front_end/core/sdk/PageResourceLoader.ts +32 -13
- package/front_end/core/sdk/PreloadingModel.ts +1 -0
- package/front_end/core/sdk/RehydratingConnection.ts +13 -14
- package/front_end/core/sdk/RemoteObject.test.ts +24 -2
- package/front_end/core/sdk/RemoteObject.ts +0 -3
- package/front_end/core/sdk/Resource.ts +0 -5
- package/front_end/core/sdk/RuntimeModel.ts +2 -1
- package/front_end/core/sdk/Script.ts +2 -7
- package/front_end/core/sdk/ServerTiming.ts +12 -12
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +7 -3
- package/front_end/core/sdk/ServiceWorkerManager.ts +14 -18
- package/front_end/core/sdk/SourceMap.test.ts +55 -73
- package/front_end/core/sdk/SourceMap.ts +14 -11
- package/front_end/core/sdk/SourceMapFunctionRanges.ts +15 -9
- package/front_end/core/sdk/SourceMapScopeChainEntry.test.ts +6 -5
- package/front_end/core/sdk/SourceMapScopeChainEntry.ts +14 -14
- package/front_end/core/sdk/SourceMapScopesInfo.test.ts +232 -317
- package/front_end/core/sdk/SourceMapScopesInfo.ts +26 -25
- package/front_end/core/sdk/StorageBucketsModel.ts +4 -0
- package/front_end/core/sdk/Target.ts +2 -2
- package/front_end/core/sdk/TargetManager.ts +1 -1
- package/front_end/core/sdk/sdk-meta.ts +86 -86
- package/front_end/core/sdk/sdk.ts +0 -2
- package/front_end/design_system_tokens.css +1 -1
- package/front_end/devtools_compatibility.js +201 -177
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +12 -0
- package/front_end/entrypoints/inspector_main/OutermostTargetSelector.ts +3 -3
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +1 -1
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +1 -1
- package/front_end/entrypoints/js_app/js_app.ts +3 -3
- package/front_end/entrypoints/lighthouse_worker/LighthouseWorkerService.ts +1 -1
- package/front_end/entrypoints/main/GlobalAiButton.test.ts +132 -0
- package/front_end/entrypoints/main/GlobalAiButton.ts +141 -0
- package/front_end/entrypoints/main/MainImpl.test.ts +27 -0
- package/front_end/entrypoints/main/MainImpl.ts +179 -47
- package/front_end/entrypoints/main/globalAiButton.css +72 -0
- package/front_end/entrypoints/main/main-meta.ts +82 -42
- package/front_end/entrypoints/main/main.ts +2 -0
- package/front_end/entrypoints/node_app/NodeConnectionsPanel.ts +6 -6
- package/front_end/entrypoints/node_app/NodeMain.ts +8 -7
- package/front_end/entrypoints/node_app/node_app.ts +5 -5
- package/front_end/entrypoints/wasmparser_worker/WasmParserWorker.ts +1 -1
- package/front_end/entrypoints/worker_app/WorkerMain.ts +1 -1
- package/front_end/generated/Deprecation.ts +7 -29
- package/front_end/generated/InspectorBackendCommands.js +183 -167
- package/front_end/generated/SupportedCSSProperties.js +252 -166
- package/front_end/generated/protocol-mapping.d.ts +687 -608
- package/front_end/generated/protocol-proxy-api.d.ts +782 -672
- package/front_end/generated/protocol.ts +11862 -11509
- package/front_end/global_typings/global_defs.d.ts +5 -0
- package/front_end/legacy_test_runner/accessibility_test_runner/accessibility_test_runner.js +1 -1
- package/front_end/legacy_test_runner/application_test_runner/CacheStorageTestRunner.js +1 -1
- package/front_end/legacy_test_runner/application_test_runner/IndexedDBTestRunner.js +1 -1
- package/front_end/legacy_test_runner/application_test_runner/ResourceTreeTestRunner.js +1 -1
- package/front_end/legacy_test_runner/application_test_runner/ResourcesTestRunner.js +1 -1
- package/front_end/legacy_test_runner/application_test_runner/ServiceWorkersTestRunner.js +1 -1
- package/front_end/legacy_test_runner/application_test_runner/StorageTestRunner.js +1 -1
- package/front_end/legacy_test_runner/axe_core_test_runner/axe_core_test_runner.js +1 -1
- package/front_end/legacy_test_runner/bindings_test_runner/AutomappingTestRunner.js +1 -1
- package/front_end/legacy_test_runner/bindings_test_runner/BindingsTestRunner.js +1 -1
- package/front_end/legacy_test_runner/bindings_test_runner/IsolatedFilesystemTestRunner.js +1 -1
- package/front_end/legacy_test_runner/bindings_test_runner/OverridesTestRunner.js +1 -1
- package/front_end/legacy_test_runner/bindings_test_runner/PersistenceTestRunner.js +1 -1
- package/front_end/legacy_test_runner/console_test_runner/console_test_runner.js +20 -20
- package/front_end/legacy_test_runner/coverage_test_runner/coverage_test_runner.js +11 -11
- package/front_end/legacy_test_runner/data_grid_test_runner/data_grid_test_runner.js +1 -1
- package/front_end/legacy_test_runner/device_mode_test_runner/device_mode_test_runner.js +1 -1
- package/front_end/legacy_test_runner/elements_test_runner/EditDOMTestRunner.js +1 -1
- package/front_end/legacy_test_runner/elements_test_runner/ElementsPanelShadowSelectionOnRefreshTestRunner.js +1 -1
- package/front_end/legacy_test_runner/elements_test_runner/ElementsTestRunner.js +6 -80
- package/front_end/legacy_test_runner/elements_test_runner/SetOuterHTMLTestRunner.js +1 -1
- package/front_end/legacy_test_runner/elements_test_runner/StylesUpdateLinksTestRunner.js +1 -1
- package/front_end/legacy_test_runner/extensions_test_runner/ExtensionsNetworkTestRunner.js +1 -1
- package/front_end/legacy_test_runner/extensions_test_runner/ExtensionsTestRunner.js +1 -1
- package/front_end/legacy_test_runner/heap_profiler_test_runner/heap_profiler_test_runner.js +2 -2
- package/front_end/legacy_test_runner/layers_test_runner/layers_test_runner.js +1 -1
- package/front_end/legacy_test_runner/network_test_runner/network_test_runner.js +1 -1
- package/front_end/legacy_test_runner/performance_test_runner/TimelineDataTestRunner.js +1 -1
- package/front_end/legacy_test_runner/performance_test_runner/TimelineTestRunner.js +1 -10
- package/front_end/legacy_test_runner/sdk_test_runner/sdk_test_runner.js +1 -1
- package/front_end/legacy_test_runner/security_test_runner/security_test_runner.js +1 -1
- package/front_end/legacy_test_runner/sources_test_runner/AutocompleteTestRunner.js +1 -1
- package/front_end/legacy_test_runner/sources_test_runner/DebuggerTestRunner.js +4 -4
- package/front_end/legacy_test_runner/sources_test_runner/EditorTestRunner.js +1 -1
- package/front_end/legacy_test_runner/sources_test_runner/LiveEditTestRunner.js +1 -1
- package/front_end/legacy_test_runner/sources_test_runner/SearchTestRunner.js +1 -1
- package/front_end/legacy_test_runner/sources_test_runner/SourcesTestRunner.js +2 -2
- package/front_end/legacy_test_runner/test_runner/TestRunner.js +45 -45
- package/front_end/legacy_test_runner/test_runner/test_runner.js +4 -4
- package/front_end/models/ai_assistance/AiHistoryStorage.snapshot.txt +66 -0
- package/front_end/models/ai_assistance/AiHistoryStorage.test.ts +82 -3
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +95 -6
- package/front_end/models/ai_assistance/AiUtils.ts +1 -1
- package/front_end/models/ai_assistance/ConversationHandler.test.ts +355 -0
- package/front_end/models/ai_assistance/ConversationHandler.ts +380 -0
- package/front_end/models/ai_assistance/ExtensionScope.ts +1 -4
- package/front_end/models/ai_assistance/README.md +79 -0
- package/front_end/models/ai_assistance/agents/AiAgent.test.ts +22 -1
- package/front_end/models/ai_assistance/agents/AiAgent.ts +76 -95
- package/front_end/models/ai_assistance/agents/FileAgent.test.ts +3 -2
- package/front_end/models/ai_assistance/agents/FileAgent.ts +1 -1
- package/front_end/models/ai_assistance/agents/NetworkAgent.ts +7 -7
- package/front_end/models/ai_assistance/agents/PerformanceAgent.test.ts +591 -62
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +1111 -117
- package/front_end/models/ai_assistance/agents/PerformanceAnnotationsAgent.test.ts +4 -2
- package/front_end/models/ai_assistance/agents/PerformanceAnnotationsAgent.ts +75 -5
- package/front_end/models/ai_assistance/agents/StylingAgent.test.ts +166 -507
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +125 -319
- package/front_end/models/ai_assistance/ai_assistance.ts +2 -1
- package/front_end/models/ai_assistance/data_formatters/FileFormatter.test.ts +3 -2
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +725 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.test.ts +249 -274
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +494 -83
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +556 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.test.ts +92 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +359 -0
- package/front_end/models/ai_assistance/debug.ts +1 -1
- package/front_end/models/ai_assistance/injected.ts +1 -1
- package/front_end/models/ai_code_completion/AiCodeCompletion.test.ts +328 -0
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +289 -0
- package/front_end/models/ai_code_completion/ai_code_completion.ts +6 -0
- package/front_end/models/ai_code_completion/debug.ts +30 -0
- package/front_end/models/autofill_manager/AutofillManager.test.ts +0 -6
- package/front_end/models/autofill_manager/AutofillManager.ts +16 -9
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +0 -4
- package/front_end/models/bindings/CompilerScriptMapping.test.ts +8 -4
- package/front_end/models/bindings/CompilerScriptMapping.ts +12 -5
- package/front_end/models/bindings/DebuggerLanguagePlugins.test.ts +7 -2
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +33 -24
- package/front_end/models/bindings/DebuggerWorkspaceBinding.test.ts +95 -3
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +94 -21
- package/front_end/models/bindings/DefaultScriptMapping.test.ts +3 -2
- package/front_end/models/bindings/FileUtils.test.ts +1 -10
- package/front_end/models/bindings/FileUtils.ts +6 -22
- package/front_end/models/bindings/LiveLocation.ts +0 -5
- package/front_end/models/bindings/PresentationConsoleMessageHelper.test.ts +7 -2
- package/front_end/models/bindings/PresentationConsoleMessageHelper.ts +0 -4
- package/front_end/models/bindings/ResourceMapping.test.ts +7 -2
- package/front_end/models/bindings/ResourceMapping.ts +0 -4
- package/front_end/models/bindings/ResourceScriptMapping.test.ts +2 -1
- package/front_end/models/bindings/ResourceScriptMapping.ts +4 -4
- package/front_end/models/bindings/SASSSourceMapping.ts +1 -1
- package/front_end/models/bindings/StylesSourceMapping.ts +0 -5
- package/front_end/models/bindings/bindings.ts +0 -2
- package/front_end/models/breakpoints/BreakpointManager.test.ts +9 -2
- package/front_end/models/cpu_profile/CPUProfileDataModel.ts +4 -2
- package/front_end/models/elements/ElementUpdateRecord.ts +101 -0
- package/front_end/models/elements/elements.ts +9 -0
- package/front_end/models/emulation/DeviceModeModel.ts +6 -22
- package/front_end/models/emulation/EmulatedDevices.ts +12 -12
- package/front_end/models/extensions/ExtensionAPI.ts +9 -5
- package/front_end/models/extensions/ExtensionPanel.ts +5 -2
- package/front_end/models/extensions/ExtensionServer.test.ts +122 -16
- package/front_end/models/extensions/ExtensionServer.ts +114 -31
- package/front_end/models/extensions/ExtensionView.ts +1 -1
- package/front_end/models/extensions/LanguageExtensionEndpoint.ts +14 -7
- package/front_end/models/har/HARFormat.ts +1 -1
- package/front_end/models/har/Importer.test.ts +40 -0
- package/front_end/models/har/Importer.ts +35 -1
- package/front_end/models/har/Writer.test.ts +3 -2
- package/front_end/models/har/Writer.ts +2 -2
- package/front_end/models/issues_manager/BounceTrackingIssue.ts +1 -1
- package/front_end/models/issues_manager/ClientHintIssue.ts +1 -1
- package/front_end/models/issues_manager/ContentSecurityPolicyIssue.ts +5 -5
- package/front_end/models/issues_manager/CookieIssue.ts +2 -2
- package/front_end/models/issues_manager/CorsIssue.ts +3 -3
- package/front_end/models/issues_manager/CrossOriginEmbedderPolicyIssue.ts +2 -2
- package/front_end/models/issues_manager/{SelectElementAccessibilityIssue.test.ts → ElementAccessibilityIssue.test.ts} +22 -21
- package/front_end/models/issues_manager/{SelectElementAccessibilityIssue.ts → ElementAccessibilityIssue.ts} +29 -21
- package/front_end/models/issues_manager/FederatedAuthRequestIssue.ts +1 -1
- package/front_end/models/issues_manager/FederatedAuthUserInfoRequestIssue.ts +1 -1
- package/front_end/models/issues_manager/GenericIssue.ts +4 -4
- package/front_end/models/issues_manager/HeavyAdIssue.ts +1 -1
- package/front_end/models/issues_manager/Issue.ts +6 -6
- package/front_end/models/issues_manager/IssuesManager.ts +8 -3
- package/front_end/models/issues_manager/LowTextContrastIssue.ts +1 -1
- package/front_end/models/issues_manager/MarkdownIssueDescription.ts +1 -1
- package/front_end/models/issues_manager/MixedContentIssue.ts +1 -1
- package/front_end/models/issues_manager/PartitioningBlobURLIssue.ts +2 -2
- package/front_end/models/issues_manager/QuirksModeIssue.ts +1 -1
- package/front_end/models/issues_manager/SRIMessageSignatureIssue.ts +3 -3
- package/front_end/models/issues_manager/SharedArrayBufferIssue.ts +1 -1
- package/front_end/models/issues_manager/SharedDictionaryIssue.ts +1 -1
- package/front_end/models/issues_manager/UnencodedDigestIssue.test.ts +49 -0
- package/front_end/models/issues_manager/UnencodedDigestIssue.ts +88 -0
- package/front_end/models/issues_manager/descriptions/sriSignatureInputHeaderValueNotInnerList.md +1 -1
- package/front_end/models/issues_manager/descriptions/sriValidationFailedIntegrityMismatch.md +1 -3
- package/front_end/models/issues_manager/descriptions/summaryElementAccessibilityInteractiveContentSummaryDescendant.md +3 -0
- package/front_end/models/issues_manager/descriptions/unencodedDigestIncorrectDigestLength.md +12 -0
- package/front_end/models/issues_manager/descriptions/unencodedDigestIncorrectDigestType.md +17 -0
- package/front_end/models/issues_manager/descriptions/unencodedDigestMalformedDictionary.md +14 -0
- package/front_end/models/issues_manager/descriptions/unencodedDigestUnknownAlgorithm.md +15 -0
- package/front_end/models/issues_manager/descriptions/userReidentificationBlocked.md +1 -1
- package/front_end/models/issues_manager/issues_manager.ts +4 -2
- package/front_end/models/javascript_metadata/NativeFunctions.js +201 -127
- package/front_end/models/live-metrics/web-vitals-injected/OnEachInteraction.ts +1 -1
- package/front_end/models/live-metrics/web-vitals-injected/rollup.config.mjs +1 -1
- package/front_end/models/logs/NetworkLog.ts +74 -83
- package/front_end/models/logs/logs-meta.ts +4 -4
- package/front_end/models/persistence/AutomaticFileSystemManager.test.ts +0 -39
- package/front_end/models/persistence/AutomaticFileSystemManager.ts +14 -21
- package/front_end/models/persistence/EditFileSystemView.ts +6 -6
- package/front_end/models/persistence/IsolatedFileSystem.ts +27 -9
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +16 -3
- package/front_end/models/persistence/NetworkPersistenceManager.ts +7 -3
- package/front_end/models/persistence/PersistenceAction.test.ts +10 -7
- package/front_end/models/persistence/PersistenceActions.ts +26 -15
- package/front_end/models/persistence/PersistenceImpl.test.ts +2 -1
- package/front_end/models/persistence/PersistenceImpl.ts +7 -4
- package/front_end/models/persistence/PersistenceUtils.ts +10 -7
- package/front_end/models/persistence/PlatformFileSystem.ts +11 -2
- package/front_end/models/persistence/WorkspaceSettingsTab.ts +6 -6
- package/front_end/models/persistence/editFileSystemView.css +17 -15
- package/front_end/models/persistence/persistence-meta.ts +10 -10
- package/front_end/models/persistence/workspaceSettingsTab.css +29 -27
- package/front_end/models/project_settings/ProjectSettingsModel.ts +2 -2
- package/front_end/models/source_map_scopes/NamesResolver.test.ts +3 -2
- package/front_end/models/source_map_scopes/NamesResolver.ts +1 -1
- package/front_end/models/source_map_scopes/ScopeChainModel.test.ts +2 -1
- package/front_end/models/stack_trace/README.md +14 -0
- package/front_end/models/stack_trace/StackTrace.ts +35 -0
- package/front_end/models/stack_trace/StackTraceImpl.test.ts +74 -0
- package/front_end/models/stack_trace/StackTraceImpl.ts +82 -0
- package/front_end/models/stack_trace/StackTraceModel.test.ts +296 -0
- package/front_end/models/stack_trace/StackTraceModel.ts +127 -0
- package/front_end/models/stack_trace/Trie.test.ts +129 -0
- package/front_end/models/stack_trace/Trie.ts +154 -0
- package/front_end/models/stack_trace/stack_trace.ts +9 -0
- package/front_end/models/stack_trace/stack_trace_impl.ts +13 -0
- package/front_end/models/text_utils/ContentProvider.ts +1 -3
- package/front_end/models/text_utils/StaticContentProvider.test.ts +1 -1
- package/front_end/models/text_utils/StaticContentProvider.ts +1 -5
- package/front_end/models/text_utils/TextUtils.ts +2 -3
- package/front_end/models/trace/LanternComputationData.ts +1 -0
- package/front_end/models/trace/ModelImpl.ts +18 -7
- package/front_end/models/trace/Processor.test.ts +15 -14
- package/front_end/models/trace/Processor.ts +49 -32
- package/front_end/models/trace/extras/ScriptDuplication.test.ts +13 -10
- package/front_end/models/trace/extras/StackTraceForEvent.test.ts +10 -8
- package/front_end/models/trace/extras/ThirdParties.ts +2 -3
- package/front_end/models/trace/extras/TraceTree.ts +7 -6
- package/front_end/models/trace/extras/extras.ts +0 -2
- package/front_end/models/trace/handlers/AnimationFramesHandler.test.ts +5 -5
- package/front_end/models/trace/handlers/AnimationFramesHandler.ts +10 -0
- package/front_end/models/trace/handlers/ExtensionTraceDataHandler.test.ts +177 -85
- package/front_end/models/trace/handlers/ExtensionTraceDataHandler.ts +28 -27
- package/front_end/models/trace/handlers/FramesHandler.test.ts +2 -7
- package/front_end/models/trace/handlers/FramesHandler.ts +46 -37
- package/front_end/models/trace/handlers/ImagePaintingHandler.test.ts +41 -0
- package/front_end/models/trace/handlers/ImagePaintingHandler.ts +44 -1
- package/front_end/models/trace/handlers/InitiatorsHandler.test.ts +62 -15
- package/front_end/models/trace/handlers/InitiatorsHandler.ts +24 -0
- package/front_end/models/trace/handlers/LayoutShiftsHandler.test.ts +6 -18
- package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +21 -17
- package/front_end/models/trace/handlers/MetaHandler.test.ts +12 -0
- package/front_end/models/trace/handlers/MetaHandler.ts +5 -4
- package/front_end/models/trace/handlers/NetworkRequestsHandler.test.ts +21 -21
- package/front_end/models/trace/handlers/NetworkRequestsHandler.ts +79 -32
- package/front_end/models/trace/handlers/PageLoadMetricsHandler.test.ts +6 -18
- package/front_end/models/trace/handlers/RendererHandler.test.ts +26 -39
- package/front_end/models/trace/handlers/RendererHandler.ts +10 -17
- package/front_end/models/trace/handlers/SamplesHandler.test.ts +3 -4
- package/front_end/models/trace/handlers/SamplesHandler.ts +13 -12
- package/front_end/models/trace/handlers/ScriptsHandler.test.ts +1 -1
- package/front_end/models/trace/handlers/ScriptsHandler.ts +8 -4
- package/front_end/models/trace/handlers/SelectorStatsHandler.test.ts +1 -3
- package/front_end/models/trace/handlers/SelectorStatsHandler.ts +65 -0
- package/front_end/models/trace/handlers/UserInteractionsHandler.test.ts +4 -2
- package/front_end/models/trace/handlers/UserInteractionsHandler.ts +4 -2
- package/front_end/models/trace/handlers/UserTimingsHandler.test.ts +326 -0
- package/front_end/models/trace/handlers/UserTimingsHandler.ts +61 -24
- package/front_end/models/trace/handlers/helpers.test.ts +7 -6
- package/front_end/models/trace/handlers/helpers.ts +19 -14
- package/front_end/models/trace/handlers/types.ts +5 -1
- package/front_end/models/trace/helpers/SamplesIntegrator.test.ts +3 -3
- package/front_end/models/trace/helpers/SamplesIntegrator.ts +24 -33
- package/front_end/models/trace/helpers/SyntheticEvents.ts +2 -2
- package/front_end/models/trace/helpers/Timing.ts +66 -3
- package/front_end/models/trace/helpers/Trace.test.ts +6 -7
- package/front_end/models/trace/helpers/Trace.ts +47 -19
- package/front_end/models/trace/helpers/TreeHelpers.test.ts +0 -8
- package/front_end/models/trace/helpers/TreeHelpers.ts +1 -1
- package/front_end/models/trace/insights/CLSCulprits.test.ts +10 -7
- package/front_end/models/trace/insights/CLSCulprits.ts +85 -23
- package/front_end/models/trace/insights/Cache.ts +12 -0
- package/front_end/models/trace/insights/Common.test.ts +3 -3
- package/front_end/models/trace/insights/Common.ts +56 -22
- package/front_end/models/trace/insights/DOMSize.test.ts +4 -1
- package/front_end/models/trace/insights/DOMSize.ts +48 -1
- package/front_end/models/trace/insights/DocumentLatency.test.ts +5 -1
- package/front_end/models/trace/insights/DocumentLatency.ts +59 -4
- package/front_end/models/trace/insights/DuplicatedJavaScript.test.ts +2 -3
- package/front_end/models/trace/insights/DuplicatedJavaScript.ts +15 -4
- package/front_end/models/trace/insights/FontDisplay.test.ts +1 -1
- package/front_end/models/trace/insights/FontDisplay.ts +8 -0
- package/front_end/models/trace/insights/ForcedReflow.ts +25 -4
- package/front_end/models/trace/insights/{InteractionToNextPaint.test.ts → INPBreakdown.test.ts} +2 -2
- package/front_end/models/trace/insights/{InteractionToNextPaint.ts → INPBreakdown.ts} +63 -16
- package/front_end/models/trace/insights/ImageDelivery.ts +39 -7
- package/front_end/models/trace/insights/LCPBreakdown.test.ts +100 -0
- package/front_end/models/trace/insights/LCPBreakdown.ts +255 -0
- package/front_end/models/trace/insights/LCPDiscovery.ts +84 -8
- package/front_end/models/trace/insights/LegacyJavaScript.ts +14 -4
- package/front_end/models/trace/insights/Models.ts +2 -2
- package/front_end/models/trace/insights/ModernHTTP.test.ts +3 -2
- package/front_end/models/trace/insights/ModernHTTP.ts +35 -18
- package/front_end/models/trace/insights/NetworkDependencyTree.test.ts +10 -1
- package/front_end/models/trace/insights/NetworkDependencyTree.ts +41 -13
- package/front_end/models/trace/insights/RenderBlocking.test.ts +8 -12
- package/front_end/models/trace/insights/RenderBlocking.ts +13 -1
- package/front_end/models/trace/insights/SlowCSSSelector.test.ts +12 -34
- package/front_end/models/trace/insights/SlowCSSSelector.ts +46 -27
- package/front_end/models/trace/insights/ThirdParties.test.ts +1 -1
- package/front_end/models/trace/insights/ThirdParties.ts +36 -0
- package/front_end/models/trace/insights/Viewport.test.ts +16 -1
- package/front_end/models/trace/insights/Viewport.ts +41 -3
- package/front_end/models/trace/insights/types.ts +5 -2
- package/front_end/models/trace/lantern/core/NetworkAnalyzer.test.ts +4 -0
- package/front_end/models/trace/lantern/graph/BaseNode.ts +1 -1
- package/front_end/models/trace/lantern/simulation/SimulationTimingMap.ts +1 -1
- package/front_end/models/trace/trace.ts +0 -2
- package/front_end/models/trace/types/Configuration.ts +8 -0
- package/front_end/models/trace/types/Extensions.ts +24 -3
- package/front_end/models/trace/types/File.ts +5 -2
- package/front_end/models/trace/types/Overlays.ts +140 -0
- package/front_end/models/trace/types/Timing.ts +1 -0
- package/front_end/models/trace/types/TraceEvents.test.ts +2 -1
- package/front_end/models/trace/types/TraceEvents.ts +98 -62
- package/front_end/models/trace/types/types.ts +1 -0
- package/front_end/models/workspace/FileManager.ts +5 -3
- package/front_end/models/{bindings → workspace}/IgnoreListManager.test.ts +11 -7
- package/front_end/models/{bindings → workspace}/IgnoreListManager.ts +36 -33
- package/front_end/models/workspace/UISourceCode.test.ts +18 -17
- package/front_end/models/workspace/UISourceCode.ts +17 -7
- package/front_end/models/workspace/WorkspaceImpl.ts +1 -1
- package/front_end/models/workspace/workspace.ts +2 -0
- package/front_end/models/workspace_diff/WorkspaceDiff.test.ts +2 -0
- package/front_end/models/workspace_diff/WorkspaceDiff.ts +7 -2
- package/front_end/panels/accessibility/ARIAAttributesView.test.ts +101 -0
- package/front_end/panels/accessibility/ARIAAttributesView.ts +16 -4
- package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +12 -9
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +31 -28
- package/front_end/panels/accessibility/AccessibilitySidebarView.ts +8 -12
- package/front_end/panels/accessibility/AccessibilityStrings.ts +87 -87
- package/front_end/panels/accessibility/AccessibilitySubPane.ts +6 -6
- package/front_end/panels/accessibility/SourceOrderView.ts +95 -61
- package/front_end/panels/accessibility/accessibilityProperties.css +5 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.snapshot.txt +32 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.test.ts +465 -377
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +289 -339
- package/front_end/panels/ai_assistance/PatchWidget.ts +30 -29
- package/front_end/panels/ai_assistance/SelectWorkspaceDialog.test.ts +11 -1
- package/front_end/panels/ai_assistance/SelectWorkspaceDialog.ts +29 -19
- package/front_end/panels/ai_assistance/aiAssistancePanel.css +1 -0
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +40 -20
- package/front_end/panels/ai_assistance/components/ChatView.test.ts +1 -0
- package/front_end/panels/ai_assistance/components/ChatView.ts +55 -44
- package/front_end/panels/ai_assistance/components/ExploreWidget.ts +10 -24
- package/front_end/panels/ai_assistance/components/UserActionRow.test.ts +4 -0
- package/front_end/panels/ai_assistance/components/UserActionRow.ts +25 -3
- package/front_end/panels/ai_assistance/components/chatView.css +0 -9
- package/front_end/panels/ai_assistance/components/exploreWidget.css +104 -102
- package/front_end/panels/ai_assistance/components/userActionRow.css +95 -94
- package/front_end/panels/ai_assistance/selectWorkspaceDialog.css +70 -69
- package/front_end/panels/animation/AnimationGroupPreviewUI.ts +1 -10
- package/front_end/panels/animation/AnimationTimeline.test.ts +6 -13
- package/front_end/panels/animation/AnimationTimeline.ts +183 -169
- package/front_end/panels/animation/AnimationUI.ts +4 -4
- package/front_end/panels/animation/animation.ts +0 -2
- package/front_end/panels/animation/animationTimeline.css +0 -67
- package/front_end/panels/application/AppManifestView.test.ts +21 -0
- package/front_end/panels/application/AppManifestView.ts +158 -139
- package/front_end/panels/application/ApplicationPanelSidebar.test.ts +13 -8
- package/front_end/panels/application/ApplicationPanelSidebar.ts +53 -54
- package/front_end/panels/application/BackForwardCacheTreeElement.ts +1 -1
- package/front_end/panels/application/BackgroundServiceView.test.ts +4 -8
- package/front_end/panels/application/BackgroundServiceView.ts +46 -44
- package/front_end/panels/application/CookieItemsView.ts +13 -14
- package/front_end/panels/application/DOMStorageItemsView.ts +5 -5
- package/front_end/panels/application/ExtensionStorageItemsView.ts +3 -3
- package/front_end/panels/application/IndexedDBModel.test.ts +2 -2
- package/front_end/panels/application/IndexedDBModel.ts +3 -0
- package/front_end/panels/application/IndexedDBViews.ts +58 -32
- package/front_end/panels/application/InterestGroupStorageModel.ts +3 -0
- package/front_end/panels/application/InterestGroupStorageView.ts +4 -4
- package/front_end/panels/application/InterestGroupTreeElement.ts +1 -1
- package/front_end/panels/application/KeyValueStorageItemsView.ts +10 -10
- package/front_end/panels/application/OpenedWindowDetailsView.ts +18 -18
- package/front_end/panels/application/PreloadingTreeElement.ts +5 -5
- package/front_end/panels/application/ReportingApiTreeElement.ts +1 -1
- package/front_end/panels/application/ReportingApiView.test.ts +161 -30
- package/front_end/panels/application/ReportingApiView.ts +153 -50
- package/front_end/panels/application/ServiceWorkerCacheTreeElement.ts +5 -5
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +20 -17
- package/front_end/panels/application/ServiceWorkerUpdateCycleView.ts +7 -7
- package/front_end/panels/application/ServiceWorkersView.ts +40 -76
- package/front_end/panels/application/SharedStorageEventsView.test.ts +2 -2
- package/front_end/panels/application/SharedStorageEventsView.ts +10 -20
- package/front_end/panels/application/SharedStorageItemsView.ts +11 -11
- package/front_end/panels/application/SharedStorageListTreeElement.ts +1 -1
- package/front_end/panels/application/SharedStorageModel.ts +3 -0
- package/front_end/panels/application/StorageBucketsTreeElement.test.ts +5 -4
- package/front_end/panels/application/StorageBucketsTreeElement.ts +4 -4
- package/front_end/panels/application/StorageItemsToolbar.ts +7 -7
- package/front_end/panels/application/StorageView.test.ts +5 -1
- package/front_end/panels/application/StorageView.ts +15 -13
- package/front_end/panels/application/application-meta.ts +7 -7
- package/front_end/panels/application/application.ts +0 -2
- package/front_end/panels/application/components/BackForwardCacheStrings.ts +5 -0
- package/front_end/panels/application/components/BackForwardCacheView.ts +11 -37
- package/front_end/panels/application/components/BounceTrackingMitigationsView.ts +1 -0
- package/front_end/panels/application/components/EndpointsGrid.ts +6 -2
- package/front_end/panels/application/components/FrameDetailsView.test.ts +4 -2
- package/front_end/panels/application/components/FrameDetailsView.ts +88 -57
- package/front_end/panels/application/components/InterestGroupAccessGrid.ts +9 -10
- package/front_end/panels/application/components/OriginTrialTreeView.ts +13 -22
- package/front_end/panels/application/components/PermissionsPolicySection.ts +11 -16
- package/front_end/panels/application/components/ProtocolHandlersView.ts +10 -10
- package/front_end/panels/application/components/ReportsGrid.ts +10 -11
- package/front_end/panels/application/components/SharedStorageAccessGrid.test.ts +4 -4
- package/front_end/panels/application/components/SharedStorageAccessGrid.ts +107 -101
- package/front_end/panels/application/components/SharedStorageMetadataView.ts +8 -8
- package/front_end/panels/application/components/StackTrace.ts +6 -12
- package/front_end/panels/application/components/StorageMetadataView.ts +22 -26
- package/front_end/panels/application/components/TrustTokensView.ts +3 -3
- package/front_end/panels/application/components/frameDetailsReportView.css +1 -1
- package/front_end/panels/application/components/sharedStorageAccessGrid.css +19 -17
- package/front_end/panels/application/preloading/PreloadingView.ts +29 -24
- package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +9 -9
- package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +22 -22
- package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +28 -29
- package/front_end/panels/application/preloading/components/PreloadingGrid.ts +5 -7
- package/front_end/panels/application/preloading/components/PreloadingMismatchedHeadersGrid.test.ts +2 -2
- package/front_end/panels/application/preloading/components/PreloadingMismatchedHeadersGrid.ts +4 -4
- package/front_end/panels/application/preloading/components/PreloadingString.ts +34 -34
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.test.ts +28 -1
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +4 -10
- package/front_end/panels/application/preloading/components/RuleSetGrid.test.ts +21 -0
- package/front_end/panels/application/preloading/components/RuleSetGrid.ts +10 -10
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +22 -23
- package/front_end/panels/application/resourcesSidebar.css +0 -4
- package/front_end/panels/autofill/AutofillView.test.ts +188 -259
- package/front_end/panels/autofill/AutofillView.ts +207 -217
- package/front_end/panels/autofill/autofill-meta.ts +3 -4
- package/front_end/panels/autofill/autofillView.css +85 -82
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.test.ts +179 -0
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +146 -35
- package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +27 -27
- package/front_end/panels/browser_debugger/ObjectEventListenersSidebarPane.ts +3 -2
- package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +16 -14
- package/front_end/panels/browser_debugger/browser_debugger-meta.ts +17 -17
- package/front_end/panels/browser_debugger/browser_debugger.ts +2 -0
- package/front_end/panels/changes/ChangesSidebar.ts +7 -7
- package/front_end/panels/changes/ChangesView.ts +6 -5
- package/front_end/panels/changes/CombinedDiffView.test.ts +2 -0
- package/front_end/panels/changes/CombinedDiffView.ts +2 -2
- package/front_end/panels/common/AiCodeCompletionDisclaimer.test.ts +57 -0
- package/front_end/panels/common/AiCodeCompletionDisclaimer.ts +186 -0
- package/front_end/panels/common/AiCodeCompletionSummaryToolbar.test.ts +85 -0
- package/front_end/panels/common/AiCodeCompletionSummaryToolbar.ts +139 -0
- package/front_end/panels/common/AiCodeCompletionTeaser.test.ts +98 -0
- package/front_end/panels/common/AiCodeCompletionTeaser.ts +258 -0
- package/front_end/panels/common/FreDialog.ts +139 -0
- package/front_end/panels/common/aiCodeCompletionDisclaimer.css +57 -0
- package/front_end/panels/common/aiCodeCompletionSummaryToolbar.css +101 -0
- package/front_end/panels/common/aiCodeCompletionTeaser.css +42 -0
- package/front_end/panels/common/common.css +0 -83
- package/front_end/panels/common/common.ts +8 -107
- package/front_end/panels/common/freDialog.css +88 -0
- package/front_end/panels/console/ConsoleContextSelector.ts +5 -5
- package/front_end/panels/console/ConsoleFormat.test.ts +1 -1
- package/front_end/panels/console/ConsolePanel.ts +1 -2
- package/front_end/panels/console/ConsolePinPane.ts +9 -9
- package/front_end/panels/console/ConsolePrompt.test.ts +47 -1
- package/front_end/panels/console/ConsolePrompt.ts +188 -19
- package/front_end/panels/console/ConsoleSidebar.test.ts +130 -0
- package/front_end/panels/console/ConsoleSidebar.ts +170 -207
- package/front_end/panels/console/ConsoleView.test.ts +4 -4
- package/front_end/panels/console/ConsoleView.ts +146 -54
- package/front_end/panels/console/ConsoleViewMessage.test.ts +1 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +66 -71
- package/front_end/panels/console/console-meta.ts +27 -27
- package/front_end/panels/console/consoleSidebar.css +2 -0
- package/front_end/panels/console/consoleView.css +22 -15
- package/front_end/panels/console_counters/WarningErrorCounter.ts +133 -100
- package/front_end/panels/coverage/CoverageDecorationManager.test.ts +2 -1
- package/front_end/panels/coverage/CoverageListView.ts +30 -30
- package/front_end/panels/coverage/CoverageView.test.ts +3 -2
- package/front_end/panels/coverage/CoverageView.ts +35 -34
- package/front_end/panels/coverage/coverage-meta.ts +7 -7
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +49 -49
- package/front_end/panels/css_overview/CSSOverviewPanel.test.ts +3 -3
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +1 -1
- package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +3 -3
- package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +3 -3
- package/front_end/panels/css_overview/CSSOverviewStartView.ts +8 -8
- package/front_end/panels/css_overview/CSSOverviewUnusedDeclarations.ts +7 -7
- package/front_end/panels/css_overview/cssOverviewCompletedView.css +289 -287
- package/front_end/panels/css_overview/cssOverviewSidebarPanel.css +43 -42
- package/front_end/panels/css_overview/cssOverviewStartView.css +68 -66
- package/front_end/panels/css_overview/css_overview-meta.ts +2 -2
- package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +14 -14
- package/front_end/panels/developer_resources/DeveloperResourcesView.ts +5 -5
- package/front_end/panels/developer_resources/developerResourcesListView.css +19 -18
- package/front_end/panels/developer_resources/developerResourcesView.css +32 -30
- package/front_end/panels/elements/AccessibilityTreeView.ts +2 -1
- package/front_end/panels/elements/CSSRuleValidator.test.ts +39 -0
- package/front_end/panels/elements/CSSRuleValidator.ts +41 -37
- package/front_end/panels/elements/CSSRuleValidatorHelper.ts +8 -0
- package/front_end/panels/elements/CSSValueTraceView.test.ts +2 -1
- package/front_end/panels/elements/CSSValueTraceView.ts +1 -2
- package/front_end/panels/elements/ClassesPaneWidget.ts +5 -3
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +18 -9
- package/front_end/panels/elements/ComputedStyleWidget.ts +4 -3
- package/front_end/panels/elements/DOMLinkifier.ts +6 -4
- package/front_end/panels/elements/DOMTreeWidget.test.ts +58 -0
- package/front_end/panels/elements/ElementIssueUtils.ts +14 -9
- package/front_end/panels/elements/ElementStatePaneWidget.ts +3 -3
- package/front_end/panels/elements/ElementsPanel.test.ts +69 -2
- package/front_end/panels/elements/ElementsPanel.ts +105 -187
- package/front_end/panels/elements/ElementsSidebarPane.ts +1 -1
- package/front_end/panels/elements/ElementsTreeElement.test.ts +401 -0
- package/front_end/panels/elements/ElementsTreeElement.ts +434 -82
- package/front_end/panels/elements/ElementsTreeOutline.test.ts +9 -6
- package/front_end/panels/elements/ElementsTreeOutline.ts +425 -258
- package/front_end/panels/elements/ElementsTreeOutlineRenderer.ts +80 -0
- package/front_end/panels/elements/EventListenersWidget.test.ts +129 -0
- package/front_end/panels/elements/EventListenersWidget.ts +112 -78
- package/front_end/panels/elements/ImagePreviewPopover.ts +1 -1
- package/front_end/panels/elements/InspectElementModeController.test.ts +77 -2
- package/front_end/panels/elements/InspectElementModeController.ts +13 -2
- package/front_end/panels/elements/LayersWidget.ts +95 -63
- package/front_end/panels/elements/{components/LayoutPane.test.ts → LayoutPane.test.ts} +60 -49
- package/front_end/panels/elements/LayoutPane.ts +593 -0
- package/front_end/panels/elements/MarkerDecorator.ts +2 -2
- package/front_end/panels/elements/MetricsSidebarPane.ts +6 -6
- package/front_end/panels/elements/NodeStackTraceWidget.ts +16 -14
- package/front_end/panels/elements/PlatformFontsWidget.ts +8 -8
- package/front_end/panels/elements/PropertiesWidget.ts +2 -2
- package/front_end/panels/elements/PropertyRenderer.test.ts +1 -1
- package/front_end/panels/elements/PropertyRenderer.ts +8 -11
- package/front_end/panels/elements/ShortcutTreeElement.ts +157 -0
- package/front_end/panels/elements/StyleEditorWidget.ts +1 -1
- package/front_end/panels/elements/StylePropertiesSection.test.ts +10 -10
- package/front_end/panels/elements/StylePropertiesSection.ts +42 -44
- package/front_end/panels/elements/StylePropertyHighlighter.test.ts +32 -21
- package/front_end/panels/elements/StylePropertyHighlighter.ts +9 -11
- package/front_end/panels/elements/StylePropertyTreeElement.test.ts +111 -53
- package/front_end/panels/elements/StylePropertyTreeElement.ts +166 -100
- package/front_end/panels/elements/StylesSidebarPane.ts +47 -48
- package/front_end/panels/elements/TopLayerContainer.ts +8 -7
- package/front_end/panels/elements/WebCustomData.test.ts +2 -2
- package/front_end/panels/elements/components/AccessibilityTreeNode.ts +1 -1
- package/front_end/panels/elements/components/AdornerManager.ts +15 -0
- package/front_end/panels/elements/components/CSSHintDetailsView.ts +1 -1
- package/front_end/panels/elements/components/CSSPropertyDocsView.test.ts +101 -2
- package/front_end/panels/elements/components/CSSPropertyDocsView.ts +188 -5
- package/front_end/panels/elements/components/CSSPropertyIconResolver.test.ts +1 -1
- package/front_end/panels/elements/components/CSSPropertyIconResolver.ts +2 -2
- package/front_end/panels/elements/components/CSSVariableValueView.ts +5 -5
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +2 -7
- package/front_end/panels/elements/components/ElementsTreeExpandButton.ts +1 -1
- package/front_end/panels/elements/components/QueryContainer.ts +1 -4
- package/front_end/panels/elements/components/components.ts +0 -4
- package/front_end/panels/elements/components/cssPropertyDocsView.css +12 -1
- package/front_end/panels/elements/components/cssVariableValueView.css +1 -0
- package/front_end/panels/elements/domLinkifier.css +36 -35
- package/front_end/panels/elements/elementStatePaneWidget.css +46 -45
- package/front_end/panels/elements/elements-meta.ts +4 -13
- package/front_end/panels/elements/elements.ts +4 -3
- package/front_end/panels/elements/elementsTreeOutline.css +2 -1
- package/front_end/panels/elements/layersWidget.css +2 -11
- package/front_end/panels/elements/layoutPane.css +145 -0
- package/front_end/panels/elements/metricsSidebarPane.css +1 -1
- package/front_end/panels/elements/nodeStackTraceWidget.css +5 -4
- package/front_end/panels/elements/platformFontsWidget.css +32 -31
- package/front_end/panels/elements/stylePropertiesTreeOutline.css +2 -2
- package/front_end/panels/elements/stylesSidebarPane.css +1 -0
- package/front_end/panels/emulation/DeviceModeToolbar.ts +13 -50
- package/front_end/panels/emulation/DeviceModeView.ts +3 -4
- package/front_end/panels/emulation/InspectedPagePlaceholder.ts +1 -1
- package/front_end/panels/emulation/MediaQueryInspector.ts +4 -2
- package/front_end/panels/emulation/emulation-meta.ts +7 -7
- package/front_end/panels/event_listeners/EventListenersView.test.ts +4 -4
- package/front_end/panels/event_listeners/EventListenersView.ts +34 -31
- package/front_end/panels/explain/PromptBuilder.test.ts +7 -2
- package/front_end/panels/explain/PromptBuilder.ts +3 -1
- package/front_end/panels/explain/components/ConsoleInsight.test.ts +14 -10
- package/front_end/panels/explain/components/ConsoleInsight.ts +13 -34
- package/front_end/panels/explain/explain-meta.ts +3 -3
- package/front_end/panels/issues/AffectedBlockedByResponseView.ts +4 -4
- package/front_end/panels/issues/AffectedCookiesView.ts +6 -6
- package/front_end/panels/issues/AffectedDescendantsWithinSelectElementView.ts +6 -6
- package/front_end/panels/issues/AffectedDirectivesView.ts +9 -9
- package/front_end/panels/issues/AffectedDocumentsInQuirksModeView.ts +4 -4
- package/front_end/panels/issues/AffectedElementsView.ts +1 -1
- package/front_end/panels/issues/AffectedElementsWithLowContrastView.ts +6 -6
- package/front_end/panels/issues/AffectedHeavyAdView.ts +7 -7
- package/front_end/panels/issues/AffectedMetadataAllowedSitesView.ts +1 -1
- package/front_end/panels/issues/AffectedResourcesView.ts +6 -6
- package/front_end/panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts +10 -10
- package/front_end/panels/issues/AffectedSourcesView.ts +1 -1
- package/front_end/panels/issues/AffectedTrackingSitesView.ts +1 -1
- package/front_end/panels/issues/CorsIssueDetailsView.ts +27 -27
- package/front_end/panels/issues/GenericIssueDetailsView.ts +3 -3
- package/front_end/panels/issues/HiddenIssuesRow.ts +55 -29
- package/front_end/panels/issues/IssueAggregator.ts +5 -11
- package/front_end/panels/issues/IssueKindView.ts +2 -2
- package/front_end/panels/issues/IssueView.ts +13 -13
- package/front_end/panels/issues/IssuesPane.ts +5 -4
- package/front_end/panels/issues/components/HideIssuesMenu.ts +1 -1
- package/front_end/panels/issues/issues-meta.ts +2 -2
- package/front_end/panels/js_timeline/js_timeline-meta.ts +6 -6
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +43 -41
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +7 -7
- package/front_end/panels/layer_viewer/LayerViewHost.ts +1 -1
- package/front_end/panels/layer_viewer/Layers3DView.ts +19 -13
- package/front_end/panels/layer_viewer/PaintProfilerView.ts +9 -9
- package/front_end/panels/layer_viewer/TransformController.ts +14 -8
- package/front_end/panels/layer_viewer/layer_viewer-meta.ts +9 -9
- package/front_end/panels/layers/LayersPanel.ts +3 -3
- package/front_end/panels/layers/layers-meta.ts +2 -2
- package/front_end/panels/lighthouse/LighthouseController.ts +27 -27
- package/front_end/panels/lighthouse/LighthousePanel.ts +7 -7
- package/front_end/panels/lighthouse/LighthouseProtocolService.ts +31 -33
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +4 -2
- package/front_end/panels/lighthouse/LighthouseReportSelector.ts +2 -4
- package/front_end/panels/lighthouse/LighthouseStartView.ts +4 -3
- package/front_end/panels/lighthouse/LighthouseStatusView.ts +31 -31
- package/front_end/panels/lighthouse/lighthouse-meta.ts +1 -1
- package/front_end/panels/lighthouse/lighthousePanel.css +9 -0
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorController.ts +2 -2
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +5 -6
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +6 -10
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +3 -3
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryNavigator.ts +6 -6
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +2 -2
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplay.ts +6 -7
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplayUtils.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterSettings.ts +1 -1
- package/front_end/panels/linear_memory_inspector/linear_memory_inspector-meta.ts +2 -2
- package/front_end/panels/media/EventDisplayTable.ts +5 -7
- package/front_end/panels/media/EventTimelineView.ts +4 -4
- package/front_end/panels/media/MainView.test.ts +1 -1
- package/front_end/panels/media/MainView.ts +4 -4
- package/front_end/panels/media/MediaModel.ts +2 -2
- package/front_end/panels/media/PlayerDetailView.ts +8 -8
- package/front_end/panels/media/PlayerListView.ts +8 -8
- package/front_end/panels/media/PlayerMessagesView.ts +15 -17
- package/front_end/panels/media/PlayerPropertiesView.ts +66 -51
- package/front_end/panels/media/TickingFlameChart.ts +6 -5
- package/front_end/panels/media/media-meta.ts +3 -3
- package/front_end/panels/mobile_throttling/CalibrationController.ts +3 -4
- package/front_end/panels/mobile_throttling/MobileThrottlingSelector.ts +3 -3
- package/front_end/panels/mobile_throttling/NetworkPanelIndicator.ts +4 -4
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +189 -51
- package/front_end/panels/mobile_throttling/ThrottlingManager.test.ts +37 -1
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +114 -126
- package/front_end/panels/mobile_throttling/ThrottlingPresets.ts +8 -8
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.test.ts +115 -0
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +178 -143
- package/front_end/panels/mobile_throttling/mobile_throttling-meta.ts +6 -6
- package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +30 -36
- package/front_end/panels/network/BinaryResourceView.ts +7 -7
- package/front_end/panels/network/BlockedURLsPane.ts +18 -17
- package/front_end/panels/network/EventSourceMessagesView.ts +9 -10
- package/front_end/panels/network/NetworkConfigView.test.ts +35 -0
- package/front_end/panels/network/NetworkConfigView.ts +19 -17
- package/front_end/panels/network/NetworkDataGridNode.test.ts +19 -8
- package/front_end/panels/network/NetworkDataGridNode.ts +129 -90
- package/front_end/panels/network/NetworkItemView.test.ts +3 -3
- package/front_end/panels/network/NetworkItemView.ts +79 -79
- package/front_end/panels/network/NetworkLogView.test.ts +61 -23
- package/front_end/panels/network/NetworkLogView.ts +207 -130
- package/front_end/panels/network/NetworkLogViewColumns.ts +60 -63
- package/front_end/panels/network/NetworkManageCustomHeadersView.ts +5 -5
- package/front_end/panels/network/NetworkPanel.test.ts +3 -3
- package/front_end/panels/network/NetworkPanel.ts +69 -68
- package/front_end/panels/network/NetworkSearchScope.ts +1 -1
- package/front_end/panels/network/NetworkTimeCalculator.ts +35 -40
- package/front_end/panels/network/NetworkWaterfallColumn.ts +2 -12
- package/front_end/panels/network/RequestCookiesView.ts +10 -11
- package/front_end/panels/network/RequestHTMLView.ts +2 -2
- package/front_end/panels/network/RequestInitiatorView.ts +16 -16
- package/front_end/panels/network/RequestPayloadView.ts +12 -13
- package/front_end/panels/network/RequestPreviewView.ts +3 -4
- package/front_end/panels/network/RequestResponseView.test.ts +36 -0
- package/front_end/panels/network/RequestResponseView.ts +5 -5
- package/front_end/panels/network/RequestTimingView.ts +54 -54
- package/front_end/panels/network/ResourceChunkView.ts +13 -13
- package/front_end/panels/network/ResourceDirectSocketChunkView.ts +26 -17
- package/front_end/panels/network/ResourceWebSocketFrameView.ts +9 -9
- package/front_end/panels/network/SignedExchangeInfoView.ts +24 -24
- package/front_end/panels/network/binaryResourceView.css +1 -0
- package/front_end/panels/network/components/DirectSocketConnectionView.ts +18 -16
- package/front_end/panels/network/components/HeaderSectionRow.ts +17 -42
- package/front_end/panels/network/components/RequestHeaderSection.ts +6 -11
- package/front_end/panels/network/components/RequestHeadersView.css +2 -2
- package/front_end/panels/network/components/RequestHeadersView.test.ts +5 -2
- package/front_end/panels/network/components/RequestHeadersView.ts +24 -34
- package/front_end/panels/network/components/RequestTrustTokensView.ts +19 -23
- package/front_end/panels/network/components/ResponseHeaderSection.ts +16 -15
- package/front_end/panels/network/components/WebBundleInfoView.ts +4 -9
- package/front_end/panels/network/network-meta.ts +27 -27
- package/front_end/panels/network/networkConfigView.css +13 -6
- package/front_end/panels/network/networkLogView.css +1 -1
- package/front_end/panels/network/networkPanel.css +3 -2
- package/front_end/panels/network/requestHTMLView.css +9 -8
- package/front_end/panels/network/resourceChunkView.css +21 -28
- package/front_end/panels/performance_monitor/PerformanceMonitor.test.ts +121 -6
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +252 -168
- package/front_end/panels/performance_monitor/performanceMonitor.css +7 -9
- package/front_end/panels/performance_monitor/performance_monitor-meta.ts +7 -7
- package/front_end/panels/profiler/HeapDetachedElementsDataGrid.ts +19 -52
- package/front_end/panels/profiler/HeapDetachedElementsView.ts +9 -6
- package/front_end/panels/profiler/HeapProfileView.ts +24 -24
- package/front_end/panels/profiler/HeapProfilerPanel.ts +1 -1
- package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +20 -20
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +27 -27
- package/front_end/panels/profiler/HeapSnapshotProxy.ts +2 -6
- package/front_end/panels/profiler/HeapSnapshotView.ts +59 -56
- package/front_end/panels/profiler/HeapTimelineOverview.ts +1 -2
- package/front_end/panels/profiler/IsolateSelector.ts +16 -16
- package/front_end/panels/profiler/LiveHeapProfileView.ts +14 -14
- package/front_end/panels/profiler/ModuleUIStrings.ts +26 -26
- package/front_end/panels/profiler/ProfileDataGrid.ts +5 -5
- package/front_end/panels/profiler/ProfileHeader.ts +0 -9
- package/front_end/panels/profiler/ProfileLauncherView.ts +6 -6
- package/front_end/panels/profiler/ProfileSidebarTreeElement.ts +1 -1
- package/front_end/panels/profiler/ProfileView.ts +23 -20
- package/front_end/panels/profiler/ProfilesPanel.ts +9 -9
- package/front_end/panels/profiler/heapProfiler.css +8 -0
- package/front_end/panels/profiler/profiler-meta.ts +12 -12
- package/front_end/panels/protocol_monitor/JSONEditor.test.ts +2 -2
- package/front_end/panels/protocol_monitor/JSONEditor.ts +36 -19
- package/front_end/panels/protocol_monitor/ProtocolMonitor.test.ts +105 -103
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +24 -25
- package/front_end/panels/protocol_monitor/protocolMonitor.css +15 -9
- package/front_end/panels/protocol_monitor/protocol_monitor-meta.ts +1 -1
- package/front_end/panels/recorder/RecorderController.test.ts +9 -2
- package/front_end/panels/recorder/RecorderController.ts +82 -85
- package/front_end/panels/recorder/components/CreateRecordingView.ts +2 -2
- package/front_end/panels/recorder/components/RecordingListView.test.ts +42 -53
- package/front_end/panels/recorder/components/RecordingListView.ts +141 -125
- package/front_end/panels/recorder/components/RecordingView.test.ts +73 -122
- package/front_end/panels/recorder/components/RecordingView.ts +912 -929
- package/front_end/panels/recorder/components/StepEditor.ts +13 -13
- package/front_end/panels/recorder/components/StepView.ts +23 -24
- package/front_end/panels/recorder/components/recordingListView.css +76 -75
- package/front_end/panels/recorder/components/recordingView.css +303 -308
- package/front_end/panels/recorder/components/stepView.css +197 -196
- package/front_end/panels/recorder/components/timelineSection.css +1 -1
- package/front_end/panels/recorder/injected/rollup.config.mjs +1 -1
- package/front_end/panels/recorder/injected/selectors/ARIASelector.ts +2 -2
- package/front_end/panels/recorder/injected/selectors/CSSSelector.ts +4 -4
- package/front_end/panels/recorder/injected/selectors/PierceSelector.ts +2 -2
- package/front_end/panels/recorder/injected/selectors/TextSelector.ts +2 -2
- package/front_end/panels/recorder/injected/selectors/XPath.ts +3 -3
- package/front_end/panels/recorder/models/RecorderSettings.ts +0 -1
- package/front_end/panels/recorder/models/RecordingPlayer.test.ts +48 -68
- package/front_end/panels/recorder/models/RecordingPlayer.ts +9 -9
- package/front_end/panels/recorder/models/RecordingSession.ts +3 -3
- package/front_end/panels/recorder/recorder-meta.ts +5 -5
- package/front_end/panels/recorder/recorderController.css +3 -3
- package/front_end/panels/screencast/ScreencastApp.ts +1 -1
- package/front_end/panels/screencast/ScreencastView.ts +13 -18
- package/front_end/panels/search/SearchResultsPane.ts +8 -8
- package/front_end/panels/search/SearchView.test.ts +2 -2
- package/front_end/panels/search/SearchView.ts +130 -127
- package/front_end/panels/search/searchResultsPane.css +2 -2
- package/front_end/panels/search/searchView.css +2 -2
- package/front_end/panels/security/CookieControlsView.ts +27 -27
- package/front_end/panels/security/CookieReportView.ts +40 -73
- package/front_end/panels/security/IPProtectionTreeElement.ts +21 -0
- package/front_end/panels/security/IPProtectionView.ts +179 -0
- package/front_end/panels/security/SecurityModel.ts +10 -10
- package/front_end/panels/security/SecurityPanel.test.ts +22 -0
- package/front_end/panels/security/SecurityPanel.ts +107 -107
- package/front_end/panels/security/SecurityPanelSidebar.ts +27 -11
- package/front_end/panels/security/ipProtectionView.css +109 -0
- package/front_end/panels/security/security-meta.ts +4 -4
- package/front_end/panels/security/security.ts +2 -0
- package/front_end/panels/sensors/LocationsSettingsTab.ts +32 -31
- package/front_end/panels/sensors/SensorsView.ts +50 -42
- package/front_end/panels/sensors/sensors-meta.ts +20 -20
- package/front_end/panels/settings/AISettingsTab.test.ts +19 -6
- package/front_end/panels/settings/AISettingsTab.ts +118 -72
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +22 -20
- package/front_end/panels/settings/KeybindsSettingsTab.ts +31 -30
- package/front_end/panels/settings/SettingsScreen.ts +19 -20
- package/front_end/panels/settings/components/SyncSection.test.ts +43 -9
- package/front_end/panels/settings/components/SyncSection.ts +63 -29
- package/front_end/panels/settings/components/syncSection.css +16 -7
- package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +14 -16
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.test.ts +61 -0
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +134 -28
- package/front_end/panels/settings/emulation/components/userAgentClientHintsForm.css +19 -0
- package/front_end/panels/settings/emulation/emulation-meta.ts +2 -2
- package/front_end/panels/settings/settings-meta.ts +12 -12
- package/front_end/panels/settings/settingsScreen.css +0 -1
- package/front_end/panels/snippets/ScriptSnippetFileSystem.ts +5 -5
- package/front_end/panels/snippets/SnippetsQuickOpen.ts +4 -4
- package/front_end/panels/sources/AddSourceMapURLDialog.ts +5 -5
- package/front_end/panels/sources/AiCodeCompletionPlugin.test.ts +119 -0
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +400 -0
- package/front_end/panels/sources/AiWarningInfobarPlugin.ts +3 -3
- package/front_end/panels/sources/BreakpointEditDialog.ts +13 -11
- package/front_end/panels/sources/{components/BreakpointsView.test.ts → BreakpointsView.test.ts} +237 -225
- package/front_end/panels/sources/{components/BreakpointsView.ts → BreakpointsView.ts} +336 -301
- package/front_end/panels/sources/{components/BreakpointsViewUtils.test.ts → BreakpointsViewUtils.test.ts} +29 -29
- package/front_end/panels/sources/{components/BreakpointsViewUtils.ts → BreakpointsViewUtils.ts} +3 -3
- package/front_end/panels/sources/CSSPlugin.ts +26 -17
- package/front_end/panels/sources/CallStackSidebarPane.ts +34 -58
- package/front_end/panels/sources/CategorizedBreakpointL10n.ts +18 -18
- package/front_end/panels/sources/CoveragePlugin.test.ts +2 -0
- package/front_end/panels/sources/CoveragePlugin.ts +5 -5
- package/front_end/panels/sources/DebuggerPausedMessage.test.ts +2 -0
- package/front_end/panels/sources/DebuggerPausedMessage.ts +33 -39
- package/front_end/panels/sources/DebuggerPlugin.test.ts +4 -3
- package/front_end/panels/sources/DebuggerPlugin.ts +68 -49
- package/front_end/panels/sources/FilteredUISourceCodeListProvider.test.ts +3 -4
- package/front_end/panels/sources/FilteredUISourceCodeListProvider.ts +7 -7
- package/front_end/panels/sources/GoToLineQuickOpen.ts +15 -15
- package/front_end/panels/sources/InplaceFormatterEditorAction.ts +9 -6
- package/front_end/panels/sources/NavigatorView.test.ts +2 -1
- package/front_end/panels/sources/NavigatorView.ts +39 -35
- package/front_end/panels/sources/OpenFileQuickOpen.ts +6 -6
- package/front_end/panels/sources/OutlineQuickOpen.ts +3 -3
- package/front_end/panels/sources/ProfilePlugin.ts +3 -3
- package/front_end/panels/sources/ResourceOriginPlugin.ts +1 -1
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +11 -9
- package/front_end/panels/sources/SnippetsPlugin.ts +2 -2
- package/front_end/panels/sources/SourcesNavigator.test.ts +3 -2
- package/front_end/panels/sources/SourcesNavigator.ts +32 -20
- package/front_end/panels/sources/SourcesPanel.test.ts +90 -0
- package/front_end/panels/sources/SourcesPanel.ts +71 -28
- package/front_end/panels/sources/SourcesSearchScope.ts +1 -1
- package/front_end/panels/sources/SourcesView.test.ts +5 -2
- package/front_end/panels/sources/SourcesView.ts +7 -8
- package/front_end/panels/sources/TabbedEditorContainer.ts +11 -8
- package/front_end/panels/sources/ThreadsSidebarPane.ts +7 -10
- package/front_end/panels/sources/UISourceCodeFrame.test.ts +104 -0
- package/front_end/panels/sources/UISourceCodeFrame.ts +40 -17
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +14 -9
- package/front_end/panels/sources/breakpointsView.css +276 -0
- package/front_end/panels/sources/components/HeadersView.ts +17 -13
- package/front_end/panels/sources/components/components.ts +0 -4
- package/front_end/panels/sources/scopeChainSidebarPane.css +1 -1
- package/front_end/panels/sources/sources-meta.ts +103 -112
- package/front_end/panels/sources/sources.ts +6 -0
- package/front_end/panels/timeline/ActiveFilters.ts +2 -1
- package/front_end/panels/timeline/AnimationsTrackAppender.ts +1 -1
- package/front_end/panels/timeline/AnnotationHelpers.test.ts +14 -8
- package/front_end/panels/timeline/AnnotationHelpers.ts +28 -23
- package/front_end/panels/timeline/AppenderUtils.ts +2 -2
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +1 -14
- package/front_end/panels/timeline/CountersGraph.test.ts +80 -0
- package/front_end/panels/timeline/CountersGraph.ts +27 -18
- package/front_end/panels/timeline/EntriesFilter.test.ts +22 -15
- package/front_end/panels/timeline/EventsTimelineTreeView.ts +4 -25
- package/front_end/panels/timeline/ExtensionTrackAppender.ts +4 -9
- package/front_end/panels/timeline/GPUTrackAppender.ts +3 -3
- package/front_end/panels/timeline/Initiators.test.ts +22 -19
- package/front_end/panels/timeline/Initiators.ts +19 -6
- package/front_end/panels/timeline/InteractionsTrackAppender.ts +6 -6
- package/front_end/panels/timeline/IsolateSelector.ts +2 -2
- package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +6 -5
- package/front_end/panels/timeline/ModificationsManager.test.ts +98 -188
- package/front_end/panels/timeline/ModificationsManager.ts +51 -48
- package/front_end/panels/timeline/NetworkTrackAppender.ts +3 -3
- package/front_end/panels/timeline/README.md +5 -13
- package/front_end/{models/trace/extras/Metadata.test.ts → panels/timeline/RecordingMetadata.test.ts} +61 -29
- package/front_end/panels/timeline/RecordingMetadata.ts +79 -0
- package/front_end/panels/timeline/SaveFileFormatter.test.ts +1 -3
- package/front_end/panels/timeline/SaveFileFormatter.ts +0 -8
- package/front_end/panels/timeline/StatusDialog.ts +12 -8
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +5 -5
- package/front_end/panels/timeline/ThreadAppender.ts +29 -29
- package/front_end/panels/timeline/TimelineController.ts +14 -18
- package/front_end/panels/timeline/TimelineDetailsView.test.ts +49 -15
- package/front_end/panels/timeline/TimelineDetailsView.ts +213 -105
- package/front_end/panels/timeline/TimelineEventOverview.ts +6 -6
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.test.ts +56 -95
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +94 -65
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.test.ts +3 -62
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +10 -30
- package/front_end/panels/timeline/TimelineFlameChartView.test.ts +105 -80
- package/front_end/panels/timeline/TimelineFlameChartView.ts +107 -102
- package/front_end/panels/timeline/TimelineHistoryManager.test.ts +0 -5
- package/front_end/panels/timeline/TimelineHistoryManager.ts +8 -8
- package/front_end/panels/timeline/TimelineLoader.test.ts +4 -7
- package/front_end/panels/timeline/TimelineLoader.ts +22 -3
- package/front_end/panels/timeline/TimelineMiniMap.ts +13 -5
- package/front_end/panels/timeline/TimelinePaintProfilerView.ts +1 -1
- package/front_end/panels/timeline/TimelinePanel.test.ts +381 -117
- package/front_end/panels/timeline/TimelinePanel.ts +576 -345
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +195 -80
- package/front_end/panels/timeline/TimelineTreeView.test.ts +5 -5
- package/front_end/panels/timeline/TimelineTreeView.ts +25 -25
- package/front_end/panels/timeline/TimelineUIUtils.test.ts +58 -55
- package/front_end/panels/timeline/TimelineUIUtils.ts +159 -345
- package/front_end/panels/timeline/TimingsTrackAppender.ts +12 -7
- package/front_end/panels/timeline/TrackConfigBanner.test.ts +68 -0
- package/front_end/panels/timeline/TrackConfigBanner.ts +97 -0
- package/front_end/panels/timeline/TrackConfiguration.test.ts +3 -3
- package/front_end/panels/timeline/TrackConfiguration.ts +1 -0
- package/front_end/panels/timeline/UIDevtoolsUtils.ts +15 -15
- package/front_end/panels/timeline/components/BreadcrumbsUI.ts +4 -9
- package/front_end/panels/timeline/components/DetailsView.ts +13 -13
- package/front_end/panels/timeline/components/ExportTraceOptions.test.ts +281 -0
- package/front_end/panels/timeline/components/ExportTraceOptions.ts +262 -0
- package/front_end/panels/timeline/components/FieldSettingsDialog.test.ts +1 -1
- package/front_end/panels/timeline/components/FieldSettingsDialog.ts +2 -1
- package/front_end/panels/timeline/components/IgnoreListSetting.test.ts +5 -4
- package/front_end/panels/timeline/components/IgnoreListSetting.ts +7 -7
- package/front_end/panels/timeline/components/InteractionBreakdown.ts +3 -3
- package/front_end/panels/timeline/components/Invalidations.test.ts +2 -1
- package/front_end/panels/timeline/components/LayoutShiftDetails.test.ts +21 -11
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +325 -307
- package/front_end/panels/timeline/components/LiveMetricsView.test.ts +14 -22
- package/front_end/panels/timeline/components/LiveMetricsView.ts +1 -1
- package/front_end/panels/timeline/components/MetricCard.test.ts +2 -2
- package/front_end/panels/timeline/components/NetworkRequestDetails.test.ts +38 -44
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +318 -278
- package/front_end/panels/timeline/components/NetworkRequestTooltip.ts +8 -8
- package/front_end/panels/timeline/components/NetworkThrottlingSelector.test.ts +3 -0
- package/front_end/panels/timeline/components/OriginMap.ts +1 -1
- package/front_end/panels/timeline/components/RelatedInsightChips.test.ts +17 -31
- package/front_end/panels/timeline/components/RelatedInsightChips.ts +87 -66
- package/front_end/panels/timeline/components/Sidebar.test.ts +43 -4
- package/front_end/panels/timeline/components/Sidebar.ts +47 -20
- package/front_end/panels/timeline/components/SidebarAnnotationsTab.test.ts +47 -72
- package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +228 -218
- package/front_end/panels/timeline/components/SidebarInsightsTab.test.ts +1 -0
- package/front_end/panels/timeline/components/SidebarInsightsTab.ts +18 -54
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.test.ts +7 -53
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +61 -44
- package/front_end/panels/timeline/components/TimelineSummary.ts +4 -4
- package/front_end/panels/timeline/components/Utils.ts +9 -9
- package/front_end/panels/timeline/components/components.ts +2 -0
- package/front_end/panels/timeline/components/exportTraceOptions.css +26 -0
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.test.ts +40 -16
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +28 -34
- package/front_end/panels/timeline/components/insights/CLSCulprits.test.ts +5 -5
- package/front_end/panels/timeline/components/insights/CLSCulprits.ts +32 -23
- package/front_end/panels/timeline/components/insights/Cache.ts +4 -22
- package/front_end/panels/timeline/components/insights/Checklist.ts +6 -7
- package/front_end/panels/timeline/components/insights/DOMSize.ts +35 -15
- package/front_end/panels/timeline/components/insights/DocumentLatency.ts +1 -61
- package/front_end/panels/timeline/components/insights/DuplicatedJavaScript.ts +5 -17
- package/front_end/panels/timeline/components/insights/EventRef.ts +7 -9
- package/front_end/panels/timeline/components/insights/FontDisplay.ts +20 -21
- package/front_end/panels/timeline/components/insights/ForcedReflow.ts +5 -28
- package/front_end/panels/timeline/components/insights/{InteractionToNextPaint.test.ts → INPBreakdown.test.ts} +8 -5
- package/front_end/panels/timeline/components/insights/INPBreakdown.ts +70 -0
- package/front_end/panels/timeline/components/insights/ImageDelivery.ts +7 -21
- package/front_end/panels/timeline/components/insights/LCPBreakdown.ts +146 -0
- package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +28 -80
- package/front_end/panels/timeline/components/insights/LegacyJavaScript.ts +3 -15
- package/front_end/panels/timeline/components/insights/ModernHTTP.ts +18 -23
- package/front_end/panels/timeline/components/insights/NetworkDependencyTree.test.ts +76 -0
- package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +35 -29
- package/front_end/panels/timeline/components/insights/NodeLink.test.ts +113 -0
- package/front_end/panels/timeline/components/insights/NodeLink.ts +50 -10
- package/front_end/panels/timeline/components/insights/README.md +1 -1
- package/front_end/panels/timeline/components/insights/RenderBlocking.ts +4 -22
- package/front_end/panels/timeline/components/insights/SidebarInsight.ts +1 -2
- package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +16 -28
- package/front_end/panels/timeline/components/insights/Table.ts +2 -3
- package/front_end/panels/timeline/components/insights/ThirdParties.ts +7 -47
- package/front_end/panels/timeline/components/insights/Viewport.ts +0 -6
- package/front_end/panels/timeline/components/insights/insights.ts +4 -4
- package/front_end/panels/timeline/components/insights/table.css +18 -0
- package/front_end/panels/timeline/components/insights/types.ts +2 -2
- package/front_end/panels/timeline/components/layoutShiftDetails.css +99 -92
- package/front_end/panels/timeline/components/networkRequestDetails.css +110 -104
- package/front_end/panels/timeline/components/networkRequestTooltip.css +88 -83
- package/front_end/panels/timeline/components/relatedInsightChips.css +60 -58
- package/front_end/panels/timeline/components/sidebarAnnotationsTab.css +80 -78
- package/front_end/panels/timeline/components/sidebarInsightsTab.css +0 -25
- package/front_end/panels/timeline/components/sidebarSingleInsightSet.css +1 -1
- package/front_end/panels/timeline/docs/flame_chart_migration.md +2 -2
- package/front_end/panels/timeline/overlays/OverlaysImpl.test.ts +149 -42
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +218 -283
- package/front_end/panels/timeline/overlays/components/EntriesLinkOverlay.ts +1 -1
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +69 -104
- package/front_end/panels/timeline/overlays/components/TimeRangeOverlay.ts +1 -1
- package/front_end/panels/timeline/overlays/components/entryLabelOverlay.css +13 -0
- package/front_end/panels/timeline/overlays/components/timeRangeOverlay.css +2 -1
- package/front_end/panels/timeline/timeline-meta.ts +14 -14
- package/front_end/panels/timeline/timeline.ts +4 -4
- package/front_end/panels/timeline/timelineDetailsView.css +118 -0
- package/front_end/panels/timeline/timelineFlameChartView.css +18 -117
- package/front_end/panels/timeline/timelineMiniMap.css +5 -0
- package/front_end/panels/timeline/timelinePanel.css +2 -10
- package/front_end/panels/timeline/timelineTreeView.css +0 -4
- package/front_end/panels/timeline/track_appenders/CompatibilityTracksAppender.test.ts +16 -15
- package/front_end/panels/timeline/track_appenders/ExtensionTrackAppender.test.ts +6 -4
- package/front_end/panels/timeline/track_appenders/InteractionsTrackAppender.test.ts +0 -1
- package/front_end/panels/timeline/track_appenders/ThreadAppender.test.ts +34 -49
- package/front_end/panels/timeline/utils/AICallTree.test.ts +54 -120
- package/front_end/panels/timeline/utils/AICallTree.ts +31 -74
- package/front_end/panels/timeline/utils/AIContext.ts +67 -0
- package/front_end/panels/timeline/utils/EntityMapper.test.ts +5 -4
- package/front_end/panels/timeline/utils/EntityMapper.ts +3 -3
- package/front_end/panels/timeline/utils/EntryName.test.ts +3 -3
- package/front_end/panels/timeline/utils/EntryName.ts +10 -10
- package/front_end/panels/timeline/utils/EntryNodes.test.ts +137 -0
- package/front_end/panels/timeline/utils/EntryNodes.ts +107 -0
- package/front_end/panels/timeline/utils/EntryStyles.ts +110 -110
- package/front_end/panels/timeline/{EventsSerializer.test.ts → utils/EventsSerializer.test.ts} +7 -7
- package/front_end/panels/timeline/{EventsSerializer.ts → utils/EventsSerializer.ts} +1 -1
- package/front_end/panels/timeline/{FreshRecording.test.ts → utils/FreshRecording.test.ts} +5 -5
- package/front_end/panels/timeline/{FreshRecording.ts → utils/FreshRecording.ts} +1 -1
- package/front_end/panels/timeline/utils/Helpers.ts +6 -0
- package/front_end/panels/timeline/utils/IgnoreList.test.ts +7 -6
- package/front_end/panels/timeline/utils/IgnoreList.ts +6 -6
- package/front_end/panels/timeline/utils/InsightAIContext.test.ts +61 -25
- package/front_end/panels/timeline/utils/InsightAIContext.ts +102 -81
- package/front_end/panels/timeline/utils/SourceMapsResolver.test.ts +5 -4
- package/front_end/panels/timeline/utils/Treemap.ts +5 -20
- package/front_end/panels/timeline/utils/utils.ts +8 -0
- package/front_end/panels/utils/utils.test.ts +1 -7
- package/front_end/panels/utils/utils.ts +17 -21
- package/front_end/panels/web_audio/WebAudioView.test.ts +224 -11
- package/front_end/panels/web_audio/WebAudioView.ts +219 -267
- package/front_end/panels/web_audio/web_audio-meta.ts +3 -3
- package/front_end/panels/web_audio/web_audio.ts +0 -12
- package/front_end/panels/webauthn/WebauthnPane.test.ts +75 -72
- package/front_end/panels/webauthn/WebauthnPane.ts +517 -578
- package/front_end/panels/webauthn/webauthn-meta.ts +2 -2
- package/front_end/panels/webauthn/webauthnPane.css +157 -155
- package/front_end/panels/whats_new/ReleaseNoteText.ts +11 -11
- package/front_end/panels/whats_new/ReleaseNoteView.ts +2 -2
- package/front_end/panels/whats_new/releaseNoteView.css +92 -91
- package/front_end/panels/whats_new/resources/WNDT.md +6 -10
- package/front_end/panels/whats_new/whats_new-meta.ts +7 -7
- package/front_end/services/trace_bounds/TraceBounds.ts +1 -1
- package/front_end/services/tracing/ExternalRequests.test.ts +39 -0
- package/front_end/services/tracing/ExternalRequests.ts +74 -0
- package/front_end/services/tracing/PerformanceTracing.ts +5 -4
- package/front_end/{models/trace → services/tracing}/TracingManager.test.ts +9 -7
- package/front_end/{models/trace → services/tracing}/TracingManager.ts +3 -4
- package/front_end/services/tracing/tracing.ts +4 -0
- package/front_end/testing/AiAssistanceHelpers.ts +10 -8
- package/front_end/testing/DOMHelpers.ts +8 -6
- package/front_end/testing/EnvironmentHelpers.ts +21 -6
- package/front_end/testing/ExpectStubCall.ts +2 -1
- package/front_end/testing/InsightHelpers.ts +11 -4
- package/front_end/testing/MockConnection.ts +3 -2
- package/front_end/testing/MockSettingStorage.ts +23 -0
- package/front_end/testing/MutationHelpers.test.ts +1 -3
- package/front_end/testing/OverridesHelpers.ts +9 -3
- package/front_end/testing/PropertyParser.ts +1 -1
- package/front_end/testing/README.md +34 -0
- package/front_end/testing/SnapshotTester.snapshot.txt +9 -0
- package/front_end/testing/SnapshotTester.test.ts +32 -0
- package/front_end/testing/SnapshotTester.ts +150 -0
- package/front_end/testing/SourceMapEncoder.ts +1 -237
- package/front_end/testing/SourceMapHelpers.ts +3 -5
- package/front_end/testing/StackTraceHelpers.ts +47 -0
- package/front_end/testing/StyleHelpers.ts +43 -22
- package/front_end/testing/TraceHelpers.ts +135 -122
- package/front_end/testing/TraceLoader.ts +23 -65
- package/front_end/testing/test_setup.ts +31 -4
- package/front_end/ui/components/buttons/Button.ts +1 -1
- package/front_end/ui/components/buttons/FloatingButton.ts +37 -6
- package/front_end/ui/components/cards/Card.ts +2 -2
- package/front_end/ui/components/copy_to_clipboard/copyToClipboard.ts +1 -1
- package/front_end/ui/components/dialogs/ButtonDialog.test.ts +2 -6
- package/front_end/ui/components/dialogs/ButtonDialog.ts +15 -0
- package/front_end/ui/components/dialogs/Dialog.ts +68 -8
- package/front_end/ui/components/dialogs/ShortcutDialog.test.ts +1 -3
- package/front_end/ui/components/diff_view/DiffView.ts +6 -6
- package/front_end/ui/components/docs/console_insight/basic.ts +1 -1
- package/front_end/ui/components/docs/console_insight/error.ts +1 -1
- package/front_end/ui/components/docs/console_insight/loading.ts +1 -1
- package/front_end/ui/components/docs/context_menu/basic.html +45 -0
- package/front_end/ui/components/docs/context_menu/basic.ts +102 -0
- package/front_end/ui/components/docs/icon_component/basic.html +1 -3
- package/front_end/ui/components/docs/icon_component/basic.ts +1 -1
- package/front_end/ui/components/docs/recorder_recording_list_view/basic.ts +4 -1
- package/front_end/ui/components/docs/select_menu/basic.html +1 -27
- package/front_end/ui/components/docs/select_menu/basic.ts +86 -194
- package/front_end/ui/components/icon_button/Icon.ts +16 -10
- package/front_end/ui/components/icon_button/IconButton.ts +1 -3
- package/front_end/ui/components/icon_button/icon.css +73 -0
- package/front_end/ui/components/issue_counter/IssueCounter.ts +13 -14
- package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +3 -3
- package/front_end/ui/components/markdown_view/MarkdownImagesMap.ts +4 -4
- package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +9 -6
- package/front_end/ui/components/markdown_view/MarkdownView.test.ts +73 -0
- package/front_end/ui/components/panel_feedback/PanelFeedback.ts +5 -11
- package/front_end/ui/components/panel_feedback/PreviewToggle.ts +4 -9
- package/front_end/ui/components/settings/SettingCheckbox.ts +3 -3
- package/front_end/ui/components/settings/SettingDeprecationWarning.ts +2 -4
- package/front_end/ui/components/snackbars/Snackbar.ts +32 -17
- package/front_end/ui/components/snackbars/snackbar.css +1 -1
- package/front_end/ui/components/spinners/Spinner.ts +50 -2
- package/front_end/ui/components/spinners/spinner.css +10 -1
- package/front_end/ui/components/srgb_overlay/SrgbOverlay.ts +0 -1
- package/front_end/ui/components/survey_link/SurveyLink.ts +4 -8
- package/front_end/ui/components/text_editor/AiCodeCompletionTeaserPlaceholder.test.ts +84 -0
- package/front_end/ui/components/text_editor/AiCodeCompletionTeaserPlaceholder.ts +83 -0
- package/front_end/ui/components/text_editor/ExecutionPositionHighlighter.ts +0 -1
- package/front_end/ui/components/text_editor/TextEditor.test.ts +72 -12
- package/front_end/ui/components/text_editor/TextEditor.ts +2 -0
- package/front_end/ui/components/text_editor/config.ts +120 -12
- package/front_end/ui/{legacy/components/inline_editor/bezierSwatch.css → components/text_editor/textEditor.css} +2 -6
- package/front_end/ui/components/text_editor/text_editor.ts +1 -0
- package/front_end/ui/components/tooltips/Tooltip.test.ts +70 -40
- package/front_end/ui/components/tooltips/Tooltip.ts +208 -33
- package/front_end/ui/components/tooltips/tooltip.css +13 -77
- package/front_end/ui/components/tree_outline/TreeOutline.ts +11 -0
- package/front_end/ui/legacy/ARIAUtils.test.ts +101 -20
- package/front_end/ui/legacy/ARIAUtils.ts +77 -49
- package/front_end/ui/legacy/ActionRegistration.test.ts +0 -2
- package/front_end/ui/legacy/ActionRegistration.ts +24 -24
- package/front_end/ui/legacy/ContextMenu.test.ts +60 -1
- package/front_end/ui/legacy/ContextMenu.ts +349 -29
- package/front_end/ui/legacy/DockController.ts +13 -7
- package/front_end/ui/legacy/EmptyWidget.ts +62 -32
- package/front_end/ui/legacy/FilterBar.ts +14 -9
- package/front_end/ui/legacy/GlassPane.ts +10 -4
- package/front_end/ui/legacy/Infobar.ts +2 -2
- package/front_end/ui/legacy/InspectorView.test.ts +99 -0
- package/front_end/ui/legacy/InspectorView.ts +71 -25
- package/front_end/ui/legacy/ListWidget.ts +9 -9
- package/front_end/ui/legacy/Panel.ts +1 -1
- package/front_end/ui/legacy/ProgressIndicator.ts +44 -41
- package/front_end/ui/legacy/RemoteDebuggingTerminatedScreen.ts +4 -4
- package/front_end/ui/legacy/ReportView.ts +1 -1
- package/front_end/ui/legacy/SearchableView.ts +24 -24
- package/front_end/ui/legacy/SettingsUI.ts +2 -2
- package/front_end/ui/legacy/ShortcutRegistry.ts +2 -1
- package/front_end/ui/legacy/SoftContextMenu.ts +23 -9
- package/front_end/ui/legacy/SoftDropDown.ts +1 -1
- package/front_end/ui/legacy/SplitWidget.test.ts +8 -0
- package/front_end/ui/legacy/SplitWidget.ts +3 -3
- package/front_end/ui/legacy/SuggestBox.ts +15 -15
- package/front_end/ui/legacy/TabbedPane.ts +27 -31
- package/front_end/ui/legacy/TargetCrashedScreen.ts +4 -4
- package/front_end/ui/legacy/TextPrompt.ts +4 -2
- package/front_end/ui/legacy/ThrottledWidget.ts +1 -1
- package/front_end/ui/legacy/Toolbar.test.ts +13 -0
- package/front_end/ui/legacy/Toolbar.ts +39 -19
- package/front_end/ui/legacy/Treeoutline.test.ts +140 -0
- package/front_end/ui/legacy/Treeoutline.ts +244 -8
- package/front_end/ui/legacy/UIUtils.test.ts +59 -0
- package/front_end/ui/legacy/UIUtils.ts +235 -25
- package/front_end/ui/legacy/View.test.ts +14 -1
- package/front_end/ui/legacy/View.ts +33 -9
- package/front_end/ui/legacy/ViewManager.test.ts +235 -0
- package/front_end/ui/legacy/ViewManager.ts +109 -15
- package/front_end/ui/legacy/ViewRegistration.ts +17 -7
- package/front_end/ui/legacy/Widget.test.ts +35 -3
- package/front_end/ui/legacy/Widget.ts +127 -16
- package/front_end/ui/legacy/XLink.ts +1 -1
- package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +36 -26
- package/front_end/ui/legacy/components/color_picker/FormatPickerContextMenu.ts +4 -8
- package/front_end/ui/legacy/components/color_picker/Spectrum.test.ts +36 -1
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +72 -49
- package/front_end/ui/legacy/components/color_picker/spectrum.css +1 -1
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +14 -19
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +31 -30
- package/front_end/ui/legacy/components/data_grid/DataGridElement.test.ts +19 -15
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +15 -3
- package/front_end/ui/legacy/components/data_grid/ShowMoreDataGridNode.ts +2 -2
- package/front_end/ui/legacy/components/data_grid/ViewportDataGrid.ts +6 -3
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +9 -3
- package/front_end/ui/legacy/components/inline_editor/BezierEditor.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/BezierUI.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/CSSAngle.test.ts +25 -25
- package/front_end/ui/legacy/components/inline_editor/CSSAngle.ts +11 -5
- package/front_end/ui/legacy/components/inline_editor/CSSShadowEditor.ts +5 -5
- package/front_end/ui/legacy/components/inline_editor/ColorSwatch.test.ts +1 -9
- package/front_end/ui/legacy/components/inline_editor/ColorSwatch.ts +35 -20
- package/front_end/ui/legacy/components/inline_editor/FontEditor.ts +32 -31
- package/front_end/ui/legacy/components/inline_editor/FontEditorUnitConverter.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/Swatches.ts +3 -47
- package/front_end/ui/legacy/components/inline_editor/cssAngle.css +4 -5
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +2 -2
- package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.test.ts +19 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +31 -28
- package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +2 -0
- package/front_end/ui/legacy/components/perf_ui/BrickBreaker.ts +2 -2
- package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +7 -3
- package/front_end/ui/legacy/components/perf_ui/FilmStripView.ts +7 -7
- package/front_end/ui/legacy/components/perf_ui/FlameChart.test.ts +162 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +153 -99
- package/front_end/ui/legacy/components/perf_ui/NetworkPriorities.ts +5 -5
- package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +3 -3
- package/front_end/ui/legacy/components/perf_ui/PieChart.ts +1 -1
- package/front_end/ui/legacy/components/perf_ui/TimelineGrid.ts +0 -4
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +54 -6
- package/front_end/ui/legacy/components/perf_ui/perf_ui-meta.ts +6 -6
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +29 -3
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +14 -5
- package/front_end/ui/legacy/components/quick_open/HelpQuickOpen.ts +2 -5
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +2 -0
- package/front_end/ui/legacy/components/quick_open/quick_open-meta.ts +2 -2
- package/front_end/ui/legacy/components/source_frame/FontView.ts +8 -5
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +17 -29
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +3 -3
- package/front_end/ui/legacy/components/source_frame/PreviewFactory.ts +2 -2
- package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.test.ts +0 -4
- package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +2 -2
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +41 -31
- package/front_end/ui/legacy/components/source_frame/StreamingContentHexView.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +2 -2
- package/front_end/ui/legacy/components/source_frame/fontView.css +1 -1
- package/front_end/ui/legacy/components/source_frame/source_frame-meta.ts +9 -9
- package/front_end/ui/legacy/components/utils/ImagePreview.ts +4 -4
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.test.ts +6 -5
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +76 -34
- package/front_end/ui/legacy/components/utils/Linkifier.test.ts +154 -2
- package/front_end/ui/legacy/components/utils/Linkifier.ts +108 -50
- package/front_end/ui/legacy/components/utils/TargetDetachedDialog.ts +2 -1
- package/front_end/ui/legacy/confirmDialog.css +1 -1
- package/front_end/ui/legacy/filter.css +12 -4
- package/front_end/ui/legacy/inspectorCommon.css +25 -20
- package/front_end/ui/legacy/remoteDebuggingTerminatedScreen.css +18 -17
- package/front_end/ui/legacy/softContextMenu.css +4 -0
- package/front_end/ui/legacy/tabbedPane.css +5 -1
- package/front_end/ui/legacy/targetCrashedScreen.css +9 -8
- package/front_end/ui/legacy/viewContainers.css +8 -0
- package/front_end/ui/visual_logging/Debugging.ts +122 -26
- package/front_end/ui/visual_logging/KnownContextValues.ts +139 -1
- package/front_end/ui/visual_logging/LoggingConfig.ts +1 -1
- package/front_end/ui/visual_logging/LoggingDriver.test.ts +74 -44
- package/front_end/ui/visual_logging/LoggingDriver.ts +3 -2
- package/front_end/ui/visual_logging/LoggingState.ts +6 -4
- package/front_end/ui/visual_logging/README.md +1 -3
- package/front_end/ui/visual_logging/visual_logging.ts +9 -0
- package/front_end/ui/visual_logging/visual_logging_debugging.png +0 -0
- package/inspector_overlay/css_grid_label_helpers.ts +4 -4
- package/inspector_overlay/highlight_flex_common.ts +2 -2
- package/inspector_overlay/loadCSS.rollup.js +2 -2
- package/inspector_overlay/main.ts +0 -4
- package/inspector_overlay/tool_highlight.css +1 -1
- package/inspector_overlay/tool_highlight.ts +7 -7
- package/package.json +32 -36
- package/scripts/add_icon_paths.py +1 -1
- package/scripts/ai_assistance/README.md +1 -0
- package/scripts/ai_assistance/auto-run/auto-run.ts +46 -6
- package/scripts/ai_assistance/auto-run/shared/comment-parsers.test.ts +2 -2
- package/scripts/ai_assistance/auto-run/shared/comment-parsers.ts +2 -2
- package/scripts/ai_assistance/auto-run/shared/puppeteer-helpers.ts +18 -15
- package/scripts/ai_assistance/auto-run/targets/elements-executor.ts +2 -0
- package/scripts/ai_assistance/auto-run/targets/elements-multimodal-executor.ts +2 -0
- package/scripts/ai_assistance/auto-run/targets/interface.ts +1 -0
- package/scripts/ai_assistance/auto-run/targets/patching-executor.ts +1 -0
- package/scripts/ai_assistance/auto-run/targets/performance-insights-executor.ts +2 -0
- package/scripts/ai_assistance/auto-run/targets/performance-main-thread-executor.ts +2 -0
- package/scripts/ai_assistance/eval/index.js +5 -1
- package/scripts/ai_assistance/package.json +2 -1
- package/scripts/ai_assistance/suite/README.md +57 -0
- package/scripts/ai_assistance/suite/helpers/evaluators.ts +183 -0
- package/scripts/ai_assistance/suite/helpers/gemini.ts +122 -0
- package/scripts/ai_assistance/suite/helpers/outputs.ts +112 -0
- package/scripts/ai_assistance/suite/instructions/lcp-breakdown.md +12 -0
- package/scripts/ai_assistance/suite/instructions/load.ts +13 -0
- package/scripts/ai_assistance/suite/instructions/scoring.md +27 -0
- package/scripts/ai_assistance/suite/performance.eval.ts +18 -0
- package/scripts/ai_assistance/suite/to_eval_output.ts +166 -0
- package/scripts/ai_assistance/suite/types.d.ts +40 -0
- package/scripts/ai_assistance/suite/upload_to_gcp.ts +104 -0
- package/scripts/ai_assistance/tsconfig.json +1 -1
- package/scripts/ai_assistance/types.d.ts +8 -3
- package/scripts/build/assert_grd.py +1 -1
- package/scripts/build/compress_files.js +9 -4
- package/scripts/build/cross_reference_ninja_and_tsc.js +5 -5
- package/scripts/build/devtools_plugin.js +9 -2
- package/scripts/build/esbuild.js +4 -1
- package/scripts/build/generate_html_entrypoint.js +5 -4
- package/scripts/build/ninja/README.md +2 -3
- package/scripts/build/ninja/bundle.gni +7 -30
- package/scripts/build/ninja/devtools_entrypoint.gni +4 -4
- package/scripts/build/ninja/devtools_pre_built.gni +2 -1
- package/scripts/build/ninja/generate_css.gni +4 -2
- package/scripts/build/ninja/vars.gni +5 -1
- package/scripts/build/ninja/write-if-changed.js +2 -2
- package/scripts/build/typescript/ts_library.py +7 -1
- package/scripts/build/typescript/typescript.gni +2 -1
- package/scripts/component_server/server.js +8 -7
- package/scripts/devtools_build.mjs +93 -26
- package/scripts/devtools_build.test.mjs +48 -48
- package/scripts/devtools_paths.py +0 -5
- package/scripts/eslint_rules/README.md +4 -2
- package/scripts/eslint_rules/lib/canvas-context-tracking.ts +1 -1
- package/scripts/eslint_rules/lib/check-css-import.ts +2 -2
- package/scripts/eslint_rules/lib/check-license-header.ts +3 -3
- package/scripts/eslint_rules/lib/check-test-definitions.ts +2 -2
- package/scripts/eslint_rules/lib/enforce-custom-element-definitions-location.ts +1 -1
- package/scripts/eslint_rules/lib/enforce-optional-properties-last.ts +1 -1
- package/scripts/eslint_rules/lib/enforce-ui-strings-as-const.ts +1 -1
- package/scripts/eslint_rules/lib/es-modules-import.ts +3 -2
- package/scripts/eslint_rules/lib/html-tagged-template.ts +2 -2
- package/scripts/eslint_rules/lib/inject-checkbox-styles.ts +36 -24
- package/scripts/eslint_rules/lib/inline-type-imports.ts +1 -1
- package/scripts/eslint_rules/lib/jslog-context-list.ts +32 -7
- package/scripts/eslint_rules/lib/no-adopted-style-sheets.ts +2 -2
- package/scripts/eslint_rules/lib/no-assert-deep-strict-equal.ts +17 -16
- package/scripts/eslint_rules/lib/no-assert-equal-boolean-null-undefined.ts +1 -1
- package/scripts/eslint_rules/lib/no-assert-equal.ts +1 -1
- package/scripts/eslint_rules/lib/no-assert-strict-equal-for-arrays-and-objects.ts +1 -1
- package/scripts/eslint_rules/lib/no-commented-out-console.ts +4 -2
- package/scripts/eslint_rules/lib/no-customized-builtin-elements.ts +1 -4
- package/scripts/eslint_rules/lib/no-imperative-dom-api/adorner.ts +5 -9
- package/scripts/eslint_rules/lib/no-imperative-dom-api/aria-utils.ts +5 -8
- package/scripts/eslint_rules/lib/no-imperative-dom-api/ast.ts +24 -1
- package/scripts/eslint_rules/lib/no-imperative-dom-api/button.ts +5 -4
- package/scripts/eslint_rules/lib/no-imperative-dom-api/class-member.ts +1 -1
- package/scripts/eslint_rules/lib/no-imperative-dom-api/data-grid.ts +23 -25
- package/scripts/eslint_rules/lib/no-imperative-dom-api/dom-api-devtools-extensions.ts +5 -9
- package/scripts/eslint_rules/lib/no-imperative-dom-api/dom-api.ts +11 -16
- package/scripts/eslint_rules/lib/no-imperative-dom-api/dom-fragment.ts +2 -2
- package/scripts/eslint_rules/lib/no-imperative-dom-api/split-widget.ts +14 -18
- package/scripts/eslint_rules/lib/no-imperative-dom-api/toolbar.ts +17 -18
- package/scripts/eslint_rules/lib/no-imperative-dom-api/ui-fragment.ts +7 -12
- package/scripts/eslint_rules/lib/no-imperative-dom-api/ui-utils.ts +7 -7
- package/scripts/eslint_rules/lib/no-imperative-dom-api/widget.ts +8 -13
- package/scripts/eslint_rules/lib/no-imperative-dom-api.ts +3 -22
- package/scripts/eslint_rules/lib/no-importing-images-from-src.ts +1 -1
- package/scripts/eslint_rules/lib/no-imports-in-directory.ts +18 -7
- package/scripts/eslint_rules/lib/no-lit-render-outside-of-view.ts +48 -37
- package/scripts/eslint_rules/lib/no-new-lit-element-components.ts +5 -2
- package/scripts/eslint_rules/lib/no-underscored-properties.ts +36 -28
- package/scripts/eslint_rules/lib/prefer-assert-instance-of.ts +24 -20
- package/scripts/eslint_rules/lib/prefer-assert-is-ok.ts +54 -45
- package/scripts/eslint_rules/lib/prefer-assert-length-of.ts +24 -17
- package/scripts/eslint_rules/lib/prefer-assert-strict-equal.ts +22 -16
- package/scripts/eslint_rules/lib/prefer-private-class-members.ts +11 -4
- package/scripts/eslint_rules/lib/prefer-sinon-assert.ts +37 -29
- package/scripts/eslint_rules/lib/prefer-url-string.ts +1 -1
- package/scripts/eslint_rules/lib/utils/lit.ts +26 -9
- package/scripts/eslint_rules/lib/validate-timing-types.ts +330 -0
- package/scripts/eslint_rules/rules-dir.mjs +4 -1
- package/scripts/eslint_rules/tests/check-license-header.test.ts +8 -8
- package/scripts/eslint_rules/tests/check-test-definitions.test.ts +0 -10
- package/scripts/eslint_rules/tests/enforce-optional-properties-last.test.ts +1 -1
- package/scripts/eslint_rules/tests/inject-checkbox-styles.test.ts +49 -0
- package/scripts/eslint_rules/tests/no-imports-in-directory.test.ts +20 -5
- package/scripts/eslint_rules/tests/no-lit-render-outside-of-view.test.ts +60 -10
- package/scripts/eslint_rules/tests/no-new-lit-element-components.test.ts +4 -0
- package/scripts/eslint_rules/tests/prefer-private-class-members.test.ts +2 -2
- package/scripts/eslint_rules/tests/utils/RuleTester.ts +19 -1
- package/scripts/eslint_rules/tests/utils.test.ts +1 -1
- package/scripts/eslint_rules/tests/validate-timing-types.test.ts +289 -0
- package/scripts/eslint_rules/tsconfig.json +3 -2
- package/scripts/extract_bugs.ts +2 -3
- package/scripts/javascript_natives/helpers.js +9 -9
- package/scripts/migration/e2e_non_hosted_gemini.mjs +102 -0
- package/scripts/migration/web-tests-esm/rename-legacy-global.mjs +1 -1
- package/scripts/npm_test.js +1 -1
- package/scripts/protocol_typescript/protocol_dts_generator.ts +27 -16
- package/scripts/protocol_typescript/protocol_schema.d.ts +9 -4
- package/scripts/reformat-clang-js-ts.js +1 -1
- package/scripts/run_build.mjs +14 -2
- package/scripts/run_start.mjs +6 -3
- package/scripts/scaffold/scaffold-widget.js +7 -7
- package/scripts/scaffold/templates/WidgetTemplate.ts.txt +1 -1
- package/scripts/tools/update_goldens.py +143 -168
- package/scripts/tsconfig.json +2 -1
- package/scripts/whitespaces.txt +1 -1
- package/front_end/core/sdk/SourceMapScopes.test.ts +0 -507
- package/front_end/core/sdk/SourceMapScopes.ts +0 -472
- package/front_end/models/ai_assistance/agents/PerformanceInsightsAgent.test.ts +0 -448
- package/front_end/models/ai_assistance/agents/PerformanceInsightsAgent.ts +0 -498
- package/front_end/models/trace/extras/FetchNodes.test.ts +0 -261
- package/front_end/models/trace/extras/FetchNodes.ts +0 -254
- package/front_end/models/trace/extras/Metadata.ts +0 -79
- package/front_end/models/trace/insights/LCPPhases.test.ts +0 -71
- package/front_end/models/trace/insights/LCPPhases.ts +0 -222
- package/front_end/panels/animation/AnimationScreenshotPopover.ts +0 -65
- package/front_end/panels/animation/animationScreenshotPopover.css +0 -18
- package/front_end/panels/application/ReportingApiReportsView.test.ts +0 -117
- package/front_end/panels/application/ReportingApiReportsView.ts +0 -88
- package/front_end/panels/elements/ElementsTreeElementHighlighter.test.ts +0 -51
- package/front_end/panels/elements/ElementsTreeElementHighlighter.ts +0 -107
- package/front_end/panels/elements/components/LayoutPane.ts +0 -515
- package/front_end/panels/elements/components/LayoutPaneUtils.ts +0 -41
- package/front_end/panels/elements/components/layoutPane.css +0 -168
- package/front_end/panels/sources/components/breakpointsView.css +0 -275
- package/front_end/panels/timeline/components/insights/InteractionToNextPaint.ts +0 -118
- package/front_end/panels/timeline/components/insights/LCPPhases.ts +0 -256
- package/front_end/panels/web_audio/AudioContextContentBuilder.ts +0 -113
- package/front_end/panels/web_audio/AudioContextSelector.ts +0 -140
- package/front_end/panels/web_audio/audioContextSelector.css +0 -20
- package/front_end/panels/web_audio/graph_visualizer/EdgeView.ts +0 -80
- package/front_end/panels/web_audio/graph_visualizer/GraphManager.ts +0 -46
- package/front_end/panels/web_audio/graph_visualizer/GraphStyle.ts +0 -96
- package/front_end/panels/web_audio/graph_visualizer/GraphView.ts +0 -197
- package/front_end/panels/web_audio/graph_visualizer/NodeRendererUtility.ts +0 -43
- package/front_end/panels/web_audio/graph_visualizer/NodeView.ts +0 -258
- package/front_end/panels/web_audio/graph_visualizer/graph_visualizer.ts +0 -19
- package/front_end/ui/components/docs/recorder_recording_view/basic.html +0 -20
- package/front_end/ui/components/docs/recorder_recording_view/basic.ts +0 -99
- package/front_end/ui/legacy/inspectorViewTabbedPane.css +0 -13
- package/inspector_overlay/debug/tool_distances.html +0 -25
- package/inspector_overlay/tool_distances.ts +0 -125
- package/scripts/eslint_rules/lib/no-it-screenshot-only-or-repeat.ts +0 -47
- package/scripts/eslint_rules/lib/no-screenshot-test-outside-perf-panel.ts +0 -77
- package/scripts/eslint_rules/lib/screenshot-assertion-in-it-screenshot.ts +0 -110
- package/scripts/eslint_rules/lib/single-screenshot-assertion-per-test.ts +0 -85
- package/scripts/eslint_rules/tests/no-it-screenshot-only-or-repeat.test.ts +0 -34
- package/scripts/eslint_rules/tests/no-screenshot-test-outside-perf-panel.test.ts +0 -99
- package/scripts/eslint_rules/tests/screenshot-assertion-in-it-screenshot.test.ts +0 -79
- package/scripts/eslint_rules/tests/single-screenshot-assertion-per-test.test.ts +0 -97
- package/scripts/tools/update_goldens_unittest.py +0 -88
- package/scripts/tools/update_goldens_v2.py +0 -68
- package/scripts/watch_build.js +0 -230
- /package/front_end/panels/recorder/models/{RecorderShorcutHelper.test.ts → RecorderShortcutHelper.test.ts} +0 -0
@@ -3,8 +3,9 @@
|
|
3
3
|
// found in the LICENSE file.
|
4
4
|
|
5
5
|
import * as i18n from '../../../core/i18n/i18n.js';
|
6
|
-
import
|
6
|
+
import * as Platform from '../../../core/platform/platform.js';
|
7
7
|
import * as Trace from '../../trace/trace.js';
|
8
|
+
import type {ConversationSuggestion} from '../agents/AiAgent.js';
|
8
9
|
|
9
10
|
import {
|
10
11
|
NetworkRequestFormatter,
|
@@ -14,10 +15,10 @@ function formatMilli(x: number|undefined): string {
|
|
14
15
|
if (x === undefined) {
|
15
16
|
return '';
|
16
17
|
}
|
17
|
-
return i18n.TimeUtilities.preciseMillisToString(x, 2);
|
18
|
+
return i18n.TimeUtilities.preciseMillisToString(x, 2, /* separator */ ' ');
|
18
19
|
}
|
19
20
|
|
20
|
-
function
|
21
|
+
function formatMicroToMilli(x: number|undefined): string {
|
21
22
|
if (x === undefined) {
|
22
23
|
return '';
|
23
24
|
}
|
@@ -56,9 +57,10 @@ function getLCPData(parsedTrace: Trace.Handlers.Types.ParsedTrace, frameId: stri
|
|
56
57
|
export class PerformanceInsightFormatter {
|
57
58
|
#insight: Trace.Insights.Types.InsightModel;
|
58
59
|
#parsedTrace: Trace.Handlers.Types.ParsedTrace;
|
59
|
-
|
60
|
-
|
61
|
-
this.#
|
60
|
+
|
61
|
+
constructor(parsedTrace: Trace.Handlers.Types.ParsedTrace, insight: Trace.Insights.Types.InsightModel) {
|
62
|
+
this.#insight = insight;
|
63
|
+
this.#parsedTrace = parsedTrace;
|
62
64
|
}
|
63
65
|
|
64
66
|
/**
|
@@ -77,38 +79,164 @@ export class PerformanceInsightFormatter {
|
|
77
79
|
if (!data) {
|
78
80
|
return '';
|
79
81
|
}
|
80
|
-
const {metricScore, lcpRequest} = data;
|
81
82
|
|
83
|
+
const {metricScore, lcpRequest, lcpEvent} = data;
|
84
|
+
const theLcpElement =
|
85
|
+
lcpEvent.args.data?.nodeName ? `The LCP element (${lcpEvent.args.data.nodeName})` : 'The LCP element';
|
82
86
|
const parts: string[] = [
|
83
|
-
`The Largest Contentful Paint (LCP) time for this navigation was ${
|
87
|
+
`The Largest Contentful Paint (LCP) time for this navigation was ${formatMicroToMilli(metricScore.timing)}.`,
|
84
88
|
];
|
89
|
+
|
85
90
|
if (lcpRequest) {
|
86
|
-
parts.push(
|
91
|
+
parts.push(`${theLcpElement} is an image fetched from \`${lcpRequest.args.data.url}\`.`);
|
92
|
+
const request = TraceEventFormatter.networkRequests(
|
93
|
+
[lcpRequest], this.#parsedTrace, {verbose: true, customTitle: 'LCP resource network request'});
|
94
|
+
parts.push(request);
|
87
95
|
} else {
|
88
|
-
parts.push(
|
96
|
+
parts.push(`${theLcpElement} is text and was not fetched from the network.`);
|
89
97
|
}
|
90
98
|
|
91
99
|
return parts.join('\n');
|
92
100
|
}
|
93
101
|
|
94
|
-
|
102
|
+
insightIsSupported(): boolean {
|
103
|
+
return this.#description().length > 0;
|
104
|
+
}
|
105
|
+
|
106
|
+
getSuggestions(): [ConversationSuggestion, ...ConversationSuggestion[]] {
|
107
|
+
switch (this.#insight.insightKey) {
|
108
|
+
case 'CLSCulprits':
|
109
|
+
return [
|
110
|
+
{title: 'Help me optimize my CLS score'},
|
111
|
+
{title: 'How can I prevent layout shifts on this page?'},
|
112
|
+
];
|
113
|
+
case 'DocumentLatency':
|
114
|
+
return [
|
115
|
+
{title: 'How do I decrease the initial loading time of my page?'},
|
116
|
+
{title: 'Did anything slow down the request for this document?'},
|
117
|
+
];
|
118
|
+
case 'DOMSize':
|
119
|
+
return [{title: 'How can I reduce the size of my DOM?'}];
|
120
|
+
case 'DuplicatedJavaScript':
|
121
|
+
return [
|
122
|
+
{title: 'How do I deduplicate the identified scripts in my bundle?'},
|
123
|
+
{title: 'Which duplicated JavaScript modules are the most problematic?'}
|
124
|
+
];
|
125
|
+
case 'FontDisplay':
|
126
|
+
return [
|
127
|
+
{title: 'How can I update my CSS to avoid layout shifts caused by incorrect `font-display` properties?'}
|
128
|
+
];
|
129
|
+
case 'ForcedReflow':
|
130
|
+
return [
|
131
|
+
{title: 'How can I avoid layout thrashing?'}, {title: 'What is forced reflow and why is it problematic?'}
|
132
|
+
];
|
133
|
+
case 'ImageDelivery':
|
134
|
+
return [
|
135
|
+
{title: 'What should I do to improve and optimize the time taken to fetch and display images on the page?'},
|
136
|
+
{title: 'Are all images on my site optimized?'},
|
137
|
+
];
|
138
|
+
case 'INPBreakdown':
|
139
|
+
return [
|
140
|
+
{title: 'Suggest fixes for my longest interaction'}, {title: 'Why is a large INP score problematic?'},
|
141
|
+
{title: 'What\'s the biggest contributor to my longest interaction?'}
|
142
|
+
];
|
143
|
+
case 'LCPDiscovery':
|
144
|
+
return [
|
145
|
+
{title: 'Suggest fixes to reduce my LCP'}, {title: 'What can I do to reduce my LCP discovery time?'},
|
146
|
+
{title: 'Why is LCP discovery time important?'}
|
147
|
+
];
|
148
|
+
case 'LCPBreakdown':
|
149
|
+
return [
|
150
|
+
{title: 'Help me optimize my LCP score'}, {title: 'Which LCP phase was most problematic?'},
|
151
|
+
{title: 'What can I do to reduce the LCP time for this page load?'}
|
152
|
+
];
|
153
|
+
case 'NetworkDependencyTree':
|
154
|
+
return [{title: 'How do I optimize my network dependency tree?'}];
|
155
|
+
case 'RenderBlocking':
|
156
|
+
return [
|
157
|
+
{title: 'Show me the most impactful render blocking requests that I should focus on'},
|
158
|
+
{title: 'How can I reduce the number of render blocking requests?'}
|
159
|
+
];
|
160
|
+
case 'SlowCSSSelector':
|
161
|
+
return [{title: 'How can I optimize my CSS to increase the performance of CSS selectors?'}];
|
162
|
+
case 'ThirdParties':
|
163
|
+
return [{title: 'Which third parties are having the largest impact on my page performance?'}];
|
164
|
+
case 'Cache':
|
165
|
+
return [{title: 'What caching strategies can I apply to improve my page performance?'}];
|
166
|
+
case 'Viewport':
|
167
|
+
return [{title: 'How do I make sure my page is optimized for mobile viewing?'}];
|
168
|
+
case 'ModernHTTP':
|
169
|
+
return [
|
170
|
+
{title: 'Is my site using the best HTTP practices?'},
|
171
|
+
{title: 'Which resources are not using a modern HTTP protocol?'},
|
172
|
+
];
|
173
|
+
case 'LegacyJavaScript':
|
174
|
+
return [
|
175
|
+
{title: 'Is my site polyfilling modern JavaScript features?'},
|
176
|
+
{title: 'How can I reduce the amount of legacy JavaScript on my page?'},
|
177
|
+
];
|
178
|
+
default:
|
179
|
+
Platform.assertNever(this.#insight.insightKey, 'Unknown insight key');
|
180
|
+
}
|
181
|
+
}
|
182
|
+
|
183
|
+
/**
|
184
|
+
* Formats and outputs the insight's data.
|
185
|
+
* Pass `{headingLevel: X}` to determine what heading level to use for the
|
186
|
+
* titles in the markdown output. The default is 2 (##).
|
187
|
+
*/
|
188
|
+
formatInsight(opts: {headingLevel: number} = {headingLevel: 2}): string {
|
189
|
+
const header = '#'.repeat(opts.headingLevel);
|
190
|
+
|
95
191
|
const {title} = this.#insight;
|
96
|
-
return
|
192
|
+
return `${header} Insight Title: ${title}
|
97
193
|
|
98
|
-
|
194
|
+
${header} Insight Summary:
|
99
195
|
${this.#description()}
|
100
196
|
|
101
|
-
|
197
|
+
${header} Detailed analysis:
|
102
198
|
${this.#details()}
|
103
199
|
|
104
|
-
|
200
|
+
${header} Estimated savings: ${this.estimatedSavings() || 'none'}
|
201
|
+
|
202
|
+
${header} External resources:
|
105
203
|
${this.#links()}`;
|
106
204
|
}
|
107
205
|
|
108
206
|
#details(): string {
|
109
|
-
if (Trace.Insights.Models.
|
110
|
-
const
|
111
|
-
if (
|
207
|
+
if (Trace.Insights.Models.ImageDelivery.isImageDelivery(this.#insight)) {
|
208
|
+
const optimizableImages = this.#insight.optimizableImages;
|
209
|
+
if (optimizableImages.length === 0) {
|
210
|
+
return 'There are no unoptimized images on this page.';
|
211
|
+
}
|
212
|
+
|
213
|
+
const imageDetails =
|
214
|
+
optimizableImages
|
215
|
+
.map(image => {
|
216
|
+
// List potential optimizations for the image
|
217
|
+
const optimizations =
|
218
|
+
image.optimizations
|
219
|
+
.map(optimization => {
|
220
|
+
const message = Trace.Insights.Models.ImageDelivery.getOptimizationMessage(optimization);
|
221
|
+
const byteSavings = i18n.ByteUtilities.bytesToString(optimization.byteSavings);
|
222
|
+
return `${message} (Est ${byteSavings})`;
|
223
|
+
})
|
224
|
+
.join('\n');
|
225
|
+
|
226
|
+
return `### ${image.request.args.data.url}
|
227
|
+
- Potential savings: ${i18n.ByteUtilities.bytesToString(image.byteSavings)}
|
228
|
+
- Optimizations:\n${optimizations}`;
|
229
|
+
})
|
230
|
+
.join('\n\n');
|
231
|
+
|
232
|
+
return `Total potential savings: ${i18n.ByteUtilities.bytesToString(this.#insight.wastedBytes)}
|
233
|
+
|
234
|
+
The following images could be optimized:\n\n${imageDetails}`;
|
235
|
+
}
|
236
|
+
|
237
|
+
if (Trace.Insights.Models.LCPBreakdown.isLCPBreakdown(this.#insight)) {
|
238
|
+
const {subparts, lcpMs} = this.#insight;
|
239
|
+
if (!lcpMs || !subparts) {
|
112
240
|
return '';
|
113
241
|
}
|
114
242
|
|
@@ -116,24 +244,14 @@ ${this.#links()}`;
|
|
116
244
|
// Image based has TTFB, Load delay, Load time and Render delay
|
117
245
|
// Note that we expect every trace + LCP to have TTFB + Render delay, but
|
118
246
|
// very old traces are missing the data, so we have to code defensively
|
119
|
-
// in case the
|
247
|
+
// in case the subparts are not present.
|
120
248
|
const phaseBulletPoints: Array<{name: string, value: string, percentage: string}> = [];
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
phaseBulletPoints.push({name: 'Resource load delay', value: formatMilli(phases.loadDelay), percentage});
|
128
|
-
}
|
129
|
-
if (phases?.loadTime) {
|
130
|
-
const percentage = (phases.loadTime / lcpMs * 100).toFixed(1);
|
131
|
-
phaseBulletPoints.push({name: 'Resource load duration', value: formatMilli(phases.loadTime), percentage});
|
132
|
-
}
|
133
|
-
if (phases?.renderDelay) {
|
134
|
-
const percentage = (phases.renderDelay / lcpMs * 100).toFixed(1);
|
135
|
-
phaseBulletPoints.push({name: 'Element render delay', value: formatMilli(phases.renderDelay), percentage});
|
136
|
-
}
|
249
|
+
|
250
|
+
Object.values(subparts).forEach((subpart: Trace.Insights.Models.LCPBreakdown.Subpart) => {
|
251
|
+
const phaseMilli = Trace.Helpers.Timing.microToMilli(subpart.range);
|
252
|
+
const percentage = (phaseMilli / lcpMs * 100).toFixed(1);
|
253
|
+
phaseBulletPoints.push({name: subpart.label, value: formatMilli(phaseMilli), percentage});
|
254
|
+
});
|
137
255
|
|
138
256
|
return `${this.#lcpMetricSharedContext()}
|
139
257
|
|
@@ -171,8 +289,8 @@ ${checklistBulletPoints.map(point => `- ${point.name}: ${point.passed ? 'PASSED'
|
|
171
289
|
}
|
172
290
|
|
173
291
|
if (Trace.Insights.Models.RenderBlocking.isRenderBlocking(this.#insight)) {
|
174
|
-
const requestSummary =
|
175
|
-
|
292
|
+
const requestSummary =
|
293
|
+
TraceEventFormatter.networkRequests(this.#insight.renderBlockingRequests, this.#parsedTrace);
|
176
294
|
|
177
295
|
if (requestSummary.length === 0) {
|
178
296
|
return 'There are no network requests that are render blocking.';
|
@@ -180,7 +298,7 @@ ${checklistBulletPoints.map(point => `- ${point.name}: ${point.passed ? 'PASSED'
|
|
180
298
|
|
181
299
|
return `Here is a list of the network requests that were render blocking on this page and their duration:
|
182
300
|
|
183
|
-
${requestSummary
|
301
|
+
${requestSummary}`;
|
184
302
|
}
|
185
303
|
|
186
304
|
if (Trace.Insights.Models.DocumentLatency.isDocumentLatency(this.#insight)) {
|
@@ -207,7 +325,7 @@ ${requestSummary.join('\n\n')}`;
|
|
207
325
|
|
208
326
|
return `${this.#lcpMetricSharedContext()}
|
209
327
|
|
210
|
-
${TraceEventFormatter.
|
328
|
+
${TraceEventFormatter.networkRequests([documentRequest], this.#parsedTrace, {
|
211
329
|
verbose: true,
|
212
330
|
customTitle: 'Document network request'
|
213
331
|
})}
|
@@ -216,7 +334,7 @@ The result of the checks for this insight are:
|
|
216
334
|
${checklistBulletPoints.map(point => `- ${point.name}: ${point.passed ? 'PASSED' : 'FAILED'}`).join('\n')}`;
|
217
335
|
}
|
218
336
|
|
219
|
-
if (Trace.Insights.Models.
|
337
|
+
if (Trace.Insights.Models.INPBreakdown.isINPBreakdown(this.#insight)) {
|
220
338
|
const event = this.#insight.longestInteractionEvent;
|
221
339
|
if (!event) {
|
222
340
|
return '';
|
@@ -224,11 +342,11 @@ ${checklistBulletPoints.map(point => `- ${point.name}: ${point.passed ? 'PASSED'
|
|
224
342
|
|
225
343
|
const inpInfoForEvent =
|
226
344
|
`The longest interaction on the page was a \`${event.type}\` which had a total duration of \`${
|
227
|
-
|
345
|
+
formatMicroToMilli(event.dur)}\`. The timings of each of the three phases were:
|
228
346
|
|
229
|
-
1. Input delay: ${
|
230
|
-
2. Processing duration: ${
|
231
|
-
3. Presentation delay: ${
|
347
|
+
1. Input delay: ${formatMicroToMilli(event.inputDelay)}
|
348
|
+
2. Processing duration: ${formatMicroToMilli(event.mainThreadHandling)}
|
349
|
+
3. Presentation delay: ${formatMicroToMilli(event.presentationDelay)}.`;
|
232
350
|
|
233
351
|
return inpInfoForEvent;
|
234
352
|
}
|
@@ -251,17 +369,81 @@ ${checklistBulletPoints.map(point => `- ${point.name}: ${point.passed ? 'PASSED'
|
|
251
369
|
});
|
252
370
|
|
253
371
|
return `The worst layout shift cluster was the cluster that started at ${
|
254
|
-
|
255
|
-
|
372
|
+
formatMicroToMilli(clusterTimes.start)} and ended at ${
|
373
|
+
formatMicroToMilli(clusterTimes.end)}, with a duration of ${formatMicroToMilli(worstCluster.dur)}.
|
256
374
|
The score for this cluster is ${worstCluster.clusterCumulativeScore.toFixed(4)}.
|
257
375
|
|
258
376
|
Layout shifts in this cluster:
|
259
377
|
${shiftsFormatted.join('\n')}`;
|
260
378
|
}
|
261
379
|
|
380
|
+
if (Trace.Insights.Models.ModernHTTP.isModernHTTP(this.#insight)) {
|
381
|
+
const requestSummary = (this.#insight.http1Requests.length === 1) ?
|
382
|
+
TraceEventFormatter.networkRequests(this.#insight.http1Requests, this.#parsedTrace, {verbose: true}) :
|
383
|
+
TraceEventFormatter.networkRequests(this.#insight.http1Requests, this.#parsedTrace);
|
384
|
+
|
385
|
+
if (requestSummary.length === 0) {
|
386
|
+
return 'There are no requests that were served over a legacy HTTP protocol.';
|
387
|
+
}
|
388
|
+
|
389
|
+
return `Here is a list of the network requests that were served over a legacy HTTP protocol:
|
390
|
+
${requestSummary}`;
|
391
|
+
}
|
392
|
+
|
393
|
+
if (Trace.Insights.Models.DuplicatedJavaScript.isDuplicatedJavaScript(this.#insight)) {
|
394
|
+
const totalWastedBytes = this.#insight.wastedBytes;
|
395
|
+
const duplicatedScriptsByModule = this.#insight.duplicationGroupedByNodeModules;
|
396
|
+
|
397
|
+
if (duplicatedScriptsByModule.size === 0) {
|
398
|
+
return 'There is no duplicated JavaScript in the page modules';
|
399
|
+
}
|
400
|
+
|
401
|
+
const filesFormatted =
|
402
|
+
Array.from(duplicatedScriptsByModule)
|
403
|
+
.map(
|
404
|
+
([module, duplication]) =>
|
405
|
+
`- Source: ${module} - Duplicated bytes: ${duplication.estimatedDuplicateBytes} bytes`)
|
406
|
+
.join('\n');
|
407
|
+
|
408
|
+
return `Total wasted bytes: ${totalWastedBytes} bytes.
|
409
|
+
|
410
|
+
Duplication grouped by Node modules: ${filesFormatted}`;
|
411
|
+
}
|
412
|
+
|
413
|
+
if (Trace.Insights.Models.LegacyJavaScript.isLegacyJavaScript(this.#insight)) {
|
414
|
+
const legacyJavaScriptResults = this.#insight.legacyJavaScriptResults;
|
415
|
+
|
416
|
+
if (legacyJavaScriptResults.size === 0) {
|
417
|
+
return 'There is no significant amount of legacy JavaScript on the page.';
|
418
|
+
}
|
419
|
+
|
420
|
+
const filesFormatted =
|
421
|
+
Array.from(legacyJavaScriptResults)
|
422
|
+
.map(([script, result]) => `\n- Script: ${script.url} - Wasted bytes: ${result.estimatedByteSavings} bytes
|
423
|
+
Matches:
|
424
|
+
${result.matches.map(match => `Line: ${match.line}, Column: ${match.column}, Name: ${match.name}`).join('\n')}`)
|
425
|
+
.join('\n');
|
426
|
+
|
427
|
+
return `Total legacy JavaScript: ${legacyJavaScriptResults.size} files.
|
428
|
+
|
429
|
+
Legacy JavaScript by file:
|
430
|
+
${filesFormatted}`;
|
431
|
+
}
|
432
|
+
|
262
433
|
return '';
|
263
434
|
}
|
264
435
|
|
436
|
+
estimatedSavings(): string {
|
437
|
+
return Object.entries(this.#insight.metricSavings ?? {})
|
438
|
+
.map(([k, v]) => {
|
439
|
+
if (k === 'CLS') {
|
440
|
+
return `${k} ${v.toFixed(2)}`;
|
441
|
+
}
|
442
|
+
return `${k} ${Math.round(v)} ms`;
|
443
|
+
})
|
444
|
+
.join(', ');
|
445
|
+
}
|
446
|
+
|
265
447
|
#links(): string {
|
266
448
|
switch (this.#insight.insightKey) {
|
267
449
|
case 'CLSCulprits':
|
@@ -278,8 +460,8 @@ ${shiftsFormatted.join('\n')}`;
|
|
278
460
|
case 'ForcedReflow':
|
279
461
|
return '';
|
280
462
|
case 'ImageDelivery':
|
281
|
-
return '';
|
282
|
-
case '
|
463
|
+
return '- https://developer.chrome.com/docs/lighthouse/performance/uses-optimized-images/';
|
464
|
+
case 'INPBreakdown':
|
283
465
|
return `- https://web.dev/articles/inp
|
284
466
|
- https://web.dev/explore/how-to-optimize-inp
|
285
467
|
- https://web.dev/articles/optimize-long-tasks
|
@@ -287,7 +469,7 @@ ${shiftsFormatted.join('\n')}`;
|
|
287
469
|
case 'LCPDiscovery':
|
288
470
|
return `- https://web.dev/articles/lcp
|
289
471
|
- https://web.dev/articles/optimize-lcp`;
|
290
|
-
case '
|
472
|
+
case 'LCPBreakdown':
|
291
473
|
return `- https://web.dev/articles/lcp
|
292
474
|
- https://web.dev/articles/optimize-lcp`;
|
293
475
|
case 'NetworkDependencyTree':
|
@@ -304,9 +486,10 @@ ${shiftsFormatted.join('\n')}`;
|
|
304
486
|
case 'Cache':
|
305
487
|
return '';
|
306
488
|
case 'ModernHTTP':
|
307
|
-
return '';
|
489
|
+
return '- https://developer.chrome.com/docs/lighthouse/best-practices/uses-http2';
|
308
490
|
case 'LegacyJavaScript':
|
309
|
-
return
|
491
|
+
return `- https://web.dev/articles/baseline-and-polyfills
|
492
|
+
- https://philipwalton.com/articles/the-state-of-es5-on-the-web/`;
|
310
493
|
}
|
311
494
|
}
|
312
495
|
|
@@ -325,14 +508,15 @@ ${shiftsFormatted.join('\n')}`;
|
|
325
508
|
case 'DOMSize':
|
326
509
|
return '';
|
327
510
|
case 'DuplicatedJavaScript':
|
328
|
-
return
|
511
|
+
return `This insight identifies large, duplicated JavaScript modules that are present in your application and create redundant code.
|
512
|
+
This wastes network bandwidth and slows down your page, as the user's browser must download and process the same code multiple times.`;
|
329
513
|
case 'FontDisplay':
|
330
514
|
return '';
|
331
515
|
case 'ForcedReflow':
|
332
516
|
return '';
|
333
517
|
case 'ImageDelivery':
|
334
|
-
return '';
|
335
|
-
case '
|
518
|
+
return 'This insight identifies unoptimized images that are downloaded at a much higher resolution than they are displayed. Properly sizing and compressing these assets will decrease their download time, directly improving the perceived page load time and LCP';
|
519
|
+
case 'INPBreakdown':
|
336
520
|
return `Interaction to Next Paint (INP) is a metric that tracks the responsiveness of the page when the user interacts with it. INP is a Core Web Vital and the thresholds for how we categorize a score are:
|
337
521
|
- Good: 200 milliseconds or less.
|
338
522
|
- Needs improvement: more than 200 milliseconds and 500 milliseconds or less.
|
@@ -345,13 +529,13 @@ For a given slow interaction, we can break it down into 3 phases:
|
|
345
529
|
|
346
530
|
The sum of these three phases is the total latency. It is important to optimize each of these phases to ensure interactions take as little time as possible. Focusing on the phase that has the largest score is a good way to start optimizing.`;
|
347
531
|
case 'LCPDiscovery':
|
348
|
-
return `This insight analyzes the time taken to discover the LCP resource and request it on the network. It only applies if LCP element was a resource like an image that has to be fetched over the network. There are 3 checks this insight makes:
|
532
|
+
return `This insight analyzes the time taken to discover the LCP resource and request it on the network. It only applies if the LCP element was a resource like an image that has to be fetched over the network. There are 3 checks this insight makes:
|
349
533
|
1. Did the resource have \`fetchpriority=high\` applied?
|
350
534
|
2. Was the resource discoverable in the initial document, rather than injected from a script or stylesheet?
|
351
535
|
3. The resource was not lazy loaded as this can delay the browser loading the resource.
|
352
536
|
|
353
537
|
It is important that all of these checks pass to minimize the delay between the initial page load and the LCP resource being loaded.`;
|
354
|
-
case '
|
538
|
+
case 'LCPBreakdown':
|
355
539
|
return 'This insight is used to analyze the time spent that contributed to the final LCP time and identify which of the 4 phases (or 2 if there was no LCP resource) are contributing most to the delay in rendering the LCP element.';
|
356
540
|
case 'NetworkDependencyTree':
|
357
541
|
return '';
|
@@ -366,15 +550,24 @@ It is important that all of these checks pass to minimize the delay between the
|
|
366
550
|
case 'Cache':
|
367
551
|
return '';
|
368
552
|
case 'ModernHTTP':
|
369
|
-
return
|
553
|
+
return `Modern HTTP protocols, such as HTTP/2, are more efficient than older versions like HTTP/1.1 because they allow for multiple requests and responses to be sent over a single network connection, significantly improving page load performance by reducing latency and overhead. This insight identifies requests that can be upgraded to a modern HTTP protocol.
|
554
|
+
|
555
|
+
We apply a conservative approach when flagging HTTP/1.1 usage. This insight will only flag requests that meet all of the following criteria:
|
556
|
+
1. Were served over HTTP/1.1 or an earlier protocol.
|
557
|
+
2. Originate from an origin that serves at least 6 static asset requests, as the benefits of multiplexing are less significant with fewer requests.
|
558
|
+
3. Are not served from 'localhost' or coming from a third-party source, where developers have no control over the server's protocol.
|
559
|
+
|
560
|
+
To pass this insight, ensure your server supports and prioritizes a modern HTTP protocol (like HTTP/2) for static assets, especially when serving a substantial number of them.`;
|
370
561
|
case 'LegacyJavaScript':
|
371
|
-
return '
|
562
|
+
return `This insight identified legacy JavaScript in your application's modules that may be creating unnecessary code.
|
563
|
+
|
564
|
+
Polyfills and transforms enable older browsers to use new JavaScript features. However, many are not necessary for modern browsers. Consider modifying your JavaScript build process to not transpile Baseline features, unless you know you must support older browsers.`;
|
372
565
|
}
|
373
566
|
}
|
374
567
|
}
|
375
568
|
|
376
569
|
export interface NetworkRequestFormatOptions {
|
377
|
-
verbose
|
570
|
+
verbose?: boolean;
|
378
571
|
customTitle?: string;
|
379
572
|
}
|
380
573
|
|
@@ -386,8 +579,10 @@ export class TraceEventFormatter {
|
|
386
579
|
|
387
580
|
const potentialRootCauses: string[] = [];
|
388
581
|
if (rootCauses) {
|
389
|
-
rootCauses.
|
390
|
-
|
582
|
+
rootCauses.iframes.forEach(
|
583
|
+
iframe => potentialRootCauses.push(
|
584
|
+
`An iframe (id: ${iframe.frame}, url: ${iframe.url ?? 'unknown'} was injected into the page)`));
|
585
|
+
rootCauses.webFonts.forEach(req => {
|
391
586
|
potentialRootCauses.push(`A font that was loaded over the network (${req.args.data.url}).`);
|
392
587
|
});
|
393
588
|
// TODO(b/413285103): use the nice strings for non-composited animations.
|
@@ -411,10 +606,38 @@ export class TraceEventFormatter {
|
|
411
606
|
'- No potential root causes identified';
|
412
607
|
|
413
608
|
return `### Layout shift ${index + 1}:
|
414
|
-
- Start time: ${
|
609
|
+
- Start time: ${formatMicroToMilli(shift.ts - baseTime)}
|
415
610
|
- Score: ${shift.args.data?.weighted_score_delta.toFixed(4)}
|
416
611
|
${rootCauseText}`;
|
417
612
|
}
|
613
|
+
|
614
|
+
// Stringify network requests for the LLM model.
|
615
|
+
static networkRequests(
|
616
|
+
requests: readonly Trace.Types.Events.SyntheticNetworkRequest[], parsedTrace: Trace.Handlers.Types.ParsedTrace,
|
617
|
+
options?: NetworkRequestFormatOptions): string {
|
618
|
+
if (requests.length === 0) {
|
619
|
+
return '';
|
620
|
+
}
|
621
|
+
|
622
|
+
let verbose;
|
623
|
+
if (options?.verbose !== undefined) {
|
624
|
+
verbose = options.verbose;
|
625
|
+
} else {
|
626
|
+
verbose = requests.length === 1;
|
627
|
+
}
|
628
|
+
|
629
|
+
// Use verbose format for a single network request. With the compressed format, a format description
|
630
|
+
// needs to be provided, which is not worth sending if only one network request is being stringified.
|
631
|
+
// For a single request, use `formatRequestVerbosely`, which formats with all fields specified and does not require a
|
632
|
+
// format description.
|
633
|
+
if (verbose) {
|
634
|
+
return requests.map(request => this.#networkRequestVerbosely(request, parsedTrace, options?.customTitle))
|
635
|
+
.join('\n');
|
636
|
+
}
|
637
|
+
|
638
|
+
return this.#networkRequestsArrayCompressed(requests, parsedTrace);
|
639
|
+
}
|
640
|
+
|
418
641
|
/**
|
419
642
|
* This is the data passed to a network request when the Performance Insights
|
420
643
|
* agent is asking for information. It is a slimmed down version of the
|
@@ -423,13 +646,22 @@ ${rootCauseText}`;
|
|
423
646
|
* Security; be careful about adding new data here. If you are in doubt please
|
424
647
|
* talk to jacktfranklin@.
|
425
648
|
*/
|
426
|
-
static
|
649
|
+
static #networkRequestVerbosely(
|
427
650
|
request: Trace.Types.Events.SyntheticNetworkRequest, parsedTrace: Trace.Handlers.Types.ParsedTrace,
|
428
|
-
|
429
|
-
const {
|
430
|
-
|
431
|
-
|
432
|
-
|
651
|
+
customTitle?: string): string {
|
652
|
+
const {
|
653
|
+
url,
|
654
|
+
statusCode,
|
655
|
+
initialPriority,
|
656
|
+
priority,
|
657
|
+
fromServiceWorker,
|
658
|
+
mimeType,
|
659
|
+
responseHeaders,
|
660
|
+
syntheticData,
|
661
|
+
protocol
|
662
|
+
} = request.args.data;
|
663
|
+
|
664
|
+
const titlePrefix = `## ${customTitle ?? 'Network request'}`;
|
433
665
|
|
434
666
|
// Note: unlike other agents, we do have the ability to include
|
435
667
|
// cross-origins, hence why we do not sanitize the URLs here.
|
@@ -468,33 +700,212 @@ ${rootCauseText}`;
|
|
468
700
|
const redirects = request.args.data.redirects.map((redirect, index) => {
|
469
701
|
const startTime = redirect.ts - baseTime;
|
470
702
|
return `#### Redirect ${index + 1}: ${redirect.url}
|
471
|
-
- Start time: ${
|
472
|
-
- Duration: ${
|
703
|
+
- Start time: ${formatMicroToMilli(startTime)}
|
704
|
+
- Duration: ${formatMicroToMilli(redirect.dur)}`;
|
473
705
|
});
|
474
706
|
|
475
|
-
|
476
|
-
|
477
|
-
- Start time: ${formatMicro(startTimesForLifecycle.queuedAt)}
|
478
|
-
- Duration: ${formatMicro(request.dur)}
|
479
|
-
- MIME type: ${mimeType}${renderBlocking ? '\n- This request was render blocking' : ''}`;
|
480
|
-
}
|
707
|
+
const initiators = this.#getInitiatorChain(parsedTrace, request);
|
708
|
+
const initiatorUrls = initiators.map(initiator => initiator.args.data.url);
|
481
709
|
|
482
710
|
return `${titlePrefix}: ${url}
|
483
711
|
Timings:
|
484
|
-
- Queued at: ${
|
485
|
-
- Request sent at: ${
|
486
|
-
- Download complete at: ${
|
487
|
-
- Main thread processing completed at: ${
|
712
|
+
- Queued at: ${formatMicroToMilli(startTimesForLifecycle.queuedAt)}
|
713
|
+
- Request sent at: ${formatMicroToMilli(startTimesForLifecycle.requestSentAt)}
|
714
|
+
- Download complete at: ${formatMicroToMilli(startTimesForLifecycle.downloadCompletedAt)}
|
715
|
+
- Main thread processing completed at: ${formatMicroToMilli(startTimesForLifecycle.processingCompletedAt)}
|
488
716
|
Durations:
|
489
|
-
- Download time: ${
|
490
|
-
- Main thread processing time: ${
|
491
|
-
- Total duration: ${
|
717
|
+
- Download time: ${formatMicroToMilli(downloadTime)}
|
718
|
+
- Main thread processing time: ${formatMicroToMilli(mainThreadProcessingDuration)}
|
719
|
+
- Total duration: ${formatMicroToMilli(request.dur)}${initiator ? `\nInitiator: ${initiator.args.data.url}` : ''}
|
492
720
|
Redirects:${redirects.length ? '\n' + redirects.join('\n') : ' no redirects'}
|
493
721
|
Status code: ${statusCode}
|
494
722
|
MIME Type: ${mimeType}
|
723
|
+
Protocol: ${protocol}
|
495
724
|
${priorityLines.join('\n')}
|
496
725
|
Render blocking: ${renderBlocking ? 'Yes' : 'No'}
|
497
726
|
From a service worker: ${fromServiceWorker ? 'Yes' : 'No'}
|
727
|
+
Initiators (root request to the request that directly loaded this one): ${initiatorUrls.join(', ') || 'none'}
|
498
728
|
${NetworkRequestFormatter.formatHeaders('Response headers', responseHeaders ?? [], true)}`;
|
499
729
|
}
|
730
|
+
|
731
|
+
static #getOrAssignUrlIndex(urlIdToIndex: Map<string, number>, url: string): number {
|
732
|
+
let index = urlIdToIndex.get(url);
|
733
|
+
if (index !== undefined) {
|
734
|
+
return index;
|
735
|
+
}
|
736
|
+
index = urlIdToIndex.size;
|
737
|
+
urlIdToIndex.set(url, index);
|
738
|
+
return index;
|
739
|
+
}
|
740
|
+
|
741
|
+
// A compact network requests format designed to save tokens when sending multiple network requests to the model.
|
742
|
+
// It creates a map that maps request URLs to IDs and references the IDs in the compressed format.
|
743
|
+
//
|
744
|
+
// Important: Do not use this method for stringifying a single network request. With this format, a format description
|
745
|
+
// needs to be provided, which is not worth sending if only one network request is being stringified.
|
746
|
+
// For a single request, use `formatRequestVerbosely`, which formats with all fields specified and does not require a
|
747
|
+
// format description.
|
748
|
+
static #networkRequestsArrayCompressed(
|
749
|
+
requests: readonly Trace.Types.Events.SyntheticNetworkRequest[],
|
750
|
+
parsedTrace: Trace.Handlers.Types.ParsedTrace): string {
|
751
|
+
const networkDataString = `
|
752
|
+
Network requests data:
|
753
|
+
|
754
|
+
`;
|
755
|
+
const urlIdToIndex = new Map<string, number>();
|
756
|
+
const allRequestsText = requests
|
757
|
+
.map(request => {
|
758
|
+
const urlIndex =
|
759
|
+
TraceEventFormatter.#getOrAssignUrlIndex(urlIdToIndex, request.args.data.url);
|
760
|
+
return this.#networkRequestCompressedFormat(
|
761
|
+
urlIndex, request, parsedTrace, urlIdToIndex);
|
762
|
+
})
|
763
|
+
.join('\n');
|
764
|
+
|
765
|
+
const urlsMapString = 'allUrls = ' +
|
766
|
+
`[${
|
767
|
+
Array.from(urlIdToIndex.entries())
|
768
|
+
.map(([url, index]) => {
|
769
|
+
return `${index}: ${url}`;
|
770
|
+
})
|
771
|
+
.join(', ')}]`;
|
772
|
+
|
773
|
+
return networkDataString + '\n\n' + urlsMapString + '\n\n' + allRequestsText;
|
774
|
+
}
|
775
|
+
|
776
|
+
/**
|
777
|
+
* Network requests format description that is sent to the model as a fact.
|
778
|
+
*/
|
779
|
+
static networkDataFormatDescription = `Network requests are formatted like this:
|
780
|
+
\`urlIndex;queuedTime;requestSentTime;downloadCompleteTime;processingCompleteTime;totalDuration;downloadDuration;mainThreadProcessingDuration;statusCode;mimeType;priority;initialPriority;finalPriority;renderBlocking;protocol;fromServiceWorker;initiators;redirects:[[redirectUrlIndex|startTime|duration]];responseHeaders:[header1Value|header2Value|...]\`
|
781
|
+
|
782
|
+
- \`urlIndex\`: Numerical index for the request's URL, referencing the "All URLs" list.
|
783
|
+
Timings (all in milliseconds, relative to navigation start):
|
784
|
+
- \`queuedTime\`: When the request was queued.
|
785
|
+
- \`requestSentTime\`: When the request was sent.
|
786
|
+
- \`downloadCompleteTime\`: When the download completed.
|
787
|
+
- \`processingCompleteTime\`: When main thread processing finished.
|
788
|
+
Durations (all in milliseconds):
|
789
|
+
- \`totalDuration\`: Total time from the request being queued until its main thread processing completed.
|
790
|
+
- \`downloadDuration\`: Time spent actively downloading the resource.
|
791
|
+
- \`mainThreadProcessingDuration\`: Time spent on the main thread after the download completed.
|
792
|
+
- \`statusCode\`: The HTTP status code of the response (e.g., 200, 404).
|
793
|
+
- \`mimeType\`: The MIME type of the resource (e.g., "text/html", "application/javascript").
|
794
|
+
- \`priority\`: The final network request priority (e.g., "VeryHigh", "Low").
|
795
|
+
- \`initialPriority\`: The initial network request priority.
|
796
|
+
- \`finalPriority\`: The final network request priority (redundant if \`priority\` is always final, but kept for clarity if \`initialPriority\` and \`priority\` differ).
|
797
|
+
- \`renderBlocking\`: 't' if the request was render-blocking, 'f' otherwise.
|
798
|
+
- \`protocol\`: The network protocol used (e.g., "h2", "http/1.1").
|
799
|
+
- \`fromServiceWorker\`: 't' if the request was served from a service worker, 'f' otherwise.
|
800
|
+
- \`initiators\`: A list (separated by ,) of URL indices for the initiator chain of this request. Listed in order starting from the root request to the request that directly loaded this one. This represents the network dependencies necessary to load this request. If there is no initiator, this is empty.
|
801
|
+
- \`redirects\`: A comma-separated list of redirects, enclosed in square brackets. Each redirect is formatted as
|
802
|
+
\`[redirectUrlIndex|startTime|duration]\`, where: \`redirectUrlIndex\`: Numerical index for the redirect's URL. \`startTime\`: The start time of the redirect in milliseconds, relative to navigation start. \`duration\`: The duration of the redirect in milliseconds.
|
803
|
+
- \`responseHeaders\`: A list (separated by '|') of values for specific, pre-defined response headers, enclosed in square brackets.
|
804
|
+
The order of headers corresponds to an internal fixed list. If a header is not present, its value will be empty.
|
805
|
+
`;
|
806
|
+
|
807
|
+
/**
|
808
|
+
*
|
809
|
+
* This is the network request data passed to the Performance agent.
|
810
|
+
*
|
811
|
+
* The `urlIdToIndex` Map is used to map URLs to numerical indices in order to not need to pass whole url every time it's mentioned.
|
812
|
+
* The map content is passed in the response together will all the requests data.
|
813
|
+
*
|
814
|
+
* See `networkDataFormatDescription` above for specifics.
|
815
|
+
*/
|
816
|
+
static #networkRequestCompressedFormat(
|
817
|
+
urlIndex: number, request: Trace.Types.Events.SyntheticNetworkRequest,
|
818
|
+
parsedTrace: Trace.Handlers.Types.ParsedTrace, urlIdToIndex: Map<string, number>): string {
|
819
|
+
const {
|
820
|
+
statusCode,
|
821
|
+
initialPriority,
|
822
|
+
priority,
|
823
|
+
fromServiceWorker,
|
824
|
+
mimeType,
|
825
|
+
responseHeaders,
|
826
|
+
syntheticData,
|
827
|
+
protocol,
|
828
|
+
} = request.args.data;
|
829
|
+
|
830
|
+
const navigationForEvent = Trace.Helpers.Trace.getNavigationForTraceEvent(
|
831
|
+
request,
|
832
|
+
request.args.data.frame,
|
833
|
+
parsedTrace.Meta.navigationsByFrameId,
|
834
|
+
);
|
835
|
+
const baseTime = navigationForEvent?.ts ?? parsedTrace.Meta.traceBounds.min;
|
836
|
+
const queuedTime = formatMicroToMilli(request.ts - baseTime);
|
837
|
+
const requestSentTime = formatMicroToMilli(syntheticData.sendStartTime - baseTime);
|
838
|
+
const downloadCompleteTime = formatMicroToMilli(syntheticData.finishTime - baseTime);
|
839
|
+
const processingCompleteTime = formatMicroToMilli(request.ts + request.dur - baseTime);
|
840
|
+
const totalDuration = formatMicroToMilli(request.dur);
|
841
|
+
const downloadDuration = formatMicroToMilli(syntheticData.finishTime - syntheticData.downloadStart);
|
842
|
+
const mainThreadProcessingDuration = formatMicroToMilli(request.ts + request.dur - syntheticData.finishTime);
|
843
|
+
const renderBlocking = Trace.Helpers.Network.isSyntheticNetworkRequestEventRenderBlocking(request) ? 't' : 'f';
|
844
|
+
const finalPriority = priority;
|
845
|
+
const headerValues = responseHeaders
|
846
|
+
?.map(header => {
|
847
|
+
const value =
|
848
|
+
NetworkRequestFormatter.allowHeader(header.name) ? header.value : '<redacted>';
|
849
|
+
return `${header.name}: ${value}`;
|
850
|
+
})
|
851
|
+
.join('|');
|
852
|
+
const redirects = request.args.data.redirects
|
853
|
+
.map(redirect => {
|
854
|
+
const urlIndex = TraceEventFormatter.#getOrAssignUrlIndex(urlIdToIndex, redirect.url);
|
855
|
+
const redirectStartTime = formatMicroToMilli(redirect.ts - baseTime);
|
856
|
+
const redirectDuration = formatMicroToMilli(redirect.dur);
|
857
|
+
return `[${urlIndex}|${redirectStartTime}|${redirectDuration}]`;
|
858
|
+
})
|
859
|
+
.join(',');
|
860
|
+
|
861
|
+
const initiators = this.#getInitiatorChain(parsedTrace, request);
|
862
|
+
const initiatorUrlIndices =
|
863
|
+
initiators.map(initiator => TraceEventFormatter.#getOrAssignUrlIndex(urlIdToIndex, initiator.args.data.url));
|
864
|
+
|
865
|
+
const parts = [
|
866
|
+
urlIndex,
|
867
|
+
queuedTime,
|
868
|
+
requestSentTime,
|
869
|
+
downloadCompleteTime,
|
870
|
+
processingCompleteTime,
|
871
|
+
totalDuration,
|
872
|
+
downloadDuration,
|
873
|
+
mainThreadProcessingDuration,
|
874
|
+
statusCode,
|
875
|
+
mimeType,
|
876
|
+
priority,
|
877
|
+
initialPriority,
|
878
|
+
finalPriority,
|
879
|
+
renderBlocking,
|
880
|
+
protocol,
|
881
|
+
fromServiceWorker ? 't' : 'f',
|
882
|
+
initiatorUrlIndices.join(','),
|
883
|
+
`[${redirects}]`,
|
884
|
+
`[${headerValues ?? ''}]`,
|
885
|
+
];
|
886
|
+
return parts.join(';');
|
887
|
+
}
|
888
|
+
|
889
|
+
static #getInitiatorChain(
|
890
|
+
parsedTrace: Trace.Handlers.Types.ParsedTrace,
|
891
|
+
request: Trace.Types.Events.SyntheticNetworkRequest): Trace.Types.Events.SyntheticNetworkRequest[] {
|
892
|
+
const initiators: Trace.Types.Events.SyntheticNetworkRequest[] = [];
|
893
|
+
|
894
|
+
let cur: Trace.Types.Events.SyntheticNetworkRequest|undefined = request;
|
895
|
+
while (cur) {
|
896
|
+
const initiator = parsedTrace.NetworkRequests.eventToInitiator.get(cur);
|
897
|
+
if (initiator) {
|
898
|
+
// Should never happen, but if it did that would be an infinite loop.
|
899
|
+
if (initiators.includes(initiator)) {
|
900
|
+
return [];
|
901
|
+
}
|
902
|
+
|
903
|
+
initiators.unshift(initiator);
|
904
|
+
}
|
905
|
+
|
906
|
+
cur = initiator;
|
907
|
+
}
|
908
|
+
|
909
|
+
return initiators;
|
910
|
+
}
|
500
911
|
}
|