Repository navigation
feat(push): add --pull for two-way sync in one command - #354
Conversation
Users editing skills on several machines have to remember push on one and pull on the other, and a push from a machine that is behind fails until they pull first. push --pull commits local changes, merges the remote with the same merge semantics pull uses, pushes, and syncs the git root scope. A conflict stops before anything is pushed and keeps the local commit; a target sync failure after a successful push is reported separately so the user knows the remote is already updated. It never rebases or force-pushes. commit rejects --pull instead of silently ignoring it, since both commands share the argument parser.
Cover the new flag on the push reference, the cross-machine sync guide, the quick reference, the daily workflow and the cross-machine recipe, in English and the ja, ko, zh-Hans and zh-Hant translations, plus the built-in skill's sync reference.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5d5b46eddd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A bare 'skillshare sync' retry hint defaults to skills and may pick project mode, so it does not redo an agents, extras, or root sync. Derive both the sync and the hint from one per-scope list.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c9b4d519db
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The root scope versions skills, agents and extras, but pull and push --pull only synced skills and agents, so merged extras changes never reached their targets.
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
The root scope versions extras too, but the dashboard pull only synced skills and agents, so merged extras never reached their targets. Matches the CLI fix.
Mirrors skillshare push --pull: commit local changes, merge the remote and sync targets, then push, in one click. A pull conflict stops at the existing review before anything is pushed.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 36b05a1970
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sync both ways commits, merges and pushes in one click, so ask first and show the concrete outcome (files to commit, remote commits to merge, scope, push target, conflict behavior) before changing anything.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a6ad7cb5c6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
It skipped target sync when the pull was already up to date, stopped on an empty remote instead of pushing, and the pull dropped extras warnings. Add alwaysSync and a remote_empty code to /api/pull and surface all extras warnings.
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Resolve the conflict in cmd/skillshare/pull.go: runkids#354 moved first-pull handling into integrateRemote, so the ErrRemoteTracksConfig guidance now lives there and also covers push --pull.
Type
proposals/only — see CONTRIBUTING.md)Summary
Adds
skillshare push --pull: one explicit command for two-way cross-device sync.skillshare push --pull -m "Update my-skill"pulluses (no rebase)pullskillshare sync … --globalretry command(s)--dry-runcommit --pullNever rebases or force-pushes.
Changes
cmd/skillshare/pull.go: extractintegrateRemote(git integration) andsyncPulledScope(target sync) frompullFromRemotesopullandpush --pullshare them;pullbehavior unchanged.cmd/skillshare/push.go/commit.go:--pullflag, help text, oplogpullarg;commitrejects--pull.rootscope now also syncs extras afterpull/push --pull(CLI and dashboard); it previously synced only skills and agents.pushreference (new "Push and Pull Together" section), cross-machine sync guide, quick reference, daily workflow, cross-machine recipe, built-in skillreferences/sync.md— English plus ja / ko / zh-Hans / zh-Hant.Deliberately out of scope (follow-ups)
From the design review: blocking when the source sits inside an unrelated parent repo (
git add -Awould sweep it), a cross-process lock for concurrent runs, and stopping whenconfig.yamlexclusion fails.Linked Issue
None.
Verification (devcontainer)
tests/integration/push_pull_test.go(5 tests): the merge+push+sync, dry-run andcommit --pulltests failed before the implementation and pass after; the conflict and empty-remote tests guard behavior plainpushalready shared.TestCompletion_PushPullFlag_AllShellscovers all five completion scripts.ok.make fmt-check lint docs-check,python3 scripts/ai-context.py checkpass.ai_docs/tests/push_pull_runbook.md: 6/6 steps pass in a fresh ssenv (two machines + bare remote: empty remote, merge+sync, dry-run, conflict,commit --pull).TestHandlePull_RootScopeSyncsExtras(failed before the fix). UI: 3 newGitSyncPagetests; full Vitest suite (791) passes,pnpm run linthas no issues in changed files,pnpm run buildpasses. Visual check of the new button in Playful light and Clean dark on the isolated preview fixture, plus a real conflict → resolve → Sync both ways run that pushed the merge.websitepnpm run buildsucceeds for all five locales (broken-link check on).Checklist
make check) — for code changes