Skip to content

Add path share --all for bulk upload - #245

Draft
benbaarber wants to merge 1 commit into
mainfrom
ben/share-all
Draft

Add path share --all for bulk upload#245
benbaarber wants to merge 1 commit into
mainfrom
ben/share-all

Conversation

@benbaarber

@benbaarber benbaarber commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

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 --project conflict with it.
  • Destinations follow the existing single-session rules: --repo > each directory's [[project]] remote > <you>/pathstash. Uploads are sequential; failures warn and continue; exit is non-zero if any failed.
  • Claude and pi metadata readers now expose the session's recorded 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_artifacts takes a ProjectScope { Exact, Under } instead of an exact-only filter; Under reuses sync's per-provider matching. The fresh-cache-or-derive step is factored into load_session and 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 --all creates duplicate graphs. Documented in the flag help and CHANGELOG.

Test plan

  • cargo test -p path-cli -p toolpath-claude -p toolpath-pi
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo fmt --check
  • path share --all --project-under ~/empathic/oss --dry-run against real sessions: 106 sessions, real worktree paths displayed, empathic/toolpath remote resolved from config
  • Interactive picker path with a [[project]] rule on a directory containing . (needs a TTY)

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

`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.
@github-actions

Copy link
Copy Markdown

🔍 Preview deployed: https://1cb4d99a.toolpath.pages.dev

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.

1 participant