feat: add TimelineAction support to TimelinePin - #40
Open
skylord123 wants to merge 1 commit into
Open
Conversation
Adds an optional actions list to TimelinePin so companion apps can put actions in a pin's action menu on the watch. An OPEN_WATCH_APP action launches the watchapp the pin is parented to, passing an optional uint32 launchCode via launch args so the app can deep-link to the pinned content. Follows the TimelineReminder pattern from pebble-dev#14: model + KDoc in common-api, bundle round-trip in common. launchCode is validated to the unsigned 32-bit range. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
matejdro
reviewed
Aug 19, 2026
| public data class TimelineAction( | ||
| val title: String, | ||
| val type: TimelineActionType = TimelineActionType.OPEN_WATCH_APP, | ||
| val launchCode: Long? = null, |
Contributor
There was a problem hiding this comment.
Should we use UInt instead? That way integer size is enforced by the compiler.
Contributor
|
Is looks like detekt build failed, can you check it? |
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
Adds an optional
actionslist toTimelinePinso companion apps can put actions in a pin's action menu on the watch — most importantlyOPEN_WATCH_APP, which launches the watchapp the pin is parented to and passes an optional uint32launchCodethroughlaunch_get_args(), letting the pin deep-link to the content it represents (e.g. a calendar companion opening the exact event).Mirrors how
reminderslanded in #14:TimelineAction(title, type, launchCode)+TimelineActionType(OPEN_WATCH_APP,HTTP), newactions: List<TimelineAction> = emptyList()onTimelinePin, KDoc on all of it.launchCodeis validated to the unsigned 32-bit range.ACTIONS_COUNT/ACTION_nsub-bundles), with the same unknown-type fallback-and-log behavior asTimelineLayoutType.Older Pebble app builds ignore the extra bundle keys, so pins from apps using this field degrade gracefully (pin inserts, actions dropped) — same compatibility story as reminders.
Host-side support to consume this is being wired into the mobile app's timeline emulator: coredevices/mobileapp#356 makes the emulator emit
openWatchAppactions with theLaunchCodeBlobDB attribute (firmware already handles the rest —timeline.claunches the pin'sparent_idwithAPP_LAUNCH_TIMELINE_ACTION). A follow-up there will map this model intoTimelinePinJsononce this is released, the same sequence as #14 → the reminders forwarding PR.Testing
:common-api:checkand:common:checkpass;:client:assembleRelease/:server:assembleReleasebuild.🤖 Generated with Claude Code