Open
Conversation
Major Changes: - Replace NextAuth with WebAuthn/passkey authentication - Admin approves emails, code sent on first login attempt - Minimal Steve Jobs-inspired login UI with shake animation - Admin dashboard with user management (delete, extend, exception) - Email delivery via Resend (access codes) - Session management with JWT (15min users, 1hr admins) - User tracking (first/last login, timelines generated) Authentication Flow: 1. Admin approves email → No immediate code sent 2. User tries to login → System auto-sends code via email 3. User enters code → Registers passkey (biometric/device) 4. Future logins → Passkey only (no code needed) Admin Controls: - Approve new user emails - Extend access (+7 days) - Toggle exception (never expires) - Delete users - View audit logs Technical: - SimpleWebAuthn v13 for passkey auth - PostgreSQL with Prisma ORM - JWT sessions with jose library - Next.js 15 App Router - Fixed async params for Next.js 15 compatibility 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Major features added: - WebAuthn passkey authentication with admin dashboard - Multiple access code delivery methods (Gmail SMTP, Resend API, Push) - Admin approval workflow with email notifications - Service worker for push notifications - Enhanced security headers and CSP configuration - Webpack config fixes for Node.js built-ins Authentication: - Passkey registration and login flows - Admin login with separate authentication - User approval system with email notifications Access Code Delivery: - Gmail SMTP integration (500 emails/day free) - Resend API integration (3000 emails/month free) - Browser push notifications with VAPID keys - QR code generation for easy code sharing - Copy-to-clipboard functionality Infrastructure: - Prisma schema updates for auth models - Service worker with notification support - Webpack fallbacks for browser compatibility - Security headers for service workers - ESLint configuration updates Testing: - New test files for DAL, lineage, and resourcing - Updated integration tests for auth flows 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Complete Apple-grade design analysis covering: - Detailed screen-by-screen audit (Capture, Decide, Plan, Present, Optimize modes) - Design system consistency analysis - Data flow mapping and integration gaps - Micro-gaps documentation (alignment, typography, empty states, errors) - Interaction flow analysis with emotional journey mapping - Strategic consolidation plan for unified experience - Code-level recommendations (immediate fixes to strategic refactors) - Vision statement for product omnipresence - Priority matrix with effort/impact estimates Key findings: - Overall grade B+ (85/100), can reach A+ (95/100) with recommendations - Critical gap: /project and /estimator disconnected (no data bridge) - OptimizeMode incomplete (placeholder implementation) - PresentMode missing PDF export - Multiple type safety and navigation issues identified Includes 9 comprehensive sections with actionable code examples, priority-based implementation roadmap, and success metrics. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Transform UX_UI_AUDIT_COMPLETE.md findings into implementable strategy: 1. Holistic_Redesign_V2.md - 3-tier architecture, state unification, bridge design 2. First_Impression_Onboarding.md - Pre-login emotional strategy, A/B tests 3. Admin_Journey_V2.md - Intelligent workflows, 96% time reduction 4. Measurement_and_Experiments.md - 20 metrics, telemetry, A/B tests 5. Mermaid_System_Maps.md - 8 visual diagrams (IA, state, flows) 6. Design_Tokens_ChangeList.md - Token fixes, dark mode plan 7. PresentMode_Upgrade_Spec.md - Dynamic slides, PDF export 8. L3Selector_Enhancements.md - Search, presets, keyboard nav 9. Roadmap_and_DoD.md - 3-sprint plan with DoD Key decisions: - OptimizeMode merged into PlanMode (not removed) - UnifiedProject store replaces 3 fragmented stores - Estimator → Project bridge with chip converter - PDF export via jsPDF + html2canvas - PostHog analytics with type-safe tracking 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Implement bridge to convert Quick Estimate into Project workflow. ADDED: - src/lib/estimator/to-chips-converter.ts * convertEstimateToChips(): Converts EstimatorInputs to Chip[] * generateProjectName(): Creates project name from inputs * extractEstimateMetadata(): Extracts metadata for tracking MODIFIED: - src/app/estimator/page.tsx * Added "Build Full Plan" button with Rocket icon * handleBuildFullPlan() handler that converts & navigates * Integrates with presales-store via addChips() - src/components/project-v2/ProjectShell.tsx * Added EstimatorBanner component with dismissible UI * Detects ?source=estimator query param * Auto-dismisses banner after 10 seconds * Sparkles icon + gradient banner design DEFINITION OF DONE (Roadmap_and_DoD.md P0-1): ✅ User clicks "Build Full Plan" in Estimator ✅ Data converts to chips (all fields mapped) ✅ Navigates to /project?mode=plan with data pre-filled ✅ Banner shows with link to edit decisions ✅ No data loss (all inputs preserved as chips) ✅ Analytics hook ready (tier_transition event) CHANGELOG: - Bridge connects Tier 1 (Quick Estimate) → Tier 2 (Project Builder) - 9 chip types created from estimator inputs - Banner provides context & guidance for users - XSS protection via sanitizeHtml() FILES CHANGED: 3
Replace console.log and alert() with professional toast system. ADDED: - src/lib/toast.ts * showSuccess(): Green toast with checkmark * showError(): Red toast with error icon * showLoading(): Loading toast with spinner * showInfo(): Neutral info toast * showWarning(): Orange warning toast * showPromise(): Handles async operations * dismissToast(): Dismiss specific or all toasts MODIFIED: - src/app/providers.tsx * Added <Toaster /> component from react-hot-toast * Positioned top-right for non-intrusive feedback - src/components/project-v2/modes/CaptureMode.tsx * Replace console.log with showSuccess() * Smart defaults now show success toast - src/components/project-v2/modes/PlanMode.tsx * Replace all alert() with showError/showWarning() * Field validation errors now use toasts * Date validation warnings now use toasts - package.json * Added react-hot-toast dependency DEFINITION OF DONE (Roadmap_and_DoD.md P0-3): ✅ react-hot-toast installed ✅ Toaster component in layout ✅ console.log replaced in CaptureMode ✅ alert() replaced in PlanMode ✅ Success toasts (green, checkmark icon) ✅ Error toasts (red, error icon) ✅ Loading toasts (spinner, auto-dismiss) CHANGELOG: - Professional feedback system replaces console/alert - Consistent UX across all modes - Color-coded by severity (success/error/warning/info) - Auto-dismiss with configurable duration - Top-right position (Steve Jobs minimalism) FILES CHANGED: 5
Add search, tier filter, and industry presets to L3 selector modal. ADDED: - INDUSTRY_PRESETS constant with 4 industries * Manufacturing (PP, QM, MM, PM, SD) * Retail & Distribution (SD, MM, WM, LE) * Financial Services (FI, CO, TR, RE, BPC) * Utilities (IS-U, PM, CS, SD) MODIFIED: - L3SelectorModal component * Search input filters by name or code (real-time) * Tier filter buttons (All/A/B/C) * Industry preset buttons (gradient blue→purple) * "No results" empty state with clear filters button * Responsive grid (1/2/3 columns) * Tooltip descriptions on hover (title attribute) DEFINITION OF DONE (Roadmap_and_DoD.md P1-3): ✅ Search input filters items in real-time ✅ Tier buttons filter (All/A/B/C) ✅ Industry presets add multiple items ✅ "No results" state shows when filter empty ✅ Search persists during session ✅ Mobile keyboard appears on input focus CHANGELOG: - 200+ L3 items now searchable - Tier filtering reduces cognitive load - Industry presets speed up selection (1-click vs 5-10 clicks) - Responsive grid adapts to screen size - Empty state guides users to clear filters FILES CHANGED: 1
- Create src/lib/design-tokens.ts with HEX color values - Add CSS variables to globals.css for theme switching - Update tailwind.config.js to import design tokens - Add dark mode support with [data-theme="dark"] selector - Add accessibility media queries (prefers-reduced-motion, prefers-reduced-data) - Rename 'glow' animation to 'focus-glow' for clarity Per specs: - Design_Tokens_ChangeList.md - Holistic_Redesign_V2.md Files changed: - src/lib/design-tokens.ts (new) - src/app/globals.css - tailwind.config.js 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Fix PlanMode ResourcePanel/RicefwPanel props with placeholders - Remove 'optimize' from ModeIndicator MODE_CONFIG - Fix PDF exporter isPDFExportSupported() condition - Remove optimize button from ImprovedGanttChart - Update ModeIndicator subtitle for plan mode Type errors fixed: - PlanMode: ResourcePanel props mismatch - PlanMode: RicefwPanel props mismatch - ModeIndicator: 'optimize' not in ProjectMode - pdf-exporter: toDataURL condition always true - ImprovedGanttChart: 'optimize' not assignable to ProjectMode Note: Pre-existing type errors in task-templates remain (effortPercent/daysPercent properties - separate fix needed) Files changed: - src/components/project-v2/modes/PlanMode.tsx - src/components/project-v2/shared/ModeIndicator.tsx - src/lib/presentation/pdf-exporter.ts - src/components/timeline/ImprovedGanttChart.tsx 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Escape quotes in PlanMode empty state message - Add missing dependencies to useMemo hook Fixes ESLint errors: - react/no-unescaped-entities - react-hooks/exhaustive-deps 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…ncements, analytics tracking
**UX Enhancements:**
- Add gratitude animation after estimate shown (First_Impression_Onboarding.md)
- Update landing page with spec-compliant copy ("From RFP to Proposal in 10 Minutes")
- Show animation on first estimate render with emotional micro-moment
**PresentMode Upgrades (P1-2):**
- Add PDF export button with loading state
- Integrate dynamic presenter notes panel (collapsed by default, toggle with 'N')
- Generate slide notes from slide-generator based on project data
- Add slide counter and improved top controls layout
**Analytics & Telemetry:**
- Add PostHog tracking for mode transitions (capture→decide→plan→present)
- Track timeline generation events (phaseCount, chipCount, totalEffort)
- Track presentation export events (started, complete, failed)
- Track estimate shown event with duration and confidence
- Add gratitude animation complete tracking
**Type System Improvements:**
- Add effortPercent and daysPercent to Task interface for templates
- Make workingDays and effort optional on Task (calculated from percentages)
- Fix type errors in PlanMode region selector
- Add proper type guards for optional properties
**Build & Production:**
- Fix ImprovedGanttChart task stream rendering (evenly distribute tasks)
- Add dynamic route config to /project page for useSearchParams
- Resolve all blocking type errors
- Production build passing ✅
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
**Core Implementation:** - Single source of truth for all project data (estimator → presales → timeline) - Version-controlled localStorage (v1) with migration support - Type-safe UnifiedProject interface **Store Features:** - Project management (create/load/delete/update) - Estimator data (profile, effort, costs) - Presales data (chips, decisions, completeness) - Timeline data (phases, resources, packages) - Workflow state (mode transitions, regeneration, manual overrides) - UI state (zoom level, presentation mode, panel widths) **Migration System:** - Backward compatible migration from legacy stores - Auto-migration on app load with backup/restore - Zero data loss safeguards **Technical Details:** - Immutable state updates (no Immer middleware) - Zustand persist middleware for localStorage - All mutations use spread operators for immutability - 21 integration tests created (4 passing, 17 need async fix) **Files Changed:** - src/stores/unified-project-store.ts (878 lines) ✅ - src/lib/store-migration.ts (migration utilities) ✅ - tests/integration/unified-project-store.test.ts (21 tests)⚠️ **Known Issues:** - Tests failing due to persist middleware async behavior - Need to add waitFor/flush for localStorage persistence in tests - Core functionality verified through manual inspection **Next Steps:** - Fix test async handling - Create migration hook for app initialization - Update components to use unified store (dual-write phase) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
**Issue:**
- Tests were failing because getState() returns a snapshot
- After calling actions, needed fresh getState() to see updates
**Fix:**
- Call getState() fresh after each action
- Add localStorage.clear() in beforeEach
- All 21 tests now passing ✅
**Pattern:**
```typescript
// Before (broken):
const store = useUnifiedProjectStore.getState();
store.createProject('Test');
expect(store.currentProject).toBeTruthy(); // FAILS - stale snapshot
// After (working):
useUnifiedProjectStore.getState().createProject('Test');
const store = useUnifiedProjectStore.getState(); // Fresh state
expect(store.currentProject).toBeTruthy(); // PASSES
```
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
**Migration Hook Implementation:** - Created StoreMigration component to run on app load - Integrated with Providers for automatic execution - Uses useRef to ensure single execution per app load **Store Updates:** - Added `addMigratedProject` action to unified store - Updated `autoMigrateIfNeeded` to accept callback - Migration now directly adds project to unified store **Migration Flow:** 1. StoreMigration mounts on app load 2. Calls autoMigrateIfNeeded with callback 3. If legacy data exists: backup → migrate → add to store 4. Mark migration complete in localStorage **Test Updates:** - Fixed chip types to include required `source` field - Changed MODULE to MODULES (correct ChipType) - All 21 tests still passing ✅ **Integration:** - Added StoreMigration to Providers component - Runs before children, ensures data ready - Silent operation (no UI, just logging) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
🎯 Summary
Implements P2-1: Unified State Management - Single source of truth for all project data, replacing 3 fragmented stores with backward-compatible migration.
Per Roadmap: Sprint 3 (P2-1) - State Unification
📦 What's Included
1. Unified Project Store (
src/stores/unified-project-store.ts)projectsmapKey features:
2. Migration System (
src/lib/store-migration.ts)presales-store(no localStorage)project-store(localStorage: 'project-storage')timeline-store(no localStorage)Migration flow:
3. Auto-Migration Hook (
src/components/common/StoreMigration.tsx)4. Integration Tests (
tests/integration/unified-project-store.test.ts)🔧 Technical Implementation
Immutable State Pattern
Replaced Immer middleware with pure immutable updates:
Key Learning: Zustand getState() Returns Snapshot
Tests initially failed because
getState()returns a snapshot:✅ Definition of Done (from Roadmap)
🧪 Testing
Run Tests:
npm test -- unified-project-store.test.ts --runResults: ✅ 21/21 tests passing
Manual Testing:
🚨 Migration Strategy (Phased Rollout)
Per roadmap risk mitigation:
✅ Phase 1: Create store, keep old stores (this PR)
⏳ Phase 2: Migrate components one-by-one (next PRs)
⏳ Phase 3: Deprecate old stores (final PR)
📝 Files Changed
Created:
src/stores/unified-project-store.ts(878 lines)src/lib/store-migration.ts(327 lines)src/components/common/StoreMigration.tsx(39 lines)tests/integration/unified-project-store.test.ts(307 lines)Modified:
src/app/providers.tsx(added StoreMigration)🔗 Related
🤖 AI Context
Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com