fix: make PR mode the default workflow#17
Conversation
DreadPirateRobertz
left a comment
There was a problem hiding this comment.
LGTM — approving.
Thorough, well-scoped change that resolves a real inconsistency (issue #16). The default mode now consistently resolves to pr across all code paths: ResolveMode(), Join(), Create(), CLI help text, and tests.
Strengths:
- Correct approach: default changed in
ResolveMode()and explicitly persisted inJoin()/Create()config structs, so both new and existing installs behave consistently. - Test coverage is strong: new
TestResolveModetable-driven test, updated assertions inTestJoin_Success/TestCreate_Success, and lifecycle tests now explicitly opt intowild-westwhere needed viajoinedLifecycleEnv(). setModehelper correctly moved frompr_mode_test.gotooffline_test.gowhere it's shared — no duplication.- Unused imports (
os,filepath) cleaned up frompr_mode_test.go.
CONTRIBUTING.md compliance:
- Feature branch:
fix/default-workflow— correctfix/*convention. - Commit message uses present tense ("make PR mode the default").
- PR body references the issue it closes.
One minor observation (non-blocking): The ResolveMode() function now returns ModePR for both empty string and ModePR input, but returns c.Mode verbatim for anything else (including ModeWildWest). This means an invalid mode string like "typo" would be returned as-is rather than falling back to default. Existing behavior, not introduced by this PR, so not a blocker.
Clean work.
DreadPirateRobertz
left a comment
There was a problem hiding this comment.
Clean implementation. Default to PR mode makes sense for Phase 2 — wild-west was the bootstrap phase. Test coverage is solid with the table-driven TestResolveMode and updated lifecycle helpers. LGTM.
- Settings.tsx: normalize empty mode to "pr" instead of "wild-west" so legacy configs don't silently revert the new default on save - BrowseList.tsx: reset selection on background poll to prevent stale index navigation after items change - cmd_serve.go: set anonymous hosted client mode to ModePR for consistent API contract Co-Authored-By: Claude Opus 4.6 <[email protected]>
e01e9f6 to
9801ebb
Compare
Adoption ReviewThanks for the contribution, @KalleBylin! This PR correctly identifies and fixes a real inconsistency — docs and the remote join path treated This PR was adopted with maintainer fixes pushed directly to the contributor's branch. Initial ReviewThe initial dual-model review (Claude + Codex) found one major issue: Maintainer Changes
Final Review StatusAll clear — no remaining blockers or majors. The Codex-flagged TUI finding was independently refuted (TUI already uses Review Iterations2 review passes performed. Adopted via |
|
Thank you both for the detailed PRs, very much appreciated! I have opened up follow up PRs:
|
Closes #16
Why
pras the default, while unset local config still resolved towild-westBrowseList(jfollowed immediately byEntercould still read the old selection)What changed
prprin newly created local configs so local and remote join agreewild-westbehavior is explicit where those tests depend on mainline mutationsBrowseListkeyboard navigation by keeping the latest selected index available synchronously before navigation (this was failing after updating branch)Testing
go test ./...go vet ./...go test -tags=integration ./internal/remote/go test -tags=integration ./test/integration/offline -run 'TestClaimWanted|TestClaimAlreadyClaimed|TestDoneFullLifecycle|TestStatusFullLifecycle|TestWildWestModeUnchanged|TestConfigSetGetMode'npm --prefix web run checkOut of Scope
wl join --directis unchanged in this PR. It still affects the join path, but does not implicitly switch the saved workflow mode towild-west.