Skip to content

Fix #4899: repaint form after sheet dismiss so dim overlay clears#4901

Merged
shai-almog merged 1 commit intomasterfrom
fix-4899-sheet-swipe-dismiss-repaint
May 9, 2026
Merged

Fix #4899: repaint form after sheet dismiss so dim overlay clears#4901
shai-almog merged 1 commit intomasterfrom
fix-4899-sheet-swipe-dismiss-repaint

Conversation

@shai-almog
Copy link
Copy Markdown
Collaborator

Summary

  • Sheet swipe-to-dismiss left the underlying Form shaded until the next user tap (issue [BUG] Sheet swipe-to-dismiss leaves the underlying Form shaded until the next tap #4899). Both dismiss paths (Sheet#hide and Sheet#animateDismissFromDrag) only called revalidateLater() after cnt.remove(), which queues work for the next paint cycle but does not wake the EDT. With nothing in the impl paint queue and no animations left, the EDT idled with stale dim pixels on screen.
  • Added an explicit parentForm.repaint() after cnt.remove() / revalidateLater() in both completion runnables so the form is queued for paint immediately.
  • Added two regression tests in SheetSwipeToDismissTest that fail without the fix (paintQueue=[]) and pass with it.

Test plan

  • mvn test -Dtest='SheetSwipeToDismissTest' — all 11 tests pass
  • mvn test -Dtest='Sheet*' — all 19 Sheet-related tests pass
  • mvn test — full suite of 2409 tests passes
  • Verified the new tests fail on master (without the fix) by stashing the change, running the tests, then restoring

Fixes #4899

🤖 Generated with Claude Code

Sheet#hide and animateDismissFromDrag both relied on revalidateLater()
to redraw the form once cnt.remove() had run, but revalidateLater()
only queues work for the next paint cycle and cnt.remove() does not
wake the EDT. With nothing in the impl paint queue and no animations
left, the EDT idled and the dim overlay pixels stayed on screen until
the next user input.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 9, 2026

✅ Continuous Quality Report

Test & Coverage

Static Analysis

  • SpotBugs [Report archive]
    • ByteCodeTranslator: 0 findings (no issues)
    • android: 0 findings (no issues)
    • codenameone-maven-plugin: 0 findings (no issues)
    • core-unittests: 0 findings (no issues)
    • ios: 0 findings (no issues)
  • PMD: 0 findings (no issues) [Report archive]
  • Checkstyle: 0 findings (no issues) [Report archive]

Generated automatically by the PR CI workflow.

@shai-almog
Copy link
Copy Markdown
Collaborator Author

shai-almog commented May 9, 2026

Compared 90 screenshots: 90 matched.

Native Android coverage

  • 📊 Line coverage: 10.20% (5571/54602 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 8.02% (27334/340745), branch 3.65% (1193/32646), complexity 4.68% (1465/31275), method 8.24% (1204/14617), class 13.64% (268/1965)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6327 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.ClassReader – 0.00% (0/1519 lines covered)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1148 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.MethodWriter – 0.00% (0/923 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/730 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/623 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.Frame – 0.00% (0/564 lines covered)
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysJvmKt – 0.00% (0/495 lines covered)
      • kotlinx.coroutines.kotlinx.coroutines.JobSupport – 0.00% (0/423 lines covered)

✅ Native Android screenshot tests passed.

Native Android coverage

  • 📊 Line coverage: 10.20% (5571/54602 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 8.02% (27334/340745), branch 3.65% (1193/32646), complexity 4.68% (1465/31275), method 8.24% (1204/14617), class 13.64% (268/1965)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6327 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.ClassReader – 0.00% (0/1519 lines covered)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1148 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.MethodWriter – 0.00% (0/923 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/730 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/623 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.Frame – 0.00% (0/564 lines covered)
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysJvmKt – 0.00% (0/495 lines covered)
      • kotlinx.coroutines.kotlinx.coroutines.JobSupport – 0.00% (0/423 lines covered)

Benchmark Results

Detailed Performance Metrics

Metric Duration
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 native encode 971.000 ms
Base64 CN1 encode 175.000 ms
Base64 encode ratio (CN1/native) 0.180x (82.0% faster)
Base64 native decode 846.000 ms
Base64 CN1 decode 215.000 ms
Base64 decode ratio (CN1/native) 0.254x (74.6% faster)
Image encode benchmark status skipped (SIMD unsupported)

@shai-almog
Copy link
Copy Markdown
Collaborator Author

shai-almog commented May 9, 2026

Compared 87 screenshots: 87 matched.
✅ Native iOS Metal screenshot tests passed.

Benchmark Results

  • VM Translation Time: 0 seconds
  • Compilation Time: 353 seconds

Build and Run Timing

Metric Duration
Simulator Boot 114000 ms
Simulator Boot (Run) 3000 ms
App Install 19000 ms
App Launch 9000 ms
Test Execution 264000 ms

Detailed Performance Metrics

Metric Duration
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 native encode 1466.000 ms
Base64 CN1 encode 1541.000 ms
Base64 encode ratio (CN1/native) 1.051x (5.1% slower)
Base64 native decode 1062.000 ms
Base64 CN1 decode 1176.000 ms
Base64 decode ratio (CN1/native) 1.107x (10.7% slower)
Base64 SIMD encode 801.000 ms
Base64 encode ratio (SIMD/native) 0.546x (45.4% faster)
Base64 encode ratio (SIMD/CN1) 0.520x (48.0% faster)
Base64 SIMD decode 1551.000 ms
Base64 decode ratio (SIMD/native) 1.460x (46.0% slower)
Base64 decode ratio (SIMD/CN1) 1.319x (31.9% slower)
Image encode benchmark iterations 100
Image createMask (SIMD off) 82.000 ms
Image createMask (SIMD on) 19.000 ms
Image createMask ratio (SIMD on/off) 0.232x (76.8% faster)
Image applyMask (SIMD off) 187.000 ms
Image applyMask (SIMD on) 138.000 ms
Image applyMask ratio (SIMD on/off) 0.738x (26.2% faster)
Image modifyAlpha (SIMD off) 168.000 ms
Image modifyAlpha (SIMD on) 152.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.905x (9.5% faster)
Image modifyAlpha removeColor (SIMD off) 396.000 ms
Image modifyAlpha removeColor (SIMD on) 126.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.318x (68.2% faster)
Image PNG encode (SIMD off) 1372.000 ms
Image PNG encode (SIMD on) 931.000 ms
Image PNG encode ratio (SIMD on/off) 0.679x (32.1% faster)
Image JPEG encode 513.000 ms

@shai-almog
Copy link
Copy Markdown
Collaborator Author

shai-almog commented May 9, 2026

Compared 90 screenshots: 90 matched.
✅ Native iOS screenshot tests passed.

Benchmark Results

  • VM Translation Time: 0 seconds
  • Compilation Time: 269 seconds

Build and Run Timing

Metric Duration
Simulator Boot 88000 ms
Simulator Boot (Run) 1000 ms
App Install 12000 ms
App Launch 4000 ms
Test Execution 249000 ms

Detailed Performance Metrics

Metric Duration
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 native encode 1200.000 ms
Base64 CN1 encode 1292.000 ms
Base64 encode ratio (CN1/native) 1.077x (7.7% slower)
Base64 native decode 698.000 ms
Base64 CN1 decode 883.000 ms
Base64 decode ratio (CN1/native) 1.265x (26.5% slower)
Base64 SIMD encode 372.000 ms
Base64 encode ratio (SIMD/native) 0.310x (69.0% faster)
Base64 encode ratio (SIMD/CN1) 0.288x (71.2% faster)
Base64 SIMD decode 396.000 ms
Base64 decode ratio (SIMD/native) 0.567x (43.3% faster)
Base64 decode ratio (SIMD/CN1) 0.448x (55.2% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 56.000 ms
Image createMask (SIMD on) 10.000 ms
Image createMask ratio (SIMD on/off) 0.179x (82.1% faster)
Image applyMask (SIMD off) 119.000 ms
Image applyMask (SIMD on) 61.000 ms
Image applyMask ratio (SIMD on/off) 0.513x (48.7% faster)
Image modifyAlpha (SIMD off) 119.000 ms
Image modifyAlpha (SIMD on) 59.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.496x (50.4% faster)
Image modifyAlpha removeColor (SIMD off) 149.000 ms
Image modifyAlpha removeColor (SIMD on) 61.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.409x (59.1% faster)
Image PNG encode (SIMD off) 922.000 ms
Image PNG encode (SIMD on) 812.000 ms
Image PNG encode ratio (SIMD on/off) 0.881x (11.9% faster)
Image JPEG encode 494.000 ms

@shai-almog shai-almog merged commit 212acc5 into master May 9, 2026
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Sheet swipe-to-dismiss leaves the underlying Form shaded until the next tap

1 participant