Simplify install enrollment UX to all-or-none choice - #698
Conversation
Review: #698Head SHA: 48b002f SummaryThis PR correctly implements issue #495 by removing the FindingsMedium / Low / Info
FooterOutcome: comment-only Previous runReview: #698Head SHA: 4686d41 SummaryThis PR cleanly replaces the FindingsCriticalNone HighNone MediumNone Low
Info
FooterOutcome: approve Previous run (2)Review: #698Head SHA: ce80dfc SummaryThe PR correctly removes the FindingsHigh
Medium(none) Low
Info
FooterOutcome: request-changes Previous run (3)Review: #698Head SHA: c7165c5 SummaryClean, well-scoped change that replaces the FindingsMedium / Low / Info
FooterOutcome: approve Previous run (4)Review: #698Head SHA: ec1426c SummaryClean, well-scoped change that replaces the FindingsMedium
Low
Info
FooterOutcome: comment-only Previous run (5)Review: #698Head SHA: 1aa02f6 SummaryClean, well-scoped implementation of issue #495 section 1. The FindingsLow
Info
FooterOutcome: approve Previous run (6)Review: #698Head SHA: 041f722 SummaryThis PR cleanly implements the install UX simplification described in #495 — removing the FindingsMedium
Low
FooterOutcome: comment-only Previous run (7)Review: #698Head SHA: 144e178 SummaryThe change correctly removes the FindingsHigh
Medium
Info
FooterOutcome: request-changes Previous run (8)Review: #698Head SHA: 0f513de SummaryClean, well-scoped PR that implements issue #495 by replacing the FindingsInfo
FooterOutcome: approve Previous run (9)Review: #698Head SHA: 21b42ff SummaryClean, well-scoped PR that correctly implements issue #495 section 1: removes the FindingsLow
Info
FooterOutcome: approve Previous run (10)Review: #698Head SHA: ac91cbe SummaryThis PR removes the FindingsCritical
High
Medium
Low
FooterOutcome: request-changes |
Fixes five critical and high-priority issues identified in the review: 1. **Restore --dry-run functionality** (CRITICAL): Re-added the early return guard that prevents app setup from running in dry-run mode. Previously removed code caused --dry-run to execute real GitHub App creation instead of previewing changes. Now passes nil repos to runDryRun as a sensible default when --repo flag is unavailable. 2. **Make promptEnrollment testable**: Refactored to accept io.Reader parameter instead of hard-coding os.Stdin. This enables dependency injection for unit testing without monkey-patching. 3. **Add retry logic for invalid input**: Changed error handling to re-prompt on invalid choices instead of terminating the install. Users can now recover from typos (e.g., "y" instead of "a") without restarting the entire installation process. 4. **Standardize output through printer**: Replaced fmt.Print with printer.StepInfo() for consistency with the rest of the codebase. 5. **Add comprehensive test coverage**: Created 6 test cases covering: - Valid inputs (a/all, n/none) with case variations - Retry logic for single and multiple invalid attempts - Error handling for EOF and read failures - Custom errorReader test helper All new tests pass. The refactoring preserves existing behavior while fixing the data-destructive dry-run bug and improving testability. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Updates installation.md to reflect changes from PR fullsend-ai#698: - Remove --repo flag from install command examples - Document new interactive enrollment prompt (all/none choice) - Add new section 4 "Managing repository enrollment" - Document `fullsend admin repos enable` command - Document `fullsend admin repos disable` command - Explain workflow for post-install enrollment changes The guide now accurately reflects the simplified all-or-none install flow and the new dedicated commands for managing enrollment after installation completes. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Updates installation.md to reflect PR fullsend-ai#698 changes: - Document new interactive enrollment prompt (all/none choice) - Remove --repo flag from all install command examples - Update "Merge enrollment PRs" section to reflect conditional behavior The guide now accurately reflects the simplified all-or-none install flow introduced in this PR. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
6547a51 to
21b42ff
Compare
Fixes critical, medium, and low priority issues from the review: **Critical - Test/Code Mismatch:** - Remove test assertion for --repo flag removal (belongs in PR fullsend-ai#698, not this PR) - This PR only adds repos enable/disable commands, doesn't touch install command **Medium - Intent Alignment:** - Change --all behavior to ignore positional repo arguments instead of rejecting them - Update validation: when --all is set, positional args are silently ignored - Update tests to verify --all ignores positional args rather than erroring **Medium - Code Duplication:** - Extract shared cobra setup into newReposSubcommand() helper - Define reposRunFunc type for enable/disable operation signatures - Reduces duplicate code from ~160 lines to ~30 lines - Enable and disable commands now use the same setup logic **Low - Deterministic Output:** - Sort repository lists when using --all to ensure deterministic commit diffs - Add sort.Strings() calls in both enable and disable operations - Import "sort" package **Low - Test Brittleness:** - Change TestReposCommand_HasSubcommands to match command names instead of full Use strings - Use sub.Name() instead of sub.Use to avoid fragility from usage text changes All tests pass. The refactoring preserves behavior while addressing reviewer concerns. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fixes critical, medium, and low priority issues from the review: **Critical - Test/Code Mismatch:** - Remove test assertion for --repo flag removal (belongs in PR fullsend-ai#698, not this PR) - This PR only adds repos enable/disable commands, doesn't touch install command **Medium - Intent Alignment:** - Change --all behavior to ignore positional repo arguments instead of rejecting them - Update validation: when --all is set, positional args are silently ignored - Update tests to verify --all ignores positional args rather than erroring **Medium - Code Duplication:** - Extract shared cobra setup into newReposSubcommand() helper - Define reposRunFunc type for enable/disable operation signatures - Reduces duplicate code from ~160 lines to ~30 lines - Enable and disable commands now use the same setup logic **Low - Deterministic Output:** - Sort repository lists when using --all to ensure deterministic commit diffs - Add sort.Strings() calls in both enable and disable operations - Import "sort" package **Low - Test Brittleness:** - Change TestReposCommand_HasSubcommands to match command names instead of full Use strings - Use sub.Name() instead of sub.Use to avoid fragility from usage text changes All tests pass. The refactoring preserves behavior while addressing reviewer concerns. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fixes five critical and high-priority issues identified in the review: 1. **Restore --dry-run functionality** (CRITICAL): Re-added the early return guard that prevents app setup from running in dry-run mode. Previously removed code caused --dry-run to execute real GitHub App creation instead of previewing changes. Now passes nil repos to runDryRun as a sensible default when --repo flag is unavailable. 2. **Make promptEnrollment testable**: Refactored to accept io.Reader parameter instead of hard-coding os.Stdin. This enables dependency injection for unit testing without monkey-patching. 3. **Add retry logic for invalid input**: Changed error handling to re-prompt on invalid choices instead of terminating the install. Users can now recover from typos (e.g., "y" instead of "a") without restarting the entire installation process. 4. **Standardize output through printer**: Replaced fmt.Print with printer.StepInfo() for consistency with the rest of the codebase. 5. **Add comprehensive test coverage**: Created 6 test cases covering: - Valid inputs (a/all, n/none) with case variations - Retry logic for single and multiple invalid attempts - Error handling for EOF and read failures - Custom errorReader test helper All new tests pass. The refactoring preserves existing behavior while fixing the data-destructive dry-run bug and improving testability. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Updates installation.md to reflect PR fullsend-ai#698 changes: - Document new interactive enrollment prompt (all/none choice) - Remove --repo flag from all install command examples - Update "Merge enrollment PRs" section to reflect conditional behavior The guide now accurately reflects the simplified all-or-none install flow introduced in this PR. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
21b42ff to
0f513de
Compare
Site previewPreview: https://af57599c-site.fullsend-ai.workers.dev Commit: |
ralphbean
left a comment
There was a problem hiding this comment.
Clean, well-scoped PR that correctly implements issue #495 section 1. The core promptEnrollment logic is solid, testable, and well-tested. A couple of items to address before merge:
- Command syntax inconsistency — the guidance message shown after choosing "none" uses
enable reposbut the prompt option text (and PR #697) usesrepos enable. These should be consistent and match PR #697's actual command structure. - Stale
--reporeferences in comments — since the--repoflag no longer exists, comments inrunInstall(around thevalidateEnabledReposcall, ~line 511) and thevalidateEnabledReposdocstring still reference--repo. These should be updated to reflect that repos now come from the enrollment prompt.
Also noting (not blocking): the "enroll all" path calls ListOrgRepos in the RunE closure, then runInstall calls it again — a minor inefficiency for large orgs that could be cleaned up in a follow-up.
Fixes critical, medium, and low priority issues from the review: **Critical - Test/Code Mismatch:** - Remove test assertion for --repo flag removal (belongs in PR fullsend-ai#698, not this PR) - This PR only adds repos enable/disable commands, doesn't touch install command **Medium - Intent Alignment:** - Change --all behavior to ignore positional repo arguments instead of rejecting them - Update validation: when --all is set, positional args are silently ignored - Update tests to verify --all ignores positional args rather than erroring **Medium - Code Duplication:** - Extract shared cobra setup into newReposSubcommand() helper - Define reposRunFunc type for enable/disable operation signatures - Reduces duplicate code from ~160 lines to ~30 lines - Enable and disable commands now use the same setup logic **Low - Deterministic Output:** - Sort repository lists when using --all to ensure deterministic commit diffs - Add sort.Strings() calls in both enable and disable operations - Import "sort" package **Low - Test Brittleness:** - Change TestReposCommand_HasSubcommands to match command names instead of full Use strings - Use sub.Name() instead of sub.Use to avoid fragility from usage text changes All tests pass. The refactoring preserves behavior while addressing reviewer concerns. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Address review feedback from PR fullsend-ai#698: - Fix command syntax in enrollment guidance message (enable repos -> repos enable) - Update validateEnabledRepos docstring to remove --repo reference - Update runInstall comment to remove --repo reference These changes ensure consistency with PR fullsend-ai#697's command structure (fullsend admin repos enable/disable) and reflect that repos now come from the enrollment prompt rather than a --repo flag. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
fullsend review is working on this — view logs |
|
fullsend review is working on this — view logs |
- Move enrollment prompt before dry-run check so dry-run can preview enrollment - Pass discovered repos to runInstall to avoid duplicate ListOrgRepos call - Add discoveredRepos parameter to runInstall that accepts pre-discovered repos - When discoveredRepos is provided, skip API call and use the provided list Addresses review feedback in fullsend-ai#698 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
fullsend review is working on this — view logs |
|
Both review issues have been addressed:
@ralphbean Ready for another review when you have a moment. |
|
/review |
- Document new interactive enrollment prompt (all/none choice) - Remove --repo flag from all install command examples - Update "Merge enrollment PRs" section to reflect conditional behavior The guide now accurately reflects the simplified all-or-none install flow introduced. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Corrected the command syntax for enrolling repositories after install: - Changed "fullsend admin repos enable" to "fullsend admin enable repos" in both the CLI output message and installation guide - This aligns with the actual command structure Also clarified in the installation guide that repositories can be enrolled later using the enable repos command. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Fix command syntax in enrollment guidance message (enable repos -> repos enable) - Update validateEnabledRepos docstring to remove --repo reference - Update runInstall comment to remove --repo reference These changes ensure consistency with the enable/disable repos command structure and reflect that repos now come from the enrollment prompt rather than a --repo flag. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Changed all references from "fullsend admin repos enable" to "fullsend admin enable repos" to match the actual command structure. Fixed in two locations: - Line 223: CLI output message when no repos enrolled during install - Line 921: promptEnrollment function help text Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Move enrollment prompt before dry-run check so dry-run can preview enrollment - Pass discovered repos to runInstall to avoid duplicate ListOrgRepos call - Add discoveredRepos parameter to runInstall that accepts pre-discovered repos - When discoveredRepos is provided, skip API call and use the provided list Addresses review feedback in fullsend-ai#698 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
When enrollAll is true and --dry-run is set, ListOrgRepos was being called twice: once during enrollment discovery and again inside runDryRun. This fix passes the already-discovered repos to runDryRun to avoid the redundant API call. Modified runDryRun to accept an optional discoveredRepos parameter similar to runInstall. When repos are provided, they are used directly; otherwise, the function calls ListOrgRepos as before. Addresses low-priority efficiency issue in review fullsend-ai#698 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
ec1426c to
c7165c5
Compare
|
fullsend review is working on this — view logs |
Address two remaining style issues from review:
1. Line 399: Update stale comment that referenced removed --repo flag
- Changed "Validate that every --repo value matches a discovered repo."
- To "Validate that every enabled repository matches a discovered repo."
2. Lines 212-214: Clarify enrollment guidance message format
- Split ambiguous "fullsend admin enable repos %s <repo-name> or --all"
- Into two clearly separated command examples showing both options:
- "fullsend admin enable repos <org> <repo-name> [repo-name...]"
- "fullsend admin enable repos <org> --all"
The improved formatting makes it clear these are alternative command
forms rather than literal command syntax.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
fullsend review is working on this — view logs |
ralphbean
left a comment
There was a problem hiding this comment.
Nice, clean PR — the interactive prompt is a solid UX improvement and the implementation is well-tested. One blocking concern around scriptability, plus two small nits.
Blocking: The install command now unconditionally requires interactive input with no flag-based bypass. Every other interactive prompt in this CLI has a non-interactive escape hatch (--yolo on uninstall/disable, --skip-app-setup on install). This needs parity — something like --enroll-all / --enroll-none, or reusing --yolo to default to a sensible choice.
Non-blocking nits noted inline.
Addresses review feedback from ralphbean and fullsend-ai-review bot: Blocking (High): - Add --enroll-all and --enroll-none flags to bypass the interactive enrollment prompt, maintaining scriptability for CI/cron environments. When either flag is set, skip promptEnrollment() and use the flag value directly. Flags are mutually exclusive with validation. Non-blocking (Low): - Remove unnecessary fmt.Sprintf calls with no format verbs (lines 228) - Update stale comment in validateEnabledRepos from "user targets a fork" to "enabled repo is a fork" to reflect new all-or-none enrollment model Follows existing CLI patterns: --yolo skips uninstall confirmation, --skip-app-setup bypasses app creation, now --enroll-all/--enroll-none bypass enrollment prompt. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
fullsend review is working on this — view logs |
Addresses Info-level issue from bot review: when enrollAll is false, allRepos remained nil, causing runDryRun and runInstall to call ListOrgRepos again. This resulted in a redundant API call. Fix: Always fetch org repos upfront, regardless of enrollment choice. Both enroll-all and enroll-none paths now use the same discovered repos, eliminating the duplicate API call. - Moved ListOrgRepos call before the enrollment branch - Both paths now pass populated allRepos to runDryRun/runInstall - No change in behavior, just eliminates redundant API call Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
fullsend review is working on this — view logs |
Summary
Implements #495 by removing the
--repoflag fromfullsend admin installand replacing it with an interactive prompt that gives users a simple choice: enroll all repositories or none.Changes
--repoflag: No longer need to specify repos upfront during installation[a]Enroll all repositories (excluding.fullsend)[n]Enroll no repositories (configure later).fullsendexclusion: Config repo is never enrolled, even with "all" optionfullsend admin repos enableBenefits
Test plan
Related
Closes #495
Depends on #697 (enable/disable commands for post-install configuration)
🤖 Generated with Claude Code