Skip to content

Serve snap.yaml description in find/info responses#6

Open
cyberb wants to merge 1 commit into
masterfrom
app-descriptions
Open

Serve snap.yaml description in find/info responses#6
cyberb wants to merge 1 commit into
masterfrom
app-descriptions

Conversation

@cyberb
Copy link
Copy Markdown
Member

@cyberb cyberb commented Jun 4, 2026

Problem

Apps opened from the platform's App Center (not yet installed) show no description, while installed apps do. Root cause is in the store: snapd's /v2/find and /v2/snaps/info responses carry an empty description.

Root cause

The cache already parses description from each app's snap.yaml into model.App (fetchAppMetadata). But:

  • model.Snap (the snapd-facing search/info result) had no description field, and
  • App.ToInfo() copied Summary but dropped Description.

So the description never reached snapd. snapd itself already relays description (its storeSnap reads json:"description"), which is why the platform sees the field present but empty.

Fix

  • Add Description (json:"description") to model.Snap.
  • Populate it from App.ToInfo().

This makes the store serve the published snap.yaml description — the intended source now that apps no longer rely on the index-v2 catalog.

Tests

  • model.App.ToInfo unit test asserts summary + description pass through.
  • TestRest_SnapsInfo: store /v2/snaps/info body contains the fixture description.
  • TestFind: snapd-relayed /v2/find contains the fixture description.

The cache already parsed the snap.yaml description into App, but
App.ToInfo dropped it and the Snap model had no description field, so
snapd's /v2/find and /v2/snaps/info responses carried an empty
description. The platform app page (and App Center) therefore showed
no description for not-yet-installed apps, while installed apps -
sourced from snapd's local /v2/snaps - did.

Add description to the Snap model and populate it from App.ToInfo so
the store relays the published snap.yaml description, which is the
intended source now that apps no longer rely on the index-v2 catalog.

Assert it end to end: store /v2/snaps/info and snapd-relayed
/v2/find both carry the fixture snap.yaml description.
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.

1 participant