-
Notifications
You must be signed in to change notification settings - Fork 72
feat: fix session restoration to display complete conversation history #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
nimishchaudhari
wants to merge
6
commits into
Nano-Collective:main
Choose a base branch
from
nimishchaudhari:resume_session_feature
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: fix session restoration to display complete conversation history #77
nimishchaudhari
wants to merge
6
commits into
Nano-Collective:main
from
nimishchaudhari:resume_session_feature
+3,945
−136
Conversation
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
- Add SessionManager module with core storage logic - Implement automatic session persistence with debounced saving - Create session selector UI component with search and pagination - Add /resume command with multiple selection methods (interactive, ID, index, last) - Integrate with existing app state and command system - Add configuration options for session management - Implement cleanup and edge case handling - Add comprehensive tests for all functionality
Problem: - When using /resume command, sessions showed 'Session resumed' message - But conversation history (user/assistant/tool messages) was not displayed - Users couldn't see their previous conversation, breaking workflow continuity Solution: - Added renderHistoricalMessages() function to convert session data to visual components - Fixed JSX syntax issues by using React.createElement() in TypeScript files - Updated all session restoration points (interactive selection, /resume last, /resume id, /resume number) - Enhanced session manager with proper message format conversion Technical Changes: - source/app.tsx: Added message component imports and renderHistoricalMessages callback - source/app/utils/appUtils.ts: Fixed JSX syntax and implemented message rendering logic - Enhanced session state management to properly convert between session and app message formats Impact: - /resume now provides seamless experience with full conversation visibility - Users can immediately continue where they left off with complete context - Maintains message formatting, timestamps, and tool call information Build Status: ✅ All TypeScript compilation errors resolved
Member
|
Hey @nimishchaudhari - this is really good 🔥 few of bugs from my manual testing as well as some thoughts:
Additional thoughts (let me know what you think):
That's it for a minute - let me know if there's any clarification needed or I've misunderstood any part :) Once we're happy with functionality we can write tests etc. |
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.


Problem
Users had no way to persist chat sessions or resume previous conversations, breaking workflow continuity when switching contexts or restarting the application.
Solution
This implementation provides the core session management functionality requested:
✅ Session Storage & Management
~/.nanocoder-sessions/with proper file structure✅ Session Restoration System
/resume- Interactive session selector UI/resume last- Resume most recent session/resume {id}- Resume by specific session ID/resume {number}- Resume by list index✅ Session Management Features
✅ Integration Points
Technical Implementation
Core Components Implemented:
source/session/session-manager.ts): Full session lifecycle managementsource/components/session-selector.tsx): Interactive session selection UIsource/commands/resume.ts): Command handler with multiple modessource/app.tsx,source/app/utils/appUtils.ts): Seamless session restorationsource/hooks/useAppState.tsx): Auto-save and state managementKey Features:
Configuration Support
{ "sessions": { "autoSave": true, "saveInterval": 5000, "maxSessions": 100, "retentionDays": 30, "directory": "~/.nanocoder-sessions" } }Testing & Validation
Impact
This implementation fully addresses the feature request in issue #51, providing users with:
The
/resumecommand now provides a seamless experience for maintaining workflow continuity across different coding sessions.Related Issues
Fixes #51 - Feature Request:
/resumecommand implementation