Skip to content

Conversation

@yujonglee
Copy link
Contributor

@yujonglee yujonglee commented Jan 2, 2026

Summary

Implements folder organization for sessions with automatic migration of existing sessions to a _default folder structure. Key changes:

  • Folder plugin enhancements: Added move_session, create_folder, rename_folder, and delete_folder commands with find_session_dir helper that recursively searches for session directories
  • Migration logic: Sessions stored directly under sessions/ (UUID-named folders) are automatically migrated to sessions/_default/ on startup and when detected by the file watcher
  • Persister updates: getSessionDir now defaults to _default folder when no folder_id is specified, ensuring consistent path structure
  • Folder persister: New persister that scans the directory structure and syncs folder hierarchy to TinyBase store
  • Test fixes: Updated path expectations in persister tests to reflect the new _default folder structure

Review & Testing Checklist for Human

  • Data safety: Verify the migration logic in migrate_all_uuid_folders and migrate_session_to_default doesn't accidentally delete or corrupt existing session data
  • Existing sessions: Test that sessions created before this change are correctly migrated to _default folder and remain accessible
  • Folder operations: Test move/create/rename/delete folder operations work correctly and update both filesystem and TinyBase state
  • Performance: Check that find_session_dir recursive search doesn't cause noticeable delays with many folders/sessions
  • Edge cases: Test behavior when target folder already exists, source doesn't exist, or folder contains nested sessions

Recommended test plan:

  1. Create some sessions without folder assignment
  2. Restart the app and verify they appear under _default folder
  3. Move a session to a new folder and verify filesystem structure matches
  4. Check that audio files and other session data are still accessible after migration

Notes

@yujonglee yujonglee marked this pull request as ready for review January 2, 2026 09:07
Copy link
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@yujonglee yujonglee mentioned this pull request Jan 2, 2026
@graphite-app
Copy link
Contributor

graphite-app bot commented Jan 2, 2026

Merge activity

  • Jan 2, 10:12 AM UTC: yujonglee added this pull request to the Graphite merge queue.
  • Jan 2, 10:13 AM UTC: CI is running for this pull request on a draft pull request (#2736) due to your merge queue CI optimization settings.
  • Jan 2, 10:14 AM UTC: Merged by the Graphite merge queue via draft PR: #2736.

graphite-app bot pushed a commit that referenced this pull request Jan 2, 2026
@graphite-app graphite-app bot closed this Jan 2, 2026
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.

2 participants