Closer/seed
null 1ac724bcde fix(content): give packs a pack_id, and stop icon_name leaking into the UI
Populates question.pack_id (build_db.py). The column was plumbed end to end
(question.pack_id -> QuestionEntity.packId -> Question.packId) but was NULL for
all 3811 rows, so content had no pack identity. Bundled packs now carry one —
the logical id a pack declares in metadata (daily ships as category
daily_fun_mc but is logically daily_single_choice_weekly_v1), else its category
id. This is the hook a purchased/imported pack needs: it becomes just another
pack_id in the same table rather than a special case. No schema or behaviour
change; identity hash unchanged.

Fixes two regressions the rebuilt db exposed, both latent for the same reason:
every category previously carried the placeholder icon_name "question", which
masked them. Packs now declare real Material icon names (shield, forum, paid).

1. Category glyphs. categoryGlyphStyle keyed on `iconName ?: categoryId`, so
   icon_name won. Material names are a different vocabulary from this file's
   keys, so 22 of 23 categories fell through to the default star. The curated
   per-category glyph now wins, with icon_name as the fallback — which is also
   what gives an imported pack a real glyph, since its category_id will not be
   listed here but its declared icon_name resolves. Added the Material aliases
   and the two unmapped categories (quality_time, daily_fun_mc).
2. Pack library chips. metadataLabels() rendered the raw icon_name as a
   user-facing tag, producing chips like "Chat Bubble Outline". It was only ever
   invisible because the list filtered the single value "Question". icon_name is
   a rendering detail, not a topic, so the chip is gone; access remains.

Verified live on both fixtures (dark 5554 / light 5556): distinct correct glyphs
(Boundaries warning, Communication chat, Rebuilding Trust shield, Sex & Desire
heart-outline), no leaked chips, and the new Quality Time pack browsable with
150 questions and a calendar glyph. Unit tests green, 0 FATAL.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 19:10:37 -05:00
..
questions review 2026-07-14 18:22:45 -05:00
build_db.py fix(content): give packs a pack_id, and stop icon_name leaking into the UI 2026-07-14 19:10:37 -05:00
degender_desire_sync.py feat: update desire sync question bank, degender scripts, app.db rebuild 2026-06-18 21:41:14 -05:00
degender_wheel_sexual_prefs.py feat: update desire sync question bank, degender scripts, app.db rebuild 2026-06-18 21:41:14 -05:00
fix_depth5_grammar.py chore: Q3 asset DB cleanup (remove 300 dead rows), Q5 grammar fix for depth-5 questions in emotional_intimacy + stress 2026-06-18 22:03:52 -05:00
fix_question_quality_q2.py fix: Q2 grammar quality pass on emotional_intimacy, parenting, stress questions + app.db rebuild 2026-06-19 00:50:23 -05:00
improve_question_variety_q1.py chore: update Q1 scripts with minor fixes 2026-06-19 00:38:43 -05:00
validate_question_variety.py fix: Q2 grammar quality pass on emotional_intimacy, parenting, stress questions + app.db rebuild 2026-06-19 00:50:23 -05:00