Skip to content

Commit bf53ea0

Browse files
committed
docs: Add missing files to gate mode removal spec
Audit revealed 3 missing files: - app/src/App.tsx (default track creation) - app/src/worker/logging.ts (hash interfaces) - app/scripts/debug-ws-storm-local.ts (test fixtures) Also added note about 'gated' vs 'gate' inconsistency in session-api.ts. Updated file count estimate from ~77 to ~80 files.
1 parent c9b04dd commit bf53ea0

File tree

1 file changed

+85
-8
lines changed

1 file changed

+85
-8
lines changed

specs/REMOVE-GATE-MODE.md

Lines changed: 85 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
**Status**: Ready for Implementation
44
**Branch**: `claude/remove-gate-mode`
5-
**Estimated Changes**: ~77 files, ~600 lines removed
5+
**Estimated Changes**: ~80 files, ~620 lines removed
66

77
## Overview
88

@@ -292,6 +292,19 @@ Remove playback mode handler:
292292
- onSetPlaybackMode={(playbackMode) => handleSetPlaybackMode(track.id, playbackMode)}
293293
```
294294

295+
#### `app/src/App.tsx`
296+
297+
Remove from default track creation (line 582):
298+
299+
```diff
300+
const defaultTracks = samples.map((sample) => ({
301+
...
302+
parameterLocks: Array(16).fill(null),
303+
- playbackMode: 'oneshot' as const,
304+
...
305+
}));
306+
```
307+
295308
---
296309

297310
### 5. Multiplayer Sync
@@ -463,6 +476,40 @@ Remove from hash calculation:
463476
};
464477
```
465478

479+
#### `app/src/worker/logging.ts`
480+
481+
Remove from logging hash interfaces and function (lines 542, 564, 617):
482+
483+
```diff
484+
interface TrackForHash {
485+
...
486+
volume: number;
487+
muted: boolean;
488+
soloed?: boolean;
489+
- playbackMode: string;
490+
transpose: number;
491+
stepCount?: number;
492+
}
493+
494+
interface CanonicalTrack {
495+
...
496+
volume: number;
497+
// NOTE: muted and soloed are EXCLUDED from hash
498+
- playbackMode: string;
499+
transpose: number;
500+
stepCount: number;
501+
}
502+
503+
// In canonicalizeTrack function (line 617)
504+
return {
505+
...
506+
volume: track.volume,
507+
- playbackMode: track.playbackMode,
508+
transpose: track.transpose,
509+
stepCount,
510+
};
511+
```
512+
466513
---
467514

468515
### 8. Session Files (JSON)
@@ -555,6 +602,9 @@ Remove validation:
555602
- }
556603
```
557604

605+
> **Note**: This file has a pre-existing bug where it uses `'gated'` instead of `'gate'`.
606+
> The rest of the codebase uses `'gate'`. This inconsistency is fixed by removal.
607+
558608
#### `app/scripts/debug-state-hash.ts`
559609

560610
Remove from hash debugging:
@@ -625,6 +675,33 @@ Remove from track fixtures:
625675
};
626676
```
627677

678+
#### `app/scripts/debug-ws-storm-local.ts`
679+
680+
Remove from test track fixtures (lines 61, 73):
681+
682+
```diff
683+
const tracks = [
684+
{
685+
...
686+
parameterLocks: Array(128).fill(null),
687+
volume: 1,
688+
muted: false,
689+
- playbackMode: 'oneshot',
690+
transpose: 0,
691+
stepCount: 16,
692+
},
693+
{
694+
...
695+
parameterLocks: Array(128).fill(null),
696+
volume: 0.7,
697+
muted: false,
698+
- playbackMode: 'oneshot',
699+
transpose: 0,
700+
stepCount: 16,
701+
},
702+
];
703+
```
704+
628705
---
629706

630707
### 11. Documentation / Specs
@@ -750,15 +827,15 @@ describe('playbackMode removal', () => {
750827
| Types | 5 | 20 |
751828
| State | 1 | 7 |
752829
| Audio | 2 | 15 |
753-
| UI | 3 | 50 |
830+
| UI | 4 | 55 |
754831
| Multiplayer | 4 | 40 |
755-
| Worker | 2 | 30 |
832+
| Worker | 3 | 40 |
756833
| Hash | 1 | 5 |
757834
| Tests | 25+ | 200+ |
758-
| Scripts | 6 | 20 |
835+
| Scripts | 7 | 25 |
759836
| Sessions (JSON) | 19 | 150+ |
760837
| Docs | 9 | 50+ |
761-
| **Total** | **~77** | **~600** |
838+
| **Total** | **~80** | **~620** |
762839

763840
---
764841

@@ -767,12 +844,12 @@ describe('playbackMode removal', () => {
767844
1. **Types first**: Remove from sync-types.ts, types.ts, state.ts, worker/types.ts
768845
2. **State management**: Remove reducer case from grid.tsx
769846
3. **Audio**: Update engine.ts and scheduler.ts
770-
4. **UI**: Remove from TrackRow.tsx, TrackRow.css, StepSequencer.tsx
847+
4. **UI**: Remove from TrackRow.tsx, TrackRow.css, StepSequencer.tsx, App.tsx
771848
5. **Sync**: Update message-types.ts, messages.ts, sync-classification.ts, multiplayer.ts
772-
6. **Worker**: Update live-session.ts, mock-durable-object.ts
849+
6. **Worker**: Update live-session.ts, mock-durable-object.ts, logging.ts
773850
7. **Hash**: Update canonicalHash.ts
774851
8. **Tests**: Update all test files
775-
9. **Scripts**: Update utility scripts
852+
9. **Scripts**: Update utility scripts (including debug-ws-storm-local.ts)
776853
10. **Sessions**: Update JSON files, delete gate-mode-demo.json
777854
11. **Docs**: Update spec files
778855

0 commit comments

Comments
 (0)