Skip to content

Overlap Settings startup paint fallback with mount - #2007

Draft
simonvanlaak wants to merge 1 commit into
mainfrom
fix/settings-open-presentation
Draft

simonvanlaak wants to merge 1 commit into
mainfrom
fix/settings-open-presentation

Conversation

@simonvanlaak

@simonvanlaak simonvanlaak commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Start the isolated preload's fallback animation callbacks alongside the commit IPC. Preserve the full hidden compositor copy, recover if native paint has already started a copy that then fails, and keep late startup signals from refocusing an open window. Section readiness stays independent of shell presentation.

This changes the Electron host handshake. The native window geometry, system theme, renderer layout, active-pane IPC admission and authoritative preference mutation continue through their existing entry points.

Verification

The 22 focused host tests passed. Eight targeted Electron tests passed in the published Linux 0.22.17 renderer with the candidate host and preload, covering hidden-frame light and dark pixels, missing entry, stalled animation callbacks, parent EOF, keyboard pane changes, narrow layouts and per-pane IPC refusal. The exact candidate frontend was also built and inspected in an isolated X display. General rendered its loading and ready states at 740 × 580 in light and dark appearance, with visible keyboard focus. The 640 px compact viewport kept its navigation and focused switch reachable.

Matched renderer diagnostic

Four alternating control/candidate pairs used the same Electron runtime, ready test data and synthetic parent. Cold means a fresh renderer profile. Warm means launching a new renderer process in the same profile after one use. Neither includes the Rust app launch or OS-cache eviction. The test holds General data until after the shell appears, sends Space once ready and replies to the observed preference request. Time starts at Electron spawn. Copy is start/end, show is the Electron API call, shell is the first successful rendered loading-state observation, ready is an enabled switch, ack is the parent pipe receiving the request and result is renderer readback. These observations have CDP/probe overhead and do not measure compositor map.

Pair Profile Variant DOM Copy start Copy end Show Shell Ready Input Ack Result
1 cold control 906.0 920.7 947.0 947.1 965.7 1084.1 1098.9 1106.1 1113.8
1 warm control 251.7 256.3 270.1 270.2 280.9 371.2 378.4 384.2 413.7
1 cold candidate 289.7 359.3 376.9 376.9 384.4 497.0 502.9 505.7 531.9
1 warm candidate 337.0 345.1 367.6 367.7 379.5 463.2 468.3 471.9 497.5
2 cold candidate 265.3 345.0 359.1 359.2 366.7 457.9 463.3 466.3 491.8
2 warm candidate 272.9 312.7 347.2 347.3 365.7 460.9 466.4 469.6 496.9
2 cold control 270.7 369.5 393.3 393.4 417.3 530.5 550.2 555.3 590.4
2 warm control 286.2 290.4 297.8 297.9 325.7 436.1 442.5 445.2 469.5
3 cold control 329.5 388.9 401.0 401.1 410.5 446.7 457.4 462.0 503.1
3 warm control 366.7 488.7 509.5 509.6 520.9 537.7 547.0 551.1 582.3
3 cold candidate 338.9 439.1 458.4 458.5 519.7 557.7 618.8 624.0 648.9
3 warm candidate 365.4 370.2 381.6 381.7 407.3 435.6 443.3 447.6 476.5
4 cold candidate 305.1 481.8 494.8 494.9 504.6 523.6 541.8 551.4 594.1
4 warm candidate 387.6 397.7 420.1 420.2 438.8 479.9 487.6 494.9 499.3
4 cold control 326.7 416.7 425.4 425.4 431.7 437.7 445.0 447.6 472.3
4 warm control 299.0 307.6 334.3 334.4 347.6 360.1 369.2 372.8 415.8

Times are milliseconds. Ordinary startup was noisy, including a 947 ms baseline outlier. Median show calls were 413.2 → 417.7 ms cold and 316.1 → 374.7 ms warm. The sample gives no reliable ordinary-path speedup. A one-pixel readback experiment showed no consistent copy improvement and was discarded.

Delayed mount response with no native paint notification

For these three additional pairs the harness suppressed ready-to-show and added a 90 ms mount acknowledgement delay to both variants. This exercises fallback scheduling with real Electron frame callbacks. Commit-to-show improved in five of six pairs, with one cold outlier in each direction. These timings characterize the injected fault only.

Pair Profile Variant DOM Fallback ack Show DOM to show Ready Input ack Result
1 cold control 314.2 1424.7 1440.3 1126.2 1475.6 1600.6 1640.9
1 warm control 462.9 2584.7 2611.5 2148.7 2712.0 2739.4 2919.6
1 cold candidate 441.0 531.6 546.4 105.4 557.6 575.6 586.0
1 warm candidate 459.3 575.3 587.4 128.1 649.8 673.2 706.1
2 cold candidate 515.8 649.3 658.5 142.7 717.3 754.0 792.0
2 warm candidate 695.0 787.3 795.2 100.2 856.4 882.1 953.7
2 cold control 578.7 711.3 736.6 158.0 800.0 847.6 862.5
2 warm control 423.7 2540.3 2567.6 2143.9 2620.9 2647.6 2702.2
3 cold control 608.4 828.0 844.5 236.0 927.4 951.0 986.8
3 warm control 635.3 815.8 861.7 226.4 930.9 952.5 962.6
3 cold candidate 616.1 1169.5 1201.3 585.2 1280.3 1310.6 1364.7
3 warm candidate 485.3 587.7 603.8 118.6 710.1 744.3 776.2

Isolated Linux compositor and clipboard

Three alternating cold/warm pairs completed on a disposable Omarchy/Hyprland VM with XWayland, an isolated network and matched copies of the Linux 0.22.17 AppImage renderer/runtime. Both sides used their respective main and preload files from this branch and its control. The direct Electron entry used synthetic About state. The normal AppImage control exited before its Settings child in the end-to-end attempt, so these timings start at the Settings process spawn. Cold uses a fresh profile. Warm relaunches Settings in the same profile. No platform caches were dropped.

Every run mapped a focused 740 × 580 window. The first sampled desktop captures contained the About title, selected navigation and loading content, with Hyprland's opening fade visible in most samples. The harness then supplied unique version state, focused Copy version and sent Space. It verified the actual Wayland clipboard string and the renderer's Copied acknowledgement. Map and pixels are observer timestamps from Hyprland window enumeration and the first completed grim capture. Capture completion includes substantial sampling overhead. The clipboard is polled before the renderer acknowledgement, so the order of those observations does not establish their actual commit order.

Pair Profile Variant DOM Copy start Copy end Show Map observed Pixel capture Ready Input Copied observed Clipboard result
1 cold control 461.5 483.5 492.0 492.0 806.8 1015.6 1045.0 1079.4 1105.6 1100.4
1 warm control 441.1 460.6 498.8 498.8 546.4 822.9 848.0 898.4 926.8 915.1
1 cold candidate 379.7 424.4 431.0 431.0 458.5 677.8 691.0 724.0 761.3 756.8
1 warm candidate 382.0 434.5 458.5 458.6 537.7 844.7 854.7 874.6 925.0 924.1
2 cold candidate 410.5 410.6 414.3 414.5 452.4 673.6 686.5 712.8 783.0 781.7
2 warm candidate 417.7 427.7 436.5 436.6 490.9 723.6 772.9 787.6 822.5 821.6
2 cold control 680.8 711.8 721.3 721.4 798.7 1073.2 1097.8 1119.4 1218.2 1214.7
2 warm control 295.4 313.6 319.1 319.2 336.9 511.2 532.7 558.2 579.2 577.8
3 cold control 373.6 386.9 400.3 400.3 421.9 614.6 636.3 645.5 679.1 678.3
3 warm control 622.5 640.1 685.2 685.2 694.0 1116.6 1140.8 1214.0 1283.2 1246.2
3 cold candidate 588.5 603.7 613.9 614.0 637.6 839.7 865.0 888.5 924.6 922.5
3 warm candidate 797.8 806.0 829.3 829.5 897.1 1114.6 1125.6 1139.3 1182.5 1181.6

Times are milliseconds. First-sample completion medians were 1,015.6 → 677.8 ms cold and 822.9 → 844.7 ms warm. The third cold pair favored the control and warm results were mixed. These samples establish native presentation and an effective control with a synthetic parent. They leave installed Rust-to-settings timing and macOS window integration unverified.

The hook-backed Linux push passed the scoped repository checks and all 78 Electron tests. This draft leaves merge and landed-commit verification to the parent.

Issues

Refs #1999

This branch has not been deployed

No deployments
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.

1 participant