Skip to content

Conversation

@MujahidAbbas
Copy link
Owner

Summary

  • Add version history UI allowing users to browse, preview, and restore previous versions of PRD and Tech Spec documents
  • Clock icon button in document headers opens a slide-over panel
  • Two-panel layout: version list (left) + preview pane (right)
  • Restore creates a new version from old content, preserving full history
  • Includes authorization checks and database transactions for security

Changes

New Files

  • app/Livewire/Concerns/HasVersionHistory.php - Shared trait for version history logic
  • resources/views/components/version-history-slide-over.blade.php - Slide-over UI component
  • tests/Feature/VersionHistoryTest.php - 8 comprehensive tests

Modified Files

  • app/Livewire/Projects/Tabs/Prd.php - Added HasVersionHistory trait
  • app/Livewire/Projects/Tabs/Tech.php - Added HasVersionHistory trait
  • resources/views/livewire/projects/tabs/prd.blade.php - Added clock icon + slide-over
  • resources/views/livewire/projects/tabs/tech.blade.php - Added clock icon + slide-over
  • Fixed Pint style issues in KanbanBoard.php, ExportTest.php

Test plan

  • All 51 tests pass (8 new + 43 existing)
  • Pint code style passes (112 files)
  • Version history opens/closes correctly
  • Version list displays with correct metadata
  • Version preview updates on selection
  • Restore creates new version and updates document
  • Toast notification confirms restore
  • Security: Cannot restore versions from other documents

@MujahidAbbas MujahidAbbas force-pushed the feature/version-history-ui branch from e060f87 to e7264c1 Compare January 2, 2026 04:04
- Add HasVersionHistory trait for shared version history logic
- Create version-history-slide-over Blade component with two-panel layout
- Add clock icon button to PRD and Tech Spec headers
- Implement version preview and restore functionality
- Restore creates new version from old content (preserving full history)
- Add authorization check and DB transaction for secure atomic restores
- Add 8 comprehensive tests for version history feature
- Fix Pint style issues across multiple files

Features:
- Browse document version history via slide-over panel
- View version metadata: timestamp, author, AI vs manual indicator
- Preview any version content
- Restore old versions with one click
- Toast notification confirms successful restore
@MujahidAbbas MujahidAbbas force-pushed the feature/version-history-ui branch from e7264c1 to 96d861a Compare January 2, 2026 04:08
@MujahidAbbas MujahidAbbas merged commit b2ce318 into main Jan 2, 2026
2 checks passed
@MujahidAbbas MujahidAbbas deleted the feature/version-history-ui branch January 2, 2026 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants