fix(20): revise plan based on checker feedback
- Task 2: Changed from 'auto' to 'checkpoint:pass' (no code changes needed) - Task 3: Explicitly state line 111 destructuring modification - Added VUMTR-01 deferral note in objective section - Updated files_modified to exclude VuContext.js (auto-exposes via pattern) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
f8e74a3c1f
commit
4f0119b259
|
|
@ -6,8 +6,8 @@ wave: 1
|
||||||
depends_on: []
|
depends_on: []
|
||||||
files_modified:
|
files_modified:
|
||||||
- jam-ui/src/hooks/useVuHelpers.js
|
- jam-ui/src/hooks/useVuHelpers.js
|
||||||
- jam-ui/src/context/VuContext.js
|
|
||||||
- jam-ui/src/hooks/useMixerHelper.js
|
- jam-ui/src/hooks/useMixerHelper.js
|
||||||
|
# Note: VuContext.js not modified - it automatically exposes removeVuState via existing pattern
|
||||||
autonomous: true
|
autonomous: true
|
||||||
|
|
||||||
must_haves:
|
must_haves:
|
||||||
|
|
@ -43,8 +43,10 @@ Purpose: Address HIGH priority memory leak (VUMTR-02, VUMTR-03) where vuStates o
|
||||||
|
|
||||||
Output:
|
Output:
|
||||||
- Modified useVuHelpers.js with removeVuState function
|
- Modified useVuHelpers.js with removeVuState function
|
||||||
- Modified VuContext.js exposing removeVuState
|
- Modified VuContext.js exposing removeVuState (automatic via existing pattern)
|
||||||
- Modified useMixerHelper.js calling removeVuState on mixer cleanup
|
- Modified useMixerHelper.js calling removeVuState on mixer cleanup
|
||||||
|
|
||||||
|
Note: VUMTR-01 (VU callback throttling) is intentionally deferred as a performance optimization, not a memory leak (per Phase 19 audit).
|
||||||
</objective>
|
</objective>
|
||||||
|
|
||||||
<execution_context>
|
<execution_context>
|
||||||
|
|
@ -122,13 +124,12 @@ removeVuState callback exists in useVuHelpers.js and is exported in the return o
|
||||||
</done>
|
</done>
|
||||||
</task>
|
</task>
|
||||||
|
|
||||||
<task type="auto">
|
<task type="checkpoint:pass">
|
||||||
<name>Task 2: Expose removeVuState through VuContext</name>
|
<name>Task 2: Verify removeVuState is exposed through VuContext</name>
|
||||||
<files>jam-ui/src/context/VuContext.js</files>
|
<rationale>
|
||||||
<action>
|
The VuContext.js file already passes all of useVuHelpers return values through the context provider (line 7: `const vuHelpers = useVuHelpers()`), so removeVuState is automatically available after Task 1 completes.
|
||||||
The VuContext.js file already passes all of useVuHelpers return values through the context provider (line 7: `const vuHelpers = useVuHelpers()`), so removeVuState is automatically available.
|
|
||||||
|
|
||||||
**Verification only** - No code changes needed. The existing pattern at lines 6-13 passes the entire vuHelpers object to the context, which now includes removeVuState:
|
The existing pattern at lines 6-13 passes the entire vuHelpers object to the context:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
export const VuProvider = ({ children }) => {
|
export const VuProvider = ({ children }) => {
|
||||||
|
|
@ -142,15 +143,15 @@ export const VuProvider = ({ children }) => {
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
Consumers using `useVuContext()` will automatically have access to removeVuState.
|
No code changes required - consumers using `useVuContext()` will automatically have access to removeVuState once Task 1 adds it to useVuHelpers.
|
||||||
</action>
|
</rationale>
|
||||||
<verify>
|
<verify>
|
||||||
1. Read VuContext.js to confirm the pattern passes all useVuHelpers exports
|
1. Read VuContext.js to confirm the pattern passes all useVuHelpers exports
|
||||||
2. Verify useVuHelpers() is called and spread into context value
|
2. Verify useVuHelpers() is called and its result is passed to context value
|
||||||
3. Confirm no changes are needed to VuContext.js
|
3. Confirm no changes are needed to VuContext.js
|
||||||
</verify>
|
</verify>
|
||||||
<done>
|
<done>
|
||||||
VuContext automatically exposes removeVuState through the existing vuHelpers spread pattern
|
VuContext automatically exposes removeVuState through the existing vuHelpers spread pattern - no modifications needed
|
||||||
</done>
|
</done>
|
||||||
</task>
|
</task>
|
||||||
|
|
||||||
|
|
@ -167,10 +168,7 @@ Implementation steps:
|
||||||
import { useVuContext } from '../context/VuContext.js';
|
import { useVuContext } from '../context/VuContext.js';
|
||||||
```
|
```
|
||||||
|
|
||||||
Update line 111 to destructure removeVuState alongside updateVU3:
|
Modify line 111 from `const { updateVU3 } = useVuContext();` to `const { updateVU3, removeVuState } = useVuContext();` to destructure removeVuState alongside updateVU3.
|
||||||
```javascript
|
|
||||||
const { updateVU3, removeVuState } = useVuContext();
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **Add cleanup effect that watches for mixer removals** - After the existing `useEffect` that syncs `isReady` (around line 317), add a new effect that detects when mixers are removed and cleans up their VU state:
|
2. **Add cleanup effect that watches for mixer removals** - After the existing `useEffect` that syncs `isReady` (around line 317), add a new effect that detects when mixers are removed and cleans up their VU state:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue