Skip to content

feat: add AI Design Session Replay & Prompt Evolution Timeline System#1151

Open
surjeetkumar8006 wants to merge 2 commits into
magic-peach:mainfrom
surjeetkumar8006:feat-timeline
Open

feat: add AI Design Session Replay & Prompt Evolution Timeline System#1151
surjeetkumar8006 wants to merge 2 commits into
magic-peach:mainfrom
surjeetkumar8006:feat-timeline

Conversation

@surjeetkumar8006
Copy link
Copy Markdown

@surjeetkumar8006 surjeetkumar8006 commented May 25, 2026

Closes #1138

✨ Overview

Currently, Reframe focuses on client-side resizing and video adjustments, but there was no structured way to visualize, track, or replay layout edits and prompt iterations over time. This PR introduces a client-side AI Design Session Replay & Prompt Evolution Timeline System that allows users to write natural language styling prompts, scrub/replay their edit history step-by-step, compare changes side-by-side (diffs), bookmark milestone states, and recover layout sessions automatically.


🎨 Proposed Features

  1. 🎬 Design Replay Timeline:
    • Visual timeline displaying chronological manual and AI-generated recipe states.
    • Replay controls (Play, Pause, Step Back, Step Forward, Scrubbing Slider) that transition the design settings in real-time.
  2. ✍️ Prompt Evolution Tracking:
    • Client-side AI Compiler (src/lib/sessionHistory.ts) that interprets compound natural language prompts (e.g., "make it vertical, increase contrast and add text 'Vlog'") and updates settings.
    • Logs what operations were applied and builds a prompt evolution chain.
  3. 🧩 Visual Parameter Diff Comparison:
    • Interactive dropdown selectors to compare any two session states.
    • Color-coded badges indicating exactly what parameter was added, removed, or modified.
  4. 📊 Workflow Analytics:
    • Statistics dashboard summarizing editing category distribution, session depth, and prompt effectiveness rating.
  5. 🏆 Milestone Snapshots:
    • Bookmark design checkpoints as Milestones (e.g., "Cinematic Version", "Instagram Reel draft").
  6. 🔄 Intelligent Recovery & Auto-Rollback:
    • Restores the design timeline from localStorage on page reload.
    • Automatically prompts and applies rollbacks to stable milestones or previous states on video export errors.

🛠️ Technical Details

  • Files Created:
    • src/lib/sessionHistory.ts: State representation, localStorage handlers, recipe diff calculations, and client-side AI compiler.
    • src/components/AICopilotTimeline.tsx: Premium dashboard component with tabs for Copilot prompts, Evolution Timeline/Replay, Parameter Diff, and Stats.
    • src/components/__tests__/sessionHistory.test.ts: 7 detailed unit tests verifying compiler behavior and diff logic.
  • Files Modified:
    • src/components/VideoEditor.tsx: Intercepts manual edits with a 1.2s debounce to record checkpoints, integrates the timeline switch tab, and handles errors with rollbacks.

🧪 Testing & Verification

  • Unit Tests: Executed npm run test using Vitest. All 84 tests in the project passed successfully.
  • Production Build: Verified clean static build using npm run build with zero TypeScript or ESLint errors.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 25, 2026

@surjeetkumar800 is attempting to deploy a commit to the magic-peach1's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown
Contributor

👋 Thanks for your PR, @surjeetkumar8006!

Welcome to Reframe — a browser-based video editor built for everyone 🎬

What happens next

  1. 🤖 Automated checks — build & TypeScript typecheck will run automatically
  2. Vercel preview — a preview deployment will be created (requires maintainer authorization for fork PRs)
  3. 👀 Code review — a maintainer will review your changes
  4. 🚀 Merge — once approved, your PR will be merged!

Quick checklist

  • PR title follows Conventional Commits (e.g. feat: add dark mode)
  • Linked the issue this PR closes (e.g. Closes #123)
  • Tested the changes locally (bun run dev)
  • Build passes (bun run build)

Useful links

Happy coding! 🎉

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 25, 2026

✅ PR Format Check Passed — @surjeetkumar8006

Basic format checks passed. A maintainer will review your code changes.

This does not mean the PR is approved — it just means the format is correct.

@github-actions github-actions Bot added level:advanced Advanced level - 55 pts type:design UI/UX design type:testing Testing labels May 25, 2026
@surjeetkumar8006
Copy link
Copy Markdown
Author

Hi @maintainers
This is a fully implemented advanced feature with replay timeline, prompt evolution tracking, visual diff comparison, analytics, milestones, and recovery system.

✅ Tests passing
✅ Build successful
✅ Integrated cleanly into existing workflow

Would appreciate a review and merge when possible. Thank you 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

level:advanced Advanced level - 55 pts type:design UI/UX design type:testing Testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🚀 Feature: AI Design Session Replay & Prompt Evolution Timeline System

2 participants