)]}'
{
  "commit": "59c14b661c6cf20f60200b5ff5c9cd474d654210",
  "tree": "da6b2223f610bc193ae515c86b7c26facdbd193e",
  "parents": [
    "83c28004460586b54281185896995da882e3f338"
  ],
  "author": {
    "name": "Bruno Corona",
    "email": "brunocorona.alcantar@gmail.com",
    "time": "Tue Jul 28 19:09:55 2026 -0600"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Jul 29 01:09:55 2026 +0000"
  },
  "message": "Fix TreeSliver first node clipping during expand/collapse animation (#188626)\n\n## Description\n\nWhile a `TreeSliver` node expands/collapses, its children should be\nclipped beneath the node (at the node\u0027s trailing edge). This worked for\nevery node except the first: node index 0 clipped at its *leading* edge,\nso its children painted over the node during the animation.\n\nThe cause was a special case in `RenderTreeSliver.paint` that conflated\n\"no parent\" with \"parent is index 0\":\n\n```dart\n(parentIndex \u003d\u003d 0 ? 0.0 : itemExtentBuilder(parentIndex, layoutDimensions)!)\n```\n\nThis branch only runs for the clipped segments after the first (the\nfirst segment is painted unclipped beforehand), so `parentIndex` is\nalways a real animating parent whose extent must be added — including\nindex 0. The fix always adds the parent\u0027s extent.\n\n## Demo\n\nVideo showing the bug and the fix:\n\n\nhttps://github.com/user-attachments/assets/db19c35c-c249-4a92-afde-5fb1e6f9f2fb\n\n## Related Issues\n\nFixes https://github.com/flutter/flutter/issues/188305\n\n## Tests\n\nI added the following tests:\n\nRegression tests in `sliver_tree_test.dart` that pump the toggle\nanimation to its midpoint and assert the clip-rect top edge:\n- First node (index 0) clips at its trailing edge (`rowExtent`), not\n`0.0`.\n- Non-first node (index 1) clips at its trailing edge (`rowExtent * 2`),\nconfirming no regression for other nodes.\n\n\n\n## Pre-launch Checklist\n\n- [x] I read the [Contributor Guide] and followed the process outlined\nthere for submitting PRs.\n- [x] I read the [AI contribution guidelines] and understand my\nresponsibilities, or I am not using AI tools.\n- [x] I read the [Tree Hygiene] wiki page, which explains my\nresponsibilities.\n- [x] I read and followed the [Flutter Style Guide], including [Features\nwe expect every widget to implement].\n- [x] I signed the [CLA].\n- [x] I listed at least one issue that this PR fixes in the description\nabove.\n- [x] I updated/added relevant documentation (doc comments with `///`).\n- [x] I added new tests to check the change I am making, or this PR is\n[test-exempt].\n- [x] I followed the [breaking change policy] and added [Data Driven\nFixes] where supported.\n- [x] All existing and new tests are passing.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5edb2a4b07aef986ab67394a601a411d140bbc30",
      "old_mode": 33188,
      "old_path": "packages/flutter/lib/src/rendering/sliver_tree.dart",
      "new_id": "d51c68dd8851ddc9f04dc9a94f204e90f295e57f",
      "new_mode": 33188,
      "new_path": "packages/flutter/lib/src/rendering/sliver_tree.dart"
    },
    {
      "type": "modify",
      "old_id": "7b97a4d9eee6fde75cff6284029b7eb74c38160a",
      "old_mode": 33188,
      "old_path": "packages/flutter/test/widgets/sliver_tree_test.dart",
      "new_id": "a48a373e5707fddba74d88695151df8dfe63afe9",
      "new_mode": 33188,
      "new_path": "packages/flutter/test/widgets/sliver_tree_test.dart"
    }
  ]
}
