fix(25): revise plan based on checker feedback

- Added Task 3 to create 25-UAT.md (requirement_coverage blocker)
- Renumbered checkpoint task from 3 to 4
- Simplified key_links[0] pattern to 'delete window\.JK' (warning fix)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Nuwan 2026-02-24 22:51:29 +05:30
parent 5f7f0fda76
commit 445e4834a6
1 changed files with 79 additions and 2 deletions

View File

@ -29,7 +29,7 @@ must_haves:
- from: "jam-ui/src/hooks/useRecordingHelpers.js"
to: "window.JK.*"
via: "useEffect cleanup function"
pattern: "return \\(\\) => \\{[\\s\\S]*delete window\\.JK"
pattern: "delete window\\.JK"
- from: "jam-ui/src/hooks/useRecordingHelpers.js"
to: "waitingOnStopTimer"
via: "useEffect cleanup function"
@ -242,8 +242,80 @@ useEffect(() => {
</done>
</task>
<task type="auto">
<name>Task 3: Create UAT checklist for memory verification</name>
<files>.planning/phases/25-memory-leak-audit/25-UAT.md</files>
<action>
Create a comprehensive UAT checklist following the Phase 23 pattern. Include:
**Frontmatter:**
```yaml
---
phase: 25-memory-leak-audit
type: uat
status: pending
verified-by:
verified-date:
---
```
**Sections to include:**
1. **Prerequisites** - Chrome DevTools, jam-ui running, native client connected
2. **Quick Verification (2-3 minutes)** - Open/close recording modal 5 times, check for console warnings
3. **Section 1: Timer Cleanup Verification**
- Purpose: Verify waitingOnStopTimer is cleared on unmount
- Test steps: Start recording, stop recording, leave session
- Expected: No timer-related errors
4. **Section 2: Callback Cleanup Verification**
- Purpose: Verify window.JK callbacks don't accumulate
- Test steps: Open/close recording modal 20 times, check window.JK
- Expected: Same callback names, no duplicates
5. **Section 3: Async Operation Cleanup Verification**
- Purpose: Verify no "state update on unmounted component" warnings
- Test steps: Open recording modal, quickly close before load completes
- Expected: No console warnings
6. **Section 4: 15-Minute Idle Test**
- Purpose: Verify modal can stay open without memory growth
- Test steps: Open modal, leave open 15+ minutes, measure heap
- Expected: < 50% growth
7. **Section 5: 15-Minute Active Recording Test**
- Purpose: Verify active recording doesn't leak memory
- Test steps: Start recording, continue 15+ minutes, measure heap
- Expected: < 50% growth, no freezes
8. **Verification Results Summary** - Table with all sections
9. **Troubleshooting** - Common issues and how to investigate
Follow exact format from Phase 23 UAT.md including:
- Checkbox format for test steps
- Expected/Actual result tables
- Notes sections
- Footer with template version
</action>
<verify>
1. File exists at .planning/phases/25-memory-leak-audit/25-UAT.md
2. File has > 100 lines
3. Contains all 5 main test sections
4. Contains frontmatter with status: pending
5. Contains troubleshooting section
</verify>
<done>
- 25-UAT.md created with comprehensive verification checklist
- All test scenarios from CONTEXT.md covered (idle 15min, active recording 15min)
- Format matches Phase 23 UAT.md pattern
</done>
</task>
<task type="checkpoint:human-verify" gate="blocking">
<name>Task 3: Verify memory stability with UAT checklist</name>
<name>Task 4: Verify memory stability with UAT checklist</name>
<what-built>
Memory leak fixes in recording-related components:
1. Timer cleanup on unmount in useRecordingHelpers.js
@ -295,6 +367,10 @@ Memory leak fixes in recording-related components:
- useRecordingHelpers.js contains cleanup useEffect for callbacks
- JKSessionRecordingModal.js contains ignore flag pattern in both useEffect hooks
**UAT File Verification:**
- 25-UAT.md exists with 100+ lines
- Contains all required test sections
**Manual Verification (UAT):**
- Human verifies no console warnings during modal open/close
- Human verifies memory stability during 15+ minute test
@ -307,6 +383,7 @@ Memory leak fixes in recording-related components:
3. MEM-03: Recording modal can remain open 15+ minutes without memory growth
4. No "state update on unmounted component" console warnings
5. Callbacks in window.JK don't accumulate across modal open/close cycles
6. 25-UAT.md created with comprehensive verification checklist
</success_criteria>
<output>