v0.0.3: fix settings ignored on real watches + splash version - #4
Merged
Conversation
0.0.2 sent every setting by name in the pebblejs://close payload. On a real watch that payload is length-limited: it was truncated mid-JSON, JSON.parse threw in webviewclosed, and the save was silently dropped — so settings did nothing. (The emulator uses a file:// return_to path, so it was unaffected and the regression slipped through.) Numeric settings now travel positionally — values only, in a fixed shared order (wirekeys.js) — so the close payload drops ~3.6x (835 -> 232 URL bytes) and always fits. app.js expands the array back to keys before forwarding the full state to the watch, so WYSIWYG is preserved: every shown value is still applied, no ghost settings. The two string settings and changed translations ride along by name. A legacy flat payload is still decoded, for safety.
The calendar-loading splash showed a hard-coded "3.0" (left over from the PebbleTimely ancestor). Show APP_VERSION instead, kept in sync with package.json.
Fixes settings being ignored on real watches and the splash version string.
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.
Summary
Hotfix release for the 0.0.2 regression where the settings page did nothing on a real watch.
pebblejs://closepayload. On a real watch that payload is length-limited, so it was truncated mid-JSON,JSON.parsethrew inwebviewclosed, and the save was silently dropped — settings appeared completely dead. The emulator uses afile://return_topath and was unaffected, which is why the regression slipped through. Numeric settings now travel positionally (values only, in a fixed shared order inwirekeys.js);app.jsexpands them back to keys before forwarding the full state to the watch. Payload drops ~3.6× (835 → 232 URL bytes) so it always fits, while WYSIWYG is preserved — every shown value is still applied, no ghost settings. The two string settings and changed translations ride along by name; a legacy flat payload is still decoded for safety.Versioning
package.json, the splashAPP_VERSION, the README badge,CHANGELOG.md, and thePUBLISHING.mdrelease notes.CONFIG_VERSION(the config-protocol version reported to the JS, on its own sequence — not the app version) is major-bumped 2.6 → 3.0 because the save wire format changed.Test plan
Verified inside
nix develop:node: all 34 settings survive; the drift/"ghost" case (a shown-but-untouched value) is applied; negativeclock2_tzsurvives; close payload is 232 URL bytes (was ~835).wirekeys.jsis bundled intobuild/pebble-js-app.js(require resolves).pebble buildon basalt/diorite/emery/flint; strict-check clean under the cloud-Werrorflags.