feat: P2-1 Unified Project Store + P2-2 Dynamic Slide Generation - #31
Closed
ib823 wants to merge 5 commits into
Closed
feat: P2-1 Unified Project Store + P2-2 Dynamic Slide Generation#31ib823 wants to merge 5 commits into
ib823 wants to merge 5 commits into
Conversation
Implements the foundation for cross-tier data flow (Estimator → Project → Present) as specified in docs/Roadmap_and_DoD.md P2-1. **Core Implementation:** - Created unified-project-store.ts with UnifiedProject interface - Versioned schema (v1) with metadata tracking - Migration utilities from legacy stores (presales/timeline/project) - Dual-write pattern for backward compatibility - Type-safe with full TypeScript support **Integration:** - Estimator saves estimates to unified store (estimator/page.tsx) - Project reads from unified store on mount (ProjectShell.tsx) - Automatic sync to legacy stores via syncToLegacyStores() - localStorage persistence with createJSONStorage **Testing:** - 17 integration tests covering: - Project creation from estimator - Legacy store migration - Dual-write sync to legacy stores - Dual-read sync from legacy stores - Project versioning - CRUD operations - Tier-specific updates (estimator/presales/timeline/UI) - All 445 tests passing **Definition of Done (P2-1):** ✅ Unified store created with full interface ✅ Migration utility converts old data ✅ Estimator saves estimates to store ✅ Project reads from store correctly ✅ No data loss during migration ✅ Backward compatible (old projects load via dual-write) ✅ Tests pass (integration tests) **Migration Strategy:** - Phase 1: Store created, dual-write to legacy stores (CURRENT) - Phase 2: Migrate components one by one - Phase 3: Deprecate legacy stores after validation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Implements complete P2-2 Dynamic Slide Generation as specified in Roadmap_and_DoD.md. **Core Implementation:** - Refactored slide-generator.ts → slide-generator.tsx with inline JSX - Dynamic slide count (3-7 slides) based on project data - Conditional slide inclusion based on available data - Slide management UI (reorder, hide/show) **Features:** 1. **Dynamic Slide Generation:** - Cover: Always included - Requirements: Only if chips exist - Timeline: Always included - Phase Breakdown: Only if >3 phases - RICEFW: Only if items exist - Team Structure: Only if resources exist - Summary: Always included 2. **Slide Management:** - Manage panel (press 'M' to toggle) - Hide/show slides with eye icon - Reorder slides with ↑/↓ buttons - Visual indicators for hidden slides - Slide counter shows hidden count 3. **Enhanced Navigation:** - Keyboard shortcuts: Arrow keys, Escape, N (notes), M (manager) - Mouse controls: dots, arrows, buttons - Smooth animations with AnimatePresence **Technical Changes:** - PresentMode.tsx: Removed hardcoded slides, now uses generateSlides() - slide-generator.tsx: Returns actual React components with Framer Motion - Added 18 comprehensive tests covering all conditional logic **Test Results:** - All 463 tests passing (was 445, +18 new) - Build succeeds with no TypeScript errors - Full coverage of dynamic slide logic **Definition of Done (P2-2) - ALL MET:** ✅ Slides generated based on project data ✅ RICEFW slide only if items exist ✅ Phase breakdown only if >3 phases ✅ Slide count varies by project (3-7 range) ✅ User can reorder slides ✅ User can hide/show slides **Files Modified:** - src/lib/presentation/slide-generator.ts → .tsx (refactored) - src/components/project-v2/modes/PresentMode.tsx (dynamic slides) - tests/lib/slide-generator.test.ts (new test file) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Created ROADMAP_STATUS.md with detailed implementation tracking - Updated Roadmap_and_DoD.md to mark P1-2 (PDF Export) as complete - Documents branch architecture and merge strategy - Provides clear decision points for next steps Current branch status: ✅ P2-1: Unified Project Store (complete) ✅ P2-2: Dynamic Slide Generation (complete) ✅ P1-2: PDF Export (complete) ✅ All 463 tests passing Next steps: Ready for PR or additional feature implementation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
8 tasks
Owner
Author
|
Closing in favor of #32 which includes all features from this PR plus the critical P1-1 safety feature (Regenerate Preview Modal). PR #32 is a superset that includes:
PR #32 completes both Sprint 2 (100%) and Sprint 3 (100%), making it the more comprehensive option for review and merge. See: #32 |
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.
🎯 Overview
Implements Sprint 3 (P2) features from the roadmap: Unified Project Store and Dynamic Slide Generation. This PR establishes the foundation for data continuity across all application tiers and enables adaptive presentation generation based on project data.
✨ Features Implemented
P2-1: Unified Project Store
File:
src/stores/unified-project-store.ts(702 lines)Core Implementation:
Integration:
estimator/page.tsx)ProjectShell.tsx)syncToLegacyStores()createJSONStorageTesting:
Definition of Done:
P2-2: Dynamic Slide Generation
File:
src/lib/presentation/slide-generator.tsx(470 lines)Core Implementation:
Slide Logic:
UI Features:
Testing:
Definition of Done:
P1-2: PDF Export (Previously Implemented)
File:
src/lib/presentation/pdf-exporter.ts(existing)Integration:
📊 Test Results
New Tests Added:
🔧 Technical Changes
Files Modified
src/stores/unified-project-store.ts- New unified store (702 lines)src/lib/presentation/slide-generator.tsx- Refactored with JSX (470 lines)src/components/project-v2/modes/PresentMode.tsx- Uses dynamic slidessrc/app/estimator/page.tsx- Saves to unified storesrc/components/project-v2/ProjectShell.tsx- Reads from unified storeFiles Added
tests/integration/unified-project-store.test.ts(719 lines)tests/lib/slide-generator.test.ts(246 lines)docs/ROADMAP_STATUS.md- Comprehensive roadmap trackingDocumentation Updated
docs/Roadmap_and_DoD.md- Marked P2-1, P2-2, P1-2 as completedocs/ROADMAP_STATUS.md- New status tracking document🚀 Migration Strategy
Phase 1: Dual-Write (CURRENT STATE)
Phase 2: Component Migration (Future)
Phase 3: Deprecation (Future)
✅ Quality Checklist
📈 Impact
User Benefits:
Developer Benefits:
🎯 Roadmap Progress
Sprint 3 (P2): ✅ 100% Complete
Other Completed:
Remaining on Separate Branches:
🔗 Related Issues
Implements roadmap items from
docs/Roadmap_and_DoD.md:📸 Screenshots
N/A - Backend data architecture and component refactoring. UI remains functionally identical but with new dynamic slide capabilities.
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com