Skip to content

Add automatic credential sync to workspaces#38

Merged
gricha merged 1 commit intomainfrom
feat/auto-sync-credentials
Jan 7, 2026
Merged

Add automatic credential sync to workspaces#38
gricha merged 1 commit intomainfrom
feat/auto-sync-credentials

Conversation

@gricha
Copy link
Copy Markdown
Owner

@gricha gricha commented Jan 7, 2026

Summary

  • Auto-sync credentials when config is changed via API (no more manual sync button)
  • File watcher monitors credential files and syncs on changes with 500ms debounce
  • Replace confirmation toast with auto-dismissing "Synced to workspaces" notification
  • Document directory sync support in credentials.files

Changes

Agent:

  • New FileWatcher class using Bun's native fs.watch()
  • Watches credential files, standard locations (~/.gitconfig, ~/.claude, ~/.codex), and SSH keys
  • triggerAutoSync() called after all config update handlers

Web UI:

  • Simplified SyncToast - auto-dismisses after 2.5s, no buttons
  • Renamed useSyncPromptuseSyncNotification

Test plan

  • Integration tests for auto-sync (4 tests)
  • API config change triggers sync
  • File watcher triggers sync on file change
  • Debouncing works for rapid changes
  • Directory sync works
  • All 105 existing tests pass
  • All 20 Playwright e2e tests pass

🤖 Generated with Claude Code

- Auto-sync when config is changed via API (credentials, scripts, agents, SSH)
- File watcher monitors credential files and syncs on changes (500ms debounce)
- Replace confirmation toast with auto-dismissing "Synced to workspaces" notification
- Support directory sync in credentials.files (already worked via TAR, now documented)

Watched files include:
- Files configured in credentials.files
- Standard locations: ~/.gitconfig, ~/.claude/.credentials.json, ~/.codex/*
- SSH keys from ssh.global.copy and per-workspace configs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@gricha gricha merged commit 5f78452 into main Jan 7, 2026
6 checks passed
@gricha gricha deleted the feat/auto-sync-credentials branch January 7, 2026 21:17
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