Skip to content

Foldable skins: 3D fold simulation, lockstep recording, designer and agent tooling - #6242

Open
shai-almog wants to merge 2 commits into
masterfrom
foldable-skins
Open

shai-almog wants to merge 2 commits into
masterfrom
foldable-skins

Conversation

@shai-almog

Copy link
Copy Markdown
Collaborator

What

  • Simulator. A foldable skin can be a book fold, a flip or a dual-screen device, and it can have a cover display.
    • The device is drawn in 3D with com.codename1.gpu and animates between postures (flat, half, closed).
    • Closing the device moves the app to the cover display.
    • Rotation is animated in 3D.
    • The bundled iPhoneDuo skin is a foldable.
  • Recording.
    • A scripted recording runs in lockstep: the animation clock is pinned to each frame's timestamp, so folds and turns play smoothly at 60 fps however slowly the machine renders.
    • Simulate -> Record Device Tour records such a clip from the menu.
    • Hidden mode runs the simulator with no window, for agents: CN1_SIMULATOR_HIDDEN=1, -Dcn1.agent.hidden=true in Maven, -Pcn1.agent.hidden=true in Gradle.
  • Skin Designer.
    • Foldable and dual-screen authoring.
    • Frame sizes are physical units (0.2 mm at the device's density), so a camera hole is no longer half again too large.
    • The corner mask had an off-by-one that drew a faint outline around every skin. Fixed.
    • The cover image is the folded half of the body, with the cover screen at its real size.
  • devices.json. Curated data for the foldables and the Surface Duo 1 and 2, in tools/devicedb/foldables.json, applied by build_devices_json.py.
  • Agent skill.
    • A new reference, promo-videos-and-skins.md.
    • A new tool, SkinTool.java, builds a skin for any phone in the current device database, foldables included, with the same geometry as the designer.
    • Sim.java gains recording options and a fold command.

Verification

  • The javase tests pass:

    Test Tests
    FoldMotionTest 14
    FoldableSkinTest 5
    BundledFoldableSkinTest 1
    JavaSESoftwareDeviceBlendTest 5
    RecordingTest 13
  • SpotBugs reports zero findings for the Maven plugin and the Gradle plugin.

  • The control-character, author-tag and since-tag gates pass.

  • The skin designer's common module compiles.

  • Recordings checked by hand:

    • lockstep 60 fps tours, with the simulator visible and hidden;
    • a Pixel 9 skin built by SkinTool, loaded in the simulator and recorded.
  • Two adversarial review passes. Their findings are fixed in this PR:

    • The recorder's stop() could deadlock when called on the EDT during a lockstep recording. It now uses a SecondaryLoop.
    • A cover display shrunk to fit its body reported the wrong ppi.
    • A dual-screen device got a camera cutout it doesn't have.

🤖 Generated with Claude Code

…agent tooling

- Simulator: foldable skins (book, flip, dual screen) with a cover display,
  drawn in 3D with com.codename1.gpu and animated between postures; 3D
  device rotation.
- Recording: lockstep capture pins an animation clock per frame, so
  scripted fold/rotation clips are smooth at 60 fps on any machine;
  Simulate -> Record Device Tour; hidden (windowless) simulator for agents
  (CN1_SIMULATOR_HIDDEN, cn1.agent.hidden).
- Skin Designer: foldable/duo authoring, physical frame units, a fixed
  corner mask (no outline), cover image as the folded half of the body.
- devices.json: curated foldables and Surface Duo data.
- Agent skill: promo videos and skins reference, SkinTool.java.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shai-almog

shai-almog commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator Author

JavaSE simulator screenshot updates

Compared 12 screenshots: 11 matched, 1 updated.

  • javase-single-native-theme-ios-modern — updated screenshot. Screenshot differs (2200x1400 px, bit depth 8).

    javase-single-native-theme-ios-modern
    Preview info: JPEG preview quality 20; JPEG preview quality 20; downscaled to 1540x980.
    Full-resolution PNG saved as javase-single-native-theme-ios-modern.png in workflow artifacts.

@github-actions

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: 1 alert(s) (0 errors, 1 warnings, 0 suggestions) (report)
  • Paragraph capitalization: No paragraph capitalization issues (report)
  • LanguageTool: No grammar matches (report)
  • Image references: No unused images detected (report)

@github-actions

Copy link
Copy Markdown
Contributor

Cloudflare Preview

…ldable skins

The javase screenshot baseline caught a greyed fold button on every
ordinary skin; the button is now shown only for a foldable skin.

Co-Authored-By: Claude Opus 5.5 <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