Skip to content

feat: server driven widgets#89

Open
DorianMazur wants to merge 5 commits intocallstackincubator:mainfrom
DorianMazur:feat/server-driven-widgets
Open

feat: server driven widgets#89
DorianMazur wants to merge 5 commits intocallstackincubator:mainfrom
DorianMazur:feat/server-driven-widgets

Conversation

@DorianMazur
Copy link

@DorianMazur DorianMazur commented Feb 23, 2026

Related #38 #52

Server Driven Widgets

Adds server-driven content updates for both iOS and Android home screen widgets, allowing widget UI to be rendered server-side and pushed to devices on a schedule.

What's included

Core infrastructure

  • createWidgetUpdateHandler, node.js HTTP handler that accepts widget update requests and returns rendered payloads for both platforms
  • Dual render paths, renderIos and renderAndroid
  • Platform detection via family query param presence

iOS

  • Keychain-based credential storage (VoltraKeychainHelper) shared between app and widget extension via App Groups
  • VoltraWidgetServerFetcher for background timeline entry fetching
  • Widget timeline provider integration with serverUpdate config

Android

  • WorkManager-based periodic background fetching (VoltraWidgetUpdateWorker)
  • Credential storage via Jetpack DataStore (VoltraWidgetCredentialStore)
  • Widget receiver code generation with serverUpdate scheduling support

Demo

App

IOS Dynamic Widget Android Dynamic Widget
image image
Ios-gif android_dynamic

Server

image

@vercel
Copy link

vercel bot commented Feb 23, 2026

@DorianMazur is attempting to deploy a commit to the Callstack Team on Vercel.

A member of the Team first needs to authorize it.

@DorianMazur DorianMazur marked this pull request as ready for review February 24, 2026 15:43
connection.connectTimeout = 15000
connection.readTimeout = 15000
connection.setRequestProperty("Accept", "application/json")
connection.setRequestProperty("User-Agent", "VoltraWidget/1.0")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we synchronize it with the version in package.json?

* import { clearWidgetServerCredentials } from 'voltra'
*
* // On user logout
* await clearWidgetServerCredentials()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we reload widgets automatically after calling 'clearWidgetServerCredentials' to purge persisted state and get back to the default state? 🤔

* This should match a Keychain Sharing capability group configured in your Apple Developer account.
* Example: "$(AppIdentifierPrefix)com.example.shared"
*
* If not provided, a default will be derived from the bundle identifier.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not implemented.

* Cancel all periodic widget updates.
*/
fun cancelAllPeriodicUpdates(context: Context) {
WorkManager.getInstance(context).cancelAllWorkByTag(VoltraWidgetUpdateWorker.TAG)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This tag is not used anywhere.

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.

2 participants