Repository navigation
Offer Setup on the first Run from a terminal - #162
Merged
Merged
Conversation
Closes #131 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… Ctrl-C with --email Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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
The first Run from a terminal with no User config offers Setup before any work.
setupand the offer shareanswered(ask + apply) andwrite_new.help,version,update,email-testandsetupreturn before the offer. The README's User config section describes the offer and the no-terminal behavior, and saysupdate,versionandhelpnever offer Setup.Evidence
cargo test --test setup_offer→ 7 of 10 failed (the terminal never showed "Set your defaults now? [Y/n]").After: all 11 pass, and so does the full
cargo test(23 test binaries).New PTY tests in
tests/setup_offer.rs:Merge Danger
Door: two-way
Revert and it's gone. The only thing left behind is a User config written by a user who answered the offer, and that's the same file
thirdshift setupwrites.Blast Radius: interactive-runs
This only changes Runs started from a terminal on a machine with no
~/.thirdshift/config.toml, where it adds one question. Unattended Runs (cron, CI, agents' shells) are unchanged. Stdout still holds only the PR URL.Unaddressed findings
Standards
setupandoffer_setup(the "wrote the User config" message, test email after write): the two handle errors oppositely (setupfails, the offer only warns). A shared helper would need an error-policy parameter, which costs more than the few lines it would save.offer_setupprints instead of returning its message (codebase-design "return results"): the offer prints mid-Run and then the Run carries on. There's no single outcome formainto print, as there is forsetup.questions::offeris a Middle Man overyes_or_no: it's kept on purpose so all prompt wording lives inquestions, andyes_or_nostays private.Spec
email-testnever offers Setup: that's accurate and Setup: the first Run offers Setup #131 lists it. The spec's wording didn't include it.warning:, not an error: the spec says Setup can't stop a Run, so the offer applies the same rule it uses for a failed write.HOMEunset, the error now comes fromoffer_setuprather thanUserConfig::load: the message and exit code1are the same, and it still happens before any work.~/.thirdshift: this is cosmetic. The offer checks for the file, so it comes back next time.Closes #131
🤖 Generated with Claude Code