chrome-devtools-frontend 1.0.1735750 → 1.0.1738725
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/rules/ui-and-widgets/ui-css-scoping-and-flex-layout.md +1 -1
- package/.agents/skills/code-review/SKILL.md +1 -0
- package/.agents/skills/devtools-uistrings/SKILL.md +147 -0
- package/.agents/skills/version-control/SKILL.md +63 -11
- package/DIR_METADATA +6 -0
- package/docs/cookbook/localization.md +1 -1
- package/docs/devtools-protocol.md +3 -1
- package/eslint.config.mjs +0 -7
- package/front_end/application_tokens.css +1 -1
- package/front_end/core/host/AidaClient.ts +147 -224
- package/front_end/core/host/AidaClientTypes.ts +9 -0
- package/front_end/core/host/AidaErrors.ts +416 -0
- package/front_end/core/host/AidaGcaTranslation.ts +18 -4
- package/front_end/core/host/InspectorFrontendHostAPI.ts +9 -2
- package/front_end/core/host/UserMetrics.ts +25 -0
- package/front_end/core/host/UserMetricsEnums.ts +25 -0
- package/front_end/core/host/host.ts +3 -1
- package/front_end/core/i18n/collect-ui-strings.js +20 -0
- package/front_end/core/root/Runtime.ts +12 -5
- package/front_end/core/sdk/NetworkManager.ts +0 -6
- package/front_end/core/sdk/OverlayModel.ts +0 -6
- package/front_end/core/sdk/PrivateVerificationTokensModel.ts +0 -18
- package/front_end/core/sdk/RehydratingConnection.ts +5 -2
- package/front_end/core/sdk/ResourceTreeModel.ts +0 -42
- package/front_end/core/sdk/ScreenCaptureModel.ts +0 -84
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +0 -15
- package/front_end/core/sdk/StorageBucketsModel.ts +0 -15
- package/front_end/design_system_tokens.css +1 -0
- package/front_end/devtools_compatibility.js +57 -2
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +203 -127
- package/front_end/entrypoints/inspector_main/renderingOptions.css +5 -0
- package/front_end/entrypoints/main/GlobalAiButton.ts +2 -9
- package/front_end/entrypoints/main/MainImpl.ts +0 -4
- package/front_end/entrypoints/node_app/app/NodeMain.ts +0 -9
- package/front_end/entrypoints/node_app/app/nodeConnectionsPanel.css +0 -22
- package/front_end/generated/SupportedCSSProperties.ts +8 -159
- package/front_end/models/ai-utils/AiUtils.ts +1 -5
- package/front_end/models/ai_assistance/DOMHelpers.ts +18 -15
- package/front_end/models/ai_assistance/ExtensionScope.ts +9 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +2 -18
- package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +13 -13
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +1 -1
- package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
- package/front_end/models/ai_assistance/contexts/FileContext.ts +1 -2
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +18 -8
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +2 -2
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +103 -81
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +15 -203
- package/front_end/models/ai_assistance/injected.ts +6 -1
- package/front_end/models/ai_assistance/skills/styling.md +8 -10
- package/front_end/models/ai_assistance/tools/GetTraceEventByKey.ts +1 -1
- package/front_end/models/ai_assistance/tools/ListSources.ts +3 -1
- package/front_end/models/ai_assistance/tools/SetElementStyles.ts +288 -0
- package/front_end/models/ai_assistance/tools/Tool.ts +1 -0
- package/front_end/models/ai_assistance/tools/ToolRegistry.ts +3 -0
- package/front_end/models/ai_code_generation/AiCodeGeneration.ts +0 -6
- package/front_end/models/bindings/ResourceScriptMapping.ts +64 -16
- package/front_end/models/javascript_metadata/NativeFunctions.ts +10 -6
- package/front_end/models/trace/EventsSerializer.ts +0 -8
- package/front_end/models/trace/handlers/FlowsHandler.ts +10 -0
- package/front_end/models/trace/handlers/SamplesHandler.ts +3 -2
- package/front_end/models/trace/handlers/ScriptsHandler.ts +25 -26
- package/front_end/models/trace/helpers/TreeHelpers.ts +4 -0
- package/front_end/models/workspace/UISourceCode.ts +30 -8
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +1 -7
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +15 -34
- package/front_end/panels/ai_assistance/components/ChatView.ts +2 -16
- package/front_end/panels/ai_assistance/components/chatInput.css +4 -4
- package/front_end/panels/ai_assistance/components/chatView.css +0 -32
- package/front_end/panels/ai_assistance/components/walkthroughView.css +1 -1
- package/front_end/panels/animation/AnimationTimeline.ts +4 -4
- package/front_end/panels/animation/animationTimeline.css +11 -7
- package/front_end/panels/application/IndexedDBModel.ts +0 -15
- package/front_end/panels/application/PrivateVerificationTokensView.ts +114 -26
- package/front_end/panels/application/ResourcesPanel.ts +1 -0
- package/front_end/panels/application/appManifestView.css +2 -5
- package/front_end/panels/application/backgroundServiceView.css +2 -2
- package/front_end/panels/application/components/backForwardCacheView.css +1 -5
- package/front_end/panels/application/components/permissionsPolicySection.css +0 -4
- package/front_end/panels/application/components/serviceWorkerRouterView.css +2 -2
- package/front_end/panels/application/frameDetailsReportView.css +0 -7
- package/front_end/panels/application/indexedDBViews.css +3 -3
- package/front_end/panels/application/privateVerificationTokensView.css +6 -0
- package/front_end/panels/application/serviceWorkerUpdateCycleView.css +1 -1
- package/front_end/panels/application/serviceWorkersView.css +2 -2
- package/front_end/panels/comments/CommentsPane.ts +1 -1
- package/front_end/panels/comments/commentsPane.css +1 -1
- package/front_end/panels/common/CommentsOverlayWidget.ts +2 -1
- package/front_end/panels/common/common.ts +0 -1
- package/front_end/panels/console/ConsoleView.ts +11 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +5 -1
- package/front_end/panels/console/consolePinPane.css +1 -1
- package/front_end/panels/console/consolePrompt.css +0 -12
- package/front_end/panels/console/consoleView.css +7 -6
- package/front_end/panels/developer_resources/developerResourcesView.css +4 -3
- package/front_end/panels/elements/DOMTreeWidget.ts +48 -5
- package/front_end/panels/elements/StylePropertyTreeElement.ts +2 -1
- package/front_end/panels/elements/components/CSSHintDetailsView.ts +12 -5
- package/front_end/panels/elements/components/cssVariableValueView.css +1 -1
- package/front_end/panels/elements/elementsPanel.css +0 -6
- package/front_end/panels/elements/layoutPane.css +0 -1
- package/front_end/panels/emulation/InspectedPagePlaceholder.ts +1 -0
- package/front_end/panels/emulation/deviceModeView.css +5 -7
- package/front_end/panels/explain/components/consoleInsight.css +1 -1
- package/front_end/panels/issues/issuesTree.css +3 -3
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +34 -17
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +39 -17
- package/front_end/panels/layer_viewer/Layers3DView.ts +34 -13
- package/front_end/panels/layer_viewer/layerDetailsView.css +1 -1
- package/front_end/panels/layer_viewer/layers3DView.css +0 -4
- package/front_end/panels/lighthouse/lighthouseStartView.css +2 -2
- package/front_end/panels/linear_memory_inspector/components/linearMemoryInspector.css +1 -1
- package/front_end/panels/media/playerListView.css +0 -18
- package/front_end/panels/media/playerMessagesView.css +1 -1
- package/front_end/panels/media/playerPropertiesView.css +1 -1
- package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +1 -6
- package/front_end/panels/network/NetworkWaterfallColumn.ts +22 -10
- package/front_end/panels/network/RequestPreviewView.ts +182 -63
- package/front_end/panels/network/SignedExchangeInfoView.ts +242 -158
- package/front_end/panels/network/networkConfigView.css +1 -1
- package/front_end/panels/network/networkLogView.css +4 -3
- package/front_end/panels/network/networkPanel.css +0 -5
- package/front_end/panels/network/networkTimingTable.css +1 -1
- package/front_end/panels/network/signedExchangeInfoView.css +12 -8
- package/front_end/panels/performance_monitor/performanceMonitor.css +2 -6
- package/front_end/panels/profiler/IsolateSelector.ts +31 -10
- package/front_end/panels/profiler/profilesPanel.css +0 -8
- package/front_end/panels/protocol_monitor/JSONEditor.css +1 -1
- package/front_end/panels/protocol_monitor/JSONEditor.ts +4 -2
- package/front_end/panels/recorder/recordingListView.css +1 -1
- package/front_end/panels/screencast/screencastView.css +3 -3
- package/front_end/panels/search/searchResultsPane.css +1 -1
- package/front_end/panels/security/SecurityModel.ts +0 -6
- package/front_end/panels/security/SecurityPanel.ts +516 -448
- package/front_end/panels/security/SecurityPanelSidebar.ts +68 -48
- package/front_end/panels/security/lockIcon.css +52 -50
- package/front_end/panels/security/mainView.css +149 -145
- package/front_end/panels/security/originView.css +117 -115
- package/front_end/panels/sensors/LocationsSettingsTab.ts +2 -50
- package/front_end/panels/sensors/locationsSettingsTab.css +3 -23
- package/front_end/panels/settings/AISettingsTab.ts +1 -2
- package/front_end/panels/settings/SettingsScreen.ts +1 -1
- package/front_end/panels/settings/emulation/devicesSettingsTab.css +0 -52
- package/front_end/panels/settings/settingsScreen.css +0 -7
- package/front_end/panels/sources/CallStackSidebarPane.ts +31 -6
- package/front_end/panels/sources/NavigatorView.ts +105 -31
- package/front_end/panels/sources/breakpointsView.css +2 -3
- package/front_end/panels/sources/components/HeadersView.ts +15 -2
- package/front_end/panels/sources/scopeChainSidebarPane.css +1 -1
- package/front_end/panels/sources/watchExpressionsSidebarPane.css +0 -1
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +1 -0
- package/front_end/panels/timeline/TimelineLayersView.ts +108 -46
- package/front_end/panels/timeline/TimelineLoader.ts +16 -6
- package/front_end/panels/timeline/TimelinePanel.ts +11 -4
- package/front_end/panels/timeline/components/cwvMetrics.css +1 -1
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +1 -1
- package/front_end/panels/timeline/components/networkRequestDetails.css +1 -1
- package/front_end/panels/timeline/components/sidebarAnnotationsTab.css +4 -4
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +0 -7
- package/front_end/panels/web_audio/webAudio.css +1 -2
- package/front_end/panels/webauthn/WebauthnPane.ts +1 -1
- package/front_end/panels/whats_new/ReleaseNoteText.ts +6 -6
- package/front_end/panels/whats_new/resources/WNDT.md +6 -6
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/comments/CommentAnchorResolver.ts +45 -4
- package/front_end/ui/comments/CommentOverlayManager.ts +45 -12
- package/front_end/ui/components/buttons/FloatingButton.ts +2 -6
- package/front_end/ui/components/buttons/button.css +2 -2
- package/front_end/ui/components/buttons/floatingButton.css +0 -44
- package/front_end/ui/components/icon_button/iconButton.css +1 -1
- package/front_end/ui/components/input/textInput.css +1 -1
- package/front_end/ui/components/markdown_view/markdownView.css +1 -1
- package/front_end/ui/legacy/ContextMenu.ts +7 -5
- package/front_end/ui/legacy/DockController.ts +1 -1
- package/front_end/ui/legacy/InspectorDrawerView.ts +1 -0
- package/front_end/ui/legacy/InspectorView.ts +5 -1
- package/front_end/ui/legacy/PopoverHelper.ts +1 -0
- package/front_end/ui/legacy/RootView.ts +9 -3
- package/front_end/ui/legacy/SplitWidget.ts +1 -0
- package/front_end/ui/legacy/Treeoutline.ts +9 -0
- package/front_end/ui/legacy/UIUtils.ts +148 -10
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +130 -137
- package/front_end/ui/legacy/components/inline_editor/CSSShadowEditor.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/SwatchPopoverHelper.ts +1 -0
- package/front_end/ui/legacy/components/inline_editor/bezierEditor.css +1 -1
- package/front_end/ui/legacy/components/inline_editor/cssAngleEditor.css +3 -1
- package/front_end/ui/legacy/components/inline_editor/cssShadowEditor.css +7 -6
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +2 -0
- package/front_end/ui/legacy/components/perf_ui/pieChart.css +3 -3
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +1 -10
- package/front_end/ui/legacy/components/utils/TargetDetachedDialog.ts +0 -3
- package/front_end/ui/legacy/components/utils/imagePreview.css +1 -1
- package/front_end/ui/legacy/filter.css +1 -1
- package/front_end/ui/legacy/infobar.css +1 -1
- package/front_end/ui/legacy/inspectorCommon.css +3 -16
- package/front_end/ui/legacy/inspectorDrawerTabbedPane.css +6 -5
- package/front_end/ui/legacy/listWidget.css +2 -7
- package/front_end/ui/legacy/softDropDownButton.css +1 -1
- package/front_end/ui/legacy/tabbedPane.css +2 -1
- package/front_end/ui/legacy/theme_support/ThemeSupport.ts +44 -9
- package/front_end/ui/legacy/treeoutline.css +3 -2
- package/front_end/ui/lit/strip-whitespace.ts +1 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +133 -0
- package/front_end/ui/visual_logging/LoggingEvents.ts +1 -1
- package/package.json +3 -3
- package/front_end/Images/geminiInDevTools.png +0 -0
- package/front_end/Images/geminiInDevTools_2x.png +0 -0
- package/front_end/generated/Deprecation.ts +0 -471
- package/front_end/generated/InspectorBackendCommands.ts +0 -1690
- package/front_end/generated/protocol-mapping.d.ts +0 -5986
- package/front_end/generated/protocol-proxy-api.d.ts +0 -5452
- package/front_end/generated/protocol.ts +0 -23364
- package/front_end/panels/accessibility/axBreadcrumbs.css +0 -155
- package/front_end/panels/common/GeminiRebrandPromoDialog.ts +0 -193
- package/front_end/panels/common/geminiRebrandPromoDialog.css +0 -47
- package/front_end/panels/network/requestHeadersTree.css +0 -226
- package/front_end/panels/recorder/startView.css +0 -38
- package/front_end/panels/security/ipProtectionView.css +0 -141
- package/front_end/ui/legacy/components/inline_editor/animationNameSwatch.css +0 -27
|
@@ -5,7 +5,7 @@ severity: nit
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
**Rule.** Scope light-DOM stylesheets and align elements using flexbox or grid rather than competing margin and position offsets
|
|
8
|
-
- **Look for**: Unscoped generic selectors in light-DOM `.css` files (or `:host` inside `@scope` blocks instead of `:scope`), redundant `@scope to (devtools-widget > *)` wrappers on shadow-DOM (`useShadowDom: 'pure'` or `useShadowDom: true`) widgets that have no child `<devtools-widget>` elements,
|
|
8
|
+
- **Look for**: Unscoped generic selectors in light-DOM `.css` files (or `:host` inside `@scope` blocks instead of `:scope`), redundant `@scope to (devtools-widget > *)` wrappers on shadow-DOM (`useShadowDom: 'pure'` or `useShadowDom: true`) widgets that have no child `<devtools-widget>` elements, CSS rules combining `vertical-align`, negative `margin-top`, and pixel offsets to center icons and buttons, or `this.registerRequiredCSS(...)` or `widget.registerRequiredCSS(...)` calls in widgets migrated to Lit view functions instead of rendering `<style>${styles}</style>` inside the view template.
|
|
9
9
|
- **Do not flag**: Shadow DOM component stylesheets where `:host` scoping is native. `<style>${styles}</style>` interpolations of `*.css.js` default imports in Lit templates (generated `.css.js` files export plain CSS strings, not `CSSStyleSheet` objects, and `<style>${...}</style>` is the standard replacement for deprecated `registerRequiredCSS`).
|
|
10
10
|
|
|
11
11
|
**Why.** Unscoped class or tag selectors in light-DOM widget stylesheets leak across the DevTools document, while combining `vertical-align`, negative margins, and `position: relative` offsets creates brittle layouts that break under font scaling or zoom.
|
|
@@ -42,6 +42,7 @@ Load the skill or `.agents/rules/` files that match what the diff touches, and a
|
|
|
42
42
|
| Ported Chromium web tests (`web_tests/http/tests/devtools`) | `migrate-chromium-test` |
|
|
43
43
|
| Flaky or disabled tests, or `it.skip` / `it.skipOnPlatforms` | `fix-tests` |
|
|
44
44
|
| Rendering user-controlled strings (URLs, names, console text) | `devtools-unicode-escaping` |
|
|
45
|
+
| Adding or modifying `UIStrings` or `@description` / `@example` L10n comments | `devtools-uistrings` |
|
|
45
46
|
| `front_end/models/*`, `BUILD.gn`, `devtools_grd_files.gni`, entrypoints | `devtools-model-management` |
|
|
46
47
|
| Reviewing foundation, models, and build configs (`front_end/(core|models|entrypoints|generated)/**`, `BUILD.gn`, `*.gni`) | `.agents/rules/models-and-core/*.md` |
|
|
47
48
|
| Merging modules or consolidating `BUILD.gn` | `merging-devtools-module` |
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: devtools-uistrings
|
|
3
|
+
description: >-
|
|
4
|
+
Reviews added or modified UIStrings and localization (@description / @example)
|
|
5
|
+
comments in Chrome DevTools for UX writing style, inline backtick locking,
|
|
6
|
+
sentence case, UI glossary terminology, translator context, and sibling string
|
|
7
|
+
consistency beyond what ESLint and check-strings.js enforce. Use when a CL or
|
|
8
|
+
local diff adds or edits UIStrings or i18n calls in front_end/. Don't use for
|
|
9
|
+
syntax rules already enforced by l10n ESLint rules or for unlocalized locked
|
|
10
|
+
strings.
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Reviewing DevTools `UIStrings` and Localization Comments
|
|
14
|
+
|
|
15
|
+
Apply these checks when a diff adds or modifies `const UIStrings = { ... }`
|
|
16
|
+
entries or their JSDoc comments in `front_end/`.
|
|
17
|
+
|
|
18
|
+
## 1. Do Not Flag
|
|
19
|
+
|
|
20
|
+
- **Already enforced by ESLint (`scripts/eslint_rules/lib/l10n-*.ts`):** Do not
|
|
21
|
+
comment on curly apostrophes (`’`) vs. straight quotes (`"`) inside
|
|
22
|
+
`UIStrings` values, Unicode ellipses (`…`) vs. `...`, uppercase `URL`,
|
|
23
|
+
negative contractions (`don’t`, `can’t`, `isn’t`, etc.), single- vs.
|
|
24
|
+
multi-sentence trailing periods, whole-phrase backtick locking, or unused keys
|
|
25
|
+
in regular `*.ts` files.
|
|
26
|
+
- **Already enforced by `third_party/i18n/check-strings.js`:** Do not comment
|
|
27
|
+
on missing/empty `@description` tags, missing `@example` tags for `{PH1}`
|
|
28
|
+
placeholders, unclosed backticks, malformed Markdown links, or `\n` literals.
|
|
29
|
+
- **Exempt strings:** Do not flag `UIStringsNotTranslate`,
|
|
30
|
+
`i18n.i18n.lockedString(...)`, or pre-existing `UIStrings` entries that were
|
|
31
|
+
not modified (including verbatim moves during a refactor).
|
|
32
|
+
- **Non-issues:** Do not nitpick minor `@description` lead-in wording variations
|
|
33
|
+
that are equally clear to translators (e.g., `Tooltip text for…` vs. `Tooltip
|
|
34
|
+
for…`), and do not force synonym swaps where grammar or spec precision breaks
|
|
35
|
+
(e.g., `a suitable Cross-Origin Resource Policy` where `a fit …` is
|
|
36
|
+
ungrammatical, or RFC terms like `additional parameters`).
|
|
37
|
+
|
|
38
|
+
## 2. Shared Capitalization & DevTools UI Terminology
|
|
39
|
+
|
|
40
|
+
Apply these rules consistently in both `UIStrings` values and `@description`
|
|
41
|
+
comments:
|
|
42
|
+
|
|
43
|
+
- **Sentence case:** Capitalize only the first word, proper nouns, product
|
|
44
|
+
names (`Chrome DevTools`), acronyms, backtick-locked spec terms (e.g.,
|
|
45
|
+
`` '`Trusted Type` violations' ``), and web platform APIs / worker types
|
|
46
|
+
(`Background Fetch API`, `Service Worker` / `Service Workers`, `Web Worker` /
|
|
47
|
+
`Web Workers`).
|
|
48
|
+
- **Panels vs. features/concepts:**
|
|
49
|
+
- Capitalize user-facing panel names (`Console`, `Network`, `Elements`,
|
|
50
|
+
`Sources`, `Performance`, `Memory`, `Application`, `Security`,
|
|
51
|
+
`Lighthouse`, `Recorder`, `Issues`). For multi-word panel or tab names,
|
|
52
|
+
capitalize only the first word (`Developer resources panel`, `Memory
|
|
53
|
+
inspector panel`, `Remote devices tab`). When paired with a noun, keep the
|
|
54
|
+
second word lowercase (`Console panel`, `Console sidebar`, `Memory panel`).
|
|
55
|
+
- Map internal folder or class names to user-facing panel names (`profiler` ->
|
|
56
|
+
`Memory panel`, `Timeline UIUtils` -> `Performance panel`,
|
|
57
|
+
`linear_memory_inspector` -> `Memory inspector panel`).
|
|
58
|
+
- Keep feature, view, tool, and concept names **lowercase** unless starting a
|
|
59
|
+
sentence (`conditional breakpoint`, `command menu`, `quick open`, `heap
|
|
60
|
+
profiler`, `heap snapshot view`, `allocation sampling`, `isolate selector`,
|
|
61
|
+
`summary view`, `console message`, `network log`).
|
|
62
|
+
- **UI glossary & platform terms:** Use `panel`, `tab`, `drawer`, `sidebar`,
|
|
63
|
+
`table` (or `datagrid`), `action bar`, and `status bar`; never call a tab,
|
|
64
|
+
sidebar, or section a `pane`. Prefer `JavaScript modules` over `ES modules`,
|
|
65
|
+
and write `top level` with a space when used as a noun (`The top level of
|
|
66
|
+
JavaScript modules`).
|
|
67
|
+
|
|
68
|
+
## 3. User-Facing String Values
|
|
69
|
+
|
|
70
|
+
- **Prefer short, everyday synonyms (when grammatical and spec-accurate):**
|
|
71
|
+
- `preserve` -> `keep` | `additional` -> `more` | `prevent` -> `stop`
|
|
72
|
+
- `submit` -> `send` | `modification` -> `change` | `create` -> `add` |
|
|
73
|
+
`suitable` -> `fit`
|
|
74
|
+
- `receive` -> `get` in general prose (e.g., `get the reports`), **except**
|
|
75
|
+
keep `receive` / `received` for network or worker data/message reception
|
|
76
|
+
(e.g., `receive data while cached`, `received a message from a
|
|
77
|
+
SharedWorker`).
|
|
78
|
+
- **Cut filler, politeness & banned branding:** Remove `please`, `sorry`,
|
|
79
|
+
`very`, `strongly`, `there is` / `there are`, marketing adjectives
|
|
80
|
+
(`seamless`, `awesome`, `fast`, `quick`), and `"Powered by AI"` (use neutral
|
|
81
|
+
action labels such as `'Understand this message'`).
|
|
82
|
+
- **Inline backtick-locking (`\`...\``):** Wrap embedded technical tokens (CSS
|
|
83
|
+
properties, values, and media features like `` `print` ``, `` `screen` ``,
|
|
84
|
+
`` `prefers-color-scheme` ``; HTTP headers like `` `Alt-Svc` ``; HTML
|
|
85
|
+
attributes; and JS APIs like `` `console.clear()` ``) in backticks so
|
|
86
|
+
translators do not translate them. Keep spec capitalization inside backticks
|
|
87
|
+
while using sentence case outside (`` '`Trusted Type` violations' ``).
|
|
88
|
+
- **Articles, positive contractions, symbols & actionability:** Avoid fragile
|
|
89
|
+
`a` / `an` articles before `{PH1}` placeholders or initialisms (`HTTP`, `XHR`)
|
|
90
|
+
when shorter article-free phrasing works. Use natural positive contractions
|
|
91
|
+
not checked by ESLint (`it’s`, `you’re`, `we’re`, `that’s`, with curly `’`),
|
|
92
|
+
and use prime (`′`) and double prime (`″`) for measurements or coordinates.
|
|
93
|
+
State how to recover in error messages (e.g., `Shorten filename to 64
|
|
94
|
+
characters or less` instead of `Invalid filename`).
|
|
95
|
+
|
|
96
|
+
## 4. Localization Comments (`@description` & `@example`)
|
|
97
|
+
|
|
98
|
+
- **Explain UI role and concrete sub-location, never repeat the string:**
|
|
99
|
+
Inspect where `UIStrings.<key>` is called and name the UI element type (button
|
|
100
|
+
label, tooltip, column header, checkbox label, context menu item,
|
|
101
|
+
`aria-label`, status text) and concrete panel/sub-view location instead of
|
|
102
|
+
echoing the message text. Keep specific sub-locations such as `in the summary
|
|
103
|
+
view of the Performance panel` rather than collapsing them to `in the
|
|
104
|
+
Performance panel`.
|
|
105
|
+
- **No internal code or protocol names:** Do not reference C++ identifiers, CDP
|
|
106
|
+
enum names, or class names in `@description` comments. Describe the
|
|
107
|
+
user-visible state instead.
|
|
108
|
+
- **Verify `@example` values against the call site:** Check what
|
|
109
|
+
`i18nString(UIStrings.<key>, {PH1: ...})` passes at runtime (especially
|
|
110
|
+
whether units like `%` or `ms` are already formatted inside `{PH1}` vs.
|
|
111
|
+
outside in the template, e.g., `@example {12.34%} PH2`) and use realistic
|
|
112
|
+
runtime values rather than type names like `{string}`. Do not ask for
|
|
113
|
+
`@example` tags on ICU plural count variables.
|
|
114
|
+
- **Comment formatting:** Use straight apostrophes (`'`) and straight quotes
|
|
115
|
+
(`"`) in code comments (even when `UIStrings` uses curly `’`), and end every
|
|
116
|
+
`@description` with a period (`.`).
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
// Bad: repeats the string, uses internal/legacy names, unlocked token, vague example
|
|
120
|
+
/**
|
|
121
|
+
* @description Text for preserve log checkbox in Timeline UIUtils Pane
|
|
122
|
+
* @example {string} PH1
|
|
123
|
+
*/
|
|
124
|
+
preserveLog: 'Please preserve additional print log entries in {PH1}',
|
|
125
|
+
|
|
126
|
+
// Good: role + sub-location, sentence case, locked token, realistic example
|
|
127
|
+
/**
|
|
128
|
+
* @description Checkbox label in the summary view of the Performance panel to
|
|
129
|
+
* keep log entries across page loads.
|
|
130
|
+
* @example {https://example.com} PH1
|
|
131
|
+
*/
|
|
132
|
+
keepLog: 'Keep more `print` log entries for {PH1}',
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## 5. Neighbor, Module & Linter-Gap Consistency
|
|
136
|
+
|
|
137
|
+
- **Adjacent `UIStrings` & `-meta.ts` alignment:** Compare added or edited
|
|
138
|
+
entries against neighboring entries in the same `UIStrings` block and
|
|
139
|
+
companion `-meta.ts` file so panel names, feature casing, inline backticks,
|
|
140
|
+
and separators (`or` vs. `/`) stay consistent across sibling strings.
|
|
141
|
+
- **Quoted label renames:** When a CL renames a setting or button label (e.g.,
|
|
142
|
+
`Preserve log` -> `Keep log`), check sibling files in the same module for
|
|
143
|
+
explanatory `UIStrings` that quote the old label (e.g., `` '`console.clear()`
|
|
144
|
+
was prevented due to \'Keep log\'' ``) and update them together.
|
|
145
|
+
- **Unused keys in linter-exempt files:** `l10n-no-unused-message` skips
|
|
146
|
+
`ModuleUIStrings.ts` and `models/trace/insights/*.ts`; flag orphaned keys
|
|
147
|
+
left behind in those files when their last caller is removed.
|
|
@@ -61,22 +61,71 @@ git rebase-update && gclient sync -Df
|
|
|
61
61
|
* **Clean up old branches first:** Before running `git rebase-update`, archive landed/closed branches (`git cl archive -f`) or mark dormant (`git config branch.<branch>.dormant true`) any obsolete branches so they do not trigger unnecessary rebase conflicts.
|
|
62
62
|
* **Always sync dependencies after rebase:** Always run `gclient sync -Df` after a `git rebase-update`. CIPD dependency updates do not show up in `git status`, so skipping `gclient sync -Df` risks leaving your checkout out of sync.
|
|
63
63
|
|
|
64
|
-
###
|
|
65
|
-
|
|
64
|
+
### Uploading & Requesting Review
|
|
65
|
+
Always run `ChromiumCodeReviewAgent` on a Work-in-Progress (WIP) CL and resolve any `ERROR` or `WARNING` findings **before** marking the CL Ready for Review or adding human reviewers.
|
|
66
|
+
|
|
67
|
+
#### Step 1 — Upload as WIP and trigger AI review
|
|
68
|
+
Upload without `--send-mail` (`-s`) (and without `-c` / `--use-commit-queue`, which implies `--send-mail`) so the CL stays in Work-in-Progress, and trigger a CQ dry run (`--cq-dry-run` / `-d`) before adding human reviewers to the attention set:
|
|
69
|
+
```bash
|
|
70
|
+
git cl upload -f --cq-dry-run --commit-description="<description>"
|
|
71
|
+
```
|
|
72
|
+
Or, if the WIP patchset is already uploaded, vote `Commit-Queue+1` via `/google/bin/releases/gemini-agents-gerrit/gerrit`:
|
|
66
73
|
```bash
|
|
67
|
-
|
|
74
|
+
/google/bin/releases/gemini-agents-gerrit/gerrit vote Commit-Queue 1 \
|
|
75
|
+
--change=<CL_NUMBER> \
|
|
76
|
+
--host=https://chromium-review.googlesource.com
|
|
68
77
|
```
|
|
69
78
|
* Always include `-f` (`--force`) so that `git cl upload` runs non-interactively without opening a text editor or prompting.
|
|
70
|
-
* Use the same writing style as the current committer
|
|
71
|
-
* Keep line length below 72
|
|
72
|
-
* Add a
|
|
73
|
-
* Amend formatter/linter changes and fix linter issues.
|
|
74
|
-
* For a brand new stack of CLs, perform the initial upload on each branch individually in parent-to-child order so each CL receives its own commit description.
|
|
79
|
+
* Use the same writing style as the current committer.
|
|
80
|
+
* Keep line length below 72.
|
|
81
|
+
* Add a `Bug: <issue number>` (or `Fixed: <issue number>` / `Bug: None`) trailer on a separate line.
|
|
82
|
+
* Amend formatter/linter changes and fix linter issues before uploading.
|
|
83
|
+
* For a brand new stack of CLs, perform the initial WIP upload on each branch individually in parent-to-child order so each CL receives its own commit description.
|
|
84
|
+
|
|
85
|
+
#### Step 2 — Poll for `ChromiumCodeReviewAgent` findings
|
|
86
|
+
Poll every ~60 seconds (up to ~5 minutes) until the `ChromiumCodeReviewAgent` run completes:
|
|
87
|
+
1. Check whether the `ChromiumCodeReviewAgent` run has reached `"status": "COMPLETED"`:
|
|
88
|
+
```bash
|
|
89
|
+
gerrit_client.py checks \
|
|
90
|
+
--host https://chromium-review.googlesource.com \
|
|
91
|
+
--change <CL_NUMBER> \
|
|
92
|
+
--revision <PS> \
|
|
93
|
+
--json_file <TMP_CHECKS_JSON>
|
|
94
|
+
```
|
|
95
|
+
2. Fetch the findings with `/google/bin/releases/gemini-agents-gerrit/gerrit findings` (include `--all` because `ChromiumCodeReviewAgent` marks `WARNING` findings `actionable: false`, which `gerrit findings` omits by default; if the internal binary is unavailable, read `results` on the `ChromiumCodeReviewAgent` entry in `<TMP_CHECKS_JSON>`):
|
|
96
|
+
```bash
|
|
97
|
+
/google/bin/releases/gemini-agents-gerrit/gerrit findings \
|
|
98
|
+
--change=<CL_NUMBER> \
|
|
99
|
+
--patchset=<PS> \
|
|
100
|
+
--all \
|
|
101
|
+
--json \
|
|
102
|
+
--host=https://chromium-review.googlesource.com
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
#### Step 3 — Address findings before starting human review
|
|
106
|
+
Inspect all `ChromiumCodeReviewAgent` findings with `ERROR` or `WARNING` severity (consulting `.agents/skills/code-review/SKILL.md`, including its Shared False-Positive Guards):
|
|
107
|
+
* **Real issue:** Fix the issue locally, re-verify (`devtools-verification`), `git commit --amend`, upload a new WIP patchset with `--cq-dry-run` (`git cl upload -f --cq-dry-run -t "<one sentence patch set description>"`), and repeat Step 2 on the new patchset.
|
|
108
|
+
* **Confirmed false positive:** While the CL is still in WIP (before adding human reviewers), reply on the CL explaining why the finding does not apply (citing `ref: f/...` if present):
|
|
109
|
+
```bash
|
|
110
|
+
/google/bin/releases/gemini-agents-gerrit/gerrit messages post \
|
|
111
|
+
--change=<CL_NUMBER> \
|
|
112
|
+
--message="<explanation citing ref: f/...>" \
|
|
113
|
+
--host=https://chromium-review.googlesource.com
|
|
114
|
+
```
|
|
115
|
+
* **Start human review:** Once `ChromiumCodeReviewAgent` completes with all `ERROR` and `WARNING` findings addressed, mark the CL Ready for Review and add human reviewers:
|
|
116
|
+
```bash
|
|
117
|
+
/google/bin/releases/gemini-agents-gerrit/gerrit reviewers add \
|
|
118
|
+
--change=<CL_NUMBER> \
|
|
119
|
+
--ready \
|
|
120
|
+
--reviewer=<reviewer1@chromium.org>,<reviewer2@chromium.org> \
|
|
121
|
+
--host=https://chromium-review.googlesource.com
|
|
122
|
+
```
|
|
123
|
+
(Or run `git cl upload -f --send-mail -r <reviewer1@chromium.org> -r <reviewer2@chromium.org>`.)
|
|
75
124
|
|
|
76
125
|
### Subsequent upload & Updating Stacks
|
|
77
126
|
To upload an updated CL:
|
|
78
127
|
```bash
|
|
79
|
-
git cl upload -f -
|
|
128
|
+
git cl upload -f --cq-dry-run -t "<one sentence patch set description>"
|
|
80
129
|
```
|
|
81
130
|
* **Updating an existing stack of CLs:** Once all CLs in a stack have been initially created, **only run `git cl upload` from the leaf (latest) branch in the chain** for subsequent updates. Uploading from the leaf branch automatically runs presubmit checks and uploads new patchsets for all parent CLs in the stack simultaneously. Never upload intermediate CLs one by one when updating a stack.
|
|
82
131
|
|
|
@@ -93,8 +142,10 @@ To check whether a DevTools commit (`devtools/devtools-frontend`) has rolled int
|
|
|
93
142
|
| Create new CL from main | `git new-branch <name>` |
|
|
94
143
|
| Create stacked CL | `git new-branch --upstream_current <name>` |
|
|
95
144
|
| Update current CL | `git commit --amend` |
|
|
96
|
-
| Initial CL upload | `git cl upload -f -
|
|
97
|
-
|
|
|
145
|
+
| Initial WIP CL upload + CQ dry run | `git cl upload -f --cq-dry-run --commit-description="<description>"` |
|
|
146
|
+
| Poll `ChromiumCodeReviewAgent` findings | `/google/bin/releases/gemini-agents-gerrit/gerrit findings --change=<CL> --patchset=<PS> --all --json --host=https://chromium-review.googlesource.com` |
|
|
147
|
+
| Mark Ready for Review & add reviewers | `/google/bin/releases/gemini-agents-gerrit/gerrit reviewers add --change=<CL> --ready --reviewer=<emails> --host=https://chromium-review.googlesource.com` |
|
|
148
|
+
| Subsequent CL upload (or update stack from leaf) | `git cl upload -f --cq-dry-run -t "<message>"` |
|
|
98
149
|
| Reparent branch to root (`origin/main`) | `git reparent-branch --root` |
|
|
99
150
|
| Change branch parent | `git reparent-branch <new-parent>` |
|
|
100
151
|
| Archive landed/closed branches | `git cl archive -f` |
|
|
@@ -103,6 +154,7 @@ To check whether a DevTools commit (`devtools/devtools-frontend`) has rolled int
|
|
|
103
154
|
| Check release & roll status | Query `https://chromiumdash.appspot.com/fetch_commit?commit=<sha>` |
|
|
104
155
|
|
|
105
156
|
## Common Mistakes
|
|
157
|
+
- **Starting human review before resolving `ChromiumCodeReviewAgent` findings:** Never pass `--send-mail` (`-s`) or `-c` (`--use-commit-queue`) on the initial upload, or add human reviewers to the attention set before AI review finishes. Upload in WIP with `--cq-dry-run`, wait for `ChromiumCodeReviewAgent` to complete, and address all `ERROR` and `WARNING` findings first.
|
|
106
158
|
- **Multiple commits on one branch:** Gerrit expects one commit per CL. Always `commit --amend`.
|
|
107
159
|
- **Using `git checkout -b`:** Does not set up tracking information correctly for `depot_tools`. Use `git new-branch`.
|
|
108
160
|
- **Manual rebasing of stacked branches:** Never use manual `git rebase` loops. Always use `git rebase-update` or `git reparent-branch` to let `depot_tools` handle tracking updates.
|
package/DIR_METADATA
CHANGED
|
@@ -16,6 +16,12 @@ agentic_review: {
|
|
|
16
16
|
".agents/skills/devtools-unicode-escaping/SKILL.md"
|
|
17
17
|
]
|
|
18
18
|
}
|
|
19
|
+
capability_groups: {
|
|
20
|
+
path_expression: ["front_end/.*\\.ts"]
|
|
21
|
+
path_expression_exclusion: [".*\\.test\\.ts"]
|
|
22
|
+
content_patterns: ["UIStrings", "@description", "i18n(String|FormatString|Template)"]
|
|
23
|
+
review_capability_skills: [".agents/skills/devtools-uistrings/SKILL.md"]
|
|
24
|
+
}
|
|
19
25
|
capability_groups: {
|
|
20
26
|
path_expression: [
|
|
21
27
|
"front_end/(core|models|entrypoints|generated)/.*\\.ts",
|
|
@@ -108,7 +108,7 @@ console.log(message2);
|
|
|
108
108
|
4. The following commands would add the new strings to `en-US.json`:
|
|
109
109
|
|
|
110
110
|
- `git cl presubmit --upload`, or
|
|
111
|
-
-
|
|
111
|
+
- `./dt collect-strings` in the DevTools checkout
|
|
112
112
|
|
|
113
113
|
5. Strings containing possible plurals have a special format in ICU. This is
|
|
114
114
|
because plurals work quite differently in other languages, e.g. special
|
|
@@ -33,7 +33,9 @@ handlers spanning several layers and processes, e.g. have instances in
|
|
|
33
33
|
### browser_protocol.pdl
|
|
34
34
|
|
|
35
35
|
The `browser_protocol.pdl` file is the source of truth that is used to generate
|
|
36
|
-
the
|
|
36
|
+
the `.ts`, `.h` and `.cc` files. DevTools generates its TypeScript types from
|
|
37
|
+
it at build time (see `front_end/generated/BUILD.gn`); they end up under
|
|
38
|
+
`out/Default/gen/front_end/generated/`.
|
|
37
39
|
|
|
38
40
|
However, there are multiple `browser_protocol.pdl` files across the codebase.
|
|
39
41
|
The main one is located at (in your chromium repo):
|
package/eslint.config.mjs
CHANGED
|
@@ -28,12 +28,6 @@ export default defineConfig([
|
|
|
28
28
|
|
|
29
29
|
'front_end/diff/diff_match_patch.js',
|
|
30
30
|
'front_end/models/javascript_metadata/NativeFunctions.ts',
|
|
31
|
-
// All of these scripts are auto-generated so don't lint them.
|
|
32
|
-
'front_end/generated/Deprecation.ts',
|
|
33
|
-
'front_end/generated/InspectorBackendCommands.ts',
|
|
34
|
-
'front_end/generated/protocol-mapping.d.ts',
|
|
35
|
-
'front_end/generated/protocol-proxy-api.d.ts',
|
|
36
|
-
'front_end/generated/protocol.ts',
|
|
37
31
|
// Any third_party addition has its source code checked out into
|
|
38
32
|
// third_party/X/package, so we ignore that code as it's not code we author or
|
|
39
33
|
// own.
|
|
@@ -1021,7 +1015,6 @@ export default defineConfig([
|
|
|
1021
1015
|
'front_end/panels/screencast/InputModel.ts',
|
|
1022
1016
|
'front_end/panels/screencast/ScreencastView.ts',
|
|
1023
1017
|
'front_end/panels/security/SecurityModel.ts',
|
|
1024
|
-
'front_end/panels/security/SecurityPanel.ts',
|
|
1025
1018
|
'front_end/panels/sensors/LocationsSettingsTab.ts',
|
|
1026
1019
|
'front_end/panels/sensors/SensorsView.ts',
|
|
1027
1020
|
'front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts',
|
|
@@ -299,7 +299,7 @@
|
|
|
299
299
|
--color-continue-to-location-hover: var(--ref-palette-yellow40);
|
|
300
300
|
--color-continue-to-location-hover-border: var(--ref-palette-yellow50);
|
|
301
301
|
--color-continue-to-location-async: var(--ref-palette-green30);
|
|
302
|
-
--color-continue-to-location-async-hover: var(--ref-palette-
|
|
302
|
+
--color-continue-to-location-async-hover: var(--ref-palette-green40);
|
|
303
303
|
--color-continue-to-location-async-hover-border: var(--ref-palette-green50);
|
|
304
304
|
--color-evaluated-expression: var(--ref-palette-yellow30);
|
|
305
305
|
--color-evaluated-expression-border: var(--ref-palette-yellow40);
|