)]}'
{
  "commit": "51757eaaa9e7c7fd85f26f8b899b5b44e4cdc84f",
  "tree": "6e21acf0d28b51a58eff49a2908961d56a18f20b",
  "parents": [
    "72a6070fd5364d881b6287cbd17967e6a5d1a941"
  ],
  "author": {
    "name": "Jack Franklin",
    "email": "jacktfranklin@chromium.org",
    "time": "Tue May 05 15:33:58 2026"
  },
  "committer": {
    "name": "devtools-frontend-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "email": "devtools-frontend-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Tue May 05 16:11:48 2026"
  },
  "message": "Insights: fix broken re-rendering of Insights\n\nThis CL makes a change to how we render Insights in the sidebar. We\nfound that if you have two traces, and the ordering of the Insights in\nthe sidebar changes, you could end up with a completely broken sidebar.\nIn the logs, this would appear as the code passing the LCP Breakdown\nmodel into the Cache insight, for example.\n\nTracking this down, I think it is down to how Lit deals with trying to\nre-render efficiently. Now we are rendering a series of\ndevtools-widgets, rather than the component itself, it would not always\ndestroy and re-order the list.\n\nLooking at\nhttps://lit.dev/docs/templates/lists/#when-to-use-map-or-repeat, it\nstates:\n\n\u003e If the DOM nodes have state that isn\u0027t controlled by a template\n\u003e expression, use the repeat directive.\n\nThe introduction of the repeat() directive here, even though we have\njust one item in the array, provides a way for us to put an explicit key\nto the node. In this case, the key is the model (each trace has unique\nmodel references) and Lit supports using an object here. Doing this\nmeans we relate the DOM to the exact model that backs it and avoids any\nchance of Lit trying to reuse elements and causing a breakage.\n\nBug: 498621626\nChange-Id: I1f23bba7fd3ad818632c0f6484085ebd318d1659\nReviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7817996\nCommit-Queue: Alina Varkki \u003calinavarkki@chromium.org\u003e\nAuto-Submit: Jack Franklin \u003cjacktfranklin@chromium.org\u003e\nReviewed-by: Alina Varkki \u003calinavarkki@chromium.org\u003e\nCommit-Queue: Jack Franklin \u003cjacktfranklin@chromium.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "bc8ab60cf9deb1f0e66ffed6e2c2885c8c049049",
      "old_mode": 33188,
      "old_path": "front_end/panels/timeline/components/SidebarSingleInsightSet.ts",
      "new_id": "3d5010657ffea18d3e3450a607ea38d22decfce3",
      "new_mode": 33188,
      "new_path": "front_end/panels/timeline/components/SidebarSingleInsightSet.ts"
    }
  ]
}
