chrome-devtools-frontend 1.0.1657110 → 1.0.1660788
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/.agents/skills/devtools-ux-writing-refactor/SKILL.md +125 -0
- package/.agents/skills/migrate-chromium-test/SKILL.md +15 -70
- package/.agents/skills/repro-flaky-tests/SKILL.md +53 -0
- package/.agents/skills/ui-eng-vision-orchestrator/SKILL.md +37 -18
- package/.agents/skills/version-control/SKILL.md +8 -1
- package/AUTHORS +1 -0
- package/SECURITY.md +3 -0
- package/docs/get_the_code.md +6 -0
- package/front_end/Images/src/ads.svg +1 -0
- package/front_end/Tests.js +6 -6
- package/front_end/core/common/Gzip.ts +12 -5
- package/front_end/core/common/ResourceType.ts +19 -19
- package/front_end/core/common/Revealer.ts +15 -15
- package/front_end/core/common/SettingRegistration.ts +19 -19
- package/front_end/core/host/AidaClient.ts +35 -9
- package/front_end/core/host/GdpClient.ts +10 -7
- package/front_end/core/platform/StringUtilities.ts +35 -0
- package/front_end/core/sdk/AccessibilityModel.snapshot.txt +17 -0
- package/front_end/core/sdk/AccessibilityModel.ts +132 -2
- package/front_end/core/sdk/CPUThrottlingManager.ts +8 -5
- package/front_end/core/sdk/CSSMetadata.ts +110 -16
- package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +2 -5
- package/front_end/core/sdk/ConsoleModel.ts +5 -5
- package/front_end/core/sdk/DOMDebuggerModel.ts +5 -1
- package/front_end/core/sdk/DOMModel.ts +32 -18
- package/front_end/core/sdk/NetworkManager.ts +58 -14
- package/front_end/core/sdk/NetworkRequest.ts +37 -1
- package/front_end/core/sdk/OverlayModel.ts +45 -6
- package/front_end/core/sdk/ResourceTreeModel.ts +6 -7
- package/front_end/core/sdk/ScreenCaptureModel.ts +2 -2
- package/front_end/core/sdk/ServerTiming.ts +17 -13
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +4 -2
- package/front_end/core/sdk/ServiceWorkerManager.ts +19 -5
- package/front_end/core/sdk/TargetManager.ts +10 -1
- package/front_end/core/sdk/TraceObject.ts +4 -2
- package/front_end/core/sdk/sdk-meta.ts +170 -0
- package/front_end/design_system_tokens.css +0 -5
- package/front_end/entrypoints/devtools_app/devtools_app.ts +1 -1
- package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +13 -4
- package/front_end/entrypoints/formatter_worker/FormattedContentBuilder.ts +5 -2
- package/front_end/entrypoints/formatter_worker/FormatterWorker.ts +23 -4
- package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +33 -10
- package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +8 -3
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +4 -4
- package/front_end/entrypoints/inspector_main/OutermostTargetSelector.ts +2 -2
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +36 -37
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +15 -33
- package/front_end/entrypoints/js_app/js_app.ts +6 -5
- package/front_end/entrypoints/main/GlobalAiButton.ts +4 -4
- package/front_end/entrypoints/main/MainImpl.ts +25 -55
- package/front_end/entrypoints/main/main-meta.ts +50 -50
- package/front_end/entrypoints/node_app/app/NodeConnectionsPanel.ts +5 -5
- package/front_end/entrypoints/node_app/app/NodeMain.ts +3 -3
- package/front_end/entrypoints/node_app/node_app.ts +10 -9
- package/front_end/entrypoints/worker_app/WorkerMain.ts +1 -1
- package/front_end/foundation/Universe.ts +76 -6
- package/front_end/generated/InspectorBackendCommands.ts +3 -3
- package/front_end/generated/SupportedCSSProperties.js +19 -12
- package/front_end/generated/protocol.ts +7 -1
- package/front_end/models/ai_assistance/AiConversation.ts +19 -17
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +37 -14
- package/front_end/models/ai_assistance/AiUtils.ts +38 -42
- package/front_end/models/ai_assistance/agents/AiAgent.ts +5 -1
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +3 -2
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +2 -1
- package/front_end/models/ai_assistance/agents/StorageAgent.ts +7 -5
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +270 -286
- package/front_end/models/ai_assistance/data_formatters/UnitFormatters.ts +20 -0
- package/front_end/models/ai_assistance/performance/AICallTree.ts +3 -1
- package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +3 -2
- package/front_end/models/autofill_manager/AutofillManager.ts +3 -1
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +8 -5
- package/front_end/models/bindings/CompilerScriptMapping.ts +2 -1
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +15 -16
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +6 -4
- package/front_end/models/bindings/FileUtils.ts +11 -12
- package/front_end/models/bindings/NetworkProject.ts +4 -0
- package/front_end/models/bindings/PresentationConsoleMessageHelper.ts +2 -1
- package/front_end/models/bindings/ResourceUtils.ts +1 -1
- package/front_end/models/bindings/SASSSourceMapping.ts +8 -5
- package/front_end/models/emulation/DeviceModeModel.ts +14 -14
- package/front_end/models/emulation/EmulatedDevices.ts +392 -11
- package/front_end/models/extensions/ExtensionAPI.ts +6 -6
- package/front_end/models/extensions/LanguageExtensionEndpoint.ts +13 -12
- 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/ConnectionAllowlistIssue.ts +1 -1
- package/front_end/models/issues_manager/ContentSecurityPolicyIssue.ts +7 -7
- package/front_end/models/issues_manager/CookieDeprecationMetadataIssue.ts +2 -2
- package/front_end/models/issues_manager/CookieIssue.ts +6 -7
- 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/DeprecationIssue.ts +3 -3
- package/front_end/models/issues_manager/EmailVerificationRequestIssue.ts +1 -1
- 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 +7 -7
- package/front_end/models/issues_manager/HeavyAdIssue.ts +3 -3
- package/front_end/models/issues_manager/Issue.ts +8 -8
- package/front_end/models/issues_manager/MixedContentIssue.ts +1 -1
- package/front_end/models/issues_manager/PartitioningBlobURLIssue.ts +3 -3
- package/front_end/models/issues_manager/QuirksModeIssue.ts +1 -1
- package/front_end/models/issues_manager/SRIMessageSignatureIssue.ts +2 -2
- package/front_end/models/issues_manager/SelectivePermissionsInterventionIssue.ts +2 -2
- package/front_end/models/issues_manager/SharedArrayBufferIssue.ts +2 -2
- package/front_end/models/issues_manager/SharedDictionaryIssue.ts +1 -1
- package/front_end/models/issues_manager/UnencodedDigestIssue.ts +3 -3
- package/front_end/models/javascript_metadata/NativeFunctions.js +5 -1
- package/front_end/models/stack_trace/StackTraceModel.ts +3 -3
- package/front_end/models/text_utils/ContentData.ts +27 -0
- package/front_end/models/trace/helpers/SamplesIntegrator.ts +21 -5
- package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +29 -14
- package/front_end/models/web_mcp/WebMCPModel.ts +24 -6
- package/front_end/models/workspace/IgnoreListManager.ts +6 -6
- package/front_end/models/workspace/UISourceCode.ts +3 -3
- package/front_end/models/workspace_diff/WorkspaceDiff.ts +23 -12
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +25 -22
- package/front_end/panels/ai_assistance/ExportConversation.ts +3 -4
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +3 -3
- package/front_end/panels/ai_assistance/components/ChatInput.ts +2 -2
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +7 -0
- package/front_end/panels/ai_assistance/components/DisabledWidget.ts +2 -2
- package/front_end/panels/animation/AnimationTimeline.ts +17 -19
- package/front_end/panels/animation/AnimationUI.ts +5 -5
- package/front_end/panels/animation/animation-meta.ts +2 -2
- package/front_end/panels/application/ApplicationPanelSidebar.ts +13 -4
- package/front_end/panels/application/BackgroundServiceView.ts +2 -1
- package/front_end/panels/application/DeviceBoundSessionsView.ts +2 -6
- package/front_end/panels/application/IndexedDBViews.ts +245 -262
- package/front_end/panels/application/OpenedWindowDetailsView.ts +1 -1
- package/front_end/panels/application/ResourcesPanel.ts +9 -2
- package/front_end/panels/application/ServiceWorkersView.ts +252 -211
- package/front_end/panels/application/StorageView.ts +97 -33
- package/front_end/panels/application/WebMCPView.ts +15 -1
- package/front_end/panels/application/components/AdsView.ts +1 -1
- package/front_end/panels/application/indexedDBViews.css +38 -9
- package/front_end/panels/application/preloading/helper/PreloadingForward.ts +2 -1
- package/front_end/panels/application/resourcesSidebar.css +5 -0
- package/front_end/panels/application/storageView.css +26 -9
- package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +5 -1
- package/front_end/panels/browser_debugger/browser_debugger-meta.ts +8 -6
- package/front_end/panels/common/DOMLinkifier.ts +1 -1
- package/front_end/panels/common/ExtensionServer.ts +119 -14
- package/front_end/panels/console/ConsoleContextSelector.ts +4 -4
- package/front_end/panels/console/ConsolePinPane.ts +12 -12
- package/front_end/panels/console/ConsolePrompt.ts +6 -6
- package/front_end/panels/console/ConsoleSidebar.ts +7 -7
- package/front_end/panels/console/ConsoleView.ts +45 -44
- package/front_end/panels/console/ConsoleViewMessage.ts +40 -40
- package/front_end/panels/console/SymbolizedErrorWidget.ts +2 -1
- package/front_end/panels/console/console-meta.ts +34 -34
- package/front_end/panels/console_counters/WarningErrorCounter.ts +2 -2
- package/front_end/panels/coverage/CoverageListView.ts +28 -28
- package/front_end/panels/coverage/CoverageModel.ts +2 -1
- package/front_end/panels/coverage/CoverageView.ts +23 -23
- package/front_end/panels/coverage/coverage-meta.ts +5 -5
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +36 -36
- package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +1 -1
- package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewStartView.ts +6 -6
- package/front_end/panels/css_overview/CSSOverviewUnusedDeclarations.ts +6 -6
- package/front_end/panels/css_overview/css_overview-meta.ts +2 -2
- package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +20 -21
- package/front_end/panels/developer_resources/DeveloperResourcesView.ts +6 -8
- package/front_end/panels/developer_resources/developer_resources-meta.ts +2 -2
- package/front_end/panels/elements/AccessibilityTreeUtils.ts +8 -102
- package/front_end/panels/elements/AccessibilityTreeView.ts +163 -70
- package/front_end/panels/elements/ElementsPanel.ts +17 -11
- package/front_end/panels/elements/ElementsTreeElement.ts +49 -2
- package/front_end/panels/elements/ElementsTreeOutline.ts +4 -4
- package/front_end/panels/elements/LayoutPane.ts +1 -1
- package/front_end/panels/elements/MetricsSidebarPane.ts +100 -34
- package/front_end/panels/elements/StylePropertiesSection.ts +2 -2
- package/front_end/panels/elements/StylePropertyTreeElement.ts +8 -2
- package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
- package/front_end/panels/elements/components/AccessibilityTreeNode.ts +7 -18
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +2 -2
- package/front_end/panels/elements/components/QueryContainer.ts +1 -1
- package/front_end/panels/issues/AffectedDirectivesView.ts +1 -1
- package/front_end/panels/issues/AffectedResourcesView.ts +2 -1
- package/front_end/panels/layer_viewer/LayerViewHost.ts +1 -1
- package/front_end/panels/media/EventDisplayTable.ts +2 -2
- package/front_end/panels/media/EventTimelineView.ts +4 -4
- package/front_end/panels/media/MainView.ts +4 -4
- package/front_end/panels/media/PlayerDetailView.ts +5 -5
- package/front_end/panels/media/PlayerListView.ts +1 -1
- package/front_end/panels/media/PlayerMessagesView.ts +12 -12
- package/front_end/panels/media/PlayerPropertiesView.ts +17 -17
- package/front_end/panels/network/NetworkDataGridNode.ts +124 -36
- package/front_end/panels/network/NetworkLogView.ts +11 -2
- package/front_end/panels/network/NetworkLogViewColumns.ts +18 -0
- package/front_end/panels/network/NetworkPanel.ts +2 -1
- package/front_end/panels/network/NetworkWaterfallColumn.ts +1 -3
- package/front_end/panels/network/RequestConditionsDrawer.ts +2 -2
- package/front_end/panels/network/RequestPayloadView.ts +53 -7
- package/front_end/panels/network/RequestPreviewView.ts +7 -1
- package/front_end/panels/network/components/ResponseHeaderSection.ts +1 -1
- package/front_end/panels/network/forward/UIFilter.ts +1 -0
- package/front_end/panels/network/networkPanel.css +1 -0
- package/front_end/panels/network/networkTimingTable.css +1 -1
- package/front_end/panels/network/requestPayloadView.css +10 -0
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +12 -12
- package/front_end/panels/performance_monitor/performance_monitor-meta.ts +7 -7
- package/front_end/panels/profiler/HeapDetachedElementsView.ts +2 -2
- package/front_end/panels/profiler/HeapProfileView.ts +563 -51
- package/front_end/panels/profiler/HeapSnapshotView.ts +15 -9
- package/front_end/panels/profiler/ProfilesPanel.ts +13 -7
- package/front_end/panels/profiler/WritableProfileHeader.ts +152 -0
- package/front_end/panels/profiler/profiler.ts +2 -2
- package/front_end/panels/protocol_monitor/JSONEditor.ts +10 -10
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +28 -32
- package/front_end/panels/protocol_monitor/protocol_monitor-meta.ts +1 -1
- package/front_end/panels/recorder/RecorderController.ts +15 -15
- package/front_end/panels/recorder/RecorderEvents.ts +8 -0
- package/front_end/panels/recorder/components/CreateRecordingView.ts +11 -11
- package/front_end/panels/recorder/components/ExtensionView.ts +74 -83
- package/front_end/panels/recorder/components/RecordingListView.ts +3 -3
- package/front_end/panels/recorder/components/RecordingView.ts +13 -10
- package/front_end/panels/recorder/components/ReplaySection.ts +9 -9
- package/front_end/panels/recorder/components/StepEditor.ts +352 -321
- package/front_end/panels/recorder/components/StepView.ts +36 -37
- package/front_end/panels/recorder/components/recordingView.css +1 -1
- package/front_end/panels/recorder/models/RecorderSettings.ts +2 -2
- package/front_end/panels/recorder/recorder-meta.ts +7 -7
- package/front_end/panels/screencast/ScreencastApp.ts +1 -1
- package/front_end/panels/screencast/ScreencastView.ts +12 -12
- package/front_end/panels/search/SearchResultsPane.ts +4 -4
- package/front_end/panels/search/SearchView.ts +20 -20
- package/front_end/panels/security/SecurityModel.ts +7 -7
- package/front_end/panels/security/SecurityPanel.ts +99 -107
- package/front_end/panels/security/SecurityPanelSidebar.ts +7 -7
- package/front_end/panels/security/security-meta.ts +2 -2
- package/front_end/panels/sensors/LocationsSettingsTab.ts +19 -19
- package/front_end/panels/sensors/SensorsView.ts +27 -27
- package/front_end/panels/sensors/sensors-meta.ts +13 -167
- package/front_end/panels/settings/AISettingsTab.ts +98 -56
- package/front_end/panels/settings/EditFileSystemView.ts +2 -2
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +20 -20
- package/front_end/panels/settings/KeybindsSettingsTab.ts +20 -21
- package/front_end/panels/settings/SettingsScreen.ts +11 -11
- package/front_end/panels/settings/WorkspaceSettingsTab.ts +5 -5
- package/front_end/panels/settings/components/SyncSection.ts +12 -12
- package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +13 -13
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +31 -31
- package/front_end/panels/settings/emulation/emulation-meta.ts +1 -1
- package/front_end/panels/settings/settings-meta.ts +14 -14
- package/front_end/panels/sources/NavigatorView.ts +7 -6
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +83 -37
- package/front_end/panels/sources/SourcesNavigator.ts +20 -18
- package/front_end/panels/sources/SourcesView.ts +10 -1
- package/front_end/panels/sources/scopeChainSidebarPane.css +12 -4
- package/front_end/panels/sources/sources-meta.ts +4 -4
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +5 -2
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +2 -1
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +2 -1
- package/front_end/panels/timeline/TimelineFlameChartView.ts +1 -1
- package/front_end/panels/timeline/TimelinePanel.ts +2 -1
- package/front_end/panels/timeline/TimelineUIUtils.ts +5 -2
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +4 -2
- package/front_end/panels/timeline/components/NetworkRequestTooltip.ts +4 -2
- package/front_end/panels/timeline/components/insights/ImageRef.ts +2 -1
- package/front_end/panels/utils/utils.ts +7 -3
- package/front_end/panels/web_audio/WebAudioView.ts +17 -18
- package/front_end/panels/web_audio/web_audio-meta.ts +3 -3
- package/front_end/panels/webauthn/WebauthnPane.ts +10 -10
- package/front_end/panels/whats_new/ReleaseNoteView.ts +1 -1
- package/front_end/panels/whats_new/whats_new-meta.ts +11 -11
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/lit/lib/async-directive.d.ts +2 -1
- package/front_end/third_party/lit/lib/async-directive.js +1 -1
- package/front_end/third_party/lit/lib/async-directive.js.map +1 -1
- package/front_end/third_party/lit/lib/decorators.d.ts +2 -1
- package/front_end/third_party/lit/lib/decorators.js.map +1 -1
- package/front_end/third_party/lit/lib/directive.d.ts +2 -1
- package/front_end/third_party/lit/lib/directive.js.map +1 -1
- package/front_end/third_party/lit/lib/directives.d.ts +2 -1
- package/front_end/third_party/lit/lib/directives.js +8 -8
- package/front_end/third_party/lit/lib/directives.js.map +1 -1
- package/front_end/third_party/lit/lib/lit.d.ts +2 -1
- package/front_end/third_party/lit/lib/lit.js +1 -1
- package/front_end/third_party/lit/lib/lit.js.map +1 -1
- package/front_end/third_party/lit/lib/static-html.d.ts +2 -1
- package/front_end/third_party/lit/lib/static-html.js +1 -1
- package/front_end/third_party/lit/lib/static-html.js.map +1 -1
- package/front_end/third_party/lit/package.json +2 -2
- package/front_end/third_party/lit/rebuild.sh +1 -1
- package/front_end/third_party/lit/src/async-directive.ts +5 -0
- package/front_end/ui/components/dialogs/Dialog.ts +1 -1
- package/front_end/ui/components/dialogs/ShortcutDialog.ts +1 -1
- package/front_end/ui/components/dialogs/shortcutDialog.css +15 -12
- package/front_end/ui/components/diff_view/DiffView.ts +2 -2
- package/front_end/ui/components/issue_counter/IssueCounter.ts +3 -3
- package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +5 -5
- package/front_end/ui/components/lists/List.ts +2 -2
- package/front_end/ui/components/panel_feedback/PreviewToggle.ts +1 -1
- package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +5 -5
- package/front_end/ui/components/settings/SettingCheckbox.ts +1 -1
- package/front_end/ui/components/snackbars/Snackbar.ts +1 -1
- package/front_end/ui/components/survey_link/SurveyLink.ts +3 -3
- package/front_end/ui/components/text_editor/config.ts +2 -2
- package/front_end/ui/components/tree_outline/TreeOutline.ts +34 -1
- package/front_end/ui/legacy/ReportView.ts +5 -0
- package/front_end/ui/legacy/Treeoutline.ts +18 -0
- package/front_end/ui/legacy/View.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +2 -0
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +8 -3
- package/front_end/ui/legacy/components/data_grid/data_grid.ts +1 -0
- package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +100 -36
- package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +7 -1
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +5 -0
- package/front_end/ui/legacy/components/utils/ImagePreview.ts +4 -2
- package/front_end/ui/legacy/inspectorCommon.css +5 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +4 -0
- package/mcp/mcp.ts +2 -0
- package/package.json +4 -4
- package/front_end/panels/profiler/ProfileView.ts +0 -610
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: devtools-ux-writing-refactor
|
|
3
|
+
description: >-
|
|
4
|
+
Refactor user-facing UIStrings and localization comments in a DevTools module folder according to UX writing guidelines (child task of b/40799900). Use when simplifying wording, checking sentence case, or improving L10n comments in UIStrings for a specific folder or issue. Don’t use for general code changes or non-UIStrings files.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# DevTools UX writing refactoring workflow
|
|
8
|
+
|
|
9
|
+
Use this skill when addressing a single UX writing refactoring task (one module folder or child issue under tracking bug [b/40799900](https://crbug.com/40799900)).
|
|
10
|
+
|
|
11
|
+
## 0. Environment setup (avoid PATH errors)
|
|
12
|
+
|
|
13
|
+
In DevTools Linux workspaces, `depot_tools` and `node`/`npm` may not be in `PATH` in non-interactive agent shells. Before you run Git, `gclient`, `npm`, or `git cl` commands, ensure that your environment is set up:
|
|
14
|
+
```bash
|
|
15
|
+
export PATH=$HOME/depot_tools:$PATH
|
|
16
|
+
source ~/.nvm/nvm.sh # Or export PATH=$(pwd)/third_party/node/linux/node-linux-x64/bin:$PATH
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 1. Pre-flight issue check and target scope
|
|
20
|
+
|
|
21
|
+
Before you write code or modify files, check the status of the associated Buganizer issue:
|
|
22
|
+
```bash
|
|
23
|
+
$ISSUES render <issue_number> # Or use buganizer MCP tools: render_issue / render_issue_with_external
|
|
24
|
+
```
|
|
25
|
+
* **Why?** Multiple developers and agents work on child tasks under `b/40799900`.
|
|
26
|
+
* **Action required:** If the issue is marked as `FIXED`, `VERIFIED`, or `CLOSED`, is assigned to another active developer, or has an attached Change List (CL), **stop immediately and verify whether you need to address it**. Ask the user for confirmation before you override existing work.
|
|
27
|
+
* **Identify target files:** If `render_issue` returns an external redaction notice, use `render_issue_with_external` to view the full bug description. The bug description typically lists the exact **Target Files** to refactor for this child task. Focus exclusively on those target files.
|
|
28
|
+
|
|
29
|
+
## 2. Create a branch
|
|
30
|
+
|
|
31
|
+
Create a branch dedicated to this issue from the latest `origin/main` (after you run `gclient sync`) using the DevTools version control tool:
|
|
32
|
+
```bash
|
|
33
|
+
git fetch origin
|
|
34
|
+
git checkout origin/main
|
|
35
|
+
gclient sync
|
|
36
|
+
git new-branch fix-<issue_number>
|
|
37
|
+
```
|
|
38
|
+
* **Why?** In Chrome DevTools, don’t use standard Git commands such as `git checkout -b` or `git switch -c`. Always use `git new-branch` so that `depot_tools` and Gerrit configure tracking information correctly.
|
|
39
|
+
* **Naming:** Always include the issue number in the branch name (for example, `fix-531625399`).
|
|
40
|
+
|
|
41
|
+
## 3. Refactor UIStrings and localization comments
|
|
42
|
+
|
|
43
|
+
Locate all TypeScript files in the target folder that define `const UIStrings = { ... }` and apply the **8-point UX writing checklist** (cross-check with official DevTools documentation at https://developer.chrome.com/docs/devtools).
|
|
44
|
+
|
|
45
|
+
> [!IMPORTANT]
|
|
46
|
+
> **Ignore non-localized or experimental strings:** Don’t modify strings in `const UIStringsNotTranslate = { ... }`, `lockedString`, or `i18n.i18n.lockedString`. These strings are for early-stage or experimental features that you mustn’t localize or alter during UX refactoring.
|
|
47
|
+
|
|
48
|
+
### The 8-point checklist
|
|
49
|
+
1. **Brevity and short synonyms:** Replace formal or lengthy words:
|
|
50
|
+
* `preserve` -> `keep` | `additional` -> `more` | `prevent` -> `stop` | `receive` -> `get`
|
|
51
|
+
* `submit` -> `send` | `modification` -> `change` | `create` -> `add` | `suitable` -> `fit`
|
|
52
|
+
* *Check sibling references:* If you change a setting name or label (for example, changing “Preserve log” to “Keep log”), search sibling files in the folder for explanatory text or status strings that reference the old name in quotes (for example, “console.clear() was prevented due to ‘Preserve log’”), and update them to match.
|
|
53
|
+
2. **Cut unnecessary words:** Eliminate politeness (`please`, `sorry`), filler (`very`, `strongly`, `there is` or `there are`), and marketing fluff (`seamless`, `awesome`, `fast`, `quick`).
|
|
54
|
+
3. **Contractions:** Use contractions (`don’t`, `can’t`, `isn’t`, `won’t`) instead of formal spellings (`do not`, `cannot`, `is not`, `will not`).
|
|
55
|
+
4. **Curly apostrophes, quotation marks, and ellipses:** Use curly apostrophes (`’`) and quotation marks (`“ ”`) for improved readability. Use the ellipsis character (`…`) instead of three periods (`...`). Use prime (`′`) and double prime (`″`) symbols as needed for measurements like length or coordinates.
|
|
56
|
+
5. **Sentence case and capitalization:** Use sentence case for headings, labels, and UI element names. Capitalize only the first word, proper nouns, product names (`Chrome DevTools`), and web APIs (`Background Fetch API`).
|
|
57
|
+
* Don’t capitalize feature names (for example, `conditional breakpoint` or `command menu`).
|
|
58
|
+
* Capitalize panel names and UX elements that are named after panels (for example, `Show Application`, `Toggle Console`, `Console sidebar`, or `Styles`).
|
|
59
|
+
* For panel names that consist of two words, capitalize only the first word (for example, `Developer resources panel`).
|
|
60
|
+
* When you use the panel name in combination with another word, capitalize the panel name but not the other word, unless it is a proper noun (for example, `Console view` or `DevTools Console`).
|
|
61
|
+
* In some cases, ambiguity exists whether a word refers to a UX element in DevTools (such as a panel name) or a concept (such as developer terminology). For example, this occurs with `console`, `issue`, or `network`. Decide based on the surrounding context and code (for example, `Console view`, `Console sidebar`, and `Console prompt` versus `console message`, `console warning`, `console log`, `copy console`, `clear console`, and `console history`; `Show Network` versus `network log` and `network filter`).
|
|
62
|
+
6. **Punctuation and actionability:** Remove trailing periods from single-sentence labels or titles. Ensure that error messages instruct the user how to recover (for example, `Shorten filename to 64 characters or less` instead of `Invalid filename`). Ensure that ARIA labels and multi-sentence tooltips have consistent terminal punctuation.
|
|
63
|
+
7. **Terminology (glossary):** Strictly follow standard DevTools UI terminology and letter casing (`panel`, `tab`, `drawer`, `sidebar`, `datagrid` or `table`, `action bar`, `status bar`, and `live expressions section`). Never use `pane` or call tabs `panes` in UI strings or localization (L10n) comments.
|
|
64
|
+
8. **Localization (L10n) comments:** Ensure that every string in `UIStrings` has a preceding `@description` comment that explains where and when it appears. This information is used for translators who need to understand the context in which the string is used.
|
|
65
|
+
* Use precise terminology and correct letter casing (see rule 7). Ensure that the description is easy to understand and provides enough context for translators. For descriptions that are underspecified or
|
|
66
|
+
ambiguous, figure out the context by looking at the use site of the
|
|
67
|
+
string and come up with a better description.
|
|
68
|
+
* You must explicitly document all standard placeholders (`{PH1}`, `{url}`, `{index}`) with runtime data examples (for example, `@example {https://example.com} url`).
|
|
69
|
+
* *ICU plural variables:* The i18n tool automatically parses variables in ICU plural format (such as `n` in `{n, plural, =0 {No issues} ...}`) as numeric counts, so they don’t require an `@example` tag in the `@description` comment.
|
|
70
|
+
* *Terminal punctuation:* Every `@description` comment must end with a period (`.`), even if it is a single phrase or sentence.
|
|
71
|
+
|
|
72
|
+
## 4. Chrome writing style guide
|
|
73
|
+
|
|
74
|
+
Also consult the style guides at `google3/experimental/users/rachelandrew/tools/chrome_writing/knowledge/style/` for applicable guidelines.
|
|
75
|
+
|
|
76
|
+
## 5. Pause for confirmation
|
|
77
|
+
|
|
78
|
+
Ask the user for a preliminary review of the proposed changes before proceeding. If the user has feedback, address feedback and pause again for confirmation.
|
|
79
|
+
|
|
80
|
+
## 6. Mandatory verification and testing
|
|
81
|
+
|
|
82
|
+
Don’t finish an edit without running the linter and test suite. In DevTools, i18n placeholder changes or string edits can easily break tests or linter rules.
|
|
83
|
+
|
|
84
|
+
1. **Update sibling unit tests**
|
|
85
|
+
Unit test files (`*.test.ts`) alongside the implementation often assert exact UIString values (such as error messages or warnings). When you refactor a string, check sibling `*.test.ts` files for assertions that match the old string value, and update them to prevent test failures.
|
|
86
|
+
2. **Run the linter and auto-fix errors**
|
|
87
|
+
```bash
|
|
88
|
+
npm run lint -- <folder_path>
|
|
89
|
+
```
|
|
90
|
+
3. **Run unit tests**
|
|
91
|
+
Run unit tests for the target folder first for fast feedback. Then, run the full test suite to verify that no cross-module regressions or snapshot failures occurred:
|
|
92
|
+
```bash
|
|
93
|
+
npm run test -- <folder_path>
|
|
94
|
+
npm run test
|
|
95
|
+
```
|
|
96
|
+
4. **Run presubmit checks**
|
|
97
|
+
Ensure that you commit or stage all changes before you run presubmit checks:
|
|
98
|
+
```bash
|
|
99
|
+
git cl presubmit -u
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## 7. Summarize changes and upload the CL
|
|
103
|
+
|
|
104
|
+
When all tests and presubmit checks pass, commit your changes and upload the CL to Gerrit. Don’t use `[uxw]` as a prefix.
|
|
105
|
+
|
|
106
|
+
1. **Stage and commit changes**
|
|
107
|
+
```bash
|
|
108
|
+
git add <modified_files>
|
|
109
|
+
git commit -m "Ensure consistent UI Strings in <folder_path>"
|
|
110
|
+
```
|
|
111
|
+
*(If you update an existing commit on this branch, use `git commit --amend`).*
|
|
112
|
+
|
|
113
|
+
2. **Upload the CL to Gerrit**
|
|
114
|
+
Upload the CL using `git cl upload`. Provide a dynamic summary of changes (depending on the actual content of the change) and the bug trailer:
|
|
115
|
+
```bash
|
|
116
|
+
git cl upload -d --commit-description="Ensure consistent UI Strings in <folder_path>
|
|
117
|
+
|
|
118
|
+
Summary of changes:
|
|
119
|
+
- <dynamically list specific words replaced, contractions adopted, or sentence case fixes>
|
|
120
|
+
|
|
121
|
+
Fixed: <issue_number>"
|
|
122
|
+
```
|
|
123
|
+
* **Formatting rules:**
|
|
124
|
+
* Keep line length below 72 characters.
|
|
125
|
+
* Include `Fixed: <issue_number>` on a separate line at the bottom of the description so that automation closes the issue.
|
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: devtools-migrate-chromium-test
|
|
3
|
-
description: Use when migrating
|
|
3
|
+
description: Use when migrating Chromium layout tests to DevTools unit tests
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Migrating Legacy DevTools Tests
|
|
7
|
-
|
|
8
|
-
The skill should be used from within a Chromium check out. The agent should make a devtools CL for the changes in `third_party/devtools-frontend`.
|
|
9
|
-
|
|
10
6
|
## Workflow
|
|
11
7
|
|
|
12
8
|
1. **Identify the Test to Move**:
|
|
13
9
|
|
|
14
|
-
-
|
|
15
|
-
-
|
|
10
|
+
- You should have already received the issue ID, the test title, and the exact local paths of the downloaded legacy test file (`.js`) and its expectation file (`-expected.txt`) in your initial prompt.
|
|
11
|
+
- Refer to these local copies as you write the new modern test.
|
|
16
12
|
|
|
17
13
|
2. **Identify the Target Location**:
|
|
18
14
|
|
|
19
|
-
- Find the file being tested in `
|
|
15
|
+
- Find the file being tested in `front_end/`.
|
|
20
16
|
- Place the new test file next to the file being tested, following the naming convention `[FileName].test.ts`.
|
|
21
17
|
- Example: If testing `ui/legacy/components/data_grid/DataGrid.ts`, the test should be `ui/legacy/components/data_grid/DataGrid.test.ts`.
|
|
22
18
|
|
|
@@ -35,21 +31,23 @@ The skill should be used from within a Chromium check out. The agent should make
|
|
|
35
31
|
|
|
36
32
|
5. **Verify the Changes**:
|
|
37
33
|
|
|
38
|
-
-
|
|
39
|
-
- Run the test using the DevTools test runner: `npm run test -- <relative_path_to_test>`
|
|
34
|
+
- Use the `verification` skill to correctly build the project and run the new test.
|
|
40
35
|
- Ensure the test passes.
|
|
41
36
|
|
|
42
|
-
6.
|
|
37
|
+
6. **Evaluate Test Completeness and Utility**:
|
|
43
38
|
|
|
44
|
-
-
|
|
45
|
-
-
|
|
39
|
+
- Critically review the newly created test to ensure it provides meaningful coverage. Cross-reference it with the original Chromium layout test to verify that all original behaviors, edge cases, and assertions have been fully migrated and are actively being tested.
|
|
40
|
+
- If the newly added test does not test any logic from the component but just the getters from the mocked data explain to the user that this test does not add value and it's better to close it without adding the test. Provide a command without executing it to close the issue as "Fixed".
|
|
41
|
+
- If the newly added test uses too extensive mocks of CDP objects and methods explain to the user that the test should be foundation e2e test instead of unit test and we won't migrate it. Provide a command without executing it to close the issue as "Won't Fix (Infeasible)".
|
|
42
|
+
|
|
43
|
+
7. Upload a CL with your changes using the `version-control` skill. Make sure the CL description has a `Fixed: <issue number>` trailer instead of `Bug: <issue number>`.
|
|
46
44
|
|
|
47
45
|
## Example Conversion
|
|
48
46
|
|
|
49
47
|
### Legacy Test (`datagrid-editable-longtext.js`)
|
|
50
48
|
|
|
51
49
|
```javascript
|
|
52
|
-
import {
|
|
50
|
+
import {TestRunner} from 'test_runner';
|
|
53
51
|
import * as DataGrid from 'devtools/ui/legacy/components/data_grid/data_grid.js';
|
|
54
52
|
|
|
55
53
|
(async function () {
|
|
@@ -65,8 +63,8 @@ import * as DataGrid from 'devtools/ui/legacy/components/data_grid/data_grid.js'
|
|
|
65
63
|
|
|
66
64
|
```typescript
|
|
67
65
|
import * as DataGrid from './data_grid.js';
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
66
|
+
import {renderElementIntoDOM} from '../../../../testing/DOMHelpers.js';
|
|
67
|
+
import {describeWithEnvironment} from '../../../../testing/EnvironmentHelpers.js';
|
|
70
68
|
|
|
71
69
|
describeWithEnvironment('DataGrid', () => {
|
|
72
70
|
it('tests long text in datagrid', () => {
|
|
@@ -86,59 +84,6 @@ describeWithEnvironment('DataGrid', () => {
|
|
|
86
84
|
- **Ignoring Environment Failures**: In some environments, `npm run test` may exit with code 1 due to memory leaks (e.g., `WebFrame LEAKED`) or infrastructure issues (e.g., `gpkg` or `Corp Airlock` logs), even if the tests themselves passed. Always check the end of the test log for `TOTAL: X SUCCESS` to confirm if the test logic was successful.
|
|
87
85
|
- **Rendering issue**: If you encounter an issue where checking values never gives correct information it may be due to async rendering. To resolve that you may trying using `raf()` from `front_end/testing/DOMHelpers.ts` to wait for the next rendering cycle.
|
|
88
86
|
|
|
89
|
-
## Creating a DevTools CL from a Chromium Checkout
|
|
90
|
-
|
|
91
|
-
To create a DevTools Change List (CL) from a Chromium checkout, you'll be working within the devtools-frontend repository, which is located inside your Chromium source tree. The depot_tools package (which includes git cl) must be in your PATH.
|
|
92
|
-
|
|
93
|
-
Here's the typical workflow:
|
|
94
|
-
|
|
95
|
-
1. **Navigate to the DevTools Frontend Directory**:
|
|
96
|
-
The DevTools frontend code resides in `third_party/devtools-frontend/src/` within your Chromium checkout (`chromium/src`).
|
|
97
|
-
|
|
98
|
-
```bash
|
|
99
|
-
cd path/to/chromium/src/third_party/devtools-frontend/src/
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
2. **Create a New Branch**:
|
|
103
|
-
It's best practice to create a new branch for your changes:
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
git new-branch my-devtools-feature
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
(Or use `git checkout -b my-devtools-feature`)
|
|
110
|
-
|
|
111
|
-
3. **Make Your Code Changes**:
|
|
112
|
-
Edit the files as needed for your feature or bug fix.
|
|
113
|
-
|
|
114
|
-
4. **Commit Changes Locally**:
|
|
115
|
-
Stage and commit your changes using standard Git commands:
|
|
116
|
-
|
|
117
|
-
```bash
|
|
118
|
-
git add .
|
|
119
|
-
git commit -m "My DevTools feature description"
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
_See the Chromium guide on commit messages for best practices on formatting descriptions, including the use of tags like Bug:. _
|
|
123
|
-
|
|
124
|
-
5. **Upload the CL for Review**:
|
|
125
|
-
Use `git cl upload` to send your changes to the Chromium Gerrit code review system:
|
|
126
|
-
|
|
127
|
-
```bash
|
|
128
|
-
git cl upload
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
This command will create a CL on `https://chromium-review.googlesource.com`. Follow the prompts to add a description, reviewers, etc. You can also add reviewers and trigger builds through the Gerrit web UI.
|
|
132
|
-
|
|
133
|
-
6. **Code Review Process**:
|
|
134
|
-
Your CL will be reviewed by DevTools owners. You may need to address feedback by amending your commit and uploading new patch sets using `git cl upload` again. Once approved, you can land the change via the Commit Queue (CQ).
|
|
135
|
-
|
|
136
|
-
### Working on Changes Across DevTools and Chromium Core
|
|
137
|
-
|
|
138
|
-
- DevTools frontend (`third_party/devtools-frontend/src/`) and the main Chromium codebase (`chromium/src`) are distinct Git repositories.
|
|
139
|
-
- If your work involves changes in both areas, you generally need to create separate CLs: one within the devtools-frontend repo and one within the main `chromium/src` repo.
|
|
140
|
-
- The "Juggling the git submodules" section of the DevTools documentation provides guidance on managing these cross-repository changes.
|
|
141
|
-
|
|
142
87
|
## After finishing the migration
|
|
143
88
|
|
|
144
|
-
|
|
89
|
+
If you encountered any novel issues, workarounds, or helpful tips during the migration that are not already documented, please report them to the user so they can be added to the skill documentation.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: repro-flaky-test
|
|
3
|
+
description: Reproduce and investigate flakiness in a test.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Fixing flaky Tests
|
|
7
|
+
|
|
8
|
+
This skill outlines the workflow for reproducing and fixing a flaky test in the DevTools codebase.
|
|
9
|
+
|
|
10
|
+
## Workflow
|
|
11
|
+
|
|
12
|
+
- You will be given as input, either a Chromium bug link (e.g. `crbug.com/1234567`), or a name of a test file and (optionally) the test name.
|
|
13
|
+
- For example: e2e/extensions/debugger-language-plugins.test.ts and "The Debugger Language Plugins/shows sensible error messages".
|
|
14
|
+
- If nothing is provided, as the user which test you should run.
|
|
15
|
+
- Find the test in the codebase and look at its implementation.
|
|
16
|
+
- Run the test three times to note how long the test runs (on average) per minute.
|
|
17
|
+
|
|
18
|
+
## Reproduction
|
|
19
|
+
|
|
20
|
+
- Run the test enough times for a full test run to take one minute. For example, if a test takes a second to run, set it to repeat 60 times. If a test takes 5 seconds to run, run it 12 times.
|
|
21
|
+
- Start with one minute and, if the failure does not repeat, try again and increase the time by a minute (up to a maximum of 5 minutes per run).
|
|
22
|
+
- Use `npm run test -- path/to/foo.test.ts --grep "<test name>" --repeat <count>` to run the tests repeatedly.
|
|
23
|
+
- Be sure to keep track of the cumulative count of how often you run the test and how often they fail, so that you can calculate a 'flaky percentage' before and after making a fix.
|
|
24
|
+
|
|
25
|
+
After every round, display the *cumulative* results in a table:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
Test: Runs Time Failures
|
|
29
|
+
"Recorder/should be able to start a replay..." 30 60s 0 (0.00%)
|
|
30
|
+
"The Debugger Language Plugins/shows sensible..." 60 60s 1 (1.67%)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Once you have one or more failures, show the error message and ask the user if they want to:
|
|
34
|
+
|
|
35
|
+
1) Start investigating the test failures.
|
|
36
|
+
2) Continue running all the tests.
|
|
37
|
+
3) Run only the failed tests (to get a clearer indication of their failure rate).
|
|
38
|
+
4) Run only the tests that haven't failed (to attempt to get a reproduction).
|
|
39
|
+
|
|
40
|
+
## Investigation
|
|
41
|
+
|
|
42
|
+
- Create a branch flaky_tests and append a datestamp, such as _2026_07_04_14h16m.
|
|
43
|
+
- Ensure you use the instructions from the `devtools-version-control` skill to create and switch branches appropriately.
|
|
44
|
+
- Investigate each test failure and propose a fix.
|
|
45
|
+
- Don't commit the changes to the branch.
|
|
46
|
+
|
|
47
|
+
## Results
|
|
48
|
+
|
|
49
|
+
- Before finishing, run the full verification process (TypeScript checks, and linters) as required by the repository best practices.
|
|
50
|
+
- Request to run the test again for as long as you think it would take to be sure the problem is gone, but get permission from the user before starting very long runs (anything over 4 minutes).
|
|
51
|
+
- For things that have a 33% failure rate before fixing (for example), only a handful of runs are needed to verify, but tests with lower failure rate need more.
|
|
52
|
+
- NOTE: If the test fails again with the same error as before, you don't need to finish the test run but instead you should augment or replace your fix with a better one.
|
|
53
|
+
- At the end, list the tests, state briefly why each test was failing and how the fix addresses the issue along with the failure rate before and after.
|
|
@@ -11,7 +11,8 @@ DevTools views into declarative `UI.Widget` components based on lit-html,
|
|
|
11
11
|
managing a multi-pass sequential CL pipeline to ensure each code modification is
|
|
12
12
|
small, testable, and highly reviewable.
|
|
13
13
|
|
|
14
|
-
Refer to [ui_engineering.md](../../../docs/ui_engineering.md) for general
|
|
14
|
+
Refer to [ui_engineering.md](../../../docs/ui_engineering.md) for general
|
|
15
|
+
principles.
|
|
15
16
|
|
|
16
17
|
--------------------------------------------------------------------------------
|
|
17
18
|
|
|
@@ -28,9 +29,12 @@ Refer to [ui_engineering.md](../../../docs/ui_engineering.md) for general princi
|
|
|
28
29
|
file matches older patterns or generic examples. Always perform a structure
|
|
29
30
|
analysis of the active file first and adapt the plan to the actual, current
|
|
30
31
|
code.
|
|
31
|
-
4. **Hybrid Files**: Files may contain multiple classes in
|
|
32
|
-
modernization (e.g., one partially migrated class and
|
|
33
|
-
class).
|
|
32
|
+
4. **Hybrid Files/Multiple Classes**: Files may contain multiple classes in
|
|
33
|
+
different states of modernization (e.g., one partially migrated class and
|
|
34
|
+
one fully legacy class). If the file being migrated contains several
|
|
35
|
+
classes, the migration needs to be done separately for each class, starting
|
|
36
|
+
with the leaves and going up the dependency chain. Propose modifications
|
|
37
|
+
only for classes with actual violations.
|
|
34
38
|
5. **Coupling Analysis**: Always check the integration files (e.g., sidebar
|
|
35
39
|
files, parent panel files) where the target class is instantiated to see if
|
|
36
40
|
there are any direct `.element` or `.contentElement` couplings. If found,
|
|
@@ -43,12 +47,21 @@ Refer to [ui_engineering.md](../../../docs/ui_engineering.md) for general princi
|
|
|
43
47
|
single responsibility per CL. Do not combine technology migrations (e.g.,
|
|
44
48
|
converting imperative DOM to Lit-html) with base class refactoring in the
|
|
45
49
|
same diff.
|
|
46
|
-
8. **
|
|
47
|
-
|
|
50
|
+
8. **Strict Intermediate Stability**: The code must compile and work correctly,
|
|
51
|
+
and all tests must pass after each step. We should not split the class API
|
|
52
|
+
update from its usage update.
|
|
48
53
|
9. **Establish Comprehensive Guardrails First**: Ensure both **logic tests**
|
|
49
|
-
(verifying presenter interactions and state updates) and **screenshot
|
|
50
|
-
(verifying layout/styling) exist before rewriting code. If coverage
|
|
51
|
-
missing, scaffold it first.
|
|
54
|
+
(verifying presenter interactions and state updates) and **screenshot
|
|
55
|
+
tests** (verifying layout/styling) exist before rewriting code. If coverage
|
|
56
|
+
is missing, scaffold it first.
|
|
57
|
+
10. **Pre-flight Clarification**: Before starting, verify if the task is
|
|
58
|
+
underspecified or ambiguous. If so, point this out and ask for
|
|
59
|
+
clarifications before proceeding.
|
|
60
|
+
11. **Step Sizing & Complexity Assessment**: Assess the complexity of each step
|
|
61
|
+
beforehand. Aim for intermediate steps that involve changing or adding
|
|
62
|
+
roughly 300 lines of code. If a step is predicted to be too complex, break
|
|
63
|
+
it down into smaller substeps. The agent must stop and report back after
|
|
64
|
+
each step or substep to allow verification.
|
|
52
65
|
|
|
53
66
|
--------------------------------------------------------------------------------
|
|
54
67
|
|
|
@@ -57,17 +70,22 @@ Refer to [ui_engineering.md](../../../docs/ui_engineering.md) for general princi
|
|
|
57
70
|
### Plan Generation (Gated)
|
|
58
71
|
|
|
59
72
|
* **Actions**:
|
|
60
|
-
1.
|
|
73
|
+
1. Verify if the task is underspecified or ambiguous. If so, ask for
|
|
74
|
+
clarifications first.
|
|
75
|
+
2. Scan the target file to determine size, complexity, legacy elements
|
|
61
76
|
(e.g., `ReportView`, `ToolbarButton`, `DataGrid`, `TreeOutline`), and
|
|
62
77
|
actual class inheritance. Deconstruct the file mentally (or in the plan)
|
|
63
78
|
into **Business Logic** (state, event handlers) and **Rendering Logic**
|
|
64
79
|
(DOM creation, CSS classes). Reference code elements by **Name** (not
|
|
65
80
|
line numbers) to ensure the plan remains valid as the codebase evolves.
|
|
66
|
-
Check if the class dependencies have been migrated to the ui eng vision
|
|
67
|
-
|
|
81
|
+
Check if the class dependencies have been migrated to the ui eng vision
|
|
82
|
+
or not. If the file contains multiple classes, plan the migration
|
|
83
|
+
separately for each class, starting with the leaves and going up the
|
|
84
|
+
dependency chain.
|
|
85
|
+
3. Check the files depending on this file, to understand how the code in
|
|
68
86
|
this file is being used.
|
|
69
|
-
|
|
70
|
-
|
|
87
|
+
4. **Dynamic Ordering Decision**: Determine whether to run Logic
|
|
88
|
+
Consolidation first or Local lit-html rendering first:
|
|
71
89
|
* **Option A (Logic First)**: Choose this if the component has a
|
|
72
90
|
complex, nested state model or highly coupled event-handlers.
|
|
73
91
|
Consolidating the state variables and defining the `ViewInput`
|
|
@@ -78,9 +96,9 @@ Refer to [ui_engineering.md](../../../docs/ui_engineering.md) for general princi
|
|
|
78
96
|
DOM construction. Converting the layout to declarative Lit templates
|
|
79
97
|
first (using temporary inline or local state) makes it much easier
|
|
80
98
|
to isolate and group the remaining state updates afterward.
|
|
81
|
-
|
|
99
|
+
5. Generate a `migration_plan.md` reflecting this ordering and outlining
|
|
82
100
|
the target steps.
|
|
83
|
-
|
|
101
|
+
6. Halt execution and print the formatted plan in Markdown to the chat.
|
|
84
102
|
Wait for user approval.
|
|
85
103
|
|
|
86
104
|
### Baseline & Safety Scaffolding
|
|
@@ -90,8 +108,9 @@ Refer to [ui_engineering.md](../../../docs/ui_engineering.md) for general princi
|
|
|
90
108
|
* **Subskill to Import**: `ui-eng-vision-test-scaffolder`
|
|
91
109
|
* **Actions**:
|
|
92
110
|
1. Verify existing test coverage. Propose and add missing **logic tests**
|
|
93
|
-
for interactions and **screenshot tests** for visual validation to avoid
|
|
94
|
-
|
|
111
|
+
for interactions and **screenshot tests** for visual validation to avoid
|
|
112
|
+
regressions.
|
|
113
|
+
2. Pay extra attention not to skip this step.
|
|
95
114
|
|
|
96
115
|
### Logic Consolidation
|
|
97
116
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: devtools-version-control
|
|
3
|
-
description: Use when starting a new task, creating a branch, switching branches, managing branches, creating and uploading CLs,
|
|
3
|
+
description: Use when starting a new task, creating a branch, switching branches, managing branches, creating and uploading CLs, handling stacked changes, or checking release and roll status in the DevTools Gerrit-based workflow. ALWAYS use this instead of running standard git checkout/switch commands for branch creation.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# DevTools Version Control
|
|
@@ -73,6 +73,12 @@ To upload an updated CL:
|
|
|
73
73
|
git cl upload -d -t "<one sentence patch set description>"
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
+
## Release and Roll Status
|
|
77
|
+
|
|
78
|
+
To check whether a DevTools commit (`devtools/devtools-frontend`) has rolled into `chromium/src` (`Roll status`) and what version or channel it is deployed to (`Release status`), look it up via the Chromium Dash API:
|
|
79
|
+
|
|
80
|
+
`https://chromiumdash.appspot.com/fetch_commit?commit=<sha>`
|
|
81
|
+
|
|
76
82
|
## Quick Reference
|
|
77
83
|
|
|
78
84
|
| Action | Command |
|
|
@@ -83,6 +89,7 @@ git cl upload -d -t "<one sentence patch set description>"
|
|
|
83
89
|
| Upload to Gerrit | `git cl upload` |
|
|
84
90
|
| Change branch parent | `git reparent-branch <new-parent>` |
|
|
85
91
|
| Sync all branches | `git rebase-update` |
|
|
92
|
+
| Check release & roll status | Query `https://chromiumdash.appspot.com/fetch_commit?commit=<sha>` |
|
|
86
93
|
|
|
87
94
|
## Common Mistakes
|
|
88
95
|
- **Multiple commits on one branch:** Gerrit expects one commit per CL. Always `commit --amend`.
|
package/AUTHORS
CHANGED
|
@@ -82,6 +82,7 @@ Nourhan Hasan <nourhan.m.hasan@gmail.com>
|
|
|
82
82
|
Paras Awasthi <awasthiparas6@gmail.com>
|
|
83
83
|
Paul Fisher <paul@pfish.zone>
|
|
84
84
|
Peng Zhou <zhoupeng.1996@bytedance.com>
|
|
85
|
+
Percy Wang <a945970854@gmail.com>
|
|
85
86
|
Per-Olov Jernberg <possan@possan.se>
|
|
86
87
|
PhistucK <phistuck@gmail.com>
|
|
87
88
|
Pradhuman Singh Baid <pradhumansinghbaid@gmail.com>
|
package/SECURITY.md
CHANGED
|
@@ -54,3 +54,6 @@ Chrome DevTools is a privileged web app running in a sandboxed renderer process,
|
|
|
54
54
|
|
|
55
55
|
### Side-Effect Free Evaluation
|
|
56
56
|
* Side-effect free JavaScript evaluation is a best-effort developer heuristic to prevent accidental state changes, not a security boundary. Bypassing it to cause side effects on the debugged page is not a vulnerability.
|
|
57
|
+
|
|
58
|
+
### Self-XSS Paste Gate
|
|
59
|
+
* The self-XSS paste gate is not a security boundary. It is supposed to reduce the chance for abuse, not to fully prevent it. Issues around bypassing it are social engineering, and outside of our threat model.
|
package/docs/get_the_code.md
CHANGED
|
@@ -499,3 +499,9 @@ ln -s src/third_party/devtools-frontend/src devtools-frontend
|
|
|
499
499
|
If you did run `gclient sync` first, remove the devtools-frontend directory and start over.
|
|
500
500
|
|
|
501
501
|
Run `gclient sync` after creating the link to fetch the dependencies for the standalone checkout.
|
|
502
|
+
|
|
503
|
+
### Known issues
|
|
504
|
+
|
|
505
|
+
- GN/Siso wrappers in `depot_tools` don't assume the side-by-side solutions, and
|
|
506
|
+
always use the binaries in Chromium. Please make sure updating Chromium when
|
|
507
|
+
you get a build error.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 -960 960 960" width="20px" fill="#000000"><path d="M288-384h48v-48h48v48h48v-168q0-10.2-6.9-17.1-6.9-6.9-17.1-6.9h-96q-10.2 0-17.1 6.9-6.9 6.9-6.9 17.1v168Zm48-96v-48h48v48h-48Zm192 96h96q20.4 0 34.2-13.8Q672-411.6 672-432v-96q0-20.4-13.8-34.2Q644.4-576 624-576h-96v192Zm48-48v-96h48v96h-48ZM168-192q-29.7 0-50.85-21.16Q96-234.32 96-264.04v-432.24Q96-726 117.15-747T168-768h624q29.7 0 50.85 21.16Q864-725.68 864-695.96v432.24Q864-234 842.85-213T792-192H168Zm0-72h624v-432H168v432Zm0 0v-432 432Z"/></svg>
|
package/front_end/Tests.js
CHANGED
|
@@ -496,8 +496,8 @@
|
|
|
496
496
|
|
|
497
497
|
TestSuite.prototype.testConsoleOnNavigateBack = function() {
|
|
498
498
|
function filteredMessages() {
|
|
499
|
-
return SDK.ConsoleModel.ConsoleModel.allMessagesUnordered(
|
|
500
|
-
a => a.source !== Protocol.Log.LogEntrySource.Violation);
|
|
499
|
+
return SDK.ConsoleModel.ConsoleModel.allMessagesUnordered(SDK.TargetManager.TargetManager.instance())
|
|
500
|
+
.filter(a => a.source !== Protocol.Log.LogEntrySource.Violation);
|
|
501
501
|
}
|
|
502
502
|
|
|
503
503
|
if (filteredMessages().length === 1) {
|
|
@@ -710,7 +710,7 @@
|
|
|
710
710
|
SDK.TargetManager.TargetManager.instance().addModelListener(
|
|
711
711
|
SDK.ConsoleModel.ConsoleModel, SDK.ConsoleModel.Events.MessageAdded, onConsoleMessage, this);
|
|
712
712
|
|
|
713
|
-
const messages = SDK.ConsoleModel.ConsoleModel.allMessagesUnordered();
|
|
713
|
+
const messages = SDK.ConsoleModel.ConsoleModel.allMessagesUnordered(SDK.TargetManager.TargetManager.instance());
|
|
714
714
|
if (messages.length) {
|
|
715
715
|
const text = messages[0].messageText;
|
|
716
716
|
this.assertEquals('ready', text);
|
|
@@ -976,7 +976,7 @@
|
|
|
976
976
|
TestSuite.prototype.testWindowInitializedOnNavigateBack = function() {
|
|
977
977
|
const test = this;
|
|
978
978
|
test.takeControl();
|
|
979
|
-
const messages = SDK.ConsoleModel.ConsoleModel.allMessagesUnordered();
|
|
979
|
+
const messages = SDK.ConsoleModel.ConsoleModel.allMessagesUnordered(SDK.TargetManager.TargetManager.instance());
|
|
980
980
|
if (messages.length === 1) {
|
|
981
981
|
checkMessages();
|
|
982
982
|
} else {
|
|
@@ -985,7 +985,7 @@
|
|
|
985
985
|
}
|
|
986
986
|
|
|
987
987
|
function checkMessages() {
|
|
988
|
-
const messages = SDK.ConsoleModel.ConsoleModel.allMessagesUnordered();
|
|
988
|
+
const messages = SDK.ConsoleModel.ConsoleModel.allMessagesUnordered(SDK.TargetManager.TargetManager.instance());
|
|
989
989
|
test.assertEquals(1, messages.length);
|
|
990
990
|
test.assertTrue(messages[0].messageText.indexOf('Uncaught') === -1);
|
|
991
991
|
test.releaseControl();
|
|
@@ -1062,7 +1062,7 @@
|
|
|
1062
1062
|
};
|
|
1063
1063
|
|
|
1064
1064
|
TestSuite.prototype.waitForTestResultsInConsole = function() {
|
|
1065
|
-
const messages = SDK.ConsoleModel.ConsoleModel.allMessagesUnordered();
|
|
1065
|
+
const messages = SDK.ConsoleModel.ConsoleModel.allMessagesUnordered(SDK.TargetManager.TargetManager.instance());
|
|
1066
1066
|
for (let i = 0; i < messages.length; ++i) {
|
|
1067
1067
|
const text = messages[i].messageText;
|
|
1068
1068
|
if (text === 'PASS') {
|
|
@@ -38,24 +38,31 @@ export async function fileToString(file: File): Promise<string> {
|
|
|
38
38
|
* Consider using `arrayBufferToString` instead, which can handle both gzipped and plain text buffers.
|
|
39
39
|
*/
|
|
40
40
|
export async function decompress(gzippedBuffer: ArrayBufferLike, charset = 'utf-8'): Promise<string> {
|
|
41
|
-
const buffer = await
|
|
41
|
+
const buffer = await decompressToBuffer(gzippedBuffer);
|
|
42
42
|
const str = new TextDecoder(charset).decode(buffer);
|
|
43
43
|
return str;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
export async function decompressToBuffer(gzippedBuffer: ArrayBufferLike): Promise<ArrayBuffer> {
|
|
47
|
+
return await gzipCodec(gzippedBuffer, new DecompressionStream('gzip'));
|
|
48
|
+
}
|
|
49
|
+
|
|
46
50
|
/**
|
|
47
51
|
* Decompress a deflate-encoded ArrayBuffer to a string.
|
|
48
52
|
* Tries 'deflate' (zlib wrapper) first, then falls back to 'deflate-raw'.
|
|
49
53
|
*/
|
|
50
54
|
export async function decompressDeflate(buffer: ArrayBufferLike, charset = 'utf-8'): Promise<string> {
|
|
51
|
-
|
|
55
|
+
const decompressedBuffer = await decompressDeflateToBuffer(buffer);
|
|
56
|
+
return new TextDecoder(charset).decode(decompressedBuffer);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export async function decompressDeflateToBuffer(buffer: ArrayBufferLike): Promise<ArrayBuffer> {
|
|
52
60
|
try {
|
|
53
|
-
|
|
61
|
+
return await gzipCodec(buffer, new DecompressionStream('deflate'));
|
|
54
62
|
} catch {
|
|
55
63
|
// Try deflate-raw format if zlib-wrapped deflate fails.
|
|
56
|
-
|
|
64
|
+
return await gzipCodec(buffer, new DecompressionStream('deflate-raw'));
|
|
57
65
|
}
|
|
58
|
-
return new TextDecoder(charset).decode(decompressedBuffer);
|
|
59
66
|
}
|
|
60
67
|
export async function compress(str: string): Promise<ArrayBuffer> {
|
|
61
68
|
const encoded = new TextEncoder().encode(str);
|