Repository navigation
Progress line: pick its colour; goal sources stay blocked - #81
Merged
Merged
Conversation
The inspector shows a colour picker for a selected progress line and redraws its 101 frames in the picked colour (one undo step). The colour is read back off the full frame. Hemisphere's stock 101-frame text is told apart by the bar shape. The stock corpus gives no evidence for goal sources: every goal-percent id drives a 0x80/0x81 ring only, never a 0x30 picker or a 0x38 bucketed gauge, so the line stays on battery. Refs #61 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012tYrCAS1CWaaNaC12cP5X6
- Read the colour through the cache bitmap: a resize leaves `data` stale, and decoding it at the new size threw on every edit. Memoised per bitmap, so a drag no longer decodes a frame per tick. - A turned line is not offered for recolouring: the turn is baked into its pixels and a redraw would lay it flat. - The commit re-checks the line: frames drawn for a line that was deleted, resized or turned meanwhile are dropped. - Picking the colour the line already has (after cf 5 rounding) is a no-op instead of an undo step and 101 new assets. - The "regenerate from a font" button is back next to the picker. Refs #61 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012tYrCAS1CWaaNaC12cP5X6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #61
What changed
progressLineColored→recolorProgressLineFx→committed). The picker reads the current colour back off the 100% frame. cf 5 stores 5/6/5 bits, so the value comes back rounded:#ff5c00reads#ff5d00.progressLineOfinfactory.tsmatches an image widget on battery (0x24) with 101 frames whose frame is bar-shaped (one side at least 4× the other). The shape check is needed becauseAnalog__370__Hemisphere's stock'0%'..'100%'text has the same meta and frame count, and recolouring it would turn the text into bars. This is marked as aponytail:heuristic.datastale. A rotated line gets no picker: the rotation is baked into its pixels, so a redraw would lay it flat. Picking the colour the line already has does nothing. Frames for a line that was deleted, resized or rotated during the redraw are dropped. The "regenerate from a font" button stays next to the picker.Corpus evidence (100 stock faces +
tests/__fixtures__)I counted every widget struct by data-source id (meta byte 9) and parent tag:
0x25,0x26,0x49,0x6c,0x6f,0x46,0x82(goal %/slot ids)0x80/0x81rings only (plus0x83/0x89Pro 3 widgets with one frame)0x6a0x81rings and0x60digit strips0x24battery0x30picker with 101 frames (Hemisphere, text),0x38with 7/20/26 frames, digit strips, rings0x3cheart rate (gauge)0x38with 11 frames0x30picker or a0x38gauge anywhere in the corpus. The only proven consumer is the arc ring, which takes min/max from its0x5a/0x5bspec. Pointing a 101-frame picker at0x26would rely on two unverified assumptions: that the firmware hands a picker the same 0..100 the ring gets, and that it doesn't hand it raw steps (whichvalue % 101would turn into noise).0x38, a struct with no bind/fmt children:Analog__336__Energetic(battery, 7 frames),Multifunction__363__Vintage(battery, 20 frames, accent),Digital__285__Widgets(battery, 26 frames) andMultifunction__348__Tumbler(0x3c, 11 frames). The editor keeps0x38as a raw layer. A static file can't show how the firmware maps 0..100 onto N frames (floor(v·N/101),floor(v·(N−1)/100), rounding…). Each face's embedded preview shows only one designer-chosen state, so that needs a watch.0x30with fewer than 101 frames on battery doesn't occur, soframes[value % count]is the only rule the editor can claim for0x30.What would unblock goals:
0x30/0x38picker.0x38(or0x30) widget on0x26with numbered frames, checked at known step counts.Minute/second/hour-driven fills are not touched (#63).
Test
tests/doc-factory.test.ts: a vertical#ff5c00line is found byprogressLineOfwithvertical: true, and its colour reads back as#ff5d00. Hemisphere's 101-frame text is not taken for a progress line.pnpm format,pnpm lint(only existing warnings),pnpm check(0 errors) andpnpm test. On this machine (load average ~256) a few browser tests andwf-roundtriptimed out in the full run. All of them pass when run on their own (wf-roundtripwith--testTimeout=300000). None of them touch code changed here.Draft reply to the reporter
🤖 Generated with Claude Code
https://claude.ai/code/session_012tYrCAS1CWaaNaC12cP5X6