Skip to content

Support Watch 3 Pro faces in the editor and gate unsafe installs - #116

Merged
freethinkel merged 8 commits into
mainfrom
wp3-faces-editor
Nov 22, 2026
Merged

freethinkel merged 8 commits into
mainfrom
wp3-faces-editor

Conversation

@freethinkel

Copy link
Copy Markdown
Collaborator

Summary

The editor opens, previews, edits and saves CMF Watch 3 Pro faces, and an install no longer sends a watch a procedural widget its firmware boot-loops on.

 flashFx (editor and store installs both end here)
   fitForWatch
   assertFlashable
+  assertWatchCompat            # raw bytes, read as the firmware's parser reads them
+    widget type >= 8           -> no watch
+    widget type 4..7           -> Watch 3 Pro
+      imageless type 4         -> Watch Pro 2 too (its parser drops it)
+      PRO2_FACES_STUB = null   # later: Pro 2 with a stub that draws them
+    cf 14 (A8) on a Pro 2      -> refused, use Export for Watch Pro 2
+    cf 28 on a Pro 2           -> counted unpacked, 1.955 MB a screen
   uploadWatchface
 editor/core/
   format/
+    compat.ts        # the gate
   document/
+    proc.ts          # 0x82 + 0x5c widgets as layers
+    support.ts       # the note under the canvas, same rule as the gate
+    pro2.ts          # Export for Watch Pro 2: cf 14/28 -> cf 5, theme pinned
   render/
+    proc-scene.ts    # port of cmf-watch-sdk wfproc.rs (MIT)
+    proc.ts          # simulator values -> panels, clips, ring

Also in here:

  • 0x5c/0x5d/0x5e/0x63 are TLV leaves. A zero-filled 0x5c was dropped on save.
  • A face with no title node no longer gains one on save.
  • A PNG dropped on a JPEG frame is re-encoded. It was stored as PNG bytes under cf 1.
  • The firmware page and the Developer panel warn before a rollback.

Palette numbers are left as they are. No vendor file, frame or resource is committed: tests build synthetic faces, and local corpora come in through environment variables.

Evidence

All emulator runs are cmf-watch-utils on stock 1.0.0.73 (Pro 2) and 1.0.1.77 (3 Pro).

  • Before: DataPulse (type 6) passes the install checks and boot-loops a Pro 2 (5 boots, 5 faults in 45 s).
    After: refused before upload (tests/flash-compat.browser.test.ts).
  • Before: a type 4 with a short struct and a condition looks imageless in the tree and boot-loops a Pro 2 (3/3).
    After: refused. The probes that crashed the emulator on a widget are all refused (tests/face-compat.test.ts).
  • Before: Citrusdash and Eleginn originals stop the Pro 2 emulator on A8.
    After: refused on a Pro 2. Their exports boot with 0 faults and draw fully, as do the Cluster Clock, Duskscape and Vive Lite exports.
  • Before: DataPulse's panels are missing, with stray glyphs in the corner.
    After: weather and chart without data match the 3 Pro emulator frame (lit-pixel IoU 1.000 at its 2 px offset).
  • Before: 98 of 100 stock Pro 2 faces save byte for byte.
    After: 100 of 100, plus 13 of 13 local 3 Pro originals. All 938 published faces save to the same bytes as on main.
  • pnpm test with all three local corpora: 681 passed, 0 skipped. check, lint, format:check and vite build pass. CI has no corpora, so those tests skip there.

Not tested: real hardware, BLE, Bluefy, stub 10 on a watch, Spinnin' Dials (the emulator lacks the VG-Lite register it needs). The Ukrainian, Spanish and Hindi strings weren't proofread by native speakers.

Merge Danger

Door: two-way

No schema, stored data or firmware changes. A revert restores the old installs, boot loops included.

Blast Radius: installs

Measured on the 938 published faces:

Effect on a Watch Pro 2 install Faces
newly refused for A8 80
of those, tagged Watch Pro 2 or untagged (so on that shelf) 18
of the 80, with no export either (over 1.955 MB a screen) 5
newly refused for unpacked ETC2 size 1
newly refused for a procedural widget 0

The 18 have about 800 recorded installs between them. The counter doesn't say on which watch, so some of those may have worked on a Pro 2. One hardware check of A8 would settle whether to lift that rule.

Installs on a Watch 3 Pro: none of the 938 is newly refused.

Known gaps, outside this PR:

  • The companion apps have none of these checks.
  • A Pro 2 has no general memory budget. A synthetic 2.6 MB cf 5 screen reboots it in the emulator and still passes the gate.
  • A stub that draws types 4..7 needs its release number reserved before PRO2_FACES_STUB is set.
  • Tinted layers preview white, because the theme palette isn't applied.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CQSU8M433m4WAvWEbAKocd

freethinkel and others added 8 commits November 22, 2026 22:10
Both watches look a procedural widget's type (tag 0x82 + 0x5c) up in a
table their loop can run off, which boot-loops the watch. The check reads
the raw bytes the way the firmware's parser does and runs once, in the
flash every install goes through:

- types 8 and up go to no watch;
- 4..7 go to a Watch 3 Pro; a Watch Pro 2 only gets an imageless 4 until
  a stub release that draws them is named in PRO2_FACES_STUB;
- ETC2 bound for a Watch Pro 2 is counted unpacked.

The firmware page and the Developer panel warn before a rollback to a
firmware that can't draw such a face.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQSU8M433m4WAvWEbAKocd
A 0x5c body of zeroes reads as a run of empty tags, and the document,
which keeps these bodies as hex, dropped it on save: the 3 Pro's widget
bodies (0x5c, 0x5d, 0x5e, 0x63) are leaves now. A file without a 0x86
title no longer gains one until the face is renamed (two stock faces).

tests/wp3-corpus.test.ts runs both over local corpora named by
FMC_WP3_FACES and FMC_WP2_FACES.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQSU8M433m4WAvWEbAKocd
core/render/proc-scene.ts is a port of cmf-watch-sdk's wfproc.rs (MIT)
with that file's test numbers: DataPulse's five panels, Luminous Beam's
percent, Briqbot's clips and Rainbow Lollipop's ring under the finger.
The simulator feeds them, and a click on the preview is a touch.

A group lays such a widget out by the widget's own box, so the panels
land where the watch puts them. Sources 0x8c (stress), 0x93 (sleep
minutes) and 0x99 (colour theme) get a value in the simulator.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQSU8M433m4WAvWEbAKocd
A type 6 panel switches among 1..4 (weather has 88 images of its own),
types 5..7 move, type 4 stays put, and no edit changes a widget's image
count or rescales its art. A note under the canvas says where the face
can go, judged by the install gate's own rule.

A file picked for a JPEG frame is stored as a JPEG even when it was a
PNG: the browser decoded it either way, the watch would not.

The Watch Pro 2 ETC2 check also counts a cf 28 frame that isn't the
largest of its run as stored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQSU8M433m4WAvWEbAKocd
The file menu offers it for a face a stock Watch Pro 2 can't show as it
is: ETC2 and A8 images become cf 5 and a layer picked by the colour theme
(source 0x99) is pinned to the simulator's theme. The open document stays
as it was. A face with a widget that would boot-loop that watch, or a
screen past the bytes tested on it (1.955 MB), is refused with the reason.
Palette numbers are left as they are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQSU8M433m4WAvWEbAKocd
The compatibility note and the memory line landed on the same spot, and
on a phone under the floating Main/AOD switch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQSU8M433m4WAvWEbAKocd
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQSU8M433m4WAvWEbAKocd
Nobody has seen A8 working on a real Watch Pro 2, and the emulator stops
on faces that use it. Any cf 14 resource is refused there, the thumbnail
included, and the message names Export for Watch Pro 2, which re-encodes
it as cf 5. The editor's note covers an A8 thumbnail too, and no longer
says such a face was made for a Watch 3 Pro: some on the Pro 2 shelf
weren't.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQSU8M433m4WAvWEbAKocd
@freethinkel
freethinkel merged commit 1790bbc into main Nov 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant