chrome-devtools-frontend 1.0.1665921 → 1.0.1666631

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (242) hide show
  1. package/.agents/skills/devtools-testing-guidance/SKILL.md +4 -0
  2. package/.agents/skills/migrate-chromium-test/SKILL.md +63 -48
  3. package/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +14 -5
  4. package/.agents/skills/ui-eng-vision-logic-consolidator/SKILL.md +11 -2
  5. package/.agents/skills/ui-eng-vision-orchestrator/SKILL.md +46 -9
  6. package/.agents/skills/ui-eng-vision-test-scaffolder/SKILL.md +20 -1
  7. package/.agents/skills/ui-eng-vision-widget-promoter/SKILL.md +9 -0
  8. package/front_end/core/host/AidaClient.ts +109 -60
  9. package/front_end/core/host/GcaClient.ts +3 -3
  10. package/front_end/core/host/UserMetrics.ts +1 -12
  11. package/front_end/core/sdk/NetworkRequest.ts +10 -55
  12. package/front_end/entrypoints/main/MainImpl.ts +0 -10
  13. package/front_end/foundation/Universe.ts +16 -0
  14. package/front_end/generated/InspectorBackendCommands.ts +2 -2
  15. package/front_end/generated/protocol.ts +2 -1
  16. package/front_end/models/ai_assistance/agents/AiAgent.ts +22 -13
  17. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +21 -5
  18. package/front_end/models/issues_manager/CookieIssue.ts +6 -127
  19. package/front_end/models/issues_manager/descriptions/CoepCorpNotSameOrigin.md +2 -2
  20. package/front_end/models/issues_manager/descriptions/CoepCorpNotSameOriginAfterDefaultedToSameOriginByCoep.md +3 -3
  21. package/front_end/models/issues_manager/descriptions/CoepCorpNotSameSite.md +2 -2
  22. package/front_end/models/issues_manager/descriptions/CoepFrameResourceNeedsCoepHeader.md +1 -1
  23. package/front_end/models/issues_manager/descriptions/CompatibilityModeQuirks.md +1 -1
  24. package/front_end/models/issues_manager/descriptions/CookieAttributeValueExceedsMaxSize.md +2 -2
  25. package/front_end/models/issues_manager/descriptions/LowTextContrast.md +1 -1
  26. package/front_end/models/issues_manager/descriptions/SameSiteNoneInsecureErrorRead.md +1 -1
  27. package/front_end/models/issues_manager/descriptions/SameSiteNoneInsecureErrorSet.md +1 -1
  28. package/front_end/models/issues_manager/descriptions/SameSiteNoneInsecureWarnRead.md +1 -1
  29. package/front_end/models/issues_manager/descriptions/SameSiteNoneInsecureWarnSet.md +1 -1
  30. package/front_end/models/issues_manager/descriptions/SameSiteUnspecifiedLaxAllowUnsafeRead.md +3 -3
  31. package/front_end/models/issues_manager/descriptions/SameSiteUnspecifiedLaxAllowUnsafeSet.md +3 -3
  32. package/front_end/models/issues_manager/descriptions/bounceTrackingMitigations.md +1 -1
  33. package/front_end/models/issues_manager/descriptions/connectionAllowlistInvalidAllowlistItemType.md +2 -2
  34. package/front_end/models/issues_manager/descriptions/connectionAllowlistInvalidHeader.md +2 -2
  35. package/front_end/models/issues_manager/descriptions/connectionAllowlistInvalidUrlPattern.md +3 -3
  36. package/front_end/models/issues_manager/descriptions/connectionAllowlistItemNotInnerList.md +2 -2
  37. package/front_end/models/issues_manager/descriptions/connectionAllowlistMoreThanOneList.md +2 -2
  38. package/front_end/models/issues_manager/descriptions/connectionAllowlistReportingEndpointNotToken.md +1 -1
  39. package/front_end/models/issues_manager/descriptions/cookieCrossSiteRedirectDowngrade.md +3 -3
  40. package/front_end/models/issues_manager/descriptions/cookieExcludeBlockedWithinRelatedWebsiteSet.md +1 -1
  41. package/front_end/models/issues_manager/descriptions/cookieExcludePortMismatch.md +1 -1
  42. package/front_end/models/issues_manager/descriptions/cookieExcludeSchemeMismatch.md +1 -1
  43. package/front_end/models/issues_manager/descriptions/cookieExcludeThirdPartyPhaseoutSet.md +1 -1
  44. package/front_end/models/issues_manager/descriptions/cookieWarnThirdPartyPhaseoutRead.md +1 -1
  45. package/front_end/models/issues_manager/descriptions/corsAllowCredentialsRequired.md +1 -1
  46. package/front_end/models/issues_manager/descriptions/corsDisabledScheme.md +2 -2
  47. package/front_end/models/issues_manager/descriptions/corsDisallowedByMode.md +2 -2
  48. package/front_end/models/issues_manager/descriptions/corsHeaderDisallowedByPreflightResponse.md +1 -1
  49. package/front_end/models/issues_manager/descriptions/corsInvalidHeaderValues.md +3 -3
  50. package/front_end/models/issues_manager/descriptions/corsLocalNetworkAccessPermissionDenied.md +1 -1
  51. package/front_end/models/issues_manager/descriptions/corsMethodDisallowedByPreflightResponse.md +1 -1
  52. package/front_end/models/issues_manager/descriptions/corsNoCorsRedirectModeNotFollow.md +1 -1
  53. package/front_end/models/issues_manager/descriptions/corsOriginMismatch.md +3 -3
  54. package/front_end/models/issues_manager/descriptions/corsPreflightResponseInvalid.md +2 -2
  55. package/front_end/models/issues_manager/descriptions/corsRedirectContainsCredentials.md +3 -3
  56. package/front_end/models/issues_manager/descriptions/corsWildcardOriginNotAllowed.md +4 -3
  57. package/front_end/models/issues_manager/descriptions/cspEvalViolation.md +4 -4
  58. package/front_end/models/issues_manager/descriptions/cspInlineViolation.md +2 -2
  59. package/front_end/models/issues_manager/descriptions/cspTrustedTypesPolicyViolation.md +2 -2
  60. package/front_end/models/issues_manager/descriptions/cspTrustedTypesSinkViolation.md +4 -4
  61. package/front_end/models/issues_manager/descriptions/cspURLViolation.md +4 -4
  62. package/front_end/models/issues_manager/descriptions/emailVerificationRequestAccountsEmptyList.md +1 -1
  63. package/front_end/models/issues_manager/descriptions/emailVerificationRequestAccountsHttpNotFound.md +1 -1
  64. package/front_end/models/issues_manager/descriptions/emailVerificationRequestAccountsInvalidContentType.md +1 -1
  65. package/front_end/models/issues_manager/descriptions/emailVerificationRequestAccountsInvalidResponse.md +1 -1
  66. package/front_end/models/issues_manager/descriptions/emailVerificationRequestAccountsNoResponse.md +1 -1
  67. package/front_end/models/issues_manager/descriptions/emailVerificationRequestDnsFetchFailed.md +1 -1
  68. package/front_end/models/issues_manager/descriptions/emailVerificationRequestDnsInvalidRecord.md +1 -1
  69. package/front_end/models/issues_manager/descriptions/emailVerificationRequestEmailVerificationWellKnownHttpNotFound.md +1 -1
  70. package/front_end/models/issues_manager/descriptions/emailVerificationRequestEmailVerificationWellKnownInvalidContentType.md +1 -1
  71. package/front_end/models/issues_manager/descriptions/emailVerificationRequestEmailVerificationWellKnownInvalidResponse.md +1 -1
  72. package/front_end/models/issues_manager/descriptions/emailVerificationRequestEmailVerificationWellKnownNoResponse.md +1 -1
  73. package/front_end/models/issues_manager/descriptions/emailVerificationRequestInvalidEmail.md +1 -1
  74. package/front_end/models/issues_manager/descriptions/emailVerificationRequestJwksHttpNotFound.md +1 -1
  75. package/front_end/models/issues_manager/descriptions/emailVerificationRequestJwksInvalidResponse.md +1 -1
  76. package/front_end/models/issues_manager/descriptions/emailVerificationRequestKeyBindingSigningFailed.md +1 -1
  77. package/front_end/models/issues_manager/descriptions/emailVerificationRequestRpOriginIsOpaque.md +1 -1
  78. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenHttpNotFound.md +1 -1
  79. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenInvalidContentType.md +1 -1
  80. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenInvalidResponse.md +1 -1
  81. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenInvalidSdJwt.md +1 -1
  82. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenMalformedSdJwt.md +1 -1
  83. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenNoResponse.md +1 -1
  84. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenVerificationKbInvalidAudience.md +1 -1
  85. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenVerificationKbInvalidIssuedAt.md +1 -1
  86. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenVerificationKbInvalidNonce.md +1 -1
  87. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenVerificationKbInvalidSdHash.md +1 -1
  88. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenVerificationKbInvalidTyp.md +1 -1
  89. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenVerificationKbMissingAud.md +1 -1
  90. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenVerificationKbMissingCnf.md +1 -1
  91. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenVerificationKbMissingIat.md +1 -1
  92. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenVerificationKbMissingNonce.md +1 -1
  93. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenVerificationKbMissingSdHash.md +1 -1
  94. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenVerificationKbSignatureFailed.md +1 -1
  95. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidEmail.md +1 -1
  96. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidEmailVerified.md +1 -1
  97. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidHolderKey.md +1 -1
  98. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidIssuedAt.md +1 -1
  99. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidIssuer.md +1 -1
  100. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenVerificationSdJwtJwksMissingKeys.md +1 -1
  101. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenVerificationSdJwtMissingCnf.md +1 -1
  102. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenVerificationSdJwtMissingEmail.md +1 -1
  103. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenVerificationSdJwtMissingIat.md +1 -1
  104. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenVerificationSdJwtMissingIss.md +1 -1
  105. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenVerificationSdJwtSignatureFailed.md +1 -1
  106. package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenVerificationSdJwtUnsupportedHeaderAlg.md +1 -1
  107. package/front_end/models/issues_manager/descriptions/emailVerificationRequestUserLoggedOut.md +1 -1
  108. package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownAccountsEndpointCrossOrigin.md +1 -1
  109. package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownHttpNotFound.md +1 -1
  110. package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownInvalidContentType.md +1 -1
  111. package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownInvalidResponse.md +1 -1
  112. package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownIssuanceEndpointCrossOrigin.md +1 -1
  113. package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownListEmpty.md +1 -1
  114. package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownMissingAccountsEndpoint.md +1 -1
  115. package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownMissingIssuanceEndpoint.md +1 -1
  116. package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownNoResponse.md +1 -1
  117. package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownUnsupportedSigningAlgorithm.md +1 -1
  118. package/front_end/models/issues_manager/descriptions/federatedAuthRequestAccountsHttpNotFound.md +1 -1
  119. package/front_end/models/issues_manager/descriptions/federatedAuthRequestAccountsInvalidResponse.md +1 -1
  120. package/front_end/models/issues_manager/descriptions/federatedAuthRequestAccountsNoResponse.md +1 -1
  121. package/front_end/models/issues_manager/descriptions/federatedAuthRequestApprovalDeclined.md +1 -1
  122. package/front_end/models/issues_manager/descriptions/federatedAuthRequestCanceled.md +1 -1
  123. package/front_end/models/issues_manager/descriptions/federatedAuthRequestErrorFetchingSignin.md +1 -1
  124. package/front_end/models/issues_manager/descriptions/federatedAuthRequestErrorIdToken.md +1 -1
  125. package/front_end/models/issues_manager/descriptions/federatedAuthRequestIdTokenHttpNotFound.md +1 -1
  126. package/front_end/models/issues_manager/descriptions/federatedAuthRequestIdTokenInvalidRequest.md +1 -1
  127. package/front_end/models/issues_manager/descriptions/federatedAuthRequestIdTokenInvalidResponse.md +1 -1
  128. package/front_end/models/issues_manager/descriptions/federatedAuthRequestIdTokenNoResponse.md +1 -1
  129. package/front_end/models/issues_manager/descriptions/federatedAuthRequestInvalidSigninResponse.md +1 -1
  130. package/front_end/models/issues_manager/descriptions/federatedAuthRequestManifestHttpNotFound.md +1 -1
  131. package/front_end/models/issues_manager/descriptions/federatedAuthRequestManifestInvalidResponse.md +1 -1
  132. package/front_end/models/issues_manager/descriptions/federatedAuthRequestManifestNoResponse.md +1 -1
  133. package/front_end/models/issues_manager/descriptions/federatedAuthRequestTooManyRequests.md +1 -1
  134. package/front_end/models/issues_manager/descriptions/federatedAuthUserInfoRequestInvalidAccountsResponse.md +1 -1
  135. package/front_end/models/issues_manager/descriptions/federatedAuthUserInfoRequestInvalidConfigOrWellKnown.md +1 -1
  136. package/front_end/models/issues_manager/descriptions/federatedAuthUserInfoRequestNoAccountSharingPermission.md +1 -1
  137. package/front_end/models/issues_manager/descriptions/federatedAuthUserInfoRequestNoApiPermission.md +1 -1
  138. package/front_end/models/issues_manager/descriptions/federatedAuthUserInfoRequestNoReturningUserFromFetchedAccounts.md +1 -1
  139. package/front_end/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotIframe.md +1 -1
  140. package/front_end/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotPotentiallyTrustworthy.md +1 -1
  141. package/front_end/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotSameOrigin.md +1 -1
  142. package/front_end/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotSignedInWithIdp.md +1 -1
  143. package/front_end/models/issues_manager/descriptions/fetchingPartitionedBlobURL.md +2 -2
  144. package/front_end/models/issues_manager/descriptions/genericFormAriaLabelledByToNonExistingIdError.md +2 -2
  145. package/front_end/models/issues_manager/descriptions/genericFormAutocompleteAttributeEmptyError.md +1 -1
  146. package/front_end/models/issues_manager/descriptions/genericFormDuplicateIdForInputError.md +1 -1
  147. package/front_end/models/issues_manager/descriptions/genericFormEmptyIdAndNameAttributesForInputError.md +2 -2
  148. package/front_end/models/issues_manager/descriptions/genericFormInputAssignedAutocompleteValueToIdOrNameAttributeError.md +2 -2
  149. package/front_end/models/issues_manager/descriptions/genericFormInputHasWrongButWellIntendedAutocompleteValueError.md +1 -1
  150. package/front_end/models/issues_manager/descriptions/genericFormInputWithNoLabelError.md +1 -1
  151. package/front_end/models/issues_manager/descriptions/genericFormLabelForMatchesNonExistingIdError.md +2 -2
  152. package/front_end/models/issues_manager/descriptions/genericFormLabelForNameError.md +1 -1
  153. package/front_end/models/issues_manager/descriptions/genericFormLabelHasNeitherForNorNestedInputError.md +1 -1
  154. package/front_end/models/issues_manager/descriptions/genericFormModelContextMissingToolName.md +1 -1
  155. package/front_end/models/issues_manager/descriptions/genericFormModelContextParameterMissingName.md +1 -1
  156. package/front_end/models/issues_manager/descriptions/genericFormModelContextRequiredParameterMissingName.md +1 -1
  157. package/front_end/models/issues_manager/descriptions/genericNavigationEntryMarkedSkippable.md +2 -2
  158. package/front_end/models/issues_manager/descriptions/heavyAd.md +1 -1
  159. package/front_end/models/issues_manager/descriptions/lazyLoadImageZeroSize.md +1 -1
  160. package/front_end/models/issues_manager/descriptions/navigatingPartitionedBlobURL.md +3 -3
  161. package/front_end/models/issues_manager/descriptions/permissionElementActivationDisabled.md +1 -1
  162. package/front_end/models/issues_manager/descriptions/permissionElementActivationDisabledWithOccluder.md +1 -1
  163. package/front_end/models/issues_manager/descriptions/permissionElementActivationDisabledWithOccluderParent.md +1 -1
  164. package/front_end/models/issues_manager/descriptions/permissionElementFencedFrameDisallowed.md +2 -2
  165. package/front_end/models/issues_manager/descriptions/permissionElementFontSizeTooLarge.md +2 -2
  166. package/front_end/models/issues_manager/descriptions/permissionElementFontSizeTooSmall.md +2 -2
  167. package/front_end/models/issues_manager/descriptions/permissionElementInsetBoxShadowUnsupported.md +1 -1
  168. package/front_end/models/issues_manager/descriptions/permissionElementInvalidDisplayStyle.md +2 -2
  169. package/front_end/models/issues_manager/descriptions/permissionElementInvalidSizeValue.md +2 -2
  170. package/front_end/models/issues_manager/descriptions/permissionElementInvalidType.md +2 -2
  171. package/front_end/models/issues_manager/descriptions/permissionElementInvalidTypeActivation.md +2 -2
  172. package/front_end/models/issues_manager/descriptions/permissionElementNonOpaqueColor.md +1 -1
  173. package/front_end/models/issues_manager/descriptions/permissionElementPaddingBottomUnsupported.md +2 -2
  174. package/front_end/models/issues_manager/descriptions/permissionElementPaddingRightUnsupported.md +2 -2
  175. package/front_end/models/issues_manager/descriptions/permissionElementRequestInProgress.md +2 -2
  176. package/front_end/models/issues_manager/descriptions/permissionElementSecurityChecksFailed.md +1 -1
  177. package/front_end/models/issues_manager/descriptions/permissionElementTypeNotSupported.md +2 -2
  178. package/front_end/models/issues_manager/descriptions/permissionElementUntrustedEvent.md +1 -1
  179. package/front_end/models/issues_manager/descriptions/placeholderDescriptionForInvisibleIssues.md +1 -1
  180. package/front_end/models/issues_manager/descriptions/selectElementAccessibilityDisallowedOptGroupChild.md +1 -1
  181. package/front_end/models/issues_manager/descriptions/selectElementAccessibilityDisallowedSelectChild.md +1 -1
  182. package/front_end/models/issues_manager/descriptions/selectElementAccessibilityInteractiveContentAttributesSelectDescendant.md +1 -1
  183. package/front_end/models/issues_manager/descriptions/selectElementAccessibilityInteractiveContentLegendChild.md +1 -1
  184. package/front_end/models/issues_manager/descriptions/selectElementAccessibilityInteractiveContentOptionChild.md +1 -1
  185. package/front_end/models/issues_manager/descriptions/selectElementAccessibilityNonPhrasingContentOptionChild.md +1 -1
  186. package/front_end/models/issues_manager/descriptions/selectivePermissionsIntervention.md +3 -3
  187. package/front_end/models/issues_manager/descriptions/sharedArrayBuffer.md +1 -1
  188. package/front_end/models/issues_manager/descriptions/sharedDictionaryUseErrorCrossOriginNoCorsRequest.md +1 -1
  189. package/front_end/models/issues_manager/descriptions/sharedDictionaryUseErrorMatchingDictionaryNotUsed.md +1 -1
  190. package/front_end/models/issues_manager/descriptions/sharedDictionaryUseErrorUnexpectedContentDictionaryHeader.md +1 -1
  191. package/front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorCossOriginNoCorsRequest.md +1 -1
  192. package/front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorDisallowedBySettings.md +1 -1
  193. package/front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorExpiredResponse.md +1 -1
  194. package/front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorFeatureDisabled.md +2 -2
  195. package/front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorInvalidStructuredHeader.md +1 -1
  196. package/front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorNavigationRequest.md +2 -2
  197. package/front_end/models/issues_manager/descriptions/sriInvalidSignatureHeader.md +4 -4
  198. package/front_end/models/issues_manager/descriptions/sriInvalidSignatureInputHeader.md +4 -4
  199. package/front_end/models/issues_manager/descriptions/sriMissingSignatureHeader.md +1 -1
  200. package/front_end/models/issues_manager/descriptions/sriMissingSignatureInputHeader.md +2 -2
  201. package/front_end/models/issues_manager/descriptions/sriSignatureHeaderValueIsIncorrectLength.md +2 -2
  202. package/front_end/models/issues_manager/descriptions/sriSignatureHeaderValueIsNotByteSequence.md +4 -4
  203. package/front_end/models/issues_manager/descriptions/sriSignatureHeaderValueIsParameterized.md +4 -4
  204. package/front_end/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidComponentName.md +1 -1
  205. package/front_end/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidComponentType.md +2 -2
  206. package/front_end/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidDerivedComponentParameter.md +1 -1
  207. package/front_end/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidHeaderComponentParameter.md +1 -1
  208. package/front_end/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidParameter.md +2 -2
  209. package/front_end/models/issues_manager/descriptions/sriSignatureInputHeaderKeyIdLength.md +5 -5
  210. package/front_end/models/issues_manager/descriptions/sriSignatureInputHeaderMissingLabel.md +3 -3
  211. package/front_end/models/issues_manager/descriptions/sriSignatureInputHeaderMissingRequiredParameters.md +2 -2
  212. package/front_end/models/issues_manager/descriptions/sriSignatureInputHeaderValueMissingComponents.md +2 -2
  213. package/front_end/models/issues_manager/descriptions/sriSignatureInputHeaderValueNotInnerList.md +2 -2
  214. package/front_end/models/issues_manager/descriptions/sriValidationFailedIntegrityMismatch.md +4 -4
  215. package/front_end/models/issues_manager/descriptions/sriValidationFailedInvalidLength.md +3 -3
  216. package/front_end/models/issues_manager/descriptions/sriValidationFailedSignatureExpired.md +2 -2
  217. package/front_end/models/issues_manager/descriptions/sriValidationFailedSignatureMismatch.md +2 -2
  218. package/front_end/models/issues_manager/descriptions/stylesheetLateImport.md +1 -1
  219. package/front_end/models/issues_manager/descriptions/summaryElementAccessibilityInteractiveContentSummaryDescendant.md +1 -1
  220. package/front_end/models/issues_manager/descriptions/unencodedDigestIncorrectDigestLength.md +2 -2
  221. package/front_end/models/issues_manager/descriptions/unencodedDigestIncorrectDigestType.md +3 -3
  222. package/front_end/models/issues_manager/descriptions/unencodedDigestMalformedDictionary.md +2 -2
  223. package/front_end/models/issues_manager/descriptions/unencodedDigestUnknownAlgorithm.md +1 -1
  224. package/front_end/panels/application/DOMStorageItemsView.ts +1 -2
  225. package/front_end/panels/application/KeyValueStorageItemsView.ts +12 -0
  226. package/front_end/panels/elements/StylePropertiesSection.ts +25 -9
  227. package/front_end/panels/elements/StylesSidebarPane.ts +48 -0
  228. package/front_end/panels/emulation/DeviceModeToolbar.ts +0 -1
  229. package/front_end/panels/emulation/DeviceModeView.ts +289 -164
  230. package/front_end/panels/emulation/MediaQueryInspector.ts +10 -6
  231. package/front_end/panels/emulation/deviceModeView.css +1 -0
  232. package/front_end/panels/lighthouse/LighthouseController.ts +1 -6
  233. package/front_end/panels/sources/breakpointEditDialog.css +2 -2
  234. package/front_end/third_party/chromium/README.chromium +1 -1
  235. package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +1 -2
  236. package/package.json +1 -2
  237. package/front_end/models/issues_manager/descriptions/SameSiteExcludeContextDowngradeRead.md +0 -8
  238. package/front_end/models/issues_manager/descriptions/SameSiteExcludeContextDowngradeSet.md +0 -8
  239. package/front_end/models/issues_manager/descriptions/SameSiteExcludeNavigationContextDowngrade.md +0 -8
  240. package/front_end/models/issues_manager/descriptions/SameSiteWarnCrossDowngradeRead.md +0 -8
  241. package/front_end/models/issues_manager/descriptions/SameSiteWarnCrossDowngradeSet.md +0 -8
  242. package/front_end/models/issues_manager/descriptions/SameSiteWarnStrictLaxDowngradeStrict.md +0 -8
@@ -22,6 +22,7 @@ Use unit tests for isolated testing of individual functions, classes, models, he
22
22
  - Use `TestUniverse` (and foundation test helpers) for easy, isolated setup of required dependencies and models.
23
23
  - For testing UI widgets, use stubbed view functions and screenshot assertions rather than spinning up heavy DOM/browser infrastructure.
24
24
  - **Location:** Co-located next to their implementation files (e.g. `TimelinePanel.ts` and `TimelinePanel.test.ts`).
25
+ - **BUILD.gn**: test file should be added to `devtools_ui_module("unittests")` or `devtools_foundation_module("foundation_unittests")` target in the corresponding `BUILD.gn` file.
25
26
 
26
27
  ---
27
28
 
@@ -33,8 +34,10 @@ Use API tests for integration tests that verify business logic requiring more co
33
34
  - Evaluating JavaScript expressions in the target page (e.g. via `Runtime.evaluate`).
34
35
  - Complex source map setups and symbolization.
35
36
  - Multi-context or target setups (workers, iframes, OOPIFs).
37
+ - Tests that require extensive CDP mock setup.
36
38
  - Verifying the "foundational layer" of DevTools models against a real browser/web page.
37
39
  - **Location:** Defined in `front_end/` with `.test.api.ts` extension (e.g. `Universe.test.api.ts`).
40
+ - **BUILD.gn**: test file should be added to `devtools_api_test_module("api_tests")` target in the corresponding `BUILD.gn` file.
38
41
 
39
42
  ---
40
43
 
@@ -46,3 +49,4 @@ Use E2E tests to verify real end-to-end user stories and user journeys.
46
49
  - Verifying full user journeys across DevTools panels and drawers.
47
50
  - Complex UI behaviors that require extensive user interaction setup and benefit from a complete DevTools frontend page connected to an inspected target page over CDP.
48
51
  - **Location:** Defined in `test/e2e/` (e.g. `test/e2e/console/console-log.test.ts`).
52
+ - **BUILD.gn**: test file should be added to `ts_e2e_library(ts_e2e_library)` target in the corresponding `BUILD.gn` file. And `node_ts_library` in `test/e2e/BUILD.gn` for its dependencies.
@@ -1,59 +1,59 @@
1
1
  ---
2
2
  name: migrate-chromium-test
3
- description: Use when migrating Chromium layout tests to DevTools unit tests
3
+ description: Use when migrating Chromium layout tests to DevTools unit tests or API tests.
4
4
  ---
5
5
 
6
6
  ## Workflow
7
7
 
8
- 1. **Identify the Test to Move**:
8
+ ### 1. Identify the Test to Move
9
9
 
10
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
11
  - Refer to these local copies as you write the new modern test.
12
12
 
13
- 2. **Identify the Target Location**:
13
+ ### 2. Determine Target Location & Test Suite Type
14
14
 
15
- - Find the file being tested in `front_end/`.
16
- - Place the new test file next to the file being tested, following the naming convention `[FileName].test.ts`.
17
- - Example: If testing `ui/legacy/components/data_grid/DataGrid.ts`, the test should be `ui/legacy/components/data_grid/DataGrid.test.ts`.
15
+ Investigate what files are being tested, start location should be `front_end/`.Consult the `devtools-testing-guidance` skill to select the appropriate test suite.
18
16
 
19
- 3. **Convert the Test Content**:
17
+ ### 3. Convert the Test Content
20
18
 
21
- - Rewrite the test from the legacy `TestRunner` style to the modern Mocha/Chai style used in DevTools.
22
- - Use `describeWithEnvironment` or `describe` as appropriate.
23
- - Replace `TestRunner.addResult` and expectation comparisons with standard assertions (`assert.strictEqual`, `assert.isTrue`, etc.).
24
- - If the test requires rendering, use `renderElementIntoDOM` to attach elements to a test container.
25
- - If testing legacy components that require internal tokens or have private methods, try to use public APIs or events instead. If impossible, consider using structural typing workarounds or updating the component to be more testable.
26
- - If tests require a repetitive setup extract it into a test helper function at the top of the file.
27
- - Code comments must be full sentences ending with a period, except when the entire comment is a URL.
28
- - Do not include comments of the form `// Replaces web test: http/tests/devtools/persistence/automapping-absolute-paths.js`. Since we plan to remove migrated web tests, these are not useful references.
29
- - **Important** If the test imports only `TestRunner` and no other TestRunner helper or DevTools code. The test should be move to the inspector-protocol test, and the issue should be closed as "Won't Fix (Infeasible)" and add the issue to the hotlist with ID 8691563.
19
+ - **Testing Style:** Rewrite legacy `TestRunner` calls into modern Mocha (`describe`, `it`) and Chai assertions (`assert.strictEqual`, `assert.isTrue`, `assert.deepEqual`, `assert.isNotNull`, `assert.instanceOf`).
20
+ - **Import Conventions:** Strictly follow the `devtools-imports` skill:
21
+ - Import cross-module code via module entrypoints (e.g., `import * as Module from '../module/module.js'`).
22
+ - Always use `import * as` for cross-module imports.
23
+ - TypeScript imports in DevTools **must** use `.js` file extensions (e.g., `./data_grid.js`).
24
+ - **Environment & Setup Selection:**
25
+ - **Foundation / Non-UI Tests:** Follow the `foundation-test-migration` skill. Use `TestUniverse` and setup hooks (`setupLocaleHooks()`, `setupSettingsHooks()`, `setupRuntimeHooks()`) instead of DOM-heavy singletons or `describeWithEnvironment`. Use `universe.createTarget()` and `MockCDPConnection` for CDP mocking.
26
+ - **UI & Widget Tests:** Follow the `devtools-ui-widgets` skill. Use `renderElementIntoDOM` from `front_end/testing/DOMHelpers.js` for mounting elements, or `createViewFunctionStub` and `view.nextInput` from `front_end/testing/ViewFunctionHelpers.js` for testing MVP widgets.
27
+ - **Code Comments:**
28
+ - Must be full sentences ending with a period (except when the entire comment is a URL).
29
+ - Do **not** include comments like `// Replaces web test: http/tests/devtools/...`. Since migrated web tests are deleted, these references become stale.
30
+ - **Accessing Private Members & Events:** Avoid calling private methods or accessing internal tokens. Test public APIs or trigger behavior by dispatching standard DOM/SDK events instead.
30
31
 
31
- 4. **Update BUILD.gn**:
32
+ ### 4. Update BUILD.gn Configuration
32
33
 
33
- - Add the new test file to the `sources` list of the `devtools_ui_module("unittests")` or `devtools_foundation_module("foundation_unittests")` target in the corresponding `BUILD.gn` file.
34
+ Every newly created test file must be added to the appropriate target in its folder's `BUILD.gn`:
34
35
 
35
- 5. **Verify the Changes**:
36
+ > [!IMPORTANT]
37
+ > If you omit the test file from `BUILD.gn`, the test target will not be compiled by Ninja and will be skipped by test runners.
36
38
 
37
- - Use the `verification` skill to correctly build the project and run the new test.
38
- - Ensure the test passes.
39
+ ### 5. Verify the Changes
39
40
 
40
- 6. **Evaluate Test Completeness and Utility**:
41
+ Use the `devtools-verification` skill to build and verify your changes.
41
42
 
42
- - 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.
43
- - 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".
44
- - 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. **CRITICAL** upload a comment to the issue with your investigation and the reason why you won't submit a CL and close the issue as "Won't Fix (Infeasible)" and add the issue to the hotlist with ID 8687901.
43
+ ### 6. Evaluate Test Completeness and Utility
45
44
 
46
- 7. **Upload the CL:**
45
+ - 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.
46
+ - If the newly added test does not test any logic from the component but only tests getters from mocked data, explain to the user that this test does not add value and it is better to close it without adding the test. Provide a command without executing it to close the issue as "Fixed".
47
47
 
48
- ## Commit message & CL upload requirements
48
+ ### 7. Upload the CL
49
49
 
50
- When committing and uploading CLs, **STRICTLY** follow this format and constraints:
51
-
52
- 1. **Title line**: `[test-migration] Migrate <short test name> test to unit test`
53
- 2. **Body**: `This CL migrates the legacy layout test <long test name> to a unit test in <new test name>. <optional additional explanation>`
54
- 2. **Body appendix**: `https://crsrc.org/c/third_party/blink/web_tests/<long test name>;drc=4d51e9cab50efd0f8029c45a486e199a1d519fd1`
55
- 3. **Bug line**: `Fixed: <issue number>`
56
- 4. **Formatting constraints**: Wrap all lines to a maximum of 72 characters per line.
50
+ Follow the `version-control` skill when uploading CLs.
51
+ Follow the following format and constraints:
52
+ - **Title line:** `[test-migration] Migrate <short test name> test to unit test`
53
+ - **Body:** `This CL migrates the legacy layout test <long test name> to a unit test in <new test name>. <optional additional explanation>`
54
+ - **Body appendix:** `https://crsrc.org/c/third_party/blink/web_tests/<long test name>;drc=4d51e9cab50efd0f8029c45a486e199a1d519fd1`
55
+ - **Bug line:** `Fixed: <issue number>`
56
+ - **Line Length Constraint:** Wrap all lines in the commit message to a maximum of 72 characters per line.
57
57
 
58
58
  Example commit message:
59
59
 
@@ -71,11 +71,14 @@ https://crsrc.org/c/third_party/blink/web_tests/http/tests/devtools/console/cons
71
71
  Fixed: <issue number>
72
72
  ```
73
73
 
74
- Use the `version-control` skill to upload the CL.
75
74
 
76
- ## Example Conversion
75
+ ---
76
+
77
+ ## Conversion Examples
78
+
79
+ ### Example 1: UI Unit Test (`DataGrid.test.ts`)
77
80
 
78
- ### Legacy Test (`datagrid-editable-longtext.js`)
81
+ #### Legacy Test (`datagrid-editable-longtext.js`)
79
82
 
80
83
  ```javascript
81
84
  import {TestRunner} from 'test_runner';
@@ -90,31 +93,43 @@ import * as DataGrid from 'devtools/ui/legacy/components/data_grid/data_grid.js'
90
93
  })();
91
94
  ```
92
95
 
93
- ### Converted Test (`DataGrid.test.ts`)
96
+ #### Converted UI Test (`DataGrid.test.ts`)
94
97
 
95
98
  ```typescript
96
- import * as DataGrid from './data_grid.js';
97
99
  import {renderElementIntoDOM} from '../../../../testing/DOMHelpers.js';
98
100
  import {describeWithEnvironment} from '../../../../testing/EnvironmentHelpers.js';
101
+ import * as DataGrid from './data_grid.js';
99
102
 
100
103
  describeWithEnvironment('DataGrid', () => {
101
104
  it('tests long text in datagrid', () => {
102
105
  // ... setup grid ...
103
- // Use assertions instead of printing results.
106
+ const grid = new DataGrid.DataGrid.DataGridImpl({...});
107
+ renderElementIntoDOM(grid.element);
108
+
109
+ // Use Chai assertions instead of printing results.
104
110
  assert.strictEqual(keyElement.textContent.length, 1500);
105
111
  });
106
112
  });
107
113
  ```
108
114
 
115
+ ---
116
+
109
117
  ## Tips & Troubleshooting
110
118
 
111
- - **TypeScript Type Mismatches**: Legacy tests often use plain strings for properties that now require specific branded types like `LocalizedString`. You can often bypass this in tests by casting the object array `as DataGrid.DataGrid.ColumnDescriptor[]` or similar, or by using `i18n.i18n.lockedString` if appropriate.
112
- - **Accessing Private Methods**: Legacy tests frequently called private methods (e.g., `dataGrid.update()`). In TypeScript unit tests, you should avoid this. Look for public alternatives (e.g., `updateInstantly()`) or trigger the behavior by dispatching standard DOM events (e.g., `element.dispatchEvent(new Event('scroll'))` instead of calling `onScroll()`).
113
- - **Recursive Expansion Limits**: Methods like `TreeElement.expandRecursively()` have a default depth limit (e.g., 3) to prevent infinite loops. If your test requires expanding deeper trees, remember to pass a higher max depth argument: `expandRecursively(10)`.
114
- - **Mocking Objects**: When testing UI components that display objects (like `RemoteObject`), look for existing mock helpers in related test files (e.g., `createDeepRemoteObjectMock` in `ObjectPropertiesSection.test.ts`) instead of trying to create real SDK objects or complex mocks from scratch. Other helpers live inside `front_end/testing`.
115
- - **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.
116
- - **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.
119
+ - **TypeScript Type Mismatches:** Legacy tests often use plain strings for properties that now require branded types like `LocalizedString`. You can bypass this in tests by casting (`as DataGrid.DataGrid.ColumnDescriptor[]`) or by using `i18n.i18n.lockedString` where appropriate.
120
+ - **Accessing Private Methods:** Legacy tests frequently called private methods (e.g., `dataGrid.update()`). Look for public alternatives (e.g., `updateInstantly()`) or trigger the behavior by dispatching standard DOM/SDK events (e.g., `element.dispatchEvent(new Event('scroll'))`).
121
+ - **Domain Test Helpers in `front_end/testing/`:** Check existing helper utilities before writing custom boilerplate:
122
+ - `DOMHelpers.ts`: `renderElementIntoDOM`, `dispatchAndAwait`.
123
+ - `ViewFunctionHelpers.ts`: `createViewFunctionStub`, `view.nextInput` (for MVP widget tests).
124
+ - `MockCDPConnection.ts`: Scoped protocol mocking.
125
+ - `SourceMapHelpers.ts`, `TraceHelpers.ts`, `ConsoleHelpers.ts`, `SettingsHelpers.ts` etc.
126
+ - **Async Rendering:** If component values fail to update immediately during tests, wait for the next rendering frame using `raf()` from `front_end/testing/DOMHelpers.js`.
127
+ - **Recursive Expansion Limits:** Methods like `TreeElement.expandRecursively()` have default depth limits (e.g. 3). Pass a higher max depth argument if your test requires deeper tree expansion: `expandRecursively(10)`.
128
+ - **Mocking Complex Objects:** Look for existing mock helpers in related test files (e.g., `createDeepRemoteObjectMock` in `ObjectPropertiesSection.test.ts`) instead of instantiating real objects from scratch.
129
+ - **Ignoring Infrastructure Log Warnings:** In some local environments, test runs may print leak messages (e.g., `WebFrame LEAKED`) or `Corp Airlock` warnings. Always inspect the summary line at the end of the test log for `TOTAL: X SUCCESS` to confirm if test logic passed.
130
+
131
+ ---
117
132
 
118
- ## After finishing the migration
133
+ ## After Finishing the Migration
119
134
 
120
- 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.
135
+ If you encountered any novel issues, workarounds, or helpful tips during the migration that are not already documented, please inform the user so the skill documentation can be further updated.
@@ -43,15 +43,14 @@ existing element containers.
43
43
  ```
44
44
 
45
45
  4. **Modern Component Mapping**:
46
-
47
- * Refer to [ui_engineering.md](../../../docs/ui_engineering.md) for
48
- specific migration examples.
46
+ * **MANDATORY**: You **MUST** read and load [ui_engineering.md](../../../docs/ui_engineering.md) first to understand specific component mappings (e.g., Toolbar vs `devtools-toolbar`). Do not assume standard Lit defaults.
49
47
  * If unsure, also consult the [automatic migration code](../../../scripts/eslint_rules/lib/no-imperative-dom-api.ts)
50
48
  * **Prefer Component Built-Ins Over Legacy Boilerplate**: Before porting
51
49
  legacy event handlers, comparators, or state variables, check if the
52
50
  modern component handles them natively. Drop host-level workarounds in
53
51
  favor of declarative component attributes.
54
52
 
53
+
55
54
  5. **Local Modular Renders**:
56
55
 
57
56
  * If the class contains multiple separate legacy container fields (e.g.,
@@ -124,5 +123,15 @@ existing element containers.
124
123
 
125
124
  13. **Wait for confirmation**:
126
125
 
127
- * Wait for an explicit confirmation from the user before proceeding to the
128
- next step.
126
+ * Wait for an explicit confirmation from the user (or Parent Orchestrator Agent) before proceeding to the next step.
127
+
128
+ --------------------------------------------------------------------------------
129
+
130
+ ## 🔍 Mental Audit (Internal Self-Correction)
131
+
132
+ *Before reporting back or committing, re-read the instructions and verify:*
133
+ 1. ❓ **Tag Parity**: Did I accidentally change any `span` to `div` (or vice versa)?
134
+ 2. ❓ **Attribute Drop**: Did I drop any `aria-*`, `role`, or custom data attributes?
135
+ 3. ❓ **Clang-Off Boundary**: Is the template wrapped in `// clang-format off`?
136
+ 4. ❓ **Build**: Does the code compile and do visual tests pass with 0% diff?
137
+
@@ -78,5 +78,14 @@ consolidating them into private helper methods with explicit data contracts.
78
78
 
79
79
  6. **Wait for confirmation**:
80
80
 
81
- * Wait for an explicit confirmation from the user before proceeding to the
82
- next step.
81
+ * Wait for an explicit confirmation from the user (or Parent Orchestrator Agent) before proceeding to the next step.
82
+
83
+ --------------------------------------------------------------------------------
84
+
85
+ ## 🔍 Mental Audit (Internal Self-Correction)
86
+
87
+ *Before reporting back or committing, re-read the instructions and verify:*
88
+ 1. ❓ **Minimal Diffs**: Did I move code blocks around unnecessarily?
89
+ 2. ❓ **State Completeness**: Are all imperative DOM updates now backed by state variables?
90
+ 3. ❓ **Build**: Does the code still compile?
91
+
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: ui-eng-vision-orchestrator
3
3
  description: High-level orchestrator for managing multi-pass migration of Chrome DevTools legacy components to the modern UI engineering vision (UI.Widget & Lit-html).
4
- allowed-tools: code_search open_urls search_changelists data_analysis import_skill close_skill
4
+ allowed-tools: code_search open_urls search_changelists data_analysis import_skill close_skill invoke_subagent send_message
5
5
  ---
6
6
 
7
7
  # UI Engineering Vision Orchestrator: Meta-Skill Instructions
@@ -14,6 +14,16 @@ small, testable, and highly reviewable.
14
14
  Refer to [ui_engineering.md](../../../docs/ui_engineering.md) for general
15
15
  principles.
16
16
 
17
+ --------------------------------------------------------------------------------
18
+
19
+ ## 🛑 Critical Constraints & Forbidden Actions
20
+
21
+ 1. **NEVER Break the Build**: Code must compile and tests must pass at all steps. If you change a class API or method signature, you **MUST** update its usage in the same CL to maintain stability.
22
+ 2. **Strict Intermediate Stability**: Do not leave the code in a broken state between passes.
23
+ 3. **No Beautification of Adjacent Code**: Do NOT fix unrelated typos, formatting issues, or lint warnings in code you aren't actively migrating.
24
+ 4. **No Monolithic Refactors**: Do NOT batch Lit conversion and Widget Promotion in the same pass. Keep CLs small and focused.
25
+
26
+
17
27
  --------------------------------------------------------------------------------
18
28
 
19
29
  ## 1. Migration Philosophy & Plan-Validate-Execute Pattern
@@ -48,8 +58,8 @@ principles.
48
58
  converting imperative DOM to Lit-html) with base class refactoring in the
49
59
  same diff.
50
60
  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.
61
+ and all tests must pass after each step. You **MUST** update usages if you
62
+ change APIs.
53
63
  9. **Establish Comprehensive Guardrails First**: Ensure both **logic tests**
54
64
  (verifying presenter interactions and state updates) and **screenshot
55
65
  tests** (verifying layout/styling) exist before rewriting code. If coverage
@@ -62,6 +72,11 @@ principles.
62
72
  roughly 300 lines of code. If a step is predicted to be too complex, break
63
73
  it down into smaller substeps. The agent must stop and report back after
64
74
  each step or substep to allow verification.
75
+ 12. **Context Hygiene via Subagents**: To keep the main conversation context
76
+ clean and focused on high-level orchestration, prefer delegating intense
77
+ execution tasks (like running tests, debugging compilations, or processing
78
+ independent classes in parallel) to specialized subagents.
79
+
65
80
 
66
81
  --------------------------------------------------------------------------------
67
82
 
@@ -96,16 +111,38 @@ principles.
96
111
  DOM construction. Converting the layout to declarative Lit templates
97
112
  first (using temporary inline or local state) makes it much easier
98
113
  to isolate and group the remaining state updates afterward.
99
- 5. Generate a `migration_plan.md` reflecting this ordering and outlining
100
- the target steps.
114
+ 5. Generate a `migration_plan.md` using the **Structured Plan Template** below.
101
115
  6. Halt execution and print the formatted plan in Markdown to the chat.
102
116
  Wait for user approval.
103
117
 
118
+ ### 📝 Structured Plan Template
119
+ The plan you generate **MUST** follow this structure:
120
+
121
+ ```markdown
122
+ # Migration Plan: [FileName.ts]
123
+
124
+ ## 📊 Current State
125
+ - **Hybrid File**: [Yes/No]
126
+ - **Classes Found**: [ClassA, ClassB]
127
+ - **Strategy Selection**: [Option A (Logic First) | Option B (Tech First)]
128
+
129
+ ## 🛠️ Passes Checklist
130
+ - [ ] **Pass 0: Baseline & Safety Scaffolding**
131
+ - Assigned to: `ui-eng-vision-test-scaffolder`
132
+ - [ ] **Pass 1: Logic Consolidation**
133
+ - Assigned to: `ui-eng-vision-logic-consolidator`
134
+ - [ ] **Pass 2: Lit-HTML Rendering**
135
+ - Assigned to: `ui-eng-vision-local-lit-renderer`
136
+ - [ ] **Pass 3: Widget Promotion**
137
+ - Assigned to: `ui-eng-vision-widget-promoter`
138
+ ```
139
+
140
+
104
141
  ### Baseline & Safety Scaffolding
105
142
 
106
143
  * **Trigger Condition**: User explicitly says "I accept the plan" or
107
144
  equivalent.
108
- * **Subskill to Import**: `ui-eng-vision-test-scaffolder`
145
+ * **Subskill to Import/Delegate**: `ui-eng-vision-test-scaffolder` (Delegate to a subagent to encapsulate verbose test logs)
109
146
  * **Actions**:
110
147
  1. Verify existing test coverage. Propose and add missing **logic tests**
111
148
  for interactions and **screenshot tests** for visual validation to avoid
@@ -116,7 +153,7 @@ principles.
116
153
 
117
154
  * **Trigger Condition**: Baseline tests green (or respective previous pass
118
155
  staged).
119
- * **Subskill to Import**: `ui-eng-vision-logic-consolidator`
156
+ * **Subskill to Import/Delegate**: `ui-eng-vision-logic-consolidator` (Delegate to a subagent to maintain focus)
120
157
  * **Actions**:
121
158
  1. Extract manual elements, constructor DOM configurations, and imperative
122
159
  updates into private update helper methods with structured
@@ -125,7 +162,7 @@ principles.
125
162
  ### Local Lit-HTML Rendering (Technology Migration)
126
163
 
127
164
  * **Trigger Condition**: Previous pass staged.
128
- * **Subskill to Import**: `ui-eng-vision-local-lit-renderer`
165
+ * **Subskill to Import/Delegate**: `ui-eng-vision-local-lit-renderer` (Delegate to a subagent for isolated template generation)
129
166
  * **Actions**:
130
167
  1. Migrate imperative elements to declarative templates (using component
131
168
  mapping rules defined inside the subskill) and render them locally
@@ -135,7 +172,7 @@ principles.
135
172
 
136
173
  * **Trigger Condition**: Both local template rendering and logic consolidation
137
174
  staged.
138
- * **Subskill to Import**: `ui-eng-vision-widget-promoter`
175
+ * **Subskill to Import/Delegate**: `ui-eng-vision-widget-promoter` (Delegate to a subagent for final architectural cleanup)
139
176
  * **Actions**:
140
177
  1. Promote view classes to modern `UI.Widget` classes, hook up
141
178
  `performUpdate()` delegates, export the default view layout, and clean
@@ -57,7 +57,7 @@ logical regressions are introduced during modernization.
57
57
 
58
58
  4. **Wait for confirmation**:
59
59
 
60
- * Wait for an explicit confirmation from the user before proceeding to the next step.
60
+ * Wait for an explicit confirmation from the user (or Parent Orchestrator Agent) before proceeding to the next step.
61
61
 
62
62
  --------------------------------------------------------------------------------
63
63
 
@@ -123,3 +123,22 @@ Always detect the execution environment first to run tests successfully:
123
123
  ```bash
124
124
  npm run build
125
125
  ```
126
+
127
+ ### Scenario D: Screenshot Test Fails (Visual Diffs > 0%)
128
+
129
+ * **Symptom**: The test runs but fails with a percentage difference in visual regression.
130
+ * **Resolution Steps**:
131
+ 1. Do **NOT** ask the user to accept the new screenshot yet.
132
+ 2. Inspect the failure log to see if it is a **layout shift** or a **missing style**.
133
+ 3. If it's a layout shift, check if you replaced a block element with an inline element (e.g. `div` -> `span`).
134
+ 4. If styles are missing, verify if the test wrapper needs `{includeCommonStyles: true}`.
135
+
136
+ --------------------------------------------------------------------------------
137
+
138
+ ## 🔍 Mental Audit (Internal Self-Correction)
139
+
140
+ *Before reporting back or committing, re-read the instructions and verify:*
141
+ 1. ❓ **Coverage**: Did I cover all classes in the file, or only the main one?
142
+ 2. ❓ **Stability**: Can the tests run repeatedly without flakiness?
143
+ 3. ❓ **Integrations**: Did I verify that the component mounts correctly?
144
+
@@ -76,3 +76,12 @@ clean `UI.Widget` classes that use native update rendering delegates.
76
76
  * **Minimal Code Movement**: When migrating, try to move code around as little as possible, in particular around the lit rendering helpers. This minimizes the git diff and improves reviewability.
77
77
 
78
78
  --------------------------------------------------------------------------------
79
+
80
+ ## 🔍 Mental Audit (Internal Self-Correction)
81
+
82
+ *Before reporting back or committing, re-read the instructions and verify:*
83
+ 1. ❓ **Decoupling**: Did I remove all direct `.element` or `.contentElement` couplings from instantiator files?
84
+ 2. ❓ **Inheritance**: Does the class now cleanly inherit from `UI.Widget` or its variants?
85
+ 3. ❓ **Injectability**: Is the view injectable in the constructor?
86
+ 4. ❓ **Build**: Does the code compile and do tests pass?
87
+
@@ -61,10 +61,33 @@ const AidaLanguageToMarkdown: Record<AidaInferenceLanguage, string> = {
61
61
  [AidaInferenceLanguage.UNKNOWN]: 'unknown',
62
62
  };
63
63
 
64
- export class AidaAbortError extends Error {}
65
- export class AidaBlockError extends Error {}
66
- export class AidaQuotaError extends Error {}
67
- export class AidaPayloadTooLargeError extends Error {}
64
+ export abstract class AidaClientError extends Error {
65
+ override name = 'AidaClientError';
66
+ }
67
+ export class AidaUnknownError extends AidaClientError {
68
+ override name = 'AidaUnknownError';
69
+ }
70
+ export class AidaAbortError extends AidaClientError {
71
+ override name = 'AidaAbortError';
72
+ }
73
+ export class AidaBlockError extends AidaClientError {
74
+ override name = 'AidaBlockError';
75
+ }
76
+ export class AidaQuotaError extends AidaClientError {
77
+ override name = 'AidaQuotaError';
78
+ }
79
+ export class AidaPayloadTooLargeError extends AidaClientError {
80
+ override name = 'AidaPayloadTooLargeError';
81
+ }
82
+ export class AidaPermissionDeniedError extends AidaClientError {
83
+ override name = 'AidaPermissionDeniedError';
84
+ }
85
+ export class AidaTimeoutError extends AidaClientError {
86
+ override name = 'AidaTimeoutError';
87
+ }
88
+ export class AidaInvalidJsonResponseError extends AidaClientError {
89
+ override name = 'AidaInvalidJsonResponseError';
90
+ }
68
91
 
69
92
  interface AiStream {
70
93
  write: (data: string) => Promise<void>;
@@ -185,40 +208,7 @@ export class AidaClient {
185
208
  },
186
209
  err => {
187
210
  debugLog('doConversation failed with error:', JSON.stringify(err));
188
- if (err instanceof DispatchHttpRequestClient.DispatchHttpRequestError && err.response) {
189
- const result = err.response;
190
- if (result.statusCode === 429) {
191
- stream.fail(new AidaQuotaError('Server responded: quota exceeded'));
192
- return;
193
- }
194
- if (result.statusCode === 403) {
195
- stream.fail(new Error('Server responded: permission denied'));
196
- return;
197
- }
198
- if ('error' in result && result.error) {
199
- if (isQuotaError(result.error, result.detail)) {
200
- stream.fail(new AidaQuotaError(
201
- `Cannot send request: ${result.error}${result.detail ? ` ${result.detail}` : ''}`));
202
- return;
203
- }
204
- if (isPayloadTooLargeError(result.error, result.detail)) {
205
- stream.fail(new AidaPayloadTooLargeError(
206
- `Cannot send request: ${result.error}${result.detail ? ` ${result.detail}` : ''}`));
207
- return;
208
- }
209
- stream.fail(new Error(`Cannot send request: ${result.error}${result.detail ? ` ${result.detail}` : ''}`));
210
- return;
211
- }
212
- if ('netErrorName' in result && result.netErrorName === 'net::ERR_TIMED_OUT') {
213
- stream.fail(new Error('doAidaConversation timed out'));
214
- return;
215
- }
216
- if (result.statusCode !== 200) {
217
- stream.fail(new Error(`Request failed: ${JSON.stringify(result)}`));
218
- return;
219
- }
220
- }
221
- stream.fail(err);
211
+ stream.fail(mapError(err));
222
212
  });
223
213
  await (yield* this.#handleResponseStream(stream));
224
214
  }
@@ -265,13 +255,7 @@ export class AidaClient {
265
255
  thoughtSignature: result.functionCallChunk.functionCall.thoughtSignature,
266
256
  });
267
257
  } else if ('error' in result) {
268
- if (isQuotaError(result.error)) {
269
- throw new AidaQuotaError(`Server responded: ${JSON.stringify(result)}`);
270
- }
271
- if (isPayloadTooLargeError(result.error)) {
272
- throw new AidaPayloadTooLargeError(`Server responded: ${JSON.stringify(result)}`);
273
- }
274
- throw new Error(`Server responded: ${JSON.stringify(result)}`);
258
+ throw mapError(result.error);
275
259
  } else {
276
260
  throw new Error(`Unknown chunk result ${JSON.stringify(result)}`);
277
261
  }
@@ -364,14 +348,18 @@ export class AidaClient {
364
348
  }
365
349
 
366
350
  if (this.#gcaClient.enabled()) {
367
- return await this.#gcaClient.completeCode(request);
351
+ try {
352
+ return await this.#gcaClient.completeCode(request);
353
+ } catch (err) {
354
+ throw mapError(err);
355
+ }
368
356
  }
369
357
  const {promise, resolve} = Promise.withResolvers<AidaCodeCompleteResult>();
370
358
  InspectorFrontendHostInstance.aidaCodeComplete(JSON.stringify(request), resolve);
371
359
  const completeCodeResult = await promise;
372
360
 
373
361
  if (completeCodeResult.error) {
374
- throw new Error(`Cannot send request: ${completeCodeResult.error} ${completeCodeResult.detail || ''}`);
362
+ throw mapError(completeCodeResult.error, completeCodeResult.detail);
375
363
  }
376
364
  const response = completeCodeResult.response;
377
365
  if (!response?.length) {
@@ -420,18 +408,25 @@ export class AidaClient {
420
408
 
421
409
  if (this.#gcaClient.enabled()) {
422
410
  // Inline and remove the else clause after migration
423
- return await this.#gcaClient.generateCode(request, options);
424
- }
425
- const response = await DispatchHttpRequestClient.makeHttpRequest<GenerateCodeResponse>(
426
- {
427
- service: SERVICE_NAME,
428
- path: '/v1/aida:generateCode',
429
- method: 'POST',
430
- body: JSON.stringify(request),
431
- },
432
- options);
411
+ try {
412
+ return await this.#gcaClient.generateCode(request, options);
413
+ } catch (err) {
414
+ throw mapError(err);
415
+ }
416
+ }
417
+ try {
418
+ const response = await DispatchHttpRequestClient.makeHttpRequest<GenerateCodeResponse>({
419
+ service: SERVICE_NAME,
420
+ path: '/v1/aida:generateCode',
421
+ method: 'POST',
422
+ body: JSON.stringify(request),
423
+ },
424
+ options);
433
425
 
434
- return response;
426
+ return response;
427
+ } catch (err) {
428
+ throw mapError(err);
429
+ }
435
430
  }
436
431
  }
437
432
 
@@ -527,10 +522,64 @@ export interface EventTypes {
527
522
  [Events.AIDA_AVAILABILITY_CHANGED]: void;
528
523
  }
529
524
 
530
- function isQuotaError(...inputs: Array<string|undefined>): boolean {
525
+ export function isQuotaError(...inputs: Array<string|undefined>): boolean {
531
526
  return inputs.some(input => input?.toLowerCase().includes('quota'));
532
527
  }
533
528
 
534
- function isPayloadTooLargeError(...inputs: Array<string|undefined>): boolean {
529
+ export function isPayloadTooLargeError(...inputs: Array<string|undefined>): boolean {
535
530
  return inputs.some(input => input?.toLowerCase().includes('payload size exceeds the limit'));
536
531
  }
532
+
533
+ /**
534
+ * Maps AIDA-specific errors, DispatchHttpRequestErrors, strings, and generic
535
+ * Errors to dedicated AidaClientError subclasses.
536
+ */
537
+ export function mapError(err: unknown, detail?: string): AidaClientError {
538
+ if (err instanceof AidaClientError) {
539
+ return err;
540
+ }
541
+
542
+ if (err instanceof DispatchHttpRequestClient.DispatchHttpRequestError) {
543
+ if (err.type === DispatchHttpRequestClient.ErrorType.ABORT) {
544
+ return new AidaAbortError();
545
+ }
546
+ const response = err.response;
547
+ if (response) {
548
+ if (response.statusCode === 429) {
549
+ return new AidaQuotaError('Server responded: quota exceeded');
550
+ }
551
+ if (response.statusCode === 403) {
552
+ return new AidaPermissionDeniedError('Server responded: permission denied');
553
+ }
554
+ if ('netErrorName' in response && response.netErrorName === 'net::ERR_TIMED_OUT') {
555
+ return new AidaTimeoutError('AIDA request timed out');
556
+ }
557
+ if ('error' in response && response.error) {
558
+ return mapError(response.error, response.detail);
559
+ }
560
+ // The dispatcher throws HTTP_RESPONSE_UNAVAILABLE with status code 200
561
+ // when it successfully receives the HTTP response but fails to parse its JSON body.
562
+ if (response.statusCode === 200 && err.type === DispatchHttpRequestClient.ErrorType.HTTP_RESPONSE_UNAVAILABLE) {
563
+ return new AidaInvalidJsonResponseError('Server responded with invalid JSON', {cause: err});
564
+ }
565
+ if (response.statusCode !== 200) {
566
+ return new AidaUnknownError(`Request failed: ${JSON.stringify(response)}`);
567
+ }
568
+ }
569
+ }
570
+
571
+ if (typeof err === 'string') {
572
+ if (isQuotaError(err, detail)) {
573
+ return new AidaQuotaError(`Cannot send request: ${err}${detail ? ` ${detail}` : ''}`);
574
+ }
575
+ if (isPayloadTooLargeError(err, detail)) {
576
+ return new AidaPayloadTooLargeError(`Cannot send request: ${err}${detail ? ` ${detail}` : ''}`);
577
+ }
578
+ return new AidaUnknownError(`Cannot send request: ${err}${detail ? ` ${detail}` : ''}`);
579
+ }
580
+
581
+ if (err instanceof Error) {
582
+ return new AidaUnknownError(err.message, {cause: err});
583
+ }
584
+ return new AidaUnknownError(String(err));
585
+ }