Background
Follow-up from the code review on #599 (which fixed #598).
To restore the topic icons in the onboarding picker, #599 keys each icon off the collection's tag code via a hardcoded allowlist in the frontend (TOPIC_ICON_CODES in src/lib/components/OnboardingView/OnboardingView.svelte). Topic collections whose tag code is not in that set — or whose tag is null — are silently filtered out of the picker.
This is a smaller, relocated form of the exact UI/DB drift class that #598 set out to eliminate: the frontend once again hardcodes a set of strings that must stay in sync with the database. A topic added in the DB with a new/unmapped tag code will silently not appear, with no error and no log.
It also underlies the High-severity edge from the same review (#599 review thread): because the filtered list is the only thing rendered and onboarding requires selecting ≥3 topics, if fewer than 3 collections have an icon-mapped code the flow becomes an unrecoverable dead-end.
Acceptance criteria
- Every
isTopic = true collection is selectable in onboarding regardless of whether it has a recognized icon (no silent drop).
- A topic without a specific icon renders with a sensible default/placeholder icon rather than being hidden.
- The icon mapping is not a hardcoded frontend allowlist that must be manually kept in sync with the database (e.g. derive it from data, or drive it from a single shared source with a documented default path).
- If a topic can't be mapped to an icon, that is observable (e.g. logged) rather than silent.
Out of scope
Notes
Raised from review comments on #599
🌊 Managed by Currents · Task 2fc6a0db-c70e-48e5-b601-34661dd9135d
{"metadata":{"sourceType":"github"},"rank":"a0","taskId":"2fc6a0db-c70e-48e5-b601-34661dd9135d","version":1}
Background
Follow-up from the code review on #599 (which fixed #598).
To restore the topic icons in the onboarding picker, #599 keys each icon off the collection's tag
codevia a hardcoded allowlist in the frontend (TOPIC_ICON_CODESinsrc/lib/components/OnboardingView/OnboardingView.svelte). Topic collections whose tagcodeis not in that set — or whose tag is null — are silently filtered out of the picker.This is a smaller, relocated form of the exact UI/DB drift class that #598 set out to eliminate: the frontend once again hardcodes a set of strings that must stay in sync with the database. A topic added in the DB with a new/unmapped tag code will silently not appear, with no error and no log.
It also underlies the High-severity edge from the same review (#599 review thread): because the filtered list is the only thing rendered and onboarding requires selecting ≥3 topics, if fewer than 3 collections have an icon-mapped code the flow becomes an unrecoverable dead-end.
Acceptance criteria
isTopic = truecollection is selectable in onboarding regardless of whether it has a recognized icon (no silent drop).Out of scope
Notes
Collectionis one option but implies a schema change + migration + admin tooling; weigh against a default-icon approach. Decide via the repo's brainstorm → ADR → spec flow if it turns out to be a real architectural choice.Raised from review comments on #599
{"metadata":{"sourceType":"github"},"rank":"a0","taskId":"2fc6a0db-c70e-48e5-b601-34661dd9135d","version":1}