Skip to content

fix(init): align main menu order#346

Merged
rianjs merged 3 commits into
mainfrom
fix/341-init-menu-ux-order
Jun 18, 2026
Merged

fix(init): align main menu order#346
rianjs merged 3 commits into
mainfrom
fix/341-init-menu-ux-order

Conversation

@rianjs

@rianjs rianjs commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Reorder the cr init main menu to match the documented UX contract: LLM runtimes, reviewer entities, review profiles, global settings, secrets management, commit, discard.
  • Make active-workspace default focus start on LLM runtimes.
  • Preserve fresh/no-workspace default focus on review profiles because dependent workflows remain disabled.

Verification

  • go test ./internal/cmd/credentialcmd
  • make check
  • tmux TUI verification at 120x40:
    • Fresh/no-workspace menu keeps Configure review profiles focused.
    • Existing-workspace menu shows Configure LLM runtimes first and focused, followed by reviewer entities, review profiles, global settings, secrets management, commit, discard.

Closes #341

@rianjs

rianjs commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Findings

Minor: The plan called out preserving disabled no-workspace behavior for both LLM and reviewer entries, but the diff only updates/adds coverage for disabled LLM selection. Add the symmetric accessible test selecting 2 with no workspace and asserting Configure reviewer entities is rejected with the existing reviewer validation message.

@rianjs

rianjs commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Findings

  • internal/cmd/credentialcmd/credentialcmd_test.go#L11327 still does not lock the full main-menu order contract. The new assertContentOrder check stops at Configure secrets management, so a regression that moved Commit staged changes and exit or Discard staged changes and exit earlier in the list would still pass. Since the ticket explicitly calls out the complete order, I’d extend this assertion to include the last two entries.

No blockers or majors beyond that coverage gap. The new tests do cover the active-workspace default, the fresh/no-workspace default, and the disabled LLM/reviewer cases.

@monit-reviewer monit-reviewer left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated PR Review

Reviewed commit: 6ed678b

Approved with 2 non-blocking suggestions below. Address at your discretion.

Summary

Reviewer Findings
harness-engineering:harness-knowledge-reviewer 1
harness-engineering:harness-self-documenting-code-reviewer 1
harness-engineering:harness-knowledge-reviewer (1 findings)

💡 Suggestion - internal/cmd/credentialcmd/credentialcmd.go:1616

The PR description references a 'documented UX contract' for menu ordering (LLM runtimes → reviewer entities → review profiles → global settings → secrets management → commit → discard) but does not cite where that contract lives in the repo. If the rationale exists only in issue #341 or PR descriptions, it should be captured in a versioned docs/ artifact so contributors can understand the ordering without mining git history.

harness-engineering:harness-self-documenting-code-reviewer (1 findings)

💡 Suggestion - internal/cmd/credentialcmd/credentialcmd_test.go:11398

TestHuhInitMenuPrompterDefaultStartsAtTopWhenProfileIsActive uses 'top' abstractly, but this PR changed what 'top' maps to (LLM runtimes is now first, previously reviewer entities). A name like TestHuhInitMenuPrompterDefaultStartsAtLLMRuntimesWhenWorkspaceActive makes the contract explicit and would catch future ordering regressions at the name level.

2 PR discussion threads considered.


Completed in 1m 41s | $1.01 | sonnet | daemon 0.2.132 | Glorfindel
Field Value
Model sonnet
Reviewers hybrid-synthesis, harness-engineering:harness-architecture-reviewer, harness-engineering:harness-enforcement-reviewer, harness-engineering:harness-knowledge-reviewer, harness-engineering:harness-self-documenting-code-reviewer, security:security-code-auditor
Engine claude · sonnet
Reviewed by pr-review-daemon · monit-pr-reviewer
Duration 1m 41s wall · 1m 38s compute (Reviewers: 1m 02s · Synthesis: 36s)
Cost $1.01 (estimated)
Tokens 225.1k in / 8.7k out
Turns 12

Per-workstream usage

Workstream Model In Out Cache read Cache create Cost
hybrid-synthesis sonnet 35.9k 1.7k 13.8k 22.2k (1h) $0.16
harness-engineering:harness-architecture-reviewer sonnet 36.7k 630 13.8k 22.9k (1h) $0.15
harness-engineering:harness-enforcement-reviewer sonnet 37.3k 827 13.8k 23.5k (1h) $0.16
harness-engineering:harness-knowledge-reviewer sonnet 38.0k 1.7k 13.8k 24.2k (1h) $0.17
harness-engineering:harness-self-documenting-code-reviewer sonnet 40.4k 3.3k 13.8k 26.6k (1h) $0.21
security:security-code-auditor sonnet 36.7k 592 13.8k 23.0k (1h) $0.15

Re-reviews only run when @monit-reviewer is re-requested as a reviewer — push as many commits as you need, then re-request when ready. PRs targeting branches other than main, master are skipped, even when @monit-reviewer is re-requested.

@@ -11396,8 +11398,25 @@ func TestHuhInitMenuPrompterDefaultStartsAtTopWhenProfileIsActive(t *testing.T)
if err != nil {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Low (harness-engineering:harness-self-documenting-code-reviewer): TestHuhInitMenuPrompterDefaultStartsAtTopWhenProfileIsActive uses 'top' abstractly, but this PR changed what 'top' maps to (LLM runtimes is now first, previously reviewer entities). A name like TestHuhInitMenuPrompterDefaultStartsAtLLMRuntimesWhenWorkspaceActive makes the contract explicit and would catch future ordering regressions at the name level.

Reply to this thread when addressed.

@@ -1616,12 +1616,12 @@ func (p huhInitMenuPrompter) ChooseAction(prompt initMenuPrompt) (initMenuAction
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Low (harness-engineering:harness-knowledge-reviewer): The PR description references a 'documented UX contract' for menu ordering (LLM runtimes → reviewer entities → review profiles → global settings → secrets management → commit → discard) but does not cite where that contract lives in the repo. If the rationale exists only in issue #341 or PR descriptions, it should be captured in a versioned docs/ artifact so contributors can understand the ordering without mining git history.

Reply to this thread when addressed.

@rianjs rianjs merged commit 79810f9 into main Jun 18, 2026
10 checks passed
@rianjs rianjs deleted the fix/341-init-menu-ux-order branch June 18, 2026 18:28
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.

Align cr init main menu order with the UX contract

2 participants