Skip to content

feat(ai): implement persistent Hyper AI workspace with follow-up learning sessions#59

Merged
imuniqueshiv merged 17 commits into
mainfrom
HyperAIWorkspace1
Jul 6, 2026
Merged

feat(ai): implement persistent Hyper AI workspace with follow-up learning sessions#59
imuniqueshiv merged 17 commits into
mainfrom
HyperAIWorkspace1

Conversation

@imuniqueshiv

Copy link
Copy Markdown
Owner

Pull Request

Summary

Implement the next phase of the Hyper AI Workspace by introducing persistent personal learning sessions, a canonical topic cache architecture, and a more reliable follow-up question workflow. Students can now continue learning from where they left off without requiring authentication or server-side user storage.


Related Issue

N/A


Type of Change

  • Feature
  • Bug Fix
  • Documentation
  • Refactor
  • Performance Improvement
  • CI / Build
  • Other

What Changed?

  • Implemented a local session service for persistent per-topic learning sessions using browser localStorage.
  • Added automatic session restoration after page refreshes and browser restarts.
  • Introduced automatic session saving after explanation generation, follow-up questions, and AI responses.
  • Added session expiration (30 days) and automatic cleanup with a maximum of 100 stored topic sessions.
  • Implemented "Saved on this device", "Last studied", and "Continue Learning" indicators in the AI Workspace.
  • Improved follow-up question workflow by resolving topic explanations server-side instead of depending on client-provided cached data.
  • Added server-side fallback for explanation retrieval to improve reliability when cached data is unavailable.
  • Improved AI Workspace state initialization and session restoration flow.
  • Added strongly typed local learning session models.

Screenshots (UI Changes Only)


Testing

  • Verified automatic session creation for new topics.
  • Verified conversation restoration after browser refresh.
  • Verified conversation restoration after closing and reopening the browser.
  • Verified follow-up questions continue working after restoring a session.
  • Verified automatic cleanup of expired sessions.
  • Verified maximum session limit handling.
  • Ran npm run format:check.
  • Ran npm run lint.
  • Ran npm run typecheck.
  • Ran npm run build.

Checklist

  • My branch is up to date with the latest main.
  • My code follows the project's coding standards.
  • I have formatted the modified files.
  • npm run format:check passes.
  • npm run lint passes.
  • npm run typecheck passes.
  • npm run build passes.
  • Documentation updates were not required.
  • I have tested my changes locally.
  • This Pull Request focuses on a single feature.

Additional Notes

This PR completes Phase 2.5 of the Hyper AI Workspace. Topic explanations remain shared through the existing canonical Redis cache, while each student's follow-up conversation is stored locally on their own device. This provides persistent learning sessions without authentication, backend user storage, or additional server costs, while preserving the existing AI workflow and keeping the architecture scalable.

@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hyper-learning-tech Ready Ready Preview, Comment Jul 6, 2026 5:18am

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@imuniqueshiv, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 5 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ad0033cd-daf0-45f8-98b9-d029d6023e80

📥 Commits

Reviewing files that changed from the base of the PR and between 9debf3c and c4e63c9.

📒 Files selected for processing (4)
  • app/rgpv/[branch]/[semester]/[subject]/ai/page.tsx
  • components/ai/workspace-chat.tsx
  • lib/ai/session-service.ts
  • types/ai.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch HyperAIWorkspace1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@imuniqueshiv imuniqueshiv merged commit 15583a0 into main Jul 6, 2026
4 checks passed
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

🎉 Congratulations @imuniqueshiv!

Thank you for contributing to HyperLearningTech.

Your pull request has been successfully merged into main.

📦 Merge Summary

🚀 Keep Contributing

  • Follow the CONTRIBUTING.md guidelines.
  • Keep each Pull Request focused on a single feature or fix.
  • Run formatting, linting, type checking, and a production build before opening a PR.

Thank you for helping make HyperLearningTech better.

Happy Coding! 🚀

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.

1 participant