Skip to content

Feat/vakil friend chat history persistence - #1639

Open
Nareshkumawat-star wants to merge 5 commits into
viru0909-dev:mainfrom
Nareshkumawat-star:feat/vakil-friend-chat-history-persistence
Open

Feat/vakil friend chat history persistence#1639
Nareshkumawat-star wants to merge 5 commits into
viru0909-dev:mainfrom
Nareshkumawat-star:feat/vakil-friend-chat-history-persistence

Conversation

@Nareshkumawat-star

Copy link
Copy Markdown

Pull Request: Vakil Friend AI Chat Conversation History Persistence

Description

Fixes an issue where refreshing the page, navigating away, or re-opening the browser cleared all Vakil Friend AI chat conversation history.

Issue Resolved

Closes #1629

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Key Changes Made

  1. Frontend Active Session Auto-Resume: Updated VakilFriendPage.jsx to load vakil_friend_active_session_id from localStorage on component mount and restore the full conversation.
  2. LocalStorage Fallback: Caches up to 50 of the latest messages under vakil_friend_cached_messages for instant rendering during network degradation.
  3. Backend History Endpoints:
    • GET /api/v1/vakil-friend/chat/history: Retrieves the user's active/latest session history.
    • POST /api/v1/vakil-friend/chat/messages: Appends user or assistant messages to the active session.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

Test User added 5 commits July 20, 2026 22:04
…gu locales and backend user language preference persistence
… numbering, status tracker, and court case linkage
…route navigation with backend session auto-resume and localStorage fallback
@vercel

vercel Bot commented Jul 20, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the CodeBlooded's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown
Contributor

Hi @Nareshkumawat-star, thanks for contributing to Nyay Setu! 🎉

I have automatically:

  • 👤 Assigned this PR to you.
  • 🏷️ Applied the gssoc:approved label.

Our workflows will now analyze your changes to classify:

  • 📈 PR Difficulty: level:*
  • 🧩 PR Type: type:*
  • 🌟 PR Quality: quality:*

Tip

Ensure your PR description references the issue it resolves (e.g. Closes #123). This allows the bot to inherit any additional labels from that issue!

Happy coding! 🚀

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Add multilingual support for Marathi, Tamil, and Telugu in addition to existing Hindi

1 participant