manager: defer module repo WebViews until pager settles - #3641
Conversation
bb853f2 to
b1f46bc
Compare
|
Have you verified it or this is what AI outputs? |
|
I actually ran into this while working on a downstream project based on KernelSU Manager, so I ended up looking into the upstream implementation and fixed it along the way. In my case the crash happened around README -> Releases navigation on modules with larger release notes. Looking through the code, the pager transition can keep the README WebView alive while the Releases page starts composing additional Markdown/WebViews, which matched what I was seeing downstream. I did use AI to help with the investigation and implementation, but it wasn't just AI output pasted into a PR — I reviewed the code and built both the Material and Miuix variants myself. I don't have a clean upstream crash trace proving this is the only root cause, though, so I kept the PR wording as “mitigates” rather than claiming it's conclusively verified. |
There was a problem hiding this comment.
Pull request overview
Defers heavy module-repository WebViews until the destination pager tab settles, reducing memory pressure during transitions.
Changes:
- Gates README and release Markdown WebViews on the settled page.
- Applies equivalent behavior to Material and Miuix interfaces.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
ModuleRepoMiuix.kt |
Defers Miuix README and release WebViews. |
ModuleRepoMaterial.kt |
Defers Material README and release WebViews. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Summary
Mitigates a crash reported when navigating from the module README page to
the Releases page for modules with large release descriptions.
The README and release descriptions are rendered using WebViews. During an
animated pager transition, both the previous page and the target page may be
composed at the same time. This can cause the README WebView and multiple
release-description WebViews to coexist temporarily, significantly increasing
memory pressure.
This change defers creation of the heavy Markdown/WebView content until the
pager has settled on the corresponding page.
The same lifecycle handling is applied to both the Material and Miuix module
repository detail implementations.
Changes
Testing
clean assembleRelease -PIS_PR_BUILD=trueAddresses #3636.
The reported navigation pattern is consistent with overlapping heavy WebView
composition and increased memory pressure. The issue currently has no usable
crash log, so this PR intentionally does not claim that the root cause has been
conclusively proven.