feat(onboard): surface back-navigation hint on inference setup prompts - #7190
feat(onboard): surface back-navigation hint on inference setup prompts#7190laitingsheng wants to merge 8 commits into
Conversation
Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage remains at 96%, unchanged from the TypeScript / code-coverage/cliThe overall coverage in the Show a code coverage summary of the most impacted files.
Updated |
📝 WalkthroughWalkthroughAdds a shared navigation hint, supports ChangesOnboarding navigation
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant HermesAuthPrompt
participant getNavigationChoice
participant PreviousSelection
HermesAuthPrompt->>User: print navigation hint
User->>HermesAuthPrompt: enter b
HermesAuthPrompt->>getNavigationChoice: parse input
getNavigationChoice-->>HermesAuthPrompt: back
HermesAuthPrompt->>PreviousSelection: return to provider selection
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
PR Review Advisor — InformationalAdvisor assessment: Informational / high confidence Model lanes
Nemotron output stays in workflow artifacts and does not change the assessment above. E2E guidanceAdvisory only. E2E / PR Gate selects and runs jobs independently. Recommended E2E: 2 optional E2E recommendations
This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge. |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/lib/onboard/hermes-auth.test.ts`:
- Around line 51-62: Update the test for promptHermesAuthMethod to record both
console logging and the interactive prompt as ordered events, then assert that
NAVIGATION_HINT appears before the prompt event. Replace the current
presence-only logSpy.mock.calls check while preserving the existing interactive
setup.
- Around line 64-71: Update the test around the back-flow case in the
auth-method prompt to use the production navigation parser or wiring for
getNavigationChoice instead of a mock that always returns "back". Preserve the
prompt response "b" and assert the flow reaches provider selection through the
real parsing behavior.
- Around line 52-53: Add an afterEach cleanup hook in the test suite containing
the console.log spy and vi.stubEnv calls, using the repository-standard
equivalents of vi.restoreAllMocks() and vi.unstubAllEnvs(). Ensure cleanup runs
after every test so mock spies and environment overrides do not leak into
subsequent cases.
In `@src/lib/onboard/prompt-helpers.test.ts`:
- Around line 20-40: Append the required "(`#6005`)" suffix to the enclosing
describe titles for getNavigationChoice back token in
src/lib/onboard/prompt-helpers.test.ts:20-40, credential prompt navigation
helpers in src/lib/onboard/credential-navigation.test.ts:13-20, and Hermes auth
back-navigation affordance in src/lib/onboard/hermes-auth.test.ts:50-87.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: a1551dc5-70c2-4dba-a282-a1964b075424
📒 Files selected for processing (7)
src/lib/navigation.tssrc/lib/onboard/credential-navigation.test.tssrc/lib/onboard/credential-navigation.tssrc/lib/onboard/hermes-auth.test.tssrc/lib/onboard/hermes-auth.tssrc/lib/onboard/prompt-helpers.test.tssrc/lib/onboard/prompt-helpers.ts
Co-authored-by: Tinson Lai <tinsonl@nvidia.com> Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Co-authored-by: Tinson Lai <tilai@nvidia.com> Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Co-authored-by: Tinson Lai <tilai@nvidia.com> Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
|
🌿 Preview your docs: https://nvidia-preview-pr-7190.docs.buildwithfern.com/nemoclaw |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/get-started/quickstart-langchain-deepagents-code.mdx`:
- Line 100: Update the navigation hint in the quickstart documentation so the
`b` destination matches the preceding `back` behavior, or explicitly limit the
provider-selection wording to prompts where that destination applies.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 6e494889-3efd-4f4f-b669-57befbb45355
📒 Files selected for processing (3)
docs/get-started/quickstart-hermes.mdxdocs/get-started/quickstart-langchain-deepagents-code.mdxdocs/get-started/quickstart.mdx
Co-authored-by: Tinson Lai <tilai@nvidia.com> Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/lib/onboard/credential-navigation.test.ts`:
- Around line 16-19: Update the test lifecycle hooks around
NEMOCLAW_TEST_NAVIGATION_KEY to capture its pre-test value in beforeEach and
restore that exact value in afterEach, deleting it only when it was originally
unset. Keep the existing vi.restoreAllMocks() cleanup intact.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 0678bfbb-124e-4382-8bf5-776ff2ae523c
📒 Files selected for processing (2)
src/lib/credentials/store.tssrc/lib/onboard/credential-navigation.test.ts
Co-authored-by: Tinson Lai <tinsonl@nvidia.com> Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Co-authored-by: Tinson Lai <tinsonl@nvidia.com> Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
apurvvkumaria
left a comment
There was a problem hiding this comment.
Reviewed exact head ba733ea against current base 78e0e4e. The change is narrowly scoped to the inference-setup back-navigation hint, preserves the existing prompt/backspace behavior, and no longer claims to close the broader all-prompts issue. Focused tests pass 33/33, the docs build passes, all commits are Verified with DCO green, protected E2E and ordinary CI/advisors are green, and there are no unresolved threads. No blocking issue found.
Summary
The inference provider setup prompts already accepted a
backreply to return to provider selection, but the option was never shown, so users could not discover it and pressed Ctrl+C instead. This surfaces a visible navigation hint before the credential and Hermes auth prompts and accepts the shortbtoken as abackalias. Behaviour is interactive-only, so non-interactive runs are unchanged.Related Issue
Partial progress toward #6005
Changes
NAVIGATION_HINTandprintNavigationHint()tosrc/lib/navigation.tsas the single source for the hint text.btoken as abackalias in bothgetNavigationChoiceparsers (prompt-helpers.ts,credential-navigation.ts).backto provider selection; this only makes the existing affordance visible and keyboard-friendly.Type of Change
Quality Gates
Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run check:diffpassed when hooks were skipped or unavailablenpx vitest run src/lib/onboard/prompt-helpers.test.ts src/lib/onboard/credential-navigation.test.ts src/lib/onboard/hermes-auth.test.ts→ 32 passed;npm run test:changed→ 14 files / 211 passed.npm testfor broad runtime/test-harness changes;npm run checkfor repo-wide validation/coverage changes — command/result:npm run docsbuilds without warnings (doc changes only)Signed-off-by: Tinson Lai tinsonl@nvidia.com
Summary by CodeRabbit
bas a shortcut to return to provider selection across prompts.b(whitespace/case variants) is treated asback.bshortcut when hints are shown.