feat: group sessions by project directory like Claude Code - #17
Merged
Conversation
Store layout moves from ~/.baton/sessions/<id>/ to
~/.baton/projects/<munged-cwd>/<id>/, using the same munging rule as
Claude Code (non-alphanumeric chars replaced with '-').
- createSession writes into the per-project subdirectory
- openSession(id) scans across projects (@ mentions can reference any
project's session, so cwd is not required to open by id)
- listSessions({cwd}) goes straight to the matching project dir but
keeps the exact meta.cwd filter, since munging is lossy and distinct
cwds can collide on the same directory name
- legacy sessions/ layout is migrated once on first store access, based
on each session's meta.cwd; corrupt metas stay in place, and the
legacy dir is removed once emptied
- docs/design.md data-directory section updated accordingly
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
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.
Store layout moves from ~/.baton/sessions// to
~/.baton/projects///, using the same munging rule as
Claude Code (non-alphanumeric chars replaced with '-').
project's session, so cwd is not required to open by id)
keeps the exact meta.cwd filter, since munging is lossy and distinct
cwds can collide on the same directory name
on each session's meta.cwd; corrupt metas stay in place, and the
legacy dir is removed once emptied