Skip to content
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

Fix: Preserve File Contents During File System Refresh #31

Merged
merged 4 commits into from
Jan 17, 2025
Merged

Conversation

akhatua2
Copy link
Contributor

Previously, when refreshing the file system, files would disappear because we were only updating the tree structure without properly preserving the file contents. The fix maintains the file contents in the files object while updating the visual tree structure, ensuring files remain visible and their contents are preserved after refresh operations.

Key changes:

  • Removed the condition that prevented existing files from being added to the tree
  • Preserved the entire files object when updating the file system state

This ensures files remain accessible and their contents intact even after closing and refreshing the file system.

alexjyc and others added 4 commits January 11, 2025 17:34
The backend is expecting message but the frontend is sending messages (plural). This is causing the message to be undefined.
…direct race condition

The localStorage.removeItem prevents the useEffect hook from auto-redirecting to a stale session ID when starting/joining a new session, as the hook immediately checks localStorage for an existing session and redirects if found.
@akhatua2 akhatua2 merged commit 671f762 into main Jan 17, 2025
3 checks passed
@akhatua2 akhatua2 deleted the fix_files branch January 17, 2025 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants