Skip to content

feat(eid-wallet): load the apps ribbon from the marketplace's live platforms - #1181

Merged
Bekiboo merged 6 commits into
mainfrom
feat/eid-wallet-apps-from-registry-in-ribbon
Oct 2, 2026
Merged

Bekiboo merged 6 commits into
mainfrom
feat/eid-wallet-apps-from-registry-in-ribbon

Conversation

@Sahil2004

@Sahil2004 Sahil2004 commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

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/platforms is used as it is today.

  • Source. /api/platforms returns 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.
  • Native request. /api/platforms sends no CORS headers, so a plain fetch from 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 to window.fetch.
  • Validation. Entries are published by the platforms themselves, so names are cleaned (control and bidi characters removed, length capped) and only https links and logos are kept. A platform without its own https link (Prikbord today) opens its page on the marketplace, /app/:id, which is what the marketplace site does. Repeats (same eName or link) are dropped.
  • Cache. The last list that loaded is kept in localStorage and shown at once on the next launch, so the ribbon is filled offline. It goes through the same validation when read back.
  • Cards. Placeholders while loading. A platform without a logo, or whose logo fails to load, gets the marketplace's placeholder (lilac square with a store icon). The category is shown as published, translated where the wallet already has a label (Social, Governance, Finance). Cards grow from 112x128 to 126x144 and icons from 40 to 45, keeping their proportions, so names like "Productivity" fit.
  • Hard-coded list removed. The five built-in apps and their bundled logos (static/images/Logo-*.svg) are gone; nothing else referenced them.
  • Pictique logo on the open-message screen. Unrelated fix found on the way: that screen (reached from a chat notification) pointed at /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-http is pinned to ~2.7 (crate and npm). 2.8 requires Tauri 2.12, and resolving it also pulled tauri-plugin-fs 2.6, which would have upgraded Tauri, wry and tao across the app. With the pin, Cargo.lock only adds packages and Tauri stays on 2.11.2. The JS plugin carries its own nested @tauri-apps/api 2.12.1, which only calls invoke.

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

  • New (a change which implements a new feature)

How the change has been tested

  • On a device (Samsung Galaxy A33, Android dev build): the ribbon shows all 16 live platforms, with Prikbord first using the placeholder and linking to /app/prikbord. Card (126x144) and icon (45x45) sizes measured in the running WebView.
  • Against production data: the parser run on the live /api/platforms response returns every platform, with logos for all but Prikbord.
  • Unit tests: new 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

  • I have ensured that the CI Checks pass locally
  • I have removed any unnecessary logic
  • My code is well documented
  • I have signed my commits
  • My code follows the pattern of the application
  • I have self reviewed my code

…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.
@Sahil2004
Sahil2004 requested a review from coodos as a code owner October 2, 2026 12:13
@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 178f5b56-8573-457d-84e3-fd7785b63f36

  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

The ribbon now loads its apps and logos from the marketplace, so these five
bundled logos are no longer referenced anywhere.
@Sahil2004 Sahil2004 self-assigned this Oct 2, 2026
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 Bekiboo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

Comment thread infrastructure/eid-wallet/src/lib/utils/marketplaceApps.ts Outdated
@Bekiboo

Bekiboo commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

🚀 Performance | 🟠 Major | 🛠️ Small

Every wallet launch now triggers a full, uncached AaaS scan.

listPlatforms() (platforms/marketplace/client/server/aaas.ts) pages through every user-profile packet in AaaS on each request, with no server-side cache. The live endpoint takes ~1.2s. Until now only marketplace page views hit it; with this PR every wallet main-screen mount does too, so AaaS load grows with users × app opens. Not broken today, but it is the endpoint's first high-traffic caller.

Suggest memoizing the listPlatforms() result in the marketplace server for a few minutes, here or in a follow-up. That is a small server change, which this PR set out to avoid, so it's your call where it lands.


📝 Documentation | 🔵 Trivial | ⚡ Quick win

Link #1182.

The "Issue Number" section is empty, so #1182 won't close on merge. Add Closes #1182.

🤖 Prompt for AI Agents
1. In platforms/marketplace/client/server/aaas.ts (or routes.ts), cache the
   result of listPlatforms() in memory for a few minutes so repeated
   GET /api/platforms calls don't re-page every AaaS packet. Keep the existing
   behavior of returning [] on failure, but don't cache failures.
2. Add "Closes #1182" to the PR description's Issue Number section.

@Sahil2004

Copy link
Copy Markdown
Contributor Author

🚀 Performance | 🟠 Major | 🛠️ Small

Every wallet launch now triggers a full, uncached AaaS scan.

listPlatforms() (platforms/marketplace/client/server/aaas.ts) pages through every user-profile packet in AaaS on each request, with no server-side cache. The live endpoint takes ~1.2s. Until now only marketplace page views hit it; with this PR every wallet main-screen mount does too, so AaaS load grows with users × app opens. Not broken today, but it is the endpoint's first high-traffic caller.

Suggest memoizing the listPlatforms() result in the marketplace server for a few minutes, here or in a follow-up. That is a small server change, which this PR set out to avoid, so it's your call where it lands.

📝 Documentation | 🔵 Trivial | ⚡ Quick win

Link #1182.

The "Issue Number" section is empty, so #1182 won't close on merge. Add Closes #1182.

🤖 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.
@Bekiboo
Bekiboo merged commit be225bc into main Oct 2, 2026
6 checks passed
@Bekiboo
Bekiboo deleted the feat/eid-wallet-apps-from-registry-in-ribbon branch October 2, 2026 12:51
Sahil2004 pushed a commit that referenced this pull request Oct 5, 2026
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.
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