Enable user-defined appstore sources#299
Open
ttmm-sp-zoo wants to merge 2 commits into
Open
Conversation
The Add Source FAB and the per-source delete button were implemented but
commented out. The backing code (CreateAppstoreSourceDialog, addSource,
removeSource, AppstoreSourceDao) is already wired up, so this just enables
the UI.
Delete is offered only for user-added sources: removing a built-in feed
either strands the user (the Rebble source is never re-added by
AppstoreSourceInitializer) or trips its re-init path, which deletes and
recreates every source, silently dropping user-added ones.
Normalize the entered feed URL to the same canonical form as the built-in
feeds. It is string-concatenated into request URLs ("${source.url}/v1/...")
and compared for equality in addHeart()/isLoggedIn(), so a pasted trailing
slash or stray whitespace would otherwise produce a source that looks right
but silently fails to serve apps.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
pebble://appstore/{id} was hardcoded to the Rebble feed URL, so an app
card could only ever be opened from Rebble. handleAppstore() already takes
the feed URL as a parameter and resolves it against the enabled sources;
only the call site was fixed to Rebble.
Read the feed from an optional ?source= query parameter, falling back to
the Rebble feed when absent, so existing links keep working unchanged. A
source that is unknown or not enabled resolves to no store and hits the
existing "Failed to find app in enabled feeds" path.
Also replaces the inline Rebble URL with the existing REBBLE_FEED_URL
constant it duplicated.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ttmm-sp-zoo
force-pushed
the
user-defined-appstore-sources
branch
from
July 17, 2026 17:40
7d458a5 to
53c1930
Compare
ttmm-sp-zoo
marked this pull request as ready for review
July 17, 2026 18:00
Contributor
|
is https://apps.ttmm.is/api up? |
Author
|
I was hope that everything is fine. So it seems that Claude didn’t finished the project correctly. This need to wait 2 weeks. I just started holiday. If you can write me what is missing. Best,AlbertSent from my iPhoneOn 18 Jul 2026, at 22:59, Eric Migicovsky ***@***.***> wrote:ericmigi left a comment (coredevices/mobileapp#299)
is https://apps.ttmm.is/api up?
***@***.*** (view on web)
—Reply to this email directly, view it on GitHub, or unsubscribe.Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
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.

Two small changes that unlock functionality already implemented in the app, so that third-party appstore feeds can be used end to end. No refactoring.
1. Enable the "Add Source" / "Delete Source" UI
AppstoreSettingsScreen.ktThe Add Source FAB and the per-source delete button were fully implemented but commented out.
CreateAppstoreSourceDialog,AppstoreSettingsScreenViewModel.addSource/removeSourceandAppstoreSourceDaoare already wired up, so this only uncomments the UI entry points.Delete is deliberately offered only for user-added sources, guarded with the existing
isPebbleFeed()/isRebbleFeed()helpers. Removing a built-in feed is unsafe today: deleting the Rebble source strands the user, asAppstoreSourceInitializernever re-adds it, while deleting the Pebble source trips that initializer's re-init path, which deletes and recreates every source and would silently drop user-added ones. Happy to drop this guard if you'd rather handle it differently.The entered URL is normalized (
trim().trimEnd('/')) to the same canonical form as the built-in feed constants. Until now everyAppstoreSource.urlcame fromINITIAL_APPSTORE_SOURCES, so it was canonical by construction; this dialog is the first path where the value is typed by a user. The URL is string-concatenated into request URLs ("${source.url}/v1/apps/id/$id") and equality-compared inaddHeart()/isLoggedIn(), so a pasted trailing slash would otherwise yield.../api//v1/apps/id/...and a source that looks correct but silently serves nothing.2. Let appstore deep links specify the feed to open from
PebbleDeepLinkHandler.kthandleAppstore()already takes the feed URL as a parameter and resolves it against the enabled sources — only the call site was fixed tohttps://appstore-api.rebble.io/api. As a result an app card could only ever be opened from Rebble.The feed is now read from an optional
?source=query parameter:?source=, the handler falls back to the Rebble feed exactly as before (the inline URL is replaced by theREBBLE_FEED_URLconstant it duplicated)."Failed to find app in enabled feeds"message. No new failure path.?source=matches the stored source URL exactly, so a link must use the same URL the source was added with — in the canonical, no-trailing-slash form the dialog now stores.Why
Third-party appstore feeds work today apart from this last mile. A working example is apps.ttmm.is — a store for TTMM watchfaces serving the full store API (per-platform descriptions, screenshots, collections). Browsing → installing a
.pbw→ loading the watchface config already works end to end on a physical device. What's missing is the ability to add the feed in the official app and to open an app card from it.This was agreed by email with Eric Migicovsky.
How to test
TTMM, URLhttps://apps.ttmm.is/api. Adding it with a trailing slash or surrounding whitespace should behave identically.pebble://appstore/{id}?source=https://apps.ttmm.is/apifor an app id served by that feed — the card opens from that source instead of failing against Rebble. Install the.pbwfrom the card and confirm it loads on the watch.pebble://appstore/{id}with no?source=still opens the Rebble card while the Rebble source is enabled.?source=pointing at a disabled or unknown feed shows "Failed to find app in enabled feeds" and does not navigate.Testing status — please read
This has not been built or run. The change is written and reviewed statically, but no JDK or Android SDK was available in the environment used, so neither the Kotlin compile, the existing test suite, nor a device run were executed. It needs a real build and an on-device pass before merging.
No tests were added.
PebbleDeepLinkHandlerTestcurrently covers only the pureparseTokenFromhelper; exercisinghandleAppstorewould need fakes forLibPebble, analytics and the source DAO, and writing tests I cannot execute seemed worse than saying so plainly. Happy to add coverage if you want it in this PR.