Add path share --all for bulk upload - #245
Draft
benbaarber wants to merge 1 commit into
Draft
Conversation
`share --all` uploads every session across the installed harnesses instead of opening the picker. `--project-under <dir>` restricts it to sessions under that subtree (same per-provider matching as `p cache sync`); `--harness` narrows to one harness. It prints one line per project directory — session count, per-harness breakdown, and the configured remote where a `[[project]]` rule resolves — and asks before uploading (`--yes` skips the prompt, `--dry-run` stops after the summary). Destinations follow the single-session rules: `--repo` for everything, else each directory's configured remote, else `<you>/pathstash`. Requires login. Failures warn and continue; the run exits non-zero if any failed. Nothing records what was already shared, so re-running uploads everything again. Claude and pi decode their project directories from lossy slugs, so the summary showed wrong paths and `[[project]]` rules on directories containing `_`, `.`, or `-` never matched. The two metadata readers now also return the cwd the session file records (`ConversationMetadata.cwd`, `SessionMeta.cwd`), and share — both the picker and `--all` — groups, displays, and resolves remotes by that. The slug-decoded path is still what locates the session files. path-cli 0.19.0, toolpath-claude 0.13.1, toolpath-pi 0.6.2.
|
🔍 Preview deployed: https://1cb4d99a.toolpath.pages.dev |
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.
Summary
path share --all [--project-under <dir>] [--harness <h>] [--repo o/n] [--dry-run] [-y]uploads every session in scope instead of opening the picker. Prints a per-project summary with harness breakdown and the configured remote where one resolves, then confirms. Requires login;--anon,--session, and--projectconflict with it.--repo> each directory's[[project]]remote ><you>/pathstash. Uploads are sequential; failures warn and continue; exit is non-zero if any failed.cwd(ConversationMetadata.cwd,SessionMeta.cwd). Their project paths are decoded from lossy slugs (_/./-all become/), which made the summary show wrong directories and made[[project]]rules on such directories miss. Share (picker and--all) now groups and resolves remotes by the recorded cwd; the slug-decoded path still locates the files.gather_artifactstakes aProjectScope { Exact, Under }instead of an exact-only filter;Underreuses sync's per-provider matching. The fresh-cache-or-derive step is factored intoload_sessionand shared by both share paths.Versions: path-cli 0.19.0, toolpath-claude 0.13.1, toolpath-pi 0.6.2.
Known limitation
There is no record of what has been uploaded and no server-side update endpoint, so re-running
--allcreates duplicate graphs. Documented in the flag help and CHANGELOG.Test plan
cargo test -p path-cli -p toolpath-claude -p toolpath-picargo clippy --workspace --all-targets -- -D warningscargo fmt --checkpath share --all --project-under ~/empathic/oss --dry-runagainst real sessions: 106 sessions, real worktree paths displayed,empathic/toolpathremote resolved from config[[project]]rule on a directory containing.(needs a TTY)Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.