Skip to content

feat: edit/create .esync.toml config from TUI#12

Merged
eloualiche merged 13 commits intomainfrom
feat/edit-config
Mar 19, 2026
Merged

feat: edit/create .esync.toml config from TUI#12
eloualiche merged 13 commits intomainfrom
feat/edit-config

Conversation

@eloualiche
Copy link
Member

Summary

  • Add e key to dashboard TUI to open .esync.toml in $EDITOR (checks $VISUAL$EDITORvi)
  • If no config exists, shows a commented template; only persists to disk if user saves changes (SHA-256 checksum comparison)
  • On save, parses new config and rebuilds watcher/syncer with new settings (full teardown + rebuild with mutex + WaitGroup)
  • Renames project-level config from esync.toml to .esync.toml (dotfile) across all code, docs, and examples
  • Invalid config shows error in status line, keeps old config running

Test plan

  • Press e with existing .esync.toml — opens in editor, reload on save
  • Press e with no config (flag-only mode) — template shown, creates .esync.toml on save
  • Exit editor without saving — no file created, TUI continues
  • Save invalid TOML — error in status line, old config retained
  • esync init creates .esync.toml (not esync.toml)
  • All tests pass: go test ./...

🤖 Generated with Claude Code

eloualiche and others added 13 commits March 18, 2026 20:27
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds: cmd/init.go rename scope, EditTemplateTOML() vs DefaultTOML()
separation, flag-only mode behavior, temp file .toml suffix,
$VISUAL/$EDITOR resolution, rebuild sequencing, README scope.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tGroup

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ck, reload status

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@eloualiche eloualiche merged commit a846e7a into main Mar 19, 2026
1 check passed
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