Consolidate transcript recording, storage, and autosave into src/core-engine/transcript#587
Merged
SorraTheOrc merged 2 commits intoMay 24, 2026
Conversation
added 2 commits
May 24, 2026 01:35
…utosave into src/core-engine/transcript - Create src/core-engine/transcript/ directory with barrel file and all transcript-related modules (TranscriptRecorderBase, TranscriptStore, autoSaveTranscript, TranscriptTypes) - Convert legacy top-level files to backward-compatible re-exports - Update core-engine index.ts to export from consolidated barrel - Add autosave to Main Street (finalizes transcript on game end) - Add finalizeMainStreetTranscript() and getMainStreetTranscript() helpers - Add integration test exercising save/load + autosave round-trip - Add migration guide at docs/core-engine/transcript-migration.md
…engine/transcript imports All example game files now import from the canonical consolidated module instead of the legacy shim paths. The legacy files remain as backward- compatible re-exports so existing code continues to work. Games migrated: - golf/GameTranscript.ts, golf/scenes/GolfOverlayManager.ts - feudalisim/GameTranscript.ts, feudalisim/scenes/FeudalismOverlayManager.ts - sushi-go/GameTranscript.ts, sushi-go/scenes/SushiGoOverlayManager.ts - lost-cities/GameTranscript.ts, lost-cities/scenes/LostCitiesOverlayManager.ts - beleaguered-castle/GameTranscript.ts - the-mind/GameTranscript.ts - main-street/MainStreetTranscript.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal
Consolidate transcript recording, storage, and autosave into
src/core-engine/transcript/and provide thin adapters for per-game recorders. Addresses CG-0MP12WI75001L9P4.Work Done
1. Created consolidated transcript module (
src/core-engine/transcript/)TranscriptRecorder.ts—TranscriptRecorderBase<T>,BaseTranscriptTranscriptStore.ts—TranscriptStore,StoredTranscript,TranscriptStoreOptionsTranscriptTypes.ts—CardSnapshot,snapshotCard()autoSaveTranscript.ts— fire-and-forget persistence helperindex.ts— barrel file exporting all of the above2. Backward-compatible re-export shims
The legacy top-level files (
TranscriptRecorder.ts,TranscriptStore.ts,TranscriptTypes.ts,autoSaveTranscript.ts) now re-export from./transcript/. All existing imports continue to work without changes.3. Main Street autosave integration
finalizeMainStreetTranscript()andgetMainStreetTranscript()helpers toMainStreetTranscript.tsautoSaveTranscriptfrom the consolidated module)4. Tests
tests/main-street/transcript-autosave.integration.test.ts5. Documentation
docs/core-engine/transcript-migration.mdAcceptance Criteria
How to Test
npm test— all 2570 tests should passnpm run build— TypeScript and Vite build should succeednpx vitest run tests/main-street/transcript-autosave.integration.test.tsReview Focus
transcript/barrel exports and the backward-compat shim patternMainStreetTurnController.tsRelated
docs/core-engine/transcript-migration.md