feat(sync): selective project export with TUI checkboxes and --projects flag#98
Open
alvarorestrepo wants to merge 1 commit intoGentleman-Programming:mainfrom
Open
Conversation
Add --projects flag and interactive TUI selector for choosing which projects to export during sync. - Add --projects=a,b flag for non-interactive multi-project export - Add interactive y/n prompt on TTY before launching project selector - Add ScreenProjectSelector TUI screen with j/k navigation, space toggle, enter confirm and q/esc cancel (channel-based result handoff) - Replace single syncExport call with per-project export loop that accumulates results and prints a summary - Preserve full backward compatibility: --all, --project and CWD default behave exactly as before - Warn to stderr when --all overrides --projects - Add table-driven tests for resolveProjects() and unit tests for handleProjectSelectorKeys() state machine (277 tests passing)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the ability to choose which projects to export during
engram sync, instead of always exporting all or just the CWD project.What changed
--projects=a,bflag — non-interactive multi-project export for scripts/CIengram syncprompts "Show projects pending sync? [y/n]" and launches a checkbox screen to pick projectsj/knavigate,spacetoggles,enterconfirms,q/esccancels--allwarning — prints to stderr when--alloverrides a--projectsvalue--all,--project(singular) and CWD default behave exactly as before; non-TTY environments skip the prompt entirelyUsage
Tests
277 tests passing across all 8 packages. New tests added:
TestResolveProjects— 8 table-driven cases covering all precedence pathsTestHandleProjectSelectorKeys*— 7 unit tests for TUI state machine (cursor nav, toggle, enter/cancel, q/esc)Files changed
cmd/engram/main.go--projectsflag,resolveProjects()helper, TTY detection, export loopinternal/tui/model.goScreenProjectSelector, 5 new fields,NewProjectSelector()constructorinternal/tui/update.gohandleProjectSelectorKeys(),collectSelected()internal/tui/view.goviewProjectSelector()renderercmd/engram/main_test.goTestResolveProjectstable testsinternal/tui/update_test.go