Skip to content

ComponentGroup: make the segmented control work on the current native themes - #5791

Merged
shai-almog merged 13 commits into
masterfrom
cg-segmented
Sep 12, 2026
Merged

shai-almog merged 13 commits into
masterfrom
cg-segmented

Conversation

@shai-almog

Copy link
Copy Markdown
Collaborator

Answering "does ComponentGroup still serve a real purpose?" -- mostly no, with one exception that turned out to be broken.

What the themes actually contain

GroupElement ButtonGroup ToggleButton ComponentGroupBool
iOS7Theme.res (legacy) 212 37 146 set
iOSModernTheme 0 0 full, 4 states not set
AndroidMaterialTheme 0 0 full, 4 states not set

The original purpose -- iOS 6 style grouped rows with rounded first/last corners -- is gone. Neither current native theme defines a single GroupElement or ButtonGroup rule.

What survives is the segmented control: setHorizontal(true) renames members to ToggleButton / First / Last / Only, and both themes style exactly those, in full, across all four states.

The bug

That surviving case did not work. updateUIIDs is gated on ComponentGroupBool, neither theme sets it, so setHorizontal(true) renamed nothing and a segmented group painted as plain buttons on every app using a current native theme. The styling was unreachable through the API that exists to reach it.

Turning the flag on in those themes is not the fix. It also governs the vertical path, which flattens Labels, TextFields and Buttons onto one GroupElement UIID neither theme styles -- trading an inert segmented control for badly styled vertical groups. The flag stays and still governs that path.

Instead, a group that is horizontal and still using the ToggleButton UIIDs setHorizontal installs is active on its own. The activation is deliberately narrow: it recognises the framework's own UIIDs, not "horizontal" on its own, so an application that set its own element UIID keeps the documented theme-gated behaviour. Renaming to ToggleButton without consulting the theme is what Button.setToggle already does, ungated, so any app with toggle buttons already depends on that UIID resolving.

Two more bugs found alongside it

  • setForceGroup only assigned the field. It took effect if and only if something else later called updateUIIDs -- adding a component, or a theme refresh -- so on an already-populated group it did nothing, and clearing it never restored anything.
  • Leaving the horizontal state could deactivate a group, and updateUIIDs only renames; it has no path back. Members kept ToggleButton names a vertical group no longer justified. The three copies of that restore loop are now one method.

Two false claims corrected: the comment in the iOS theme said that theme sets ComponentGroupBool (true of the legacy iOS themes, not of it), and the guide said the same.

Behaviour change

setForceGroup(false) no longer deactivates a horizontal group -- it is a segmented control on its own terms now. RadioButtonTest.testRestoreWorksAfterGroupingIsSwitchedOff used a horizontal group to reach the restore path and now uses a vertical one; what it tests, the ownership marker outliving the restore, is unchanged.

Verification

  • Full core-unittests: 6695 tests, 0 failures. SpotBugs report regenerated from scratch: 0 findings.
  • New ComponentGroupSegmentedTest, 8 tests. Probed against pre-fix code: 5 of the 8 fail, which are the behavioural ones. The 3 that pass are the two deliberate guards (vertical still gated, custom element UIID still gated) and the characterization test for the new setForceGroup semantics.
  • check-cast-semantics.sh, check-control-characters.py, check-copyright-headers.sh (4 files passed), guide structure / xrefs / missing-code-blocks / unused-images, Vale 0 alerts, LanguageTool status: ok total: 0.
  • Built against a per-checkout Maven repo, not ~/.m2.

… themes

A horizontal ComponentGroup is a segmented control, and it is the only use of
ComponentGroup the current native themes carry any styling for. Both style
ToggleButton and its First/Last/Only variants in full, across all four states,
and neither defines a single GroupElement or ButtonGroup rule. Neither sets
ComponentGroupBool either, so updateUIIDs returned early and setHorizontal(true)
renamed nothing: the styling was unreachable through the API that exists to
reach it, and a segmented group painted as plain buttons on every new app.

Turning the flag on in those themes is not the fix. It also governs the
vertical path, which flattens Labels, TextFields and Buttons onto one
GroupElement UIID that neither theme styles, so it would trade an inert
segmented control for badly styled vertical groups. The flag stays, and still
governs that path. What changes is that a group which is horizontal and still
using the ToggleButton UIIDs setHorizontal installs is active on its own.

The activation is deliberately narrow -- it recognises the framework's own
ToggleButton UIIDs, not "horizontal" on its own -- so an application that chose
its own element UIID keeps the documented theme-gated behaviour. Renaming to
ToggleButton without consulting the theme is what Button.setToggle already
does, ungated, so an app with toggle buttons already depends on that UIID.

Two bugs found alongside it:

setForceGroup only assigned the field. It took effect if and only if something
else later called updateUIIDs -- adding a component, or a theme refresh -- so on
an already-populated group it did nothing, and clearing it never restored
anything. It now applies the change it records.

Leaving the horizontal state could deactivate a group, and updateUIIDs only
renames; it has no path back. Members kept ToggleButton names a vertical group
no longer justified. The three copies of that restore loop are now one method.

The comment in the iOS theme claimed that theme sets ComponentGroupBool, which
is true of the legacy iOS themes and not of it. The guide said the same thing.
Both corrected.

RadioButtonTest.testRestoreWorksAfterGroupingIsSwitchedOff used a horizontal
group to reach the restore path. A horizontal group no longer deactivates, so
it now uses a vertical one; what it tests -- the ownership marker outliving the
restore -- is unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
πŸ“ Code Review βœ… Completed 2026-09-12T18:53:42.851936Z 8a94be1 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with πŸ‘€ while any review is running, comments if it has suggestions, and reacts with πŸ‘ once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dc13b3584b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions

github-actions Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Developer Guide build artifacts are available for download from this workflow run:

Developer Guide quality checks:

  • AsciiDoc linter: No issues found (report)
  • Vale: No alerts found (report)
  • Paragraph capitalization: No paragraph capitalization issues (report)
  • LanguageTool: No grammar matches (report)
  • Image references: No unused images detected (report)

…ot just one

Review found that setElementUIID strands its members: a populated horizontal
group is active, naming a custom element UIID makes it inactive, and the
updateUIIDs call at the end of the setter returns early and renames nothing, so
the members keep the ToggleButton names from the state the group just left.

It was right, and it is the same shape as the setHorizontal bug already in this
branch, so this enumerates the rest of the family instead of patching the one
that was reported. Every mutator that can change the answer to isGroupingActive
now goes through one applyOrRestore, because updateUIIDs only ever renames and
has no path back.

Two more turned up in the sweep, both older than this branch:

setGroupFlag assigned the field and did nothing else, so pointing a group at a
constant the theme does set never activated it, and pointing it away never
restored.

setPropertyValue("groupFlag", value) called setGroupFlag(groupFlag) -- the field,
not the argument -- so the property assigned the flag to itself and a designer
edit was discarded. Its forceGroup neighbour assigned the field directly and
skipped the setter's apply.

Five tests, each probed against the code before this commit, where all five fail.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

βœ… Continuous Quality Report

Test & Coverage

Static Analysis

  • SpotBugs [Report archive]
    • βœ… ByteCodeTranslator: 0 findings (no issues)
    • βœ… android: 0 findings (no issues)
    • βœ… build-hint-catalog: 0 findings (no issues)
    • βœ… build-hint-tools: 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aec50d12e8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions

Copy link
Copy Markdown
Contributor

Cloudflare Preview

@shai-almog

shai-almog commented Sep 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Native fidelity (Android, Material 3)

54 pairs compared -- median 95.6%, worst 91.3% (FlatButton_pressed_dark), 25th pct 94.9%, mean 95.7%.

Distribution -- >=99%: 2 | 95-99%: 37 | 90-95%: 15 | <90%: 0

Component State Appearance Material Fidelity SSIM mean delta vs base Geometry
FlatButton pressed dark normal 91.3% 0.899 3.10 0.0 ok
Tabs normal light normal 92.3% 0.914 3.05 0.0 ok
Button pressed dark normal 92.6% 0.949 4.32 0.0 ok
FlatButton normal dark normal 93.2% 0.938 2.69 0.0 ok
Button disabled dark normal 93.3% 0.928 2.20 0.0 ok
Button pressed light normal 93.3% 0.952 3.68 0.0 ok
FlatButton normal light normal 93.7% 0.941 2.29 0.0 ok
FlatButton pressed light normal 93.8% 0.942 2.56 0.0 ok
FloatingActionButton pressed light normal 94.4% 0.927 2.82 0.0 OFF (h 0.88)
RadioButton normal dark normal 94.5% 0.963 2.19 0.0 ok
RadioButton normal light normal 94.7% 0.964 1.85 0.0 ok
CheckBox selected dark normal 94.7% 0.950 2.60 0.0 ok
RadioButton selected dark normal 94.8% 0.963 2.42 0.0 ok
CheckBox normal dark normal 94.9% 0.952 2.69 0.0 ok
Button normal dark normal 94.9% 0.949 3.16 0.0 ok
CheckBox normal light normal 95.0% 0.953 2.30 0.0 ok
Toolbar normal dark normal 95.1% 0.906 1.60 0.0 ok
RaisedButton pressed dark normal 95.2% 0.950 2.39 0.0 ok
CheckBox disabled dark normal 95.2% 0.954 1.47 0.0 ok
CheckBox disabled light normal 95.2% 0.956 1.34 0.0 ok
Tabs normal dark normal 95.2% 0.913 3.65 0.0 ok
RadioButton disabled dark normal 95.3% 0.963 1.18 0.0 ok
RadioButton selected light normal 95.3% 0.964 1.84 0.0 ok
CheckBox selected light normal 95.4% 0.952 2.06 0.0 ok
Switch selected light normal 95.4% 0.966 1.59 0.0 ok
Switch selected dark normal 95.5% 0.966 1.86 0.0 ok
RadioButton disabled light normal 95.5% 0.966 1.08 0.0 ok
Switch disabled dark normal 95.6% 0.961 0.85 0.0 ok
Dialog normal light normal 95.7% 0.930 2.30 0.0 ok
RaisedButton pressed light normal 95.8% 0.958 2.16 0.0 ok
Button normal light normal 95.8% 0.953 2.46 0.0 ok
Dialog normal dark normal 95.8% 0.932 2.30 0.0 ok
Switch normal light normal 96.0% 0.961 1.45 0.0 ok
FloatingActionButton normal light normal 96.1% 0.937 1.14 0.0 ok
FloatingActionButton pressed dark normal 96.2% 0.951 2.45 0.0 ok
Switch normal dark normal 96.2% 0.962 1.39 0.0 ok
TextField disabled dark normal 96.2% 0.965 0.76 0.0 ok
RaisedButton normal dark normal 96.4% 0.952 1.78 0.0 ok
Switch disabled light normal 96.4% 0.970 0.61 0.0 ok
Button disabled light normal 96.8% 0.960 1.06 0.0 ok
ProgressBar normal dark normal 96.9% 0.967 2.03 0.0 OFF (h 1.50)
RaisedButton disabled dark normal 97.0% 0.955 0.89 0.0 ok
FloatingActionButton normal dark normal 97.1% 0.952 1.43 0.0 ok
ProgressBar normal light normal 97.3% 0.974 1.53 0.0 OFF (h 1.50)
RaisedButton disabled light normal 97.3% 0.961 0.79 0.0 ok
TextField disabled light normal 97.3% 0.965 0.79 0.0 ok
RaisedButton normal light normal 97.3% 0.961 1.40 0.0 ok
TextField normal dark normal 97.6% 0.958 1.83 0.0 ok
TextField normal light normal 97.6% 0.958 1.63 0.0 ok
Slider normal dark normal 98.4% 0.990 0.87 0.0 ok
Toolbar normal light normal 98.7% 0.974 1.28 0.0 ok
Slider normal light normal 99.0% 0.991 0.47 0.0 ok
Slider disabled dark normal 99.6% 0.993 0.22 0.0 ok
Slider disabled light normal 99.6% 0.993 0.18 0.0 ok
Geometry vs native (bbox offset / size ratio / center offset / corner radius) -- gated separately from the visual score
Component State Appearance bbox dx,dy (px) w ratio h ratio center off (px) radius native->cn1 (px)
FloatingActionButton pressed light +0,+0 0.929 0.881 4.0 -
FloatingActionButton normal light +0,+0 0.946 0.912 2.9 -
Button pressed dark +0,+0 0.947 0.975 2.6 -
Button disabled dark +0,+0 0.947 0.975 2.6 -
Button pressed light +0,+0 0.947 0.975 2.6 -
Button normal dark +0,+0 0.947 0.975 2.6 -
RaisedButton pressed dark +0,+0 0.945 0.975 2.6 -
RaisedButton pressed light +0,+0 0.945 0.975 2.6 -
Button normal light +0,+0 0.947 0.975 2.6 -
RaisedButton normal dark +0,+0 0.945 0.975 2.6 -
Button disabled light +0,+0 0.947 0.975 2.6 -
RaisedButton disabled dark +0,+0 0.945 0.975 2.6 -
RaisedButton disabled light +0,+0 0.945 0.975 2.6 -
RaisedButton normal light +0,+0 0.945 0.975 2.6 -
RadioButton normal dark +1,+1 1.029 1.000 2.2 -
RadioButton normal light +1,+1 1.029 1.000 2.2 -
RadioButton selected dark +1,+1 1.029 1.000 2.2 -
RadioButton disabled dark +1,+1 1.029 1.000 2.2 -
RadioButton selected light +1,+1 1.029 1.000 2.2 -
Switch selected light +0,+0 1.080 1.063 2.2 -
RadioButton disabled light +1,+1 1.029 1.000 2.2 -
CheckBox selected dark +1,+1 1.013 1.000 1.8 -
CheckBox normal dark +1,+1 1.013 1.000 1.8 -
CheckBox normal light +1,+1 1.013 1.000 1.8 -
CheckBox disabled dark +1,+1 1.013 1.000 1.8 -
CheckBox disabled light +1,+1 1.013 1.000 1.8 -
CheckBox selected light +1,+1 1.013 1.000 1.8 -
Switch selected dark +0,+0 1.060 1.031 1.6 -
Switch disabled dark +0,-1 1.060 1.031 1.6 -
Dialog normal light +0,+0 1.007 0.982 1.6 -
Dialog normal dark +0,+0 1.007 0.982 1.6 -
Switch normal light +0,-1 1.060 1.031 1.6 -
Switch normal dark +0,-1 1.060 1.031 1.6 -
Switch disabled light +0,-1 1.060 1.031 1.6 -
FloatingActionButton pressed dark +0,+0 0.963 0.963 1.4 -
FloatingActionButton normal dark +0,+0 0.963 0.963 1.4 -
Toolbar normal light -1,+1 1.000 1.000 1.4 -
FlatButton pressed dark +0,+0 0.977 0.975 1.1 -
FlatButton normal dark +0,+0 0.977 0.975 1.1 -
FlatButton normal light +0,+0 0.977 0.975 1.1 -
FlatButton pressed light +0,+0 0.977 0.975 1.1 -
TextField normal dark +0,+0 1.015 1.036 1.1 -
TextField normal light +0,+0 1.015 1.036 1.1 -
Toolbar normal dark +0,+0 1.000 1.032 1.0 -
ProgressBar normal dark +0,+0 1.000 1.500 1.0 -
ProgressBar normal light +0,+0 1.000 1.500 1.0 -
TextField disabled dark +0,+0 1.015 1.018 0.7 -
TextField disabled light +0,+0 1.015 1.018 0.7 -
Tabs normal light +0,+1 1.000 0.984 0.5 -
Slider normal dark +1,+0 0.996 1.000 0.5 -
Slider normal light +1,+0 0.996 1.000 0.5 -
Tabs normal dark +0,+0 1.000 1.000 0.0 -
Slider disabled dark +0,+0 1.000 1.000 0.0 -
Slider disabled light +0,+0 1.000 1.000 0.0 -

Side-by-side comparisons (worst first)

  • FlatButton_pressed_dark -- 91.25% fidelity (SSIM 0.8985) (no change)

    native FlatButton_pressed_dark cn1 FlatButton_pressed_dark
    Left: native widget. Right: Codename One render.

  • Tabs_normal_light -- 92.28% fidelity (SSIM 0.9140) (no change)

    native Tabs_normal_light cn1 Tabs_normal_light
    Left: native widget. Right: Codename One render.

  • Button_pressed_dark -- 92.61% fidelity (SSIM 0.9485) (no change)

    native Button_pressed_dark cn1 Button_pressed_dark
    Left: native widget. Right: Codename One render.

  • FlatButton_normal_dark -- 93.24% fidelity (SSIM 0.9381) (no change)

    native FlatButton_normal_dark cn1 FlatButton_normal_dark
    Left: native widget. Right: Codename One render.

  • Button_disabled_dark -- 93.26% fidelity (SSIM 0.9278) (no change)

    native Button_disabled_dark cn1 Button_disabled_dark
    Left: native widget. Right: Codename One render.

  • Button_pressed_light -- 93.34% fidelity (SSIM 0.9521) (no change)

    native Button_pressed_light cn1 Button_pressed_light
    Left: native widget. Right: Codename One render.

  • FlatButton_normal_light -- 93.72% fidelity (SSIM 0.9410) (no change)

    native FlatButton_normal_light cn1 FlatButton_normal_light
    Left: native widget. Right: Codename One render.

  • FlatButton_pressed_light -- 93.77% fidelity (SSIM 0.9424) (no change)

    native FlatButton_pressed_light cn1 FlatButton_pressed_light
    Left: native widget. Right: Codename One render.

  • FloatingActionButton_pressed_light -- 94.44% fidelity (SSIM 0.9273) (no change)

    native FloatingActionButton_pressed_light cn1 FloatingActionButton_pressed_light
    Left: native widget. Right: Codename One render.

  • RadioButton_normal_dark -- 94.46% fidelity (SSIM 0.9630) (no change)

    native RadioButton_normal_dark cn1 RadioButton_normal_dark
    Left: native widget. Right: Codename One render.

  • RadioButton_normal_light -- 94.69% fidelity (SSIM 0.9643) (no change)

    native RadioButton_normal_light cn1 RadioButton_normal_light
    Left: native widget. Right: Codename One render.

  • CheckBox_selected_dark -- 94.71% fidelity (SSIM 0.9502) (no change)

    native CheckBox_selected_dark cn1 CheckBox_selected_dark
    Left: native widget. Right: Codename One render.

  • RadioButton_selected_dark -- 94.79% fidelity (SSIM 0.9630) (no change)

    native RadioButton_selected_dark cn1 RadioButton_selected_dark
    Left: native widget. Right: Codename One render.

  • CheckBox_normal_dark -- 94.93% fidelity (SSIM 0.9516) (no change)

    native CheckBox_normal_dark cn1 CheckBox_normal_dark
    Left: native widget. Right: Codename One render.

  • Button_normal_dark -- 94.94% fidelity (SSIM 0.9491) (no change)

    native Button_normal_dark cn1 Button_normal_dark
    Left: native widget. Right: Codename One render.

  • CheckBox_normal_light -- 95.03% fidelity (SSIM 0.9531) (no change)

    native CheckBox_normal_light cn1 CheckBox_normal_light
    Left: native widget. Right: Codename One render.

  • Toolbar_normal_dark -- 95.07% fidelity (SSIM 0.9059) (no change)

    native Toolbar_normal_dark cn1 Toolbar_normal_dark
    Left: native widget. Right: Codename One render.

  • RaisedButton_pressed_dark -- 95.19% fidelity (SSIM 0.9501) (no change)

    native RaisedButton_pressed_dark cn1 RaisedButton_pressed_dark
    Left: native widget. Right: Codename One render.

  • CheckBox_disabled_dark -- 95.20% fidelity (SSIM 0.9538) (no change)

    native CheckBox_disabled_dark cn1 CheckBox_disabled_dark
    Left: native widget. Right: Codename One render.

  • CheckBox_disabled_light -- 95.21% fidelity (SSIM 0.9562) (no change)

    native CheckBox_disabled_light cn1 CheckBox_disabled_light
    Left: native widget. Right: Codename One render.

  • Tabs_normal_dark -- 95.23% fidelity (SSIM 0.9125) (no change)

    native Tabs_normal_dark cn1 Tabs_normal_dark
    Left: native widget. Right: Codename One render.

  • RadioButton_disabled_dark -- 95.29% fidelity (SSIM 0.9630) (no change)

    native RadioButton_disabled_dark cn1 RadioButton_disabled_dark
    Left: native widget. Right: Codename One render.

  • RadioButton_selected_light -- 95.33% fidelity (SSIM 0.9642) (no change)

    native RadioButton_selected_light cn1 RadioButton_selected_light
    Left: native widget. Right: Codename One render.

  • CheckBox_selected_light -- 95.37% fidelity (SSIM 0.9524) (no change)

    native CheckBox_selected_light cn1 CheckBox_selected_light
    Left: native widget. Right: Codename One render.

  • Switch_selected_light -- 95.37% fidelity (SSIM 0.9658) (no change)

    native Switch_selected_light cn1 Switch_selected_light
    Left: native widget. Right: Codename One render.

  • Switch_selected_dark -- 95.45% fidelity (SSIM 0.9656) (no change)

    native Switch_selected_dark cn1 Switch_selected_dark
    Left: native widget. Right: Codename One render.

  • RadioButton_disabled_light -- 95.46% fidelity (SSIM 0.9657) (no change)

    native RadioButton_disabled_light cn1 RadioButton_disabled_light
    Left: native widget. Right: Codename One render.

  • Switch_disabled_dark -- 95.57% fidelity (SSIM 0.9613) (no change)

    native Switch_disabled_dark cn1 Switch_disabled_dark
    Left: native widget. Right: Codename One render.

  • Dialog_normal_light -- 95.65% fidelity (SSIM 0.9300) (no change)

    native Dialog_normal_light cn1 Dialog_normal_light
    Left: native widget. Right: Codename One render.

  • RaisedButton_pressed_light -- 95.78% fidelity (SSIM 0.9578) (no change)

    native RaisedButton_pressed_light cn1 RaisedButton_pressed_light
    Left: native widget. Right: Codename One render.

  • Button_normal_light -- 95.79% fidelity (SSIM 0.9528) (no change)

    native Button_normal_light cn1 Button_normal_light
    Left: native widget. Right: Codename One render.

  • Dialog_normal_dark -- 95.79% fidelity (SSIM 0.9322) (no change)

    native Dialog_normal_dark cn1 Dialog_normal_dark
    Left: native widget. Right: Codename One render.

  • Switch_normal_light -- 95.97% fidelity (SSIM 0.9612) (no change)

    native Switch_normal_light cn1 Switch_normal_light
    Left: native widget. Right: Codename One render.

  • FloatingActionButton_normal_light -- 96.09% fidelity (SSIM 0.9367) (no change)

    native FloatingActionButton_normal_light cn1 FloatingActionButton_normal_light
    Left: native widget. Right: Codename One render.

  • FloatingActionButton_pressed_dark -- 96.16% fidelity (SSIM 0.9513) (no change)

    native FloatingActionButton_pressed_dark cn1 FloatingActionButton_pressed_dark
    Left: native widget. Right: Codename One render.

  • Switch_normal_dark -- 96.17% fidelity (SSIM 0.9616) (no change)

    native Switch_normal_dark cn1 Switch_normal_dark
    Left: native widget. Right: Codename One render.

  • TextField_disabled_dark -- 96.21% fidelity (SSIM 0.9648) (no change)

    native TextField_disabled_dark cn1 TextField_disabled_dark
    Left: native widget. Right: Codename One render.

  • RaisedButton_normal_dark -- 96.41% fidelity (SSIM 0.9516) (no change)

    native RaisedButton_normal_dark cn1 RaisedButton_normal_dark
    Left: native widget. Right: Codename One render.

  • Switch_disabled_light -- 96.43% fidelity (SSIM 0.9698) (no change)

    native Switch_disabled_light cn1 Switch_disabled_light
    Left: native widget. Right: Codename One render.

  • Button_disabled_light -- 96.80% fidelity (SSIM 0.9596) (no change)

    native Button_disabled_light cn1 Button_disabled_light
    Left: native widget. Right: Codename One render.

  • ProgressBar_normal_dark -- 96.91% fidelity (SSIM 0.9669) (no change)

    native ProgressBar_normal_dark cn1 ProgressBar_normal_dark
    Left: native widget. Right: Codename One render.

  • RaisedButton_disabled_dark -- 97.02% fidelity (SSIM 0.9549) (no change)

    native RaisedButton_disabled_dark cn1 RaisedButton_disabled_dark
    Left: native widget. Right: Codename One render.

  • FloatingActionButton_normal_dark -- 97.07% fidelity (SSIM 0.9521) (no change)

    native FloatingActionButton_normal_dark cn1 FloatingActionButton_normal_dark
    Left: native widget. Right: Codename One render.

  • ProgressBar_normal_light -- 97.26% fidelity (SSIM 0.9739) (no change)

    native ProgressBar_normal_light cn1 ProgressBar_normal_light
    Left: native widget. Right: Codename One render.

  • RaisedButton_disabled_light -- 97.26% fidelity (SSIM 0.9611) (no change)

    native RaisedButton_disabled_light cn1 RaisedButton_disabled_light
    Left: native widget. Right: Codename One render.

  • TextField_disabled_light -- 97.29% fidelity (SSIM 0.9649) (no change)

    native TextField_disabled_light cn1 TextField_disabled_light
    Left: native widget. Right: Codename One render.

  • RaisedButton_normal_light -- 97.32% fidelity (SSIM 0.9613) (no change)

    native RaisedButton_normal_light cn1 RaisedButton_normal_light
    Left: native widget. Right: Codename One render.

  • TextField_normal_dark -- 97.61% fidelity (SSIM 0.9583) (no change)

    native TextField_normal_dark cn1 TextField_normal_dark
    Left: native widget. Right: Codename One render.

  • TextField_normal_light -- 97.62% fidelity (SSIM 0.9582) (no change)

    native TextField_normal_light cn1 TextField_normal_light
    Left: native widget. Right: Codename One render.

  • Slider_normal_dark -- 98.39% fidelity (SSIM 0.9900) (no change)

    native Slider_normal_dark cn1 Slider_normal_dark
    Left: native widget. Right: Codename One render.

  • Toolbar_normal_light -- 98.69% fidelity (SSIM 0.9739) (no change)

    native Toolbar_normal_light cn1 Toolbar_normal_light
    Left: native widget. Right: Codename One render.

  • Slider_normal_light -- 98.95% fidelity (SSIM 0.9908) (no change)

    native Slider_normal_light cn1 Slider_normal_light
    Left: native widget. Right: Codename One render.

  • Slider_disabled_dark -- 99.56% fidelity (SSIM 0.9927) (no change)

    native Slider_disabled_dark cn1 Slider_disabled_dark
    Left: native widget. Right: Codename One render.

  • Slider_disabled_light -- 99.59% fidelity (SSIM 0.9932) (no change)

    native Slider_disabled_light cn1 Slider_disabled_light
    Left: native widget. Right: Codename One render.

setHorizontal only called updateUIIDs inside its "GroupElement" branch, so a
group that already carried the ToggleButton UIID -- set explicitly, rather than
swapped in by this method -- became segmented on the orientation change and
applied nothing. isGroupingActive then reported that the group owned its
members' UIIDs while they still wore their own, which is also what
Button.groupOwnsUIID reads, until an unrelated insertion or theme refresh
happened to put it right.

Orientation alone decides activation for such a group, so the apply is now
unconditional rather than confined to the branch that renames the UIID.

Found in review, and the last of the flip points in this family.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 875f7159b9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…e group

A grouped ComboBox is forced into spinner mode. removeComponentImpl restored
the UIID and nothing else, so a combo that left the group went on opening as a
spinner for the rest of its life. That is older than this branch, but the
self-activating segmented group is what makes it reachable with no theme
constant set, which is why it is fixed here.

The restore was also lossy in the other direction: it assigned the group's own
uiidsDirty flag rather than the value the application had chosen, so restoring
a combo that was deliberately set to spinner mode turned it into a popup. The
prior mode is now recorded on the way in, the way $origUIID already is, and put
back on the way out.

Two tests. The removal one fails against the code before this commit. The
second does not -- the old path happened to leave the flag true for the reason
that is the bug -- so it is there to pin that the restore returns the
application's choice rather than a hardcoded false, which is what a naive fix
would have done.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d0173ba65f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

All three from review, all three against the restore added in the previous
commit, and each has a test that fails without its fix.

A missing snapshot is not the same as "it was false". An inactive group never
records one, so restoring unconditionally took spinner mode away from an
application that had asked for it, merely because the combo passed through an
inert ComponentGroup. Absent snapshot now means this group took nothing and has
nothing to give back.

The snapshot is scoped to one membership. Left in place after a restore, a
second grouping kept the value the first had captured, so a combo the
application changed in between came back wrong. It is cleared on the way out.

Removal during an animation restored nothing. Container.removeComponentImpl
queues the physical removal while the AnimationManager is animating and leaves
the child in the component list, so the restore ran and updateUIIDs put the
grouped UIID and spinner mode straight back -- and the queued callback goes to
removeComponentImplNoAnimationSafety, which never reaches this class, so nothing
undid it. Re-grouping the remaining members now happens before the departing one
is restored, so the restore is last and stands.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 508f2a3941

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@shai-almog

shai-almog commented Sep 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 151 screenshots: 151 matched.

Native Android coverage

  • πŸ“Š Line coverage: 9.24% (9184/99417 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 8.99% (47193/524920), branch 3.55% (1767/49739), complexity 3.52% (1868/53026), method 5.43% (1514/27888), class 10.89% (407/3736)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6367 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.ClassReader – 0.00% (0/1524 lines covered)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1187 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.MethodWriter – 0.00% (0/922 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/736 lines covered)
      • com.google.common.cache.com.google.common.cache.LocalCache$Segment – 0.00% (0/726 lines covered)
      • okio.okio.Buffer – 0.00% (0/687 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/625 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.Frame – 0.00% (0/570 lines covered)

βœ… Native Android screenshot tests passed.

Native Android coverage

  • πŸ“Š Line coverage: 9.24% (9184/99417 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 8.99% (47193/524920), branch 3.55% (1767/49739), complexity 3.52% (1868/53026), method 5.43% (1514/27888), class 10.89% (407/3736)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6367 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.ClassReader – 0.00% (0/1524 lines covered)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1187 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.MethodWriter – 0.00% (0/922 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/736 lines covered)
      • com.google.common.cache.com.google.common.cache.LocalCache$Segment – 0.00% (0/726 lines covered)
      • okio.okio.Buffer – 0.00% (0/687 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/625 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.Frame – 0.00% (0/570 lines covered)

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend scalar fallback (no native SIMD)
SIMD int-add (64K x300) java 123ms / native 71ms = 1.7x speedup
SIMD float-mul (64K x300) java 50ms / native 67ms = 0.7x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 83.000 ms
Base64 CN1 decode 69.000 ms
Base64 native encode 508.000 ms
Base64 encode ratio (CN1/native) 0.163x (83.7% faster)
Base64 native decode 308.000 ms
Base64 decode ratio (CN1/native) 0.224x (77.6% faster)
Image encode benchmark status skipped (SIMD unsupported)

Removal is hooked in two places now, because the two things that have to happen
are true at different moments.

removeComponentImpl restores the departing member. An animated removal only
queues the physical removal, so that member can sit in the component list for
the length of the animation, and waiting until completion leaves it wearing the
group's UIID throughout -- or for good, if the animation never completes.

removeComponentImplNoAnimationSafety re-groups the survivors, because that is
where the member is genuinely out of the list. Recomputing positions in
removeComponentImpl still counts a queued member, which left the survivor of a
two-element group reading ToggleButtonLast instead of ToggleButtonOnly, and the
queued callback goes straight to Container so nothing came back to correct it.
It is package-private and this class is in the same package, so this is the
supported hook rather than a workaround.

Every route out arrives there, which incidentally fixes replace(): it bypasses
removeComponentImpl entirely, so a replaced member used to keep the group's UIID
permanently. Its other half is left alone -- replace() inserts through
insertComponentAtImpl, which this class does not override, so the incoming
component is not grouped and never has been.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7e14363957

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Review found the insert-side twin of the removal seam fixed in the last commit,
twice: an addComponent during an animation, and replace(). Rather than patch
each, this moves the insert hook to the point that has the same property the
removal hook does.

insertComponentAtImpl is where a member genuinely enters the component list, and
every route arrives there -- the immediate insertion, the one the
AnimationManager queues, and replace(). insertComponentAt only queues while
animating, so positions recomputed there do not count the arriving member, and
the queued callback goes straight to Container and never comes back here. Both
are package-private and this class is in the same package, so both hooks are
supported rather than worked around.

That also settles replace() properly. The previous commit noted that its
incoming member was never grouped because it does not call insertComponentAt;
it does call insertComponentAtImpl, so hooking there groups it, and the note and
the test comment that recorded the gap are gone.

The class now has one rule on each side: group when a member is in, restore when
it is out, both at the moment it is actually true.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c4a6703887

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

updateUIID only snapshots when nothing is recorded, and nothing cleared the
record, so a component that was grouped, given a new UIID, and grouped again was
restored to the name it wore two memberships ago. Dormant on themes without
ComponentGroupBool; a self-activating horizontal group reaches it by default.

Cleared on departure, which is the same scoping the spinner snapshot already
got. Deliberately not on deactivation: a group that merely goes inactive still
holds the member, and Button reads this marker while working out what leaving
toggle mode should restore, so clearing it there would change behaviour that has
its own tests. Those tests -- RadioButtonTest, ButtonTest, CheckBoxTest,
ButtonGroupTest and the lead-component sample -- were run against this and pass.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c1080827fe

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…Horizontal gives

The guide said a horizontal ComponentGroup needs no theme constant, flatly.
isSegmented is narrower than that on purpose: it self-activates only while
elementUIID is exactly ToggleButton, so a group given its own element UIID
before being turned horizontal is theme-gated like a vertical one. There is a
test in this branch asserting precisely that, so the guide was promising
behaviour the implementation deliberately withholds.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6aad07dd41

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…hot too

Two more of the same family, both found in review.

Reordering decides which member is First and which is Last, so it belongs with
insertion and removal rather than outside them. Container.drop reorders through
setComponentIndex and starts a layout animation, reaching neither of the other
hooks, so a dragged segment kept the UIID of the position it came from --
reachable by default now that a horizontal group needs no theme constant.
setComponentIndex is package-private and this class is in the same package, so
it is the third supported hook and not a workaround.

Deactivating now drops $origUIID as departing already did. The previous commit
scoped the clear to departure out of caution about Button, which reads the
marker while working out what leaving toggle mode restores. The caution was
misplaced: Button's restore runs off its own preToggleUIID field, and the
branches that touch $origUIID exist to keep a live group's snapshot in step, so
they are correctly inert once the group has handed the UIID back. Run against
RadioButtonTest, ButtonTest, CheckBoxTest, ButtonGroupTest and the
lead-component sample, all passing.

Both comments that documented the old "set once, never cleared" lifetime -- the
one here and the one in Button -- say what is now true instead.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d82cd01c00

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

… here

Review asked grouping to preserve both aliases of a member configured through
setUIID(portrait, landscape). The defect it describes is real: getUIID resolves
to whichever alias matches the current orientation, the one-argument setUIID
writes the portrait slot, so in landscape the group's name never takes effect
and a restore can put a landscape alias into the portrait slot.

It is not fixable from this class. Component.landscapeUiid is private and has no
accessor, so there is nothing here to read or to put back, and the only way to
do it properly is to give Component a way to read and swap both aliases
together. That is a change to core styling, with its own reach beyond this
container, and it does not belong on a segmented-control fix.

Nothing about it is new either: updateUIID has always used the one-argument
setUIID, so every group that has ever been active -- the legacy iOS themes, any
forced group -- has behaved this way. What this branch changes is how easy it is
to reach, which is worth a note in the code rather than a workaround in it.

Recorded at the call site, since the review thread is not what a future reader
of this method will have.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b74c4af469

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

The class-level contract still told callers a component group does nothing
without ComponentGroupBool. That is what the code did before this branch and is
now wrong for a horizontal one, so the generated API documentation contradicted
both the implementation and the developer guide -- and a caller reading it would
not expect their children to be restyled.

Stated with the same boundary the code and the guide use: the exception covers a
horizontal group still wearing the ToggleButton UIIDs setHorizontal installs,
and naming your own element UIID puts it back under the constant.

The internal note on isGroupingActive had the same stale list of activation
conditions and is updated with it. Third time a claim has been corrected in one
place and left standing in another on this branch, so this one was swept by
grepping the class for the claim rather than fixing the line that was reported.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f0356fcc60

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

isSegmented derives activation from the layout, and Container.setLayout is
public, so a caller could flip a populated group between segmented and not
without anything putting the member UIIDs right: dropping a Y axis layout on a
horizontal group left every child wearing ToggleButton, and an X axis one on a
group already carrying that UIID never applied it.

Reconciling in setLayout covers that route and the setHorizontal route with one
rule, so setHorizontal no longer reconciles for itself. Its two halves are
reordered for that: the UIID swap now happens before the layout change, because
setLayout is what reconciles and it has to see the names the group means to use.
The other order would have run it once against a half-changed group.

That is the fifth hook in this family, and they all say the same thing --
insertion, removal, reordering, and now orientation each reconcile at the point
the thing positional UIIDs depend on actually changes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@shai-almog
shai-almog merged commit a14aaca into master Sep 12, 2026
32 checks passed
@shai-almog
shai-almog deleted the cg-segmented branch September 12, 2026 18:58
@shai-almog

shai-almog commented Sep 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 181 screenshots: 181 matched.
βœ… JavaScript-port screenshot tests passed.

@shai-almog

shai-almog commented Sep 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Native fidelity (iOS Modern, Metal)

68 pairs compared -- median 95.0%, worst 83.5% (Tabs_normal_dark), 25th pct 92.5%, mean 94.6%.

Distribution -- >=99%: 3 | 95-99%: 31 | 90-95%: 29 | <90%: 5

Component State Appearance Material Fidelity SSIM mean delta vs base Geometry
Tabs normal dark glass 83.5% 0.884 11.66 0.0 ok
Tabs normal light glass 86.4% 0.896 8.01 0.0 ok
Toolbar normal light glass 87.6% 0.951 4.24 0.0 ok
Toolbar normal dark glass 87.7% 0.950 3.69 0.0 ok
Button pressed dark glass 89.9% 0.958 4.21 0.0 OFF (off 12px, w 1.10)
TextField normal light normal 90.0% 0.958 2.78 -0.4 ok
Spinner normal dark normal 90.8% 0.881 3.39 -0.7 ok
TextField disabled light normal 91.1% 0.962 2.24 -0.2 ok
Spinner normal light normal 91.6% 0.910 4.11 -0.2 ok
RaisedButton disabled light glass 91.8% 0.961 3.09 +0.2 ok
Button normal dark glass 91.8% 0.958 3.52 0.0 OFF (off 12px, w 1.10)
Slider disabled dark normal 92.1% 0.943 2.45 -0.3 ok
Switch selected light normal 92.1% 0.981 1.47 0.0 ok
CheckBox normal light normal 92.2% 0.994 0.68 0.0 ok
RadioButton normal light normal 92.2% 0.994 0.68 0.0 ok
FlatButton normal dark glass 92.2% 0.983 2.21 +4.3 ok
Button normal light glass 92.4% 0.961 3.65 0.0 OFF (off 12px, w 1.10)
Slider normal dark normal 92.5% 0.944 2.63 -0.2 ok
RaisedButton disabled dark glass 92.7% 0.965 2.72 +1.3 ok
CheckBox disabled light normal 92.7% 0.995 0.50 0.0 ok
RadioButton disabled light normal 92.7% 0.995 0.50 0.0 ok
Button pressed light glass 92.9% 0.962 3.29 0.0 OFF (off 12px, w 1.10)
FlatButton pressed dark glass 92.9% 0.985 1.26 +2.3 ok
TabsGeom normal dark normal 93.0% 0.892 8.76 0.0 ok
TabsGeom normal light normal 93.0% 0.886 7.10 0.0 ok
FlatButton pressed light glass 93.2% 0.982 1.90 +4.3 ok
Button disabled dark glass 93.5% 0.962 2.47 0.0 OFF (off 12px, w 1.10)
Slider disabled light normal 94.0% 0.963 1.75 -0.1 OFF (h 4.50)
FlatButton normal light glass 94.2% 0.983 1.79 +1.3 ok
Button disabled light glass 94.4% 0.964 2.36 0.0 OFF (off 12px, w 1.10)
RaisedButton pressed dark glass 94.6% 0.965 2.07 +1.5 ok
RaisedButton normal dark glass 94.6% 0.966 2.08 +1.7 ok
RaisedButton pressed light glass 94.8% 0.967 2.22 +2.0 ok
RadioButton selected light normal 94.8% 0.992 0.86 0.0 ok
RaisedButton normal light glass 95.0% 0.967 2.19 +2.4 ok
Slider normal light normal 95.1% 0.959 1.56 0.0 ok
Switch normal light normal 95.5% 0.986 0.70 0.0 ok
CheckBox disabled dark normal 95.8% 0.993 0.25 0.0 ok
RadioButton disabled dark normal 95.8% 0.993 0.25 0.0 ok
CheckBox selected light normal 95.8% 0.994 0.67 0.0 ok
Switch selected dark normal 95.9% 0.985 1.02 0.0 ok
Switch disabled light normal 96.4% 0.990 0.53 0.0 ok
CheckBox normal dark normal 96.5% 0.993 0.35 0.0 ok
RadioButton normal dark normal 96.5% 0.993 0.35 0.0 ok
GlassPanelPhoto normal light glass 96.7% 0.980 7.95 +0.6 ok
GlassPanelPhoto normal dark glass 96.8% 0.983 8.78 +0.6 ok
TabOne normal dark normal 96.8% 0.953 4.44 +0.7 ok
Switch normal dark normal 96.8% 0.986 0.82 0.0 ok
RadioButton selected dark normal 96.8% 0.991 0.57 0.0 ok
TextField normal dark normal 96.9% 0.949 3.30 -0.2 ok
TextField disabled dark normal 97.2% 0.953 2.37 -0.2 ok
ProgressBar normal dark normal 97.5% 0.997 0.60 +3.0 ok
TabOne normal light normal 97.5% 0.961 2.89 +1.9 ok
ProgressBar normal light normal 97.6% 0.999 0.61 +2.2 ok
CheckBox selected dark normal 97.8% 0.993 0.38 0.0 ok
Dialog normal dark normal 97.9% 0.961 1.38 +0.9 ok
Dialog normal light normal 98.0% 0.963 1.42 +0.9 ok
Switch disabled dark normal 98.0% 0.987 0.41 +2.5 ok
GlassIcon normal dark normal 98.6% 0.984 3.55 0.0 ok
GlassText normal dark normal 98.6% 0.984 3.52 0.0 ok
GlassIcon normal light normal 98.7% 0.986 3.54 0.0 ok
GlassText normal light normal 98.7% 0.986 3.58 0.0 ok
GlassPanelGrad normal light normal 98.9% 0.994 4.38 +0.7 ok
GlassPanelGrad normal dark normal 99.0% 0.993 3.84 +0.5 ok
GlassPanelGrey normal dark normal 99.0% 0.992 3.30 +0.6 ok
GlassPanelGrey normal light normal 99.1% 0.994 3.29 +0.7 ok
GlassPanelRed normal dark normal 99.1% 0.993 3.22 +0.5 ok
GlassPanelRed normal light normal 99.1% 0.994 3.49 +0.7 ok
Geometry vs native (bbox offset / size ratio / center offset / corner radius) -- gated separately from the visual score
Component State Appearance bbox dx,dy (px) w ratio h ratio center off (px) radius native->cn1 (px)
Button pressed dark +0,+0 1.104 1.000 11.5 45.4 -> 45.3
Button normal dark +0,+0 1.104 1.000 11.5 45.8 -> 45.2
Button normal light +0,+0 1.104 1.000 11.5 44.5 -> 45.3
Button pressed light +0,+0 1.104 1.000 11.5 48.1 -> 45.4
Button disabled dark +0,+0 1.104 1.000 11.5 45.1 -> 45.2
Button disabled light +0,+0 1.104 1.000 11.5 44.0 -> 45.3
TabOne normal dark -3,+0 1.007 0.948 4.9 80.3 -> 77.3
TabOne normal light -3,+0 1.007 0.948 4.9 79.1 -> 77.0
Toolbar normal light +4,+7 0.987 0.926 3.5 62.5 -> 56.1
Toolbar normal dark +4,+7 0.987 0.919 3.2 60.5 -> 55.5
Switch selected light +0,+0 1.028 1.026 2.7 -
RaisedButton disabled dark +0,+0 1.024 1.011 2.6 49.8 -> 46.1
Slider disabled light +0,-29 1.000 4.500 2.5 -
CheckBox disabled light +1,-3 1.000 1.023 2.2 -
RadioButton disabled light +1,-3 1.000 1.023 2.2 -
CheckBox disabled dark +1,-3 1.000 1.023 2.2 -
RadioButton disabled dark +1,-3 1.000 1.023 2.2 -
RaisedButton disabled light +0,+0 1.019 1.011 2.1 54.1 -> 96.6
RaisedButton pressed dark +0,+0 1.019 1.011 2.1 44.5 -> 44.3
RaisedButton normal dark +0,+0 1.019 1.011 2.1 44.4 -> 44.3
RaisedButton pressed light +0,+0 1.019 1.011 2.1 44.7 -> 44.3
RaisedButton normal light +0,+0 1.019 1.011 2.1 44.5 -> 44.1
Switch normal light +0,+0 1.023 1.013 2.1 -
Switch disabled light +0,+0 1.023 1.013 2.1 -
Switch normal dark +0,+0 1.023 1.013 2.1 -
Switch disabled dark +0,+0 1.023 1.013 2.1 -
CheckBox normal dark +0,-2 1.000 1.000 2.0 -
RadioButton normal dark +0,-2 1.000 1.000 2.0 -
RadioButton selected dark +0,-2 1.000 1.000 2.0 -
CheckBox selected dark +0,-2 1.000 1.000 2.0 -
Tabs normal dark +9,+0 0.973 1.012 1.8 79.7 -> 80.7
Tabs normal light +9,+0 0.973 1.012 1.8 79.2 -> 80.3
TabsGeom normal dark +9,+0 0.973 1.012 1.8 80.5 -> 80.9
TabsGeom normal light +9,+0 0.973 1.012 1.8 79.3 -> 80.6
FlatButton normal dark +4,+0 0.966 1.011 1.6 91.8 -> 95.7
FlatButton pressed dark +4,+0 0.966 1.011 1.6 95.3 -> 97.9
Switch selected dark +0,+0 1.017 1.013 1.6 -
CheckBox normal light +0,-2 1.000 1.011 1.5 -
RadioButton normal light +0,-2 1.000 1.011 1.5 -
RadioButton selected light +0,-2 1.000 1.011 1.5 -
CheckBox selected light +0,-2 1.000 1.011 1.5 -
Spinner normal light +11,-9 0.978 1.055 1.1 -
GlassIcon normal dark +0,+1 0.999 1.000 1.1 92.1 -> 91.5
GlassText normal dark +0,+1 0.999 1.000 1.1 92.1 -> 91.5
Spinner normal dark +12,-9 0.977 1.055 1.0 -
GlassPanelGrey normal dark +0,+1 1.000 1.000 1.0 26.4 -> 26.9
FlatButton normal light +0,+0 0.993 1.011 0.7 91.9 -> 51.8
Slider disabled dark +0,-1 1.000 1.015 0.5 -
FlatButton pressed light +1,+0 0.986 1.011 0.5 95.4 -> 65.6
Slider normal light +0,+1 1.000 0.964 0.5 -
GlassPanelPhoto normal light +0,+0 1.000 1.005 0.5 25.6 -> 31.4
GlassPanelPhoto normal dark +0,+0 1.000 1.005 0.5 23.0 -> 27.0
ProgressBar normal dark +0,+0 1.000 0.900 0.5 -
ProgressBar normal light +0,+0 1.000 0.900 0.5 -
GlassIcon normal light +0,+0 1.000 1.005 0.5 91.6 -> 92.3
GlassText normal light +0,+0 1.000 1.005 0.5 91.6 -> 92.3
GlassPanelGrad normal light +0,+0 1.000 1.005 0.5 22.3 -> 25.9
GlassPanelGrad normal dark +1,+1 0.998 0.995 0.5 25.7 -> 22.5
GlassPanelGrey normal light +0,+0 1.000 1.005 0.5 22.4 -> 26.0
GlassPanelRed normal dark +1,+1 0.998 0.995 0.5 26.6 -> 22.8
GlassPanelRed normal light +0,+0 1.000 1.005 0.5 22.1 -> 26.1
TextField normal light +0,+0 1.000 1.000 0.0 -
TextField disabled light +0,+0 1.000 1.000 0.0 -
Slider normal dark +0,+0 1.000 1.000 0.0 -
TextField normal dark +0,+0 1.000 1.000 0.0 -
TextField disabled dark +0,+0 1.000 1.000 0.0 -
Dialog normal dark +0,+0 1.000 1.000 0.0 -
Dialog normal light +0,+0 1.000 1.000 0.0 -

Side-by-side comparisons (worst first)

  • Tabs_normal_dark -- 83.45% fidelity (SSIM 0.8842) (no change)

    native Tabs_normal_dark cn1 Tabs_normal_dark
    Left: native widget. Right: Codename One render.

  • Tabs_normal_light -- 86.44% fidelity (SSIM 0.8961) (no change)

    native Tabs_normal_light cn1 Tabs_normal_light
    Left: native widget. Right: Codename One render.

  • Toolbar_normal_light -- 87.64% fidelity (SSIM 0.9511) (no change)

    native Toolbar_normal_light cn1 Toolbar_normal_light
    Left: native widget. Right: Codename One render.

  • Toolbar_normal_dark -- 87.70% fidelity (SSIM 0.9495) (no change)

    native Toolbar_normal_dark cn1 Toolbar_normal_dark
    Left: native widget. Right: Codename One render.

  • Button_pressed_dark -- 89.93% fidelity (SSIM 0.9576) (no change)

    native Button_pressed_dark cn1 Button_pressed_dark
    Left: native widget. Right: Codename One render.

  • TextField_normal_light -- 90.03% fidelity (SSIM 0.9576) (-0.37 vs baseline)

    native TextField_normal_light cn1 TextField_normal_light
    Left: native widget. Right: Codename One render.

  • Spinner_normal_dark -- 90.78% fidelity (SSIM 0.8814) (-0.69 vs baseline)

    native Spinner_normal_dark cn1 Spinner_normal_dark
    Left: native widget. Right: Codename One render.

  • TextField_disabled_light -- 91.13% fidelity (SSIM 0.9619) (-0.22 vs baseline)

    native TextField_disabled_light cn1 TextField_disabled_light
    Left: native widget. Right: Codename One render.

  • Spinner_normal_light -- 91.58% fidelity (SSIM 0.9099) (-0.21 vs baseline)

    native Spinner_normal_light cn1 Spinner_normal_light
    Left: native widget. Right: Codename One render.

  • RaisedButton_disabled_light -- 91.76% fidelity (SSIM 0.9613) (+0.15 vs baseline)

    native RaisedButton_disabled_light cn1 RaisedButton_disabled_light
    Left: native widget. Right: Codename One render.

  • Button_normal_dark -- 91.84% fidelity (SSIM 0.9583) (no change)

    native Button_normal_dark cn1 Button_normal_dark
    Left: native widget. Right: Codename One render.

  • Slider_disabled_dark -- 92.13% fidelity (SSIM 0.9434) (-0.31 vs baseline)

    native Slider_disabled_dark cn1 Slider_disabled_dark
    Left: native widget. Right: Codename One render.

  • Switch_selected_light -- 92.13% fidelity (SSIM 0.9806) (no change)

    native Switch_selected_light cn1 Switch_selected_light
    Left: native widget. Right: Codename One render.

  • CheckBox_normal_light -- 92.16% fidelity (SSIM 0.9938) (no change)

    native CheckBox_normal_light cn1 CheckBox_normal_light
    Left: native widget. Right: Codename One render.

  • RadioButton_normal_light -- 92.16% fidelity (SSIM 0.9938) (no change)

    native RadioButton_normal_light cn1 RadioButton_normal_light
    Left: native widget. Right: Codename One render.

  • FlatButton_normal_dark -- 92.21% fidelity (SSIM 0.9833) (+4.25 vs baseline)

    native FlatButton_normal_dark cn1 FlatButton_normal_dark
    Left: native widget. Right: Codename One render.

  • Button_normal_light -- 92.37% fidelity (SSIM 0.9609) (no change)

    native Button_normal_light cn1 Button_normal_light
    Left: native widget. Right: Codename One render.

  • Slider_normal_dark -- 92.52% fidelity (SSIM 0.9441) (-0.22 vs baseline)

    native Slider_normal_dark cn1 Slider_normal_dark
    Left: native widget. Right: Codename One render.

  • RaisedButton_disabled_dark -- 92.65% fidelity (SSIM 0.9653) (+1.25 vs baseline)

    native RaisedButton_disabled_dark cn1 RaisedButton_disabled_dark
    Left: native widget. Right: Codename One render.

  • CheckBox_disabled_light -- 92.71% fidelity (SSIM 0.9953) (no change)

    native CheckBox_disabled_light cn1 CheckBox_disabled_light
    Left: native widget. Right: Codename One render.

  • RadioButton_disabled_light -- 92.71% fidelity (SSIM 0.9953) (no change)

    native RadioButton_disabled_light cn1 RadioButton_disabled_light
    Left: native widget. Right: Codename One render.

  • Button_pressed_light -- 92.88% fidelity (SSIM 0.9617) (no change)

    native Button_pressed_light cn1 Button_pressed_light
    Left: native widget. Right: Codename One render.

  • FlatButton_pressed_dark -- 92.90% fidelity (SSIM 0.9849) (+2.31 vs baseline)

    native FlatButton_pressed_dark cn1 FlatButton_pressed_dark
    Left: native widget. Right: Codename One render.

  • TabsGeom_normal_dark -- 93.01% fidelity (SSIM 0.8920) (no change)

    native TabsGeom_normal_dark cn1 TabsGeom_normal_dark
    Left: native widget. Right: Codename One render.

  • TabsGeom_normal_light -- 93.02% fidelity (SSIM 0.8861) (no change)

    native TabsGeom_normal_light cn1 TabsGeom_normal_light
    Left: native widget. Right: Codename One render.

  • FlatButton_pressed_light -- 93.20% fidelity (SSIM 0.9819) (+4.33 vs baseline)

    native FlatButton_pressed_light cn1 FlatButton_pressed_light
    Left: native widget. Right: Codename One render.

  • Button_disabled_dark -- 93.52% fidelity (SSIM 0.9618) (no change)

    native Button_disabled_dark cn1 Button_disabled_dark
    Left: native widget. Right: Codename One render.

  • Slider_disabled_light -- 93.96% fidelity (SSIM 0.9625) (-0.05 vs baseline)

    native Slider_disabled_light cn1 Slider_disabled_light
    Left: native widget. Right: Codename One render.

  • FlatButton_normal_light -- 94.18% fidelity (SSIM 0.9825) (+1.32 vs baseline)

    native FlatButton_normal_light cn1 FlatButton_normal_light
    Left: native widget. Right: Codename One render.

  • Button_disabled_light -- 94.35% fidelity (SSIM 0.9636) (no change)

    native Button_disabled_light cn1 Button_disabled_light
    Left: native widget. Right: Codename One render.

  • RaisedButton_pressed_dark -- 94.56% fidelity (SSIM 0.9653) (+1.46 vs baseline)

    native RaisedButton_pressed_dark cn1 RaisedButton_pressed_dark
    Left: native widget. Right: Codename One render.

  • RaisedButton_normal_dark -- 94.57% fidelity (SSIM 0.9659) (+1.69 vs baseline)

    native RaisedButton_normal_dark cn1 RaisedButton_normal_dark
    Left: native widget. Right: Codename One render.

  • RaisedButton_pressed_light -- 94.80% fidelity (SSIM 0.9665) (+2.04 vs baseline)

    native RaisedButton_pressed_light cn1 RaisedButton_pressed_light
    Left: native widget. Right: Codename One render.

  • RadioButton_selected_light -- 94.84% fidelity (SSIM 0.9916) (no change)

    native RadioButton_selected_light cn1 RadioButton_selected_light
    Left: native widget. Right: Codename One render.

  • RaisedButton_normal_light -- 95.01% fidelity (SSIM 0.9673) (+2.40 vs baseline)

    native RaisedButton_normal_light cn1 RaisedButton_normal_light
    Left: native widget. Right: Codename One render.

  • Slider_normal_light -- 95.09% fidelity (SSIM 0.9588) (-0.04 vs baseline)

    native Slider_normal_light cn1 Slider_normal_light
    Left: native widget. Right: Codename One render.

  • Switch_normal_light -- 95.51% fidelity (SSIM 0.9863) (no change)

    native Switch_normal_light cn1 Switch_normal_light
    Left: native widget. Right: Codename One render.

  • CheckBox_disabled_dark -- 95.76% fidelity (SSIM 0.9928) (no change)

    native CheckBox_disabled_dark cn1 CheckBox_disabled_dark
    Left: native widget. Right: Codename One render.

  • RadioButton_disabled_dark -- 95.76% fidelity (SSIM 0.9928) (no change)

    native RadioButton_disabled_dark cn1 RadioButton_disabled_dark
    Left: native widget. Right: Codename One render.

  • CheckBox_selected_light -- 95.80% fidelity (SSIM 0.9938) (no change)

    native CheckBox_selected_light cn1 CheckBox_selected_light
    Left: native widget. Right: Codename One render.

  • Switch_selected_dark -- 95.90% fidelity (SSIM 0.9850) (no change)

    native Switch_selected_dark cn1 Switch_selected_dark
    Left: native widget. Right: Codename One render.

  • Switch_disabled_light -- 96.35% fidelity (SSIM 0.9896) (+0.04 vs baseline)

    native Switch_disabled_light cn1 Switch_disabled_light
    Left: native widget. Right: Codename One render.

  • CheckBox_normal_dark -- 96.52% fidelity (SSIM 0.9927) (no change)

    native CheckBox_normal_dark cn1 CheckBox_normal_dark
    Left: native widget. Right: Codename One render.

  • RadioButton_normal_dark -- 96.52% fidelity (SSIM 0.9927) (no change)

    native RadioButton_normal_dark cn1 RadioButton_normal_dark
    Left: native widget. Right: Codename One render.

  • GlassPanelPhoto_normal_light -- 96.72% fidelity (SSIM 0.9804) (+0.64 vs baseline)

    native GlassPanelPhoto_normal_light cn1 GlassPanelPhoto_normal_light
    Left: native widget. Right: Codename One render.

  • GlassPanelPhoto_normal_dark -- 96.76% fidelity (SSIM 0.9832) (+0.59 vs baseline)

    native GlassPanelPhoto_normal_dark cn1 GlassPanelPhoto_normal_dark
    Left: native widget. Right: Codename One render.

  • TabOne_normal_dark -- 96.77% fidelity (SSIM 0.9526) (+0.73 vs baseline)

    native TabOne_normal_dark cn1 TabOne_normal_dark
    Left: native widget. Right: Codename One render.

  • Switch_normal_dark -- 96.80% fidelity (SSIM 0.9855) (no change)

    native Switch_normal_dark cn1 Switch_normal_dark
    Left: native widget. Right: Codename One render.

  • RadioButton_selected_dark -- 96.81% fidelity (SSIM 0.9908) (no change)

    native RadioButton_selected_dark cn1 RadioButton_selected_dark
    Left: native widget. Right: Codename One render.

  • TextField_normal_dark -- 96.88% fidelity (SSIM 0.9492) (-0.20 vs baseline)

    native TextField_normal_dark cn1 TextField_normal_dark
    Left: native widget. Right: Codename One render.

  • TextField_disabled_dark -- 97.19% fidelity (SSIM 0.9526) (-0.15 vs baseline)

    native TextField_disabled_dark cn1 TextField_disabled_dark
    Left: native widget. Right: Codename One render.

  • ProgressBar_normal_dark -- 97.47% fidelity (SSIM 0.9973) (+3.03 vs baseline)

    native ProgressBar_normal_dark cn1 ProgressBar_normal_dark
    Left: native widget. Right: Codename One render.

  • TabOne_normal_light -- 97.51% fidelity (SSIM 0.9608) (+1.89 vs baseline)

    native TabOne_normal_light cn1 TabOne_normal_light
    Left: native widget. Right: Codename One render.

  • ProgressBar_normal_light -- 97.60% fidelity (SSIM 0.9989) (+2.19 vs baseline)

    native ProgressBar_normal_light cn1 ProgressBar_normal_light
    Left: native widget. Right: Codename One render.

  • CheckBox_selected_dark -- 97.79% fidelity (SSIM 0.9932) (no change)

    native CheckBox_selected_dark cn1 CheckBox_selected_dark
    Left: native widget. Right: Codename One render.

  • Dialog_normal_dark -- 97.86% fidelity (SSIM 0.9614) (+0.89 vs baseline)

    native Dialog_normal_dark cn1 Dialog_normal_dark
    Left: native widget. Right: Codename One render.

  • Dialog_normal_light -- 97.95% fidelity (SSIM 0.9634) (+0.86 vs baseline)

    native Dialog_normal_light cn1 Dialog_normal_light
    Left: native widget. Right: Codename One render.

  • Switch_disabled_dark -- 98.01% fidelity (SSIM 0.9869) (+2.48 vs baseline)

    native Switch_disabled_dark cn1 Switch_disabled_dark
    Left: native widget. Right: Codename One render.

  • GlassIcon_normal_dark -- 98.59% fidelity (SSIM 0.9841) (no change)

    native GlassIcon_normal_dark cn1 GlassIcon_normal_dark
    Left: native widget. Right: Codename One render.

  • GlassText_normal_dark -- 98.59% fidelity (SSIM 0.9837) (no change)

    native GlassText_normal_dark cn1 GlassText_normal_dark
    Left: native widget. Right: Codename One render.

  • GlassIcon_normal_light -- 98.67% fidelity (SSIM 0.9860) (no change)

    native GlassIcon_normal_light cn1 GlassIcon_normal_light
    Left: native widget. Right: Codename One render.

  • GlassText_normal_light -- 98.69% fidelity (SSIM 0.9862) (no change)

    native GlassText_normal_light cn1 GlassText_normal_light
    Left: native widget. Right: Codename One render.

  • GlassPanelGrad_normal_light -- 98.91% fidelity (SSIM 0.9935) (+0.67 vs baseline)

    native GlassPanelGrad_normal_light cn1 GlassPanelGrad_normal_light
    Left: native widget. Right: Codename One render.

  • GlassPanelGrad_normal_dark -- 98.98% fidelity (SSIM 0.9928) (+0.55 vs baseline)

    native GlassPanelGrad_normal_dark cn1 GlassPanelGrad_normal_dark
    Left: native widget. Right: Codename One render.

  • GlassPanelGrey_normal_dark -- 98.99% fidelity (SSIM 0.9917) (+0.57 vs baseline)

    native GlassPanelGrey_normal_dark cn1 GlassPanelGrey_normal_dark
    Left: native widget. Right: Codename One render.

  • GlassPanelGrey_normal_light -- 99.05% fidelity (SSIM 0.9936) (+0.67 vs baseline)

    native GlassPanelGrey_normal_light cn1 GlassPanelGrey_normal_light
    Left: native widget. Right: Codename One render.

  • GlassPanelRed_normal_dark -- 99.09% fidelity (SSIM 0.9926) (+0.52 vs baseline)

    native GlassPanelRed_normal_dark cn1 GlassPanelRed_normal_dark
    Left: native widget. Right: Codename One render.

  • GlassPanelRed_normal_light -- 99.10% fidelity (SSIM 0.9939) (+0.67 vs baseline)

    native GlassPanelRed_normal_light cn1 GlassPanelRed_normal_light
    Left: native widget. Right: Codename One render.

@shai-almog

shai-almog commented Sep 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 148 screenshots: 148 matched.
βœ… Native Mac screenshot tests passed.

Benchmark Results

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

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 53ms / native 3ms = 17.6x speedup
SIMD float-mul (64K x300) java 55ms / native 2ms = 27.5x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path active (NEON-accelerated)
Base64 CN1 encode 157.000 ms
Base64 CN1 decode 91.000 ms
Base64 native encode 515.000 ms
Base64 encode ratio (CN1/native) 0.305x (69.5% faster)
Base64 native decode 249.000 ms
Base64 decode ratio (CN1/native) 0.365x (63.5% faster)
Base64 SIMD encode 48.000 ms
Base64 encode ratio (SIMD/CN1) 0.306x (69.4% faster)
Base64 SIMD decode 43.000 ms
Base64 decode ratio (SIMD/CN1) 0.473x (52.7% faster)
Base64 encode ratio (SIMD/native) 0.093x (90.7% faster)
Base64 decode ratio (SIMD/native) 0.173x (82.7% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 7.000 ms
Image createMask (SIMD on) 2.000 ms
Image createMask ratio (SIMD on/off) 0.286x (71.4% faster)
Image applyMask (SIMD off) 35.000 ms
Image applyMask (SIMD on) 26.000 ms
Image applyMask ratio (SIMD on/off) 0.743x (25.7% faster)
Image modifyAlpha (SIMD off) 26.000 ms
Image modifyAlpha (SIMD on) 22.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.846x (15.4% faster)
Image modifyAlpha removeColor (SIMD off) 27.000 ms
Image modifyAlpha removeColor (SIMD on) 22.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.815x (18.5% faster)

@shai-almog

shai-almog commented Sep 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 160 screenshots: 160 matched.
βœ… Native Mac screenshot tests passed.

Benchmark Results

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

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 73ms / native 3ms = 24.3x speedup
SIMD float-mul (64K x300) java 65ms / native 3ms = 21.6x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 native bridge unavailable (CN1 + SIMD + image benchmarks only)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path active (NEON-accelerated)
Base64 CN1 encode 163.000 ms
Base64 CN1 decode 96.000 ms
Image encode benchmark iterations 100
Image createMask (SIMD off) 9.000 ms
Image createMask (SIMD on) 3.000 ms
Image createMask ratio (SIMD on/off) 0.333x (66.7% faster)
Image applyMask (SIMD off) 42.000 ms
Image applyMask (SIMD on) 30.000 ms
Image applyMask ratio (SIMD on/off) 0.714x (28.6% faster)
Image modifyAlpha (SIMD off) 28.000 ms
Image modifyAlpha (SIMD on) 22.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.786x (21.4% faster)
Image modifyAlpha removeColor (SIMD off) 28.000 ms
Image modifyAlpha removeColor (SIMD on) 23.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.821x (17.9% faster)

@shai-almog

shai-almog commented Sep 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 149 screenshots: 149 matched.
βœ… Native iOS Metal screenshot tests passed.

Benchmark Results

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

Build and Run Timing

Metric Duration
Simulator Boot 92000 ms
Simulator Boot (Run) 1000 ms
App Install 14000 ms
App Launch 6000 ms
Test Execution 459000 ms

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 76ms / native 3ms = 25.3x speedup
SIMD float-mul (64K x300) java 307ms / native 4ms = 76.7x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path active (NEON-accelerated)
Base64 CN1 encode 204.000 ms
Base64 CN1 decode 118.000 ms
Base64 native encode 379.000 ms
Base64 encode ratio (CN1/native) 0.538x (46.2% faster)
Base64 native decode 631.000 ms
Base64 decode ratio (CN1/native) 0.187x (81.3% faster)
Base64 SIMD encode 51.000 ms
Base64 encode ratio (SIMD/CN1) 0.250x (75.0% faster)
Base64 SIMD decode 44.000 ms
Base64 decode ratio (SIMD/CN1) 0.373x (62.7% faster)
Base64 encode ratio (SIMD/native) 0.135x (86.5% faster)
Base64 decode ratio (SIMD/native) 0.070x (93.0% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 7.000 ms
Image createMask (SIMD on) 2.000 ms
Image createMask ratio (SIMD on/off) 0.286x (71.4% faster)
Image applyMask (SIMD off) 34.000 ms
Image applyMask (SIMD on) 25.000 ms
Image applyMask ratio (SIMD on/off) 0.735x (26.5% faster)
Image modifyAlpha (SIMD off) 26.000 ms
Image modifyAlpha (SIMD on) 26.000 ms
Image modifyAlpha ratio (SIMD on/off) 1.000x (0.0% slower)
Image modifyAlpha removeColor (SIMD off) 49.000 ms
Image modifyAlpha removeColor (SIMD on) 52.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 1.061x (6.1% slower)

@shai-almog

shai-almog commented Sep 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 144 screenshots: 144 matched.
βœ… Native Apple TV (tvOS, Metal) screenshot tests passed.

@shai-almog

shai-almog commented Sep 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 143 screenshots: 143 matched.
βœ… Native iOS screenshot tests passed.

Benchmark Results

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

Build and Run Timing

Metric Duration
Simulator Boot 97000 ms
Simulator Boot (Run) 1000 ms
App Install 22000 ms
App Launch 10000 ms
Test Execution 464000 ms

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 117ms / native 3ms = 39.0x speedup
SIMD float-mul (64K x300) java 104ms / native 3ms = 34.6x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path active (NEON-accelerated)
Base64 CN1 encode 238.000 ms
Base64 CN1 decode 134.000 ms
Base64 native encode 814.000 ms
Base64 encode ratio (CN1/native) 0.292x (70.8% faster)
Base64 native decode 453.000 ms
Base64 decode ratio (CN1/native) 0.296x (70.4% faster)
Base64 SIMD encode 81.000 ms
Base64 encode ratio (SIMD/CN1) 0.340x (66.0% faster)
Base64 SIMD decode 111.000 ms
Base64 decode ratio (SIMD/CN1) 0.828x (17.2% faster)
Base64 encode ratio (SIMD/native) 0.100x (90.0% faster)
Base64 decode ratio (SIMD/native) 0.245x (75.5% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 10.000 ms
Image createMask (SIMD on) 3.000 ms
Image createMask ratio (SIMD on/off) 0.300x (70.0% faster)
Image applyMask (SIMD off) 100.000 ms
Image applyMask (SIMD on) 55.000 ms
Image applyMask ratio (SIMD on/off) 0.550x (45.0% faster)
Image modifyAlpha (SIMD off) 184.000 ms
Image modifyAlpha (SIMD on) 106.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.576x (42.4% faster)
Image modifyAlpha removeColor (SIMD off) 361.000 ms
Image modifyAlpha removeColor (SIMD on) 219.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.607x (39.3% faster)

@shai-almog

shai-almog commented Sep 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 217 screenshots: 217 matched.
βœ… Native Apple Watch (watchOS, Core Graphics) screenshot tests passed.

shai-almog added a commit that referenced this pull request Sep 13, 2026
Not this branch's render. #5791 (ComponentGroup / segmented control) changed the
layout by about 4px below the Birthdate picker, and landed at 21:58 on 2026-09-12
while master last ran the Windows and Linux screenshot gates at 07:01 that
morning -- those gates skip most pushes to master, so nothing compared the new
render until the next PR did.

This branch is JavaScript-target only (the JS suspension analysis, the JS
emitter, parparvm_runtime.js and the JS port's own files), so it cannot reach
the Windows or Linux native renderers at all. The three goldens come from this
PR's own CI artifacts: the windows x64, arm64 and cross-build runs produce a
byte-identical PNG and share one golden, and both linux arches produce another,
so no arch is left mismatching.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
shai-almog added a commit that referenced this pull request Sep 13, 2026
* JS port: let a static initializer make a host call (issue #5774)

A <clinit> that reached the host answered `undefined` and said nothing.

`ensureClassInitialized` drives a generator clinit with a synchronous
run-to-completion loop that steps it with `result.next()` and discards
whatever it yields. For a HOST_CALL that means the message is never posted
to the main thread and the `yield` it came from resumes with `undefined`.
The JSO bridge turns that into a Java null with no error anywhere --
`isDegradedObjectResult` does not treat a null getter result as degraded --
so the app dies later, somewhere else, with nothing connecting it back.

In #5774 an app's `SystemFont` clinit read a preference. `Window.current()`
was answered `undefined`, fell through to wrapping the WORKER GLOBAL as the
window and cached that for the life of the worker, so `getLocalforage()`
read `self.localforage` (undefined) and `LocalForage.<init>` NPE'd on
`impl.config(opts)` -- a bare NPE naming a constructor the developer never
called.

Four changes:

* `jvm.ensureClassInitializedSuspending` drives the clinit with `yield*`, so
  its ops reach `handleYield` on the real trampoline and resume with the
  host's answer. `_Ig` routes there, with a shared stateless no-op iterator
  for the already-initialized case so the common path allocates nothing.

* The emitter uses `yield* _Ig("X")` instead of `_I("X")` at a guard whose
  clinit chain suspends, and `JavascriptSuspensionAnalysis` records the same
  guard (GETSTATIC / PUTSTATIC / INVOKESTATIC / NEW) as a call edge into that
  clinit so the method holding it is a generator. The two sides must agree:
  a `yield*` in a plain `function` is a SyntaxError, not a subtle bug.

* The synchronous driver now FAILS on an op it cannot service, naming the
  class and the op, instead of stepping past it and answering `undefined`.
  That is the whole point -- the residual gap (a suspending clinit reached
  from a method the analysis proved synchronous) is narrow and now loud.

* `Window.current()` no longer caches the worker-global fallback, so one
  failed round trip cannot pin a DOM-less window for the whole session, and
  `LocalForage.<init>` says which of the two things went wrong instead of
  NPE'ing.

Regression test: `JsClinitHostCallApp`, whose <clinit> asks the host to echo
41 through the same worker protocol the port uses. Before the fix the host
call is never sent; the test asserts 42 comes back.

`-Dparparvm.js.clinitedge.off=1` disables the analysis edges on both sides,
for A/B measuring the generator-count cost and for bisecting.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* JS port: resolve the static-field owner before deciding what a clinit guard names

Review found that the new clinit edges read the owner straight off the
instruction. A Fieldref names any accessible SUBTYPE rather than the declaring
class -- javac writes `getstatic Impl.VALUE` for a field the interface `Impl`
implements declares, confirmed with javap (`Fieldref Q$Impl.VALUE`) -- and the
emitter has always resolved that, because `_S` and the clinit are both keyed on
the declaring class. Reading it raw made the own-class/ancestor elision fire on
an access the emitter guards against the INTERFACE, so the edge was dropped for
a clinit that does suspend and the method stayed synchronous.

`classInitGuardOwner` is now the one implementation of "what class does this
instruction's guard name", living next to the emitter that places the guards,
parameterized by the class lookup because `classIndex` is only populated at emit
time and the analysis runs before it. The INVOKESTATIC owner goes through
`resolveDirectInvokeOwner` for the same reason.

Writing the test for that shape turned up an older bug in the same family, and
without it the shape cannot work at all. `JavascriptReachability` seeded the
clinit from the raw owner too, and `markClassInstantiated` walks the SUPERCLASS
chain only -- so the declaring interface's `<clinit>` was seeded by nothing,
culled, and the field read back as its default with no error anywhere. JLS
12.4.1 initializes the declaring interface. Both owners are marked now; the raw
one has been marked there for as long as the pass has existed.

The regression fixture covers both guard shapes and sums them, so either one
failing changes the answer: a plain static holder (echo 41 -> 42) and an
interface-declared field reached through the implementing class (echo 20 -> 21).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Reseed the ValidatorLightweightPicker goldens for windows and linux

Not this branch's render. #5791 (ComponentGroup / segmented control) changed the
layout by about 4px below the Birthdate picker, and landed at 21:58 on 2026-09-12
while master last ran the Windows and Linux screenshot gates at 07:01 that
morning -- those gates skip most pushes to master, so nothing compared the new
render until the next PR did.

This branch is JavaScript-target only (the JS suspension analysis, the JS
emitter, parparvm_runtime.js and the JS port's own files), so it cannot reach
the Windows or Linux native renderers at all. The three goldens come from this
PR's own CI artifacts: the windows x64, arm64 and cross-build runs produce a
byte-identical PNG and share one golden, and both linux arches produce another,
so no arch is left mismatching.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* JS port: a null invoke owner is "no guard here", not an NPE

`classInitGuardOwner` handed `resolveDirectInvokeOwner`'s result straight to
`sanitizeClassName`, which dereferences it. The resolver answers null for a null
owner -- that guard is why it has one -- so the analysis pass would have thrown
rather than reporting what every caller already understands: null means this
instruction places no class-init guard.

Found red-teaming this branch's own diff, not in review. ASM does not hand out a
null owner for a real methodref, so it is latent; the emitter's existing call
site has the same shape and has never fired.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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