InlineMatchFormRow: Add Opponent Session Deck Pin + Auto-Open New Row Preference
complete
George Jabbour
## Summary
Two UX improvements for fast match entry during playtesting sessions:
- Opponent Session Deck Pinning- Pin opponent's deck/archetype for a session (like user's deck pin)
- Auto-Open New Row Preference- Toggle to auto-open new form row after submitting
---
## Feature 1: Opponent Session Deck Pinning
Current:
Users can pin their OWN deck as a "session deck" that pre-populates new match forms.Requested:
Also allow pinning the OPPONENT's deck/archetype. Useful when testing against the same deck repeatedly.Affected Files:
- apps/frontend/src/contexts/session-deck-context.tsx- AddsessionOpponentDeckstate,setSessionOpponentDeck(),isSessionOpponentDeck()methods. Add second sessionStorage key.
- apps/frontend/src/components/matches/forms/InlineMatchFormRow.tsx(lines 329-348) - PassonSetSessionDeckandisSessionDeckprops to opponent's DeckArchetypeSelect component.
- apps/frontend/src/components/matches/hooks/useInlineMatchForm.ts(lines 62-88, 148-163) - UpdatecreateInitialFormState()and sync effect to pre-populate opponent fields from session.
---
## Feature 2: Auto-Open New Row Preference
Current:
Form closes after submit. User clicks "Add Match" again for next entry.Requested:
Toggle to keep form open after submit. New form appears with session decks preserved.Affected Files:
- apps/frontend/src/components/matches/tables/inline-matches-table.tsx(lines 89, 117-120) - AddautoOpenNextstate with localStorage persistence. ModifyhandleFormSuccess()to conditionally keepisAddingtrue.
---
## Acceptance Criteria
Feature 1:
- [ ] Pin button appears in opponent's DeckArchetypeSelect
- [ ] Session opponent deck persists in sessionStorage
- [ ] New forms pre-populate opponent field from session
- [ ] Visual indicator when opponent deck is pinned
Feature 2:
- [ ] Toggle near "Add Match" button or in form actions
- [ ] When enabled, new form opens after submit
- [ ] Session deck values preserved in new form
- [ ] Opponent name input auto-focused
- [ ] Preference persists in localStorage
- [ ] Default: OFF
---
## Questions
- Auto-open toggle placement: Next to "Add Match" button or in form row actions?
- Should mobile sheet also support auto-open?
- Different icon/color for opponent session deck indicator?
---
## Estimated Complexity: S-M (3-5 hours)
- Feature 1: ~2-3 hours (context + component changes)
- Feature 2: ~1-2 hours (state + localStorage + UI)
George Jabbour
marked this post as
complete
George Jabbour
marked this post as
in progress
George Jabbour
marked this post as
under review