14 KiB
Epic 2 Retrospective: Player Notifications & Director's Board
Date: 2026-05-23
Epic: 2 - Player Notifications & Director's Board
Status: Completed
Facilitator: Amelia (Developer)
Participants: Morr (Project Lead), Alice (Product Owner), Charlie (Senior Dev), Dana (QA Engineer), Elena (Junior Dev)
Executive Summary
Epic 2 delivered all 3 stories on time with 100% completion rate. The epic extended the core visibility control system with player-facing notifications and a comprehensive GM control interface. Test coverage improved significantly with 105 new tests added. The team successfully resolved all deferred technical debt from Epic 1 while maintaining architectural consistency.
Epic Metrics:
- Stories Completed: 3/3 (100%)
- New Tests Added: 105
- Total Tests Passing: 412
- Production Incidents: 0
- Critical Blockers: 0
Epic Overview
Stories Delivered
| Story | Title | Status | Tests Added | Key Outcomes |
|---|---|---|---|---|
| 2.1 | NotificationBus & Notification Verbosity | Done | 28 | Coalescing notifications, verbosity settings, i18n integration |
| 2.2 | Director's Board — Core Layout & Participant Toggle | Done | 48 | ApplicationV2 implementation, per-participant toggle, keyboard nav |
| 2.3 | Director's Board — Bulk Actions, Spotlight & Keyboard Shortcuts | Done | 29 | Show/Hide All, Spotlight, Undo, keyboard shortcuts, sidebar button |
Functional Requirements Covered
- FR-9: Director's Board open via sidebar button + keyboard shortcut
- FR-10: Director's Board full Visibility Matrix seating-chart layout
- FR-11: Per-participant toggle from Director's Board
- FR-12: Bulk Show All / Hide All with one-step Undo
- FR-13: Spotlight action with pre-spotlight snapshot and Restore
- FR-14: Full keyboard shortcuts for Director's Board actions
- FR-20: Toast notification to all participants on GM visibility change
- FR-21: Notification verbosity configuration per user
What Went Well
🎯 Major Successes
-
Proactive Technical Debt Resolution
- Story 2.1 proactively addressed all 4 deferred items from Epic 1 retro
- Memory leak fixes in ScryingPoolController
- Listener cleanup in both ScryingPoolController and VisibilityManager
- Echo revision validation
- Impact: Prevented debt accumulation, maintained code health
-
Architecture Decisions Proved Sound
- Import boundary enforcement (ESLint
import/no-restricted-paths) caught violations early - Side-effect-free constructors enabled reliable testing
- Dependency injection pattern allowed easy mocking in tests
- Impact: High testability, maintainable codebase
- Import boundary enforcement (ESLint
-
TDD Discipline Maintained
- All stories followed strict TDD red-green cycles
- 105 new tests with comprehensive coverage
- Tests caught edge cases before production
- Impact: High confidence in code quality
-
Complete i18n Coverage
- All user-facing strings properly localized
- Consistent i18n key naming convention
- Fallback patterns for edge cases
- Impact: Ready for localization, professional polish
-
Accessibility Built-In
- All interactive elements have ARIA labels
- Full keyboard navigation support
- Focus management in dialogs and popovers
- Impact: WCAG AA compliant, usable by all players
-
Cross-Browser/Environment Compatibility
- Conditional ApplicationV2 pattern for test environment
- Safe optional chaining for FoundryVTT APIs
- Graceful degradation when features unavailable
- Impact: Reliable across different environments
Challenges & Growth Areas
⚠️ Key Challenges
-
Cross-Story Interface Mismatches
- Issue: Story 2.2 implemented
_dispatchToggle()with object parameter{userId, targetState}but ScryingPoolController.action() expects positional args(source, participantId, targetState, opId, baseRevision) - Resolution: Fixed in Story 2.3 Task 1, but cost development time
- Root Cause: Insufficient integration testing between stories
- Pattern: 1 story had cross-story interface issues
- Issue: Story 2.2 implemented
-
Event Listener Lifecycle Management
- Issue: Memory leak fixes were deferred from Epic 1 and had to be addressed in Epic 2
- Manifestations:
_revisionsMap leak in ScryingPoolController- Missing
teardown()methods in multiple classes - DOM listener cleanup on close/reopen cycles
- Resolution: Story 2.1 Tasks 4.1-4.3, Story 2.3 various fixes
- Pattern: 3 out of 3 stories had to add cleanup/teardown logic
-
Race Conditions in Bulk Operations
- Issue: Story 2.3 bulk actions (showAll, hideAll, spotlight) had race conditions in state capture
- Manifestations: Inconsistent snapshots when user states changed mid-operation
- Resolution: Atomic state capture before iteration
- Pattern: All bulk operations now capture complete state snapshot first
-
Sidebar Button API Uncertainty
- Issue: FoundryVTT v14
getSceneControlButtonshook API was uncertain - Resolution: Implemented with safe optional chaining, added fallback CTA button in ScryingPoolStrip
- Pattern: Defensive coding for uncertain APIs
- Issue: FoundryVTT v14
Patterns Identified
✅ Positive Patterns (Repeat These)
-
Deferred Debt Folding
- Story 2.1 proactively addressed Epic 1 deferred items
- Pattern: Address deferred work early in the next epic
- Recommendation: Continue this pattern for Epic 3
-
Utility Function Extraction
- Story 2.3 created
src/utils/boardUtils.jsfor shared context building - Pattern: Extract shared logic into utility modules
- Recommendation: Apply this pattern more aggressively
- Story 2.3 created
-
State Machine Patterns
- Undo/Restore state machine with
_undoSnapshotand_spotlightSnapshot - Pattern: Clear state transitions with mutual exclusion
- Recommendation: Document this pattern for reuse
- Undo/Restore state machine with
-
Bulk Operation Patterns
- Atomic state capture before iteration
- Ghost state exclusion checks
- Pending operation guards
- Pattern: Robust bulk operation handling
- Recommendation: Create reusable bulk operation helper
⚠️ Negative Patterns (Avoid These)
-
Insufficient Cross-Story Testing
- Interface mismatches between stories
- Pattern: Test story interfaces against their dependencies
- Recommendation: Add integration test step to story creation checklist
-
Late Lifecycle Management
teardown()methods added as fixes rather than designed in- Pattern: Event cleanup as afterthought
- Recommendation: Include teardown in initial class design template
Previous Retro Follow-Through (Epic 1)
Epic 1 Action Items Status
| Action Item | Status | Evidence |
|---|---|---|
| Memory leak fixes | ✅ Completed | Story 2.1 Tasks 4.1-4.4 |
| Listener cleanup | ✅ Completed | Story 2.1, refined in Story 2.3 |
| Test coverage for edge cases | ✅ Completed | 105 new tests in Epic 2 |
| Documentation improvements | ⚠️ Partial | Dev notes good, module-level docs need work |
Assessment: 3/4 action items completed (75%). The one partial item (documentation) carries forward.
Lessons Applied from Epic 1
✅ Import Boundaries - Strictly enforced via ESLint, no violations in Epic 2
✅ Side-Effect-Free Constructors - All new classes follow this pattern
✅ TDD Approach - Maintained throughout Epic 2
✅ Dependency Injection - Enabled comprehensive testing
⚠️ Documentation - Story-level documentation excellent, module-level could improve
Lessons NOT Applied from Epic 1
❌ None identified - All Epic 1 lessons were successfully applied
Next Epic Preview: Epic 3 - Scene-Aware Camera Automation
Epic 3 Overview
| Story | Title | Status |
|---|---|---|
| 3.1 | Save & Load Scene Presets | Backlog |
| 3.2 | Scene Auto-Apply & ConfirmationBar | Backlog |
| 3.3 | Preset Import & Export | Backlog |
Dependencies on Epic 2
-
Director's Board UI Patterns
- ApplicationV2 usage patterns
- Event delegation on root element
- Position persistence via user flags
- Status: ✅ Available and tested
-
NotificationBus Integration
- Toast notification infrastructure
- Coalescing patterns
- Verbosity settings
- Status: ✅ Available and tested
-
Visibility Matrix Persistence
- World setting storage
- StateStore change events
- Status: ✅ Available from Epic 1
-
Bulk Operation Patterns
- Atomic state capture
- Ghost state handling
- Pending operation guards
- Status: ✅ Available from Story 2.3
Technical Prerequisites
✅ All prerequisites met - Epic 2 delivered all required infrastructure
Open Questions (from Architecture)
-
OQ-5:
updateScenehook timing- Need to verify FoundryVTT v14 hook behavior
- Risk: Auto-apply may fire at wrong time in scene transition
- Action: Spike before Story 3.2
-
OQ-6: Partial vs unconditional preset application
- Decision needed: Apply presets to offline participants?
- Risk: State inconsistency if participants reconnect
- Action: Architectural decision before Story 3.2
Preparation Needed
| Task | Owner | Priority | Estimated Effort | Deadline |
|---|---|---|---|---|
Spike updateScene hook timing |
Charlie | High | 1 day | Before 3.2 |
| Decide partial preset behavior | Morr + Alice | High | 0.5 day | Before 3.2 |
| Update architecture.md with Epic 2 patterns | Amelia | Medium | 0.5 day | After retro |
| Create integration test checklist | Dana | Medium | 0.5 day | Before 3.1 |
Action Items
Process Improvements
-
Add cross-story integration tests to story creation checklist
- Owner: Dana (QA Engineer)
- Deadline: Before Story 3.1 starts
- Success Criteria: Checklist item added to
deferred-work.mdor story template - Category: Process
-
Document event lifecycle patterns in architecture.md
- Owner: Amelia (Developer)
- Deadline: After Epic 2 retrospective
- Success Criteria:
teardown()pattern documented, examples provided - Category: Documentation
-
Create reusable bulk operation helper
- Owner: Charlie (Senior Dev)
- Deadline: Before Story 3.1 starts
- Success Criteria: Helper module created and tested, used in Story 3.2
- Category: Technical
Technical Debt
No critical debt items - all Epic 1 deferred items resolved in Epic 2
Documentation
- Update architecture.md with Epic 2 patterns
- Owner: Amelia (Developer)
- Deadline: After Epic 2 retrospective
- Success Criteria: New patterns documented: NotificationBus coalescing, Director's Board architecture, bulk operation patterns
Team Agreements
- All stories must include integration verification step in their checklist
- Event listeners must have corresponding
teardown()methods - Cross-story interface changes require peer review from adjacent story authors
- Bulk operations must capture atomic state snapshots before iteration
Critical Path
Blockers to Resolve Before Epic 3
-
OQ-5:
updateScenehook timing spike- Owner: Charlie (Senior Dev)
- Must complete by: Before Story 3.2 starts
- Dependencies: None
-
OQ-6: Partial preset application decision
- Owner: Morr (Project Lead) + Alice (Product Owner)
- Must complete by: Before Story 3.2 starts
- Dependencies: None
Preparation Sprint Tasks
- Spike
updateScenehook timing - Decide partial vs unconditional preset application
- Update architecture.md with Epic 2 patterns
- Create integration test checklist
- Create reusable bulk operation helper
Total Estimated Effort: 2-3 days
Readiness Assessment
Epic 2 Readiness
| Area | Status | Notes |
|---|---|---|
| Testing & Quality | ✅ Complete | 412 tests passing, all ACs verified |
| Deployment | ⏳ Pending | Module not yet deployed to FoundryVTT |
| Stakeholder Acceptance | ✅ N/A | Internal module for personal use |
| Technical Health | ✅ Stable | No critical issues, good architecture |
| Unresolved Blockers | ✅ None | All stories complete and tested |
Overall: Epic 2 is complete and production-ready from a technical perspective. Deployment timing is at Morr's discretion.
Files Modified in Epic 2
New Files
src/notifications/NotificationBus.jstests/unit/notifications/NotificationBus.test.jssrc/ui/gm/DirectorsBoard.jstests/unit/ui/gm/DirectorsBoard.test.jssrc/ui/shared/ParticipantCard.jstests/unit/ui/shared/ParticipantCard.test.jssrc/utils/boardUtils.js
Modified Files
module.js(settings, keybindings, wiring)lang/en.json(i18n keys)templates/directors-board.hbstemplates/participant-card.hbsstyles/components/_directors-board.lessstyles/components/_participant-card.lessstyles/components/_notification.lesssrc/core/ScryingPoolController.js(cleanup methods)src/core/VisibilityManager.js(cleanup methods)
Metrics Summary
| Metric | Value | Notes |
|---|---|---|
| Stories Completed | 3/3 | 100% |
| New Tests | 105 | +29 in Story 2.3 alone |
| Total Tests | 412 | All passing |
| New Files | 7 | 3 source, 4 test |
| Modified Files | 11 | Across core, ui, styles, templates |
| LOC Added | ~1,500 | Estimated |
| Production Incidents | 0 | |
| Code Review Iterations | Minimal | Most stories passed first review |
Conclusion
Epic 2 was a successful delivery that extended the module's core functionality with player notifications and GM control tools. The team maintained architectural discipline, delivered comprehensive test coverage, and proactively resolved technical debt from Epic 1.
Key Achievements:
- Complete notification system with coalescing and verbosity control
- Full-featured Director's Board with keyboard accessibility
- Bulk operations with undo capability
- Maintained 100% architectural compliance
Areas for Improvement:
- Cross-story integration testing
- Event lifecycle pattern standardization
- Earlier detection of interface mismatches
Readiness for Epic 3: High - All prerequisites met, team experienced, patterns established.
Next Retrospective: Epic 3 (after all stories complete)
Document Owner: Morr (Project Lead)
Last Updated: 2026-05-23