# theme-v2 parity audit: Study 03 (`app-ui-v2`) and its rebuild (Study 03b, `app-ui-v3`)

Audit date: 15 November 2026. Mode: prototype/UX study. Platform scope: browser prototype and documentation; no native code.

**Later the same day:** Study 03 (`prototypes/app-ui-v2`) and Study 01 (`prototypes/reader-ui`) were removed in commit `dad8a3f`. The paths below are historical; read them with `git show dad8a3f^:prototypes/app-ui-v2/<file>`. Study 03b now carries the two Study 03 inputs it still uses: the Plus Jakarta Sans files (`assets/`) and the surah directory and editorial relationships (`js/directory.js`).

## Question

Study 03 (`prototypes/app-ui-v2`) was meant to be the theme-v2 mirror of the complete learner app before native work starts under `adr/PLAN.md`. Its README marks every parity row "Implemented". The review asked whether that holds for navigation, native mobile components and the journeys between screens, and whether the earlier complete study (`prototypes/app-ui`, Study 02) was carried forward.

**Answer:** No. Study 03 adopted theme-v2's tokens (colours, Plus Jakarta Sans, radii, 44px targets) and built the Quran learning loop in depth. It did not adopt theme-v2's components, its presentation model or its journeys, and it dropped most Study 02 flows. Its own discipline gate then removed several theme-v2 traits. This document records the evidence and the rebuild that closes the gap.

## Method and evidence

- **Authority:** the 52 theme-v2 artboards in `prototypes/theme-v2/*/*.dc.html`. The five shared Design Components (TabBar, SideNav, ActionBar, EventCard, TicketPass) are byte-identical in every folder (md5 checked). Their computed styles were read from the rendered artboards, with the network blocked.
- **Subject:** `app-ui-v2/app.js` (route renderers and actions), `styles.css`, `tools/discipline-audit.cjs`, and the committed captures in `app-ui-v2/artifacts/`.
- **Earlier study:** `app-ui/README.md` and the route and action inventory in `app-ui/app.js`.
- **Captures:** `artifacts/reference/*.png` (theme-v2) and `artifacts/v3/*.png` (rebuild), both produced by `tools/capture.cjs`. [compare.html](compare.html) shows them side by side. It showed the Study 03 captures as a third column until Study 03 was removed.

## Findings

| # | Gap | theme-v2 (authority) | Study 03 (`app-ui-v2`) |
|---|---|---|---|
| G1 | Tab bar | 4 items (Home, Explore, My events, Profile), 76×52, 11px labels; active label ink 700 with a teal icon | 5 items (Utama, Al-Quran, Teroka, Koleksi, Akaun); active label in action teal (`styles.css` `.bottom-item`) |
| G2 | Side navigation | 232px rail: Home, Explore, Podcasts, Series, Articles, My events. Premium card with crown disc and a gold "See plans" pill | 5 items. Premium card with a text link and no crown (`app.js:75`) |
| G3 | Top bars | Root: wordmark + Search + avatar, or large title + bell with count. Detail: Back + contextual Share/Save/Text size/Download. Tablet shows the wordmark once, in the rail | One `topbar()` for every screen (`app.js:78`): brand or Back, then bell + avatar. Tablet shows the wordmark twice |
| G4 | Presentation model | Pushed details hide the tab bar and own a sticky ActionBar. Registration is a full-screen step flow. Filters are a modal sheet. Series and podcasts dock a mini-player | Tab bar on every screen. No ActionBar; CTAs sit inside cards. Registration is two dialogs and a toast (`register-event` → `sign-in-register` → `complete-registration`). No per-tab stacks |
| G5 | Shared components | TabBar, SideNav, ActionBar, EventCard, TicketPass, filter sheet, facts card, accordion, lesson row, mini-player, step header, recovery card, Continue card, tiles, segmented series row, grouped article list, Premium card, carousel with pager | None of the five shared DCs reproduced. Own `event-card`, `material-card` and `continue-row` instead |
| G6 | Overrides against theme-v2 | Unselected chip: white with a 1px `#E1E8EF` border. Quiet button: white with a `#CBD8E3` border. Gold `#C99546` Premium action. 12px tracked kickers | `styles.css:127` strips chip borders and backgrounds and makes `.secondary` transparent. The gold action is absent. The traits were removed to pass the discipline budget (`BUDGET`, `discipline-audit.cjs:5`) |
| G7 | Art direction | Illustrative geometric plates on tinted fields (`#E3F4F4`, `#FBF7ED`, `#355F8C`) with grain. Optional Islamic touch: 8-point lattice, arch, Arabic subtitle | Study 02 photographs inside dark navy cinematic heroes (event, series, player). Islamic touch declined |
| G8 | Compositions | Home: carousel → Continue → next event → upcoming → Podcasts → Series → Articles → Premium. Event: plate, two-weight title, host, facts, about, checklist, accordion, related, ActionBar. Series: plate, tags, progress, "Continue lesson 3", lesson list | Home: learning preview, one feature, Continue grid, one event. Event: dark hero, occurrence chips, 2-column definition list. Series: Study 02 hero with 16:9 cards |
| G9 | Journeys (`Journey.dc.html`) | Six lanes: entry points; open content; free registration; paid registration with bank approval outside the app; Premium member; Premium non-member (options → sign in → subscribe → back to the same event → resume) | Free and paid each collapse to a dialog. Premium member: missing. Non-member: one membership page. Confirmation, ticket pass and My events (Upcoming / On demand / Past): missing |
| G10 | Recovery (`States-Recovery.dc.html`) | Fifteen states, each in three lines: what happened, what still holds (tick on `#F0FAFA`), what to do next | Three ad-hoc states (offline banner, audio error dock, coverage absence), not in that pattern |
| G11 | Study 02 regression | Sign-in (email/Google), verify/reset, profile, preferences, help, deletion preview, membership management (cancel renewal, grace, hold, paused, expired), restore conflict, orders and receipts, live join, full player (±15s, speed, full screen, episode picker, end card, next part, autoplay countdown), mini-player across destinations | Account has three rows; membership is one button; the player has Play and Mark complete only |
| G12 | Interaction defects | — | Five verse actions wrap unevenly (`study-A-phone.png`). Hero buttons wrap to two lines. A "0 Disimpan" tile on the hub. The audio dock covers content (`series-phone.png`) |

### Study 03 scorecard

Match, Partial or Missing against the theme-v2 artboard; Study 02 regressions are noted where theme-v2 has no artboard.

| Screen | Shell | Components | Composition | Journeys |
|---|---|---|---|---|
| Home | Partial | Missing | Partial | Partial |
| Explore | Partial | Missing | Missing | Partial |
| Filter sheet / Events filtered | Missing | Missing | Missing | Missing |
| Event details | Partial | Missing | Missing | Partial |
| Your details · Tickets · Review and pay · Confirmed | Missing | Missing | Missing | Missing |
| Ticket · My events | Missing | Missing | Missing | Missing |
| Notifications | Partial | Partial | Partial | Partial |
| Series details | Partial | Missing | Missing | Partial |
| Article · Articles list | Partial · Missing | Missing | Partial · Missing | Partial |
| Podcast (recording) details | Missing | Missing | Missing | Missing |
| Profile and membership (Study 02) | Partial | Partial | Partial | Missing |
| Primary action situations (12) | Missing | Missing | — | Missing |
| Recovery states (15) | Missing | Missing | — | Missing |
| Quran hub, surah, study A/B/C, sources, saved | Partial | Partial | Match (own design) | Match |

### Root causes

1. **Scope.** The study was framed as "Quran continuity", so everything outside the Quran loop became a stub sized to prove a return path.
2. **Tokens, not components.** Colours and fonts were adopted, but no theme-v2 component was rebuilt, and the README did not test component parity.
3. **The wrong gate.** `discipline-audit.cjs` measured tidiness (four sizes, no tracked capitals, one grouping device). theme-v2's own artboards exceed those budgets, so passing the gate meant stripping theme-v2.
4. **Two design languages.** Study 02 photographs and cinematic compositions were reused wholesale.
5. **No navigation model.** A single string-template shell with one top bar and one bottom bar cannot express push, sheet, flow and full-screen presentation.

## Decisions (user, 15 November 2026)

1. Write this audit, then build a new studio, `app-ui-v3`. `app-ui-v2` stays unchanged as a reference. (Superseded: `app-ui-v2` was later removed in commit `dad8a3f`.)
2. Navigation follows theme-v2 exactly, plus one Al-Quran destination.
3. Where theme-v2 conflicts with the discipline budgets, theme-v2 fidelity wins.
4. Series use the theme-v2 pattern (light plate, numbered lesson list, docked mini-player). Study 02's cinematic hero stays Study 02's record.

## Resolution in Study 03b

| # | Resolution | Evidence |
|---|---|---|
| G1 | Phone tabs: Home · Al-Quran · Explore · My events · Profile, with theme-v2 item metrics and active state | `parity.cjs` tab-bar, tab-active, tab-inactive |
| G2 | Tablet rail: Home · Al-Quran · Explore · Recordings · Series · Articles · My events. Premium card with crown and gold pill; Profile through the avatar | `parity.cjs` side-nav, side-item-active, side-premium, gold-button |
| G3 | `topRoot` (large title + actions) and `topDetail` (Back + contextual actions, pinned while content scrolls). Tablet uses the labelled back pill and 48px buttons | `qa.cjs` navigation checks; captures `event`, `event-tablet` |
| G4 | `router.js`: one stack per tab; push, sheet, flow and full-screen layers, all mirrored in browser history so system Back and app Back agree. Re-selecting a tab pops to its root. Finished flows are removed, so Back never re-enters a paid booking | `qa.cjs` Tabs, Back and Player checks |
| G5 | `components.js`: 42 render functions covering the theme-v2 components and their parts, with component roots tagged `data-component`. [gallery.html](gallery.html) shows every one beside its reference crop | `parity.cjs`: 49 pairs, 271 property checks, 0 mismatches |
| G6 | Bordered chips, quiet buttons, gold Premium actions and tracked kickers restored at theme-v2 values | `parity.cjs` chip-on, chip-off, gold-button, date-kicker |
| G7 | SVG plates in the theme-v2 motif language, with grain and highlight on large plates. Islamic touch is a studio toggle; Arabic appears only from existing surah metadata | captures `series`, `series-islamic` |
| G8 | Home, Explore, Event, Series, Article, Articles list and Notifications follow their artboards' order and spacing, using TafsirMY fixtures | `discipline-audit.cjs`: each mirrored screen within its artboard's own counts |
| G9 | All six lanes, including card 3-D Secure, FPX and e-wallet approval outside the app, Premium member at RM0.00 due, and the non-member return to the same event to resume | `qa.cjs` Free, Paid, Premium member, Non-member, Entry points |
| G10 | `recoveryCard` in the three-line pattern; all fifteen states open inside the screen they belong to (studio Recovery picker) | `qa.cjs` Recovery × 15 |
| G11 | Profile, account, preferences, Premium subscribe and manage (cancel, grace, hold, paused, expired), restore conflict, purchases and receipts, help, deletion preview, sign-out boundary. The player regains seek, ±15s, speed, full screen, Episodes sheet, end card, next part before next lesson, and opt-in autoplay | `qa.cjs` Membership, Profile, Player checks |
| G12 | Verse actions: three icon buttons (Dengar, Simpan, Nota since the tafsir reader of 22 Nov 2026; the More sheet left with Mark studied and Related materials). The mini-player docks above the bar instead of covering content. Long labels and pills wrap at 320px | `qa.cjs` layout matrix (9 modes × 10 screens) |

The Quran loop from Study 03 was first ported unchanged in behaviour. On 22 November 2026 the tafsir reader replaced it (DESIGN.md "Reader — tafsir reader"). Its reference is the git-ignored Tafseer_Quran_View export, which is not theme-v2 authority, so it has no parity pairs: compare.html shows the export beside each Quran scene, labelled as an external reference. The reader keeps the original DESIGN.md reading budgets (`discipline-audit.cjs` READER: four sizes, four colours on one field, no tracked capitals, no stacked surfaces) and measures three sizes.

### Documented deviations

- **Action gradient.** theme-v2 starts at `#2197A5`. White 16px labels measure about 4.0:1 at the label edge on full-width buttons, so v3 starts at `#147D8A` (4.8:1). The end stop, radius, size and type are unchanged. `qa.cjs` checks the contrast; `parity.cjs` does not compare `background-image`.
- **Content.** Lumen fixtures are mapped to existing TafsirMY fixtures (see [ASSETS-AND-CONTENT.md](ASSETS-AND-CONTENT.md)). theme-v2's in-person venue, QR door code and podcast catalogue have no TafsirMY equivalent. Online registrations show a joining pass, the QR variant lives in the gallery, and "Podcasts" becomes "Recordings" (two existing items).
- **Store.** Study 02's store catalogue has no theme-v2 artboard and is not rebuilt. Paid access goes through tickets, Premium and purchases.

## Verification (15 November 2026, local Chrome, browser only)

| Check | Command | Result |
|---|---|---|
| Component parity | `node prototypes/app-ui-v3/tools/parity.cjs` | 49 pairs, 271 property checks, 0 mismatches |
| Journeys, states, layout, contrast, network | `node prototypes/app-ui-v3/tools/qa.cjs` | 205 checks passed |
| Discipline, recalibrated | `node prototypes/app-ui-v3/tools/discipline-audit.cjs` | 28 of 28 cases within budget |

None of this is native-device, TalkBack/VoiceOver, system-gesture, billing or production-content evidence. Android and iOS are not scaffolded.
