Skip to content

feat(deck): unify deck page with drops-aware UI - #34

Merged
damarals merged 3 commits into
mainfrom
feat/30-unified-deck-page
May 10, 2026
Merged

damarals merged 3 commits into
mainfrom
feat/30-unified-deck-page

Conversation

@damarals

Copy link
Copy Markdown
Owner

Closes #30

Summary

  • Replaced the placeholder app/deck/[id].tsx with the unified deck page (lifted from app/review/[id].tsx); deleted the review/[id] route. Library entry and post-generation flow now both land on the same screen.
  • The post-generation enhancements (sparse/minor-drops InlineAlerts, kept/skipped filter pills, dropped-tracks list, "X cards · Y skipped" subtitle) render purely as drops.length > 0 conditionals — no mode flag, no route param. When opened from the library the store is empty for that id, so all the enhancements short-circuit and the screen falls back to a plain card list with a "X cards · created Mon DD, YYYY" subtitle.
  • Restored back navigation: dropped headerBackVisible: false and gestureEnabled: false from the page's Stack.Screen options; removed the hardcoded title from the layout-level deck/[id] entry so the in-screen headerTitle (driven by deck.name) wins.
  • Flipped app/resolving.tsx redirect from /review/${id} to /deck/${id}.
  • YearEditor now dismisses without committing on Android hardware back (via BackHandler.addEventListener('hardwareBackPress', …) while editingIsrc != null) and on tap outside (via Keyboard.addListener('keyboardDidHide', …) — the existing keyboardShouldPersistTaps="handled" on the FlatList collapses the soft keyboard on tap-outside, which we mirror to clear the edit state).

Test plan

  • npm run typecheck clean
  • npm run lint clean
  • npm test — 140/140 pass
  • Post-generation: create a deck via Generate → resolves → lands on /deck/[id] with drops UI (subtitle "X cards · Y skipped", InlineAlerts, filter pills, dropped rows visible)
  • Library: open a saved deck from home → lands on /deck/[id] with the same screen but no drops UI; subtitle reads "X cards · created Mon DD, YYYY"
  • Header back arrow and edge-swipe gesture both work
  • Tap a year cell to start editing; press Android back → editor dismisses without writing override
  • Tap a year cell to start editing; tap anywhere outside the input → keyboard dismisses → editor dismisses without writing override

@damarals
damarals merged commit 47e09ee into main May 10, 2026
1 check passed
@damarals
damarals deleted the feat/30-unified-deck-page branch May 10, 2026 23:32
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.

Unify deck page: merge review/[id] into deck/[id] with drops-aware UI

1 participant