From 445e4834a6e6b7e71a1eca24d1f7379dbb5008b7 Mon Sep 17 00:00:00 2001 From: Nuwan Date: Tue, 24 Feb 2026 22:51:29 +0530 Subject: [PATCH] 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 --- .../phases/25-memory-leak-audit/25-01-PLAN.md | 81 ++++++++++++++++++- 1 file changed, 79 insertions(+), 2 deletions(-) diff --git a/.planning/phases/25-memory-leak-audit/25-01-PLAN.md b/.planning/phases/25-memory-leak-audit/25-01-PLAN.md index 08671c1ad..7a1ae8e2e 100644 --- a/.planning/phases/25-memory-leak-audit/25-01-PLAN.md +++ b/.planning/phases/25-memory-leak-audit/25-01-PLAN.md @@ -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(() => { + + Task 3: Create UAT checklist for memory verification + .planning/phases/25-memory-leak-audit/25-UAT.md + +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 + + +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 + + +- 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 + + + - Task 3: Verify memory stability with UAT checklist + Task 4: Verify memory stability with UAT checklist 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