Repository navigation
feat(eid-wallet): load the apps ribbon from the marketplace's live platforms - #1181
Conversation
…atforms The apps ribbon on the main screen had five apps hard-coded. It now shows the platforms returned by the marketplace's GET /api/platforms, which lists what platforms have published through Awareness. - marketplaceApps.ts fetches the endpoint, keeps only entries with a name and an https link (logos must be https too), drops repeats, and caches the last good list so the ribbon fills at once and works offline. - The endpoint sends no CORS headers, so inside the app the request goes through the Tauri HTTP plugin. Its scope only allows the marketplace host. - Cards show placeholders while loading, an initial when a logo fails, and the published category (translated where the wallet has a label). - tauri-plugin-http is pinned to 2.7 on both sides so Tauri stays on 2.11.
- A platform that publishes no https link of its own (Prikbord today) is no longer dropped. Its card opens the platform's page on the marketplace (/app/:id), which is what the marketplace site links to. - A platform without a logo gets the same placeholder the marketplace shows: a lilac square with a store icon. - Cards grow from 112x128 to 126x144, keeping their 7:8 shape, so longer live names and categories such as "Productivity" fit.
Icon tiles grow from 40 to 45 and their glyphs from 20 to 22, the same 1.125x the cards grew by.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The ribbon now loads its apps and logos from the marketplace, so these five bundled logos are no longer referenced anywhere.
The open-message screen (reached from a chat notification) points its Pictique button at /images/pictique-logo.svg, but the redesign (#961) deleted that file when it added a cropped copy for the apps ribbon, so the button showed a broken image. Put the cropped logo back at the path the screen uses.
Bekiboo
left a comment
There was a problem hiding this comment.
Audit pass. All non-blocking; nothing here needs to hold the merge. Two more points that don't map to a changed line are in a separate comment.
|
🚀 Performance | 🟠 Major | 🛠️ Small Every wallet launch now triggers a full, uncached AaaS scan.
Suggest memoizing the 📝 Documentation | 🔵 Trivial | ⚡ Quick win Link #1182. The "Issue Number" section is empty, so #1182 won't close on merge. Add 🤖 Prompt for AI Agents |
not to be done in this PR |
When Awareness fails, the marketplace's /api/platforms still answers 200
with { platforms: [], error }. fetchRibbonApps treated that as an empty
list, so the ribbon replaced its cached apps with nothing. It now throws
when the body carries an error, and the component's existing catch keeps
the cached list. A plain empty list without an error is still accepted.
The apps ribbon now loads from the marketplace's live platforms (#1181), a new user-facing capability, so this is a minor rather than a patch. #1188 follows with the category translations. The Android versionCode goes to 33, continuing 24, 25, 26, 27, 28, 31, 32. .env.example gains the docs site as a commented value for PUBLIC_TRANSLATIONS_URL, the way it already offers the registry and provisioner URLs per environment. Empty disables the runtime correction catalog, which suits a local checkout but leaves a release build unable to receive wording fixes.
Description of change
The apps ribbon on the eID wallet's main screen had five apps hard-coded. It now shows the platforms the marketplace lists live, from
GET https://marketplace.w3ds.metastate.foundation/api/platforms, so a platform published through Awareness shows up in the wallet without a new release.No server changes.
/api/platformsis used as it is today./api/platformsreturns the platforms published through Awareness, already filtered by the marketplace (drafts, archived, inactive and in-review entries are dropped). Today that is 16 third-party platforms. The marketplace's curated list (Blabsy, Pictique, eVoting, ...) only exists in the marketplace's frontend bundle, so it is not part of this list./api/platformssends no CORS headers, so a plainfetchfrom the webview is blocked. Inside the app the request goes through@tauri-apps/plugin-http, whose scope only allows the marketplace host. In a plain browser (vite dev) it falls back towindow.fetch./app/:id, which is what the marketplace site does. Repeats (same eName or link) are dropped.localStorageand shown at once on the next launch, so the ribbon is filled offline. It goes through the same validation when read back.static/images/Logo-*.svg) are gone; nothing else referenced them./images/pictique-logo.svg, which Feat/eid wallet redesign #961 deleted, so its Pictique button showed a broken image. The cropped logo is back at that path.Dependency note
tauri-plugin-httpis pinned to~2.7(crate and npm). 2.8 requires Tauri 2.12, and resolving it also pulledtauri-plugin-fs2.6, which would have upgraded Tauri, wry and tao across the app. With the pin,Cargo.lockonly adds packages and Tauri stays on 2.11.2. The JS plugin carries its own nested@tauri-apps/api2.12.1, which only callsinvoke.Related
#1180 takes a different route to the same ribbon: a new marketplace endpoint,
/api/apps, that merges the curated list with the live one. This PR needs no marketplace change, but only shows the live platforms. The two touch the same component, so only one of them should land.Issue Number
Type of change
How the change has been tested
/app/prikbord. Card (126x144) and icon (45x45) sizes measured in the running WebView./api/platformsresponse returns every platform, with logos for all but Prikbord.marketplaceApps.spec.ts(parsing, https-only links and logos, marketplace fallback link, de-duplication, fetch errors, cache round-trip, corrupt or unavailable storage). The wallet suite passes, 115/115.cargo check --locked,svelte-check(0 errors) and Biome pass.Change checklist