Skip to content

feat: local-first remote sync#337

Merged
avihut merged 12 commits intomasterfrom
daft-329/feat/local-first
Mar 27, 2026
Merged

feat: local-first remote sync#337
avihut merged 12 commits intomasterfrom
daft-329/feat/local-first

Conversation

@avihut
Copy link
Copy Markdown
Owner

@avihut avihut commented Mar 26, 2026

Summary

  • Make daft local-first by default: worktree management commands (start, checkout, remove) no longer fetch, push, or delete remote branches unless opted in
  • Add daft config remote-sync interactive TUI to configure remote sync behavior (Full sync / Local only / Custom), with --on/--off/--status non-interactive shortcuts
  • Add --local flag to start/checkout/go and --local/--remote flags to remove/branch-delete for per-invocation overrides
  • Add daft doctor migration check when no remote-sync settings are configured

Fixes #329

Test plan

  • 927 unit tests pass (14 new for remote-sync TUI)
  • clippy clean, fmt clean, man pages verified
  • 6 new YAML scenarios pass: local-first checkout, start, remove + --local and --remote flag overrides
  • Manual testing of daft config remote-sync TUI, --on, --off, --status
  • Docs site builds successfully

🤖 Generated with Claude Code

avihut and others added 10 commits March 26, 2026 23:51
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
….push default, branchDelete.remote)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…emote conditional on settings

Wire checkout_fetch and branch_delete_remote settings (added in previous
step) into the actual execution paths so remote operations only happen
when the corresponding setting is enabled.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add a new `daft config` command with a `remote-sync` subcommand for
configuring the three remote sync settings (checkout.fetch,
checkout.push, branchDelete.remote). Supports both non-interactive
shortcuts (--on, --off, --status, --global) and an interactive ratatui
TUI with radio group presets and individual checkbox toggles.

Also adds `config_set_global` to GitCommand for writing global git
config values.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Warns users when none of the three remote-sync keys (checkout.fetch,
checkout.push, branchDelete.remote) are explicitly configured, so they
know the defaults have changed and can run `daft config remote-sync`.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add `daft config` to docs.rs help output, suggest.rs typo suggestions,
bash/zsh/fish shell completions, xtask man page generation, and commit
the generated daft-config.1 man page.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add six YAML test scenarios verifying the local-first defaults (no
fetch/push/remote-delete by default) and --local/--remote flag overrides.
Also add daft-start and daft-go symlinks to the dev setup script so
the daft-start command is available in test environments.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add Remote Sync section to configuration guide covering daft.checkout.fetch,
daft.checkout.push, daft.branchDelete.remote (all default false). Create
daft-config CLI reference page. Update daft-start, daft-go, and daft-remove
to document --local/--remote flags. Update SKILL.md with local-first defaults
and daft config remote-sync command.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@avihut avihut added this to the Public Launch milestone Mar 26, 2026
@avihut avihut added the feat New feature label Mar 26, 2026
@avihut avihut self-assigned this Mar 26, 2026
avihut and others added 2 commits March 27, 2026 09:31
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- checkout/direnv: enable fetch explicitly since checkout no longer fetches
- checkout/local-first-start: use git-worktree-checkout -b (daft-start not in CI PATH)
- checkout/local-flag: same daft-start → git-worktree-checkout -b fix
- config/remote-custom: enable push/fetch explicitly to test custom remote behavior
- test_config_defaults: verify new default (no push)
- test_config_remote_custom: enable push/fetch before testing custom remote
- test_checkout_direnv: enable fetch before testing remote content

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@avihut avihut merged commit ecf6a94 into master Mar 27, 2026
8 checks passed
@avihut avihut deleted the daft-329/feat/local-first branch March 27, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Local vs Remote work Modes

1 participant