)]}'
{
  "commit": "682a17bba63977d0b1f181d3a76adf7073810f1b",
  "tree": "5e9f998fdd746d1476b08327c4d27dfc4b85268b",
  "parents": [
    "b2990669a9c005d79e6b722df0b595e4d68678bc"
  ],
  "author": {
    "name": "Micah Bales",
    "email": "micahbales@google.com",
    "time": "Thu Aug 06 15:07:28 2026 -0700"
  },
  "committer": {
    "name": "Micah Bales",
    "email": "micahbales@google.com",
    "time": "Thu Aug 06 15:07:28 2026 -0700"
  },
  "message": "polygerrit-ui: improve flow email validation UX and contextual error handling\n\nThis change resolves b/537010867 by introducing client-side email account validation during flow creation, suppressing disruptive global error dialogs, and providing inline feedback.\n\nProduct \u0026 Technical Decisions:\n\n1. Debouncing Keystroke Lookups:\n   - Debounced stage parsing (\u0027parseStagesFromRawFlow\u0027) by 300ms during raw flow editing to avoid hammering the backend \u0027getAccountDetails\u0027 REST API on every keystroke.\n\n2. Contextual In-Modal Error Banners:\n   - Suppressed PolyGerrit\u0027s global 404 error toasts/dialogs during account lookups by passing a no-op error handler (\u0027errFn\u0027).\n   - Replaced global error popups with a contextual \u0027.error-banner\u0027 inside the modal itself, keeping the error state local to the authoring UI.\n\n3. Live Preview Error Display:\n   - Updated \u0027\u003cgr-flow-rule\u003e\u0027 parameter rendering to detect non-existent or invalid user IDs / email addresses and render an error state directly on the parameter chip in the live preview using \u0027EMAIL_PATTERN\u0027.\n\n4. Synchronous Flush on Submission:\n   - On clicking \"Create Flow\", any pending debounced parsing task is flushed synchronously (\u0027parseStagesDebounced.flush()\u0027), guaranteeing that inputs are validated immediately prior to dispatching the request.\n\nScreenshots:\n\nError preview chip: https://screenshot-v2.corp.google.com/1vefvmslk6og0\nFailure banner on attempted \u0027create flow\u0027: https://screenshot-v2.corp.google.com/174o5jb3kaepo\nSuccess on valid userId: https://screenshot-v2.corp.google.com/74uk8q4itf86o\n\nRelease-Notes: Added client-side email validation and in-modal error handling when creating change flows in PolyGerrit UI.\nTAG\u003dagy\nGoogle-Bug-Id: b/537010867\nBUG\u003d537010867\nCONV\u003d92d49428-aab5-4177-b1d2-6dc20cfe445a\nChange-Id: I55af56aaf9e5365564259757c6068c8d4b975bd2",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f9e699933dbbb8dd49e6981ff17d3f55735b27ab",
      "old_mode": 33188,
      "old_path": "polygerrit-ui/app/elements/change/gr-flows/gr-create-flow.ts",
      "new_id": "b400a9a108fe755938fb44a518a94da1e1bb9df3",
      "new_mode": 33188,
      "new_path": "polygerrit-ui/app/elements/change/gr-flows/gr-create-flow.ts"
    },
    {
      "type": "modify",
      "old_id": "e2f58c98e35335b04ef124ee810268395a9904be",
      "old_mode": 33188,
      "old_path": "polygerrit-ui/app/elements/change/gr-flows/gr-create-flow_screenshot_test.ts",
      "new_id": "5c53f596468e11a91a12b8259bbb007f3cb633f4",
      "new_mode": 33188,
      "new_path": "polygerrit-ui/app/elements/change/gr-flows/gr-create-flow_screenshot_test.ts"
    },
    {
      "type": "modify",
      "old_id": "ba96d2e611b3a43bb9d814036a366344e9f5ba1c",
      "old_mode": 33188,
      "old_path": "polygerrit-ui/app/elements/change/gr-flows/gr-create-flow_test.ts",
      "new_id": "02c88e1209663d6342c902417a8a5cf4a1027adf",
      "new_mode": 33188,
      "new_path": "polygerrit-ui/app/elements/change/gr-flows/gr-create-flow_test.ts"
    },
    {
      "type": "modify",
      "old_id": "34433f5f90a1fb4748a900a79efe36e49a39db04",
      "old_mode": 33188,
      "old_path": "polygerrit-ui/app/elements/change/gr-flows/gr-flow-rule.ts",
      "new_id": "3b788466a4418739f791f66486740ffe938aec3b",
      "new_mode": 33188,
      "new_path": "polygerrit-ui/app/elements/change/gr-flows/gr-flow-rule.ts"
    },
    {
      "type": "modify",
      "old_id": "83d0c74db2f3700fbfe637e011fd20c2b60d7472",
      "old_mode": 33188,
      "old_path": "polygerrit-ui/app/models/flows/flows-model.ts",
      "new_id": "f2e7802c1407ef9d41be2776b135a1947628bb3e",
      "new_mode": 33188,
      "new_path": "polygerrit-ui/app/models/flows/flows-model.ts"
    },
    {
      "type": "modify",
      "old_id": "cb069ee4d179923de413c31d6bd39576860ce22a",
      "old_mode": 33188,
      "old_path": "polygerrit-ui/app/utils/flows-util.ts",
      "new_id": "cc62adedf05bdf9965055af665a5d4219a4a31d3",
      "new_mode": 33188,
      "new_path": "polygerrit-ui/app/utils/flows-util.ts"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "0984e2ae1be798b4e149da5a22f266c11a85c4c1",
      "new_mode": 33188,
      "new_path": "polygerrit-ui/screenshots/Chromium/baseline/gr-create-flow-dialog-error-dark.png"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "fb70aae885c3ab56f631f91e3c172d60167ae8ad",
      "new_mode": 33188,
      "new_path": "polygerrit-ui/screenshots/Chromium/baseline/gr-create-flow-dialog-error.png"
    }
  ]
}
