Skip to content

[inflight/candidate] [Android] Backport grid spacing regression fix for #38925 - #39335

Merged
kubaflo merged 1 commit into
inflight/candidatefrom
kubaflo-sr12-grid-regression
Oct 12, 2026
Merged

kubaflo merged 1 commit into
inflight/candidatefrom
kubaflo-sr12-grid-regression

Conversation

@kubaflo

@kubaflo kubaflo commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description of Change

Regression-only backport to inflight/candidate, explicitly requested for servicing. This is not a backport of the entire mixed source PR. Candidate baseline: 3d96e23006ea80f58ff2946017eb4593f63a46c6.

#38925 reports the Android CollectionView / GridItemsLayout regression from 10.0.90 to 10.0.100, introduced by #35782. SpacingItemDecoration.GetItemOffsets calls the uncached GetSpanGroupIndex(itemCount - 1) for every child, scanning the adapter through JNI on repeated layout/scroll passes. Large sources stall ItemsSource/layout and can ANR during flings.

Bring over only SpacingItemDecoration.cs from #38969 (production file is identical to the rebased source): return immediately for zero spacing; identify the first/last span rows by inspecting only the items that can share those rows, using assigned child span indices with the original lookup fallback. Keep existing adapter-position/count bounds, linear-layout behavior, outer-edge spacing, and full-span header/footer handling. Candidate's other Android fixes remain untouched.

Source provenance:

Deliberately excluded: #38926's longstanding ObservableGroupedSource.GetGroupAndIndex optimization and its focused device test; the source page/test's far-group ScrollTo actions and timing expectations; general optimization PR #39063. These are not part of the #38925 servicing regression. No version pins, dependencies, CI configuration, or generated manifests/localization files changed.

Adapt the directly relevant Issue38925 HostApp and Android-only CollectionView shard-6 test to load 50 groups × 200 items, check that the first item is rendered, and assert the app-reported ItemsSource/dispatcher elapsed time is below 15,000 ms. The in-app time assertion avoids accepting a slow load merely because Appium's tap returns after the stall. No ScrollTo requirement is retained.

Validation (compilation and non-UI checks only): used the installed SDK explicitly, without changing global.json. Restores were performed only after missing assets/build-task dependency failures. Preliminary missing-assets and missing-task failures were resolved; an initial target-framework mismatch was corrected to Candidate's net10.0-android36.0 graph.

Exact command Result
dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll restore src/Controls/src/Core/Controls.Core.csproj -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -v:q Passed
dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll build src/Controls/src/Core/Controls.Core.csproj -f net10.0-android36.0 --no-restore -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -v:q Passed; 0 errors, 3 existing Gradle Java-8 source/target deprecation warnings
dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll build Microsoft.Maui.BuildTasks.slnf -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -v:q Passed; 0 warnings/errors
dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll restore src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -v:q Passed
dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll build src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj -f net10.0-android --no-restore -t:Compile -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -v:q Passed; 0 warnings/errors; Compile target only, no app launch
dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll restore src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -v:q Passed
dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll build src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj --no-restore -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -v:q Passed after correcting a nullable timing-text diagnostic; final build 0 warnings/errors; test assembly compilation only
dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll format whitespace . --folder --include src/Controls/src/Core/Handlers/Items/Android/SpacingItemDecoration.cs src/Controls/tests/TestCases.HostApp/Issues/Issue38925.cs src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue38925.cs --verify-no-changes --verbosity quiet Passed; only touched files formatted
git diff --check and git diff --cached --check Passed
git diff --quiet ad38e20f14fa841bd82b3b569256e84c45e48d4f -- src/Controls/src/Core/Handlers/Items/Android/SpacingItemDecoration.cs Passed; exact production-source identity

Additionally, an uncommitted dependency-free managed harness compiled the exact production source against minimal Android/RecyclerView stubs. 809,530 offset comparisons passed, covering empty/single/mixed/full-span rows, both orientations, assigned/fallback span indices, linear layouts, invalid positions, zero-spacing early return, and bounded lookups for a 10,050-position grouped grid. The same harness with unmodified Candidate source failed the bounded-lookup assertion as expected. This checks managed offset logic and lookup counts, not native Android/JNI performance or rendering.

Not run: the added UI test, existing Issue35700/Issue38321 runtime coverage, native device tests, fling/ANR measurements, or screenshot comparison. No XCTest, Appium execution, simulator/emulator, GUI, or browser automation was used, per the user's active-work restriction. No native runtime proof is claimed; Android CI/artifact validation is still required.

Issues Fixed

Fixes #38925

Targeting inflight/candidate by explicit servicing-backport request, not main. #38926 is intentionally not claimed as fixed.

Backport only the SpacingItemDecoration fix from #38969. Keep Issue38925 coverage focused on loading a large grouped ItemsSource; exclude the longstanding #38926 grouped-source and ScrollTo optimizations.

Source original: c6b0c73

Source rebased: ad38e20

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool October 12, 2026 12:26 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool October 12, 2026 12:27 — with GitHub Actions Inactive
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

@kubaflo
kubaflo temporarily deployed to copilot-pat-pool October 12, 2026 12:27 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool October 12, 2026 12:29 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool October 12, 2026 12:31 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool October 12, 2026 12:31 — with GitHub Actions Inactive
@kubaflo
kubaflo merged commit f324ac4 into inflight/candidate Oct 12, 2026
39 of 43 checks passed
@kubaflo
kubaflo deleted the kubaflo-sr12-grid-regression branch October 12, 2026 14:37
@github-actions github-actions Bot added this to the .NET 10 SR12 milestone Oct 12, 2026
kubaflo added a commit that referenced this pull request Oct 13, 2026
#38925 (#39335)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->

### Description of Change

<!-- Enter description of the fix in this section -->

**Regression-only backport to `inflight/candidate`, explicitly requested
for servicing. This is not a backport of the entire mixed source PR.**
Candidate baseline: `3d96e23006ea80f58ff2946017eb4593f63a46c6`.

#38925 reports the Android `CollectionView` / `GridItemsLayout`
regression from **10.0.90 to 10.0.100**, introduced by #35782.
`SpacingItemDecoration.GetItemOffsets` calls the uncached
`GetSpanGroupIndex(itemCount - 1)` for every child, scanning the adapter
through JNI on repeated layout/scroll passes. Large sources stall
ItemsSource/layout and can ANR during flings.

Bring over only `SpacingItemDecoration.cs` from #38969 (production file
is identical to the rebased source): return immediately for zero
spacing; identify the first/last span rows by inspecting only the items
that can share those rows, using assigned child span indices with the
original lookup fallback. Keep existing adapter-position/count bounds,
linear-layout behavior, outer-edge spacing, and full-span header/footer
handling. Candidate's other Android fixes remain untouched.

Source provenance:
- Original GitHub merge SHA:
[`c6b0c73ccbc7eebd5c9a683e5b803d786cf37cf7`](c6b0c73).
- Current rebased equivalent:
[`ad38e20f14fa841bd82b3b569256e84c45e48d4f`](ad38e20).

**Deliberately excluded:** #38926's longstanding
`ObservableGroupedSource.GetGroupAndIndex` optimization and its focused
device test; the source page/test's far-group `ScrollTo` actions and
timing expectations; general optimization PR #39063. These are not part
of the #38925 servicing regression. No version pins, dependencies, CI
configuration, or generated manifests/localization files changed.

Adapt the directly relevant Issue38925 HostApp and Android-only
CollectionView shard-6 test to load **50 groups × 200 items**, check
that the first item is rendered, and assert the app-reported
ItemsSource/dispatcher elapsed time is **below 15,000 ms**. The in-app
time assertion avoids accepting a slow load merely because Appium's tap
returns after the stall. No ScrollTo requirement is retained.

**Validation (compilation and non-UI checks only):** used the installed
SDK explicitly, without changing `global.json`. Restores were performed
only after missing assets/build-task dependency failures. Preliminary
missing-assets and missing-task failures were resolved; an initial
target-framework mismatch was corrected to Candidate's
`net10.0-android36.0` graph.

| Exact command | Result |
| --- | --- |
| `dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll restore
src/Controls/src/Core/Controls.Core.csproj
-p:IncludeIosTargetFrameworks=false
-p:IncludeMacCatalystTargetFrameworks=false -v:q` | Passed |
| `dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll build
src/Controls/src/Core/Controls.Core.csproj -f net10.0-android36.0
--no-restore -p:IncludeIosTargetFrameworks=false
-p:IncludeMacCatalystTargetFrameworks=false -v:q` | Passed; 0 errors, 3
existing Gradle Java-8 source/target deprecation warnings |
| `dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll build
Microsoft.Maui.BuildTasks.slnf -p:IncludeIosTargetFrameworks=false
-p:IncludeMacCatalystTargetFrameworks=false -v:q` | Passed; 0
warnings/errors |
| `dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll restore
src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj
-p:IncludeIosTargetFrameworks=false
-p:IncludeMacCatalystTargetFrameworks=false -v:q` | Passed |
| `dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll build
src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj
-f net10.0-android --no-restore -t:Compile
-p:IncludeIosTargetFrameworks=false
-p:IncludeMacCatalystTargetFrameworks=false -v:q` | Passed; 0
warnings/errors; Compile target only, no app launch |
| `dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll restore
src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj
-p:IncludeIosTargetFrameworks=false
-p:IncludeMacCatalystTargetFrameworks=false -v:q` | Passed |
| `dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll build
src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj
--no-restore -p:IncludeIosTargetFrameworks=false
-p:IncludeMacCatalystTargetFrameworks=false -v:q` | Passed after
correcting a nullable timing-text diagnostic; final build 0
warnings/errors; test assembly compilation only |
| `dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll format
whitespace . --folder --include
src/Controls/src/Core/Handlers/Items/Android/SpacingItemDecoration.cs
src/Controls/tests/TestCases.HostApp/Issues/Issue38925.cs
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue38925.cs
--verify-no-changes --verbosity quiet` | Passed; only touched files
formatted |
| `git diff --check` and `git diff --cached --check` | Passed |
| `git diff --quiet ad38e20 --
src/Controls/src/Core/Handlers/Items/Android/SpacingItemDecoration.cs` |
Passed; exact production-source identity |

Additionally, an uncommitted dependency-free managed harness compiled
the **exact production source** against minimal Android/RecyclerView
stubs. **809,530 offset comparisons passed**, covering
empty/single/mixed/full-span rows, both orientations, assigned/fallback
span indices, linear layouts, invalid positions, zero-spacing early
return, and bounded lookups for a 10,050-position grouped grid. The same
harness with unmodified Candidate source failed the bounded-lookup
assertion as expected. This checks managed offset logic and lookup
counts, **not native Android/JNI performance or rendering**.

**Not run:** the added UI test, existing Issue35700/Issue38321 runtime
coverage, native device tests, fling/ANR measurements, or screenshot
comparison. No XCTest, Appium execution, simulator/emulator, GUI, or
browser automation was used, per the user's active-work restriction. No
native runtime proof is claimed; Android CI/artifact validation is still
required.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #38925

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

Targeting `inflight/candidate` by explicit servicing-backport request,
not `main`. #38926 is intentionally not claimed as fixed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Oct 14, 2026
#38925 (#39335)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->

### Description of Change

<!-- Enter description of the fix in this section -->

**Regression-only backport to `inflight/candidate`, explicitly requested
for servicing. This is not a backport of the entire mixed source PR.**
Candidate baseline: `3d96e23006ea80f58ff2946017eb4593f63a46c6`.

#38925 reports the Android `CollectionView` / `GridItemsLayout`
regression from **10.0.90 to 10.0.100**, introduced by #35782.
`SpacingItemDecoration.GetItemOffsets` calls the uncached
`GetSpanGroupIndex(itemCount - 1)` for every child, scanning the adapter
through JNI on repeated layout/scroll passes. Large sources stall
ItemsSource/layout and can ANR during flings.

Bring over only `SpacingItemDecoration.cs` from #38969 (production file
is identical to the rebased source): return immediately for zero
spacing; identify the first/last span rows by inspecting only the items
that can share those rows, using assigned child span indices with the
original lookup fallback. Keep existing adapter-position/count bounds,
linear-layout behavior, outer-edge spacing, and full-span header/footer
handling. Candidate's other Android fixes remain untouched.

Source provenance:
- Original GitHub merge SHA:
[`c6b0c73ccbc7eebd5c9a683e5b803d786cf37cf7`](c6b0c73).
- Current rebased equivalent:
[`ad38e20f14fa841bd82b3b569256e84c45e48d4f`](ad38e20).

**Deliberately excluded:** #38926's longstanding
`ObservableGroupedSource.GetGroupAndIndex` optimization and its focused
device test; the source page/test's far-group `ScrollTo` actions and
timing expectations; general optimization PR #39063. These are not part
of the #38925 servicing regression. No version pins, dependencies, CI
configuration, or generated manifests/localization files changed.

Adapt the directly relevant Issue38925 HostApp and Android-only
CollectionView shard-6 test to load **50 groups × 200 items**, check
that the first item is rendered, and assert the app-reported
ItemsSource/dispatcher elapsed time is **below 15,000 ms**. The in-app
time assertion avoids accepting a slow load merely because Appium's tap
returns after the stall. No ScrollTo requirement is retained.

**Validation (compilation and non-UI checks only):** used the installed
SDK explicitly, without changing `global.json`. Restores were performed
only after missing assets/build-task dependency failures. Preliminary
missing-assets and missing-task failures were resolved; an initial
target-framework mismatch was corrected to Candidate's
`net10.0-android36.0` graph.

| Exact command | Result |
| --- | --- |
| `dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll restore
src/Controls/src/Core/Controls.Core.csproj
-p:IncludeIosTargetFrameworks=false
-p:IncludeMacCatalystTargetFrameworks=false -v:q` | Passed |
| `dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll build
src/Controls/src/Core/Controls.Core.csproj -f net10.0-android36.0
--no-restore -p:IncludeIosTargetFrameworks=false
-p:IncludeMacCatalystTargetFrameworks=false -v:q` | Passed; 0 errors, 3
existing Gradle Java-8 source/target deprecation warnings |
| `dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll build
Microsoft.Maui.BuildTasks.slnf -p:IncludeIosTargetFrameworks=false
-p:IncludeMacCatalystTargetFrameworks=false -v:q` | Passed; 0
warnings/errors |
| `dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll restore
src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj
-p:IncludeIosTargetFrameworks=false
-p:IncludeMacCatalystTargetFrameworks=false -v:q` | Passed |
| `dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll build
src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj
-f net10.0-android --no-restore -t:Compile
-p:IncludeIosTargetFrameworks=false
-p:IncludeMacCatalystTargetFrameworks=false -v:q` | Passed; 0
warnings/errors; Compile target only, no app launch |
| `dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll restore
src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj
-p:IncludeIosTargetFrameworks=false
-p:IncludeMacCatalystTargetFrameworks=false -v:q` | Passed |
| `dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll build
src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj
--no-restore -p:IncludeIosTargetFrameworks=false
-p:IncludeMacCatalystTargetFrameworks=false -v:q` | Passed after
correcting a nullable timing-text diagnostic; final build 0
warnings/errors; test assembly compilation only |
| `dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll format
whitespace . --folder --include
src/Controls/src/Core/Handlers/Items/Android/SpacingItemDecoration.cs
src/Controls/tests/TestCases.HostApp/Issues/Issue38925.cs
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue38925.cs
--verify-no-changes --verbosity quiet` | Passed; only touched files
formatted |
| `git diff --check` and `git diff --cached --check` | Passed |
| `git diff --quiet ad38e20 --
src/Controls/src/Core/Handlers/Items/Android/SpacingItemDecoration.cs` |
Passed; exact production-source identity |

Additionally, an uncommitted dependency-free managed harness compiled
the **exact production source** against minimal Android/RecyclerView
stubs. **809,530 offset comparisons passed**, covering
empty/single/mixed/full-span rows, both orientations, assigned/fallback
span indices, linear layouts, invalid positions, zero-spacing early
return, and bounded lookups for a 10,050-position grouped grid. The same
harness with unmodified Candidate source failed the bounded-lookup
assertion as expected. This checks managed offset logic and lookup
counts, **not native Android/JNI performance or rendering**.

**Not run:** the added UI test, existing Issue35700/Issue38321 runtime
coverage, native device tests, fling/ANR measurements, or screenshot
comparison. No XCTest, Appium execution, simulator/emulator, GUI, or
browser automation was used, per the user's active-work restriction. No
native runtime proof is claimed; Android CI/artifact validation is still
required.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #38925

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

Targeting `inflight/candidate` by explicit servicing-backport request,
not `main`. #38926 is intentionally not claimed as fixed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Oct 18, 2026
#38925 (#39335)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->

### Description of Change

<!-- Enter description of the fix in this section -->

**Regression-only backport to `inflight/candidate`, explicitly requested
for servicing. This is not a backport of the entire mixed source PR.**
Candidate baseline: `3d96e23006ea80f58ff2946017eb4593f63a46c6`.

#38925 reports the Android `CollectionView` / `GridItemsLayout`
regression from **10.0.90 to 10.0.100**, introduced by #35782.
`SpacingItemDecoration.GetItemOffsets` calls the uncached
`GetSpanGroupIndex(itemCount - 1)` for every child, scanning the adapter
through JNI on repeated layout/scroll passes. Large sources stall
ItemsSource/layout and can ANR during flings.

Bring over only `SpacingItemDecoration.cs` from #38969 (production file
is identical to the rebased source): return immediately for zero
spacing; identify the first/last span rows by inspecting only the items
that can share those rows, using assigned child span indices with the
original lookup fallback. Keep existing adapter-position/count bounds,
linear-layout behavior, outer-edge spacing, and full-span header/footer
handling. Candidate's other Android fixes remain untouched.

Source provenance:
- Original GitHub merge SHA:
[`c6b0c73ccbc7eebd5c9a683e5b803d786cf37cf7`](c6b0c73).
- Current rebased equivalent:
[`ad38e20f14fa841bd82b3b569256e84c45e48d4f`](ad38e20).

**Deliberately excluded:** #38926's longstanding
`ObservableGroupedSource.GetGroupAndIndex` optimization and its focused
device test; the source page/test's far-group `ScrollTo` actions and
timing expectations; general optimization PR #39063. These are not part
of the #38925 servicing regression. No version pins, dependencies, CI
configuration, or generated manifests/localization files changed.

Adapt the directly relevant Issue38925 HostApp and Android-only
CollectionView shard-6 test to load **50 groups × 200 items**, check
that the first item is rendered, and assert the app-reported
ItemsSource/dispatcher elapsed time is **below 15,000 ms**. The in-app
time assertion avoids accepting a slow load merely because Appium's tap
returns after the stall. No ScrollTo requirement is retained.

**Validation (compilation and non-UI checks only):** used the installed
SDK explicitly, without changing `global.json`. Restores were performed
only after missing assets/build-task dependency failures. Preliminary
missing-assets and missing-task failures were resolved; an initial
target-framework mismatch was corrected to Candidate's
`net10.0-android36.0` graph.

| Exact command | Result |
| --- | --- |
| `dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll restore
src/Controls/src/Core/Controls.Core.csproj
-p:IncludeIosTargetFrameworks=false
-p:IncludeMacCatalystTargetFrameworks=false -v:q` | Passed |
| `dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll build
src/Controls/src/Core/Controls.Core.csproj -f net10.0-android36.0
--no-restore -p:IncludeIosTargetFrameworks=false
-p:IncludeMacCatalystTargetFrameworks=false -v:q` | Passed; 0 errors, 3
existing Gradle Java-8 source/target deprecation warnings |
| `dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll build
Microsoft.Maui.BuildTasks.slnf -p:IncludeIosTargetFrameworks=false
-p:IncludeMacCatalystTargetFrameworks=false -v:q` | Passed; 0
warnings/errors |
| `dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll restore
src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj
-p:IncludeIosTargetFrameworks=false
-p:IncludeMacCatalystTargetFrameworks=false -v:q` | Passed |
| `dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll build
src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj
-f net10.0-android --no-restore -t:Compile
-p:IncludeIosTargetFrameworks=false
-p:IncludeMacCatalystTargetFrameworks=false -v:q` | Passed; 0
warnings/errors; Compile target only, no app launch |
| `dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll restore
src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj
-p:IncludeIosTargetFrameworks=false
-p:IncludeMacCatalystTargetFrameworks=false -v:q` | Passed |
| `dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll build
src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj
--no-restore -p:IncludeIosTargetFrameworks=false
-p:IncludeMacCatalystTargetFrameworks=false -v:q` | Passed after
correcting a nullable timing-text diagnostic; final build 0
warnings/errors; test assembly compilation only |
| `dotnet /usr/local/share/dotnet/sdk/10.0.100/dotnet.dll format
whitespace . --folder --include
src/Controls/src/Core/Handlers/Items/Android/SpacingItemDecoration.cs
src/Controls/tests/TestCases.HostApp/Issues/Issue38925.cs
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue38925.cs
--verify-no-changes --verbosity quiet` | Passed; only touched files
formatted |
| `git diff --check` and `git diff --cached --check` | Passed |
| `git diff --quiet ad38e20 --
src/Controls/src/Core/Handlers/Items/Android/SpacingItemDecoration.cs` |
Passed; exact production-source identity |

Additionally, an uncommitted dependency-free managed harness compiled
the **exact production source** against minimal Android/RecyclerView
stubs. **809,530 offset comparisons passed**, covering
empty/single/mixed/full-span rows, both orientations, assigned/fallback
span indices, linear layouts, invalid positions, zero-spacing early
return, and bounded lookups for a 10,050-position grouped grid. The same
harness with unmodified Candidate source failed the bounded-lookup
assertion as expected. This checks managed offset logic and lookup
counts, **not native Android/JNI performance or rendering**.

**Not run:** the added UI test, existing Issue35700/Issue38321 runtime
coverage, native device tests, fling/ANR measurements, or screenshot
comparison. No XCTest, Appium execution, simulator/emulator, GUI, or
browser automation was used, per the user's active-work restriction. No
native runtime proof is claimed; Android CI/artifact validation is still
required.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #38925

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

Targeting `inflight/candidate` by explicit servicing-backport request,
not `main`. #38926 is intentionally not claimed as fixed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 12, 2026

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — dd38b94a Deployed Oct 12, 2026 by kubaflo via conclusion #2320
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant