feat(console): make account switching a clear user action - #335
Conversation
📝 WalkthroughWalkthroughThe Console now distinguishes durable default accounts from per-chat account switching. It adds client-specific account actions and feedback, centralizes switching guidance, removes obsolete copy, and updates contract tests. ChangesAccount-switching guidance
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/console/console-assets.ts`:
- Around line 1323-1330: Update the shared catalog-switch-guidance handling near
the configuration-card rendering and the Line 1341 visibility logic so
unavailable account switching is rendered once in the shared element rather than
appended by each card. Remove the per-card switching paragraph created in the
configuration loop, and explicitly handle mixed catalogs so the shared guidance
reflects whether any configuration supports switching while preserving available
switch controls.
In `@tests/console-server.test.ts`:
- Around line 2292-2332: Add behavior-level tests in the account-switching
coverage around renderConfigurationCatalog and the clipboard handler, exercising
multiple configurations and supported clients rather than only inspecting
/app.js literals. Assert the rendered shared-guidance count,
client/profile-specific button text and aria-label, the clipboard payload, and
the confirmation message; retain the existing protocol-string checks as
supplemental coverage.
🪄 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: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 94870f87-31f2-4aef-8ba7-401ef9fbaa69
📒 Files selected for processing (2)
src/console/console-assets.tstests/console-server.test.ts
Summary
Closes #331.
Security impact
Presentation-only Console change. The clipboard payload, miftah_use_profile behavior, client support, redaction, audit, credential handling, containment, and public APIs remain unchanged.
TDD evidence
Validation
The standard parallel coverage invocation encountered an unchanged 1,000 ms upstream startup bound under local coverage instrumentation; each reported test passed in isolation, and the complete coverage run passed without changing timeouts or skipping tests. Current-head CI remains authoritative for the standard Linux, macOS, Windows, quality, and package matrix.
Review
CodeRabbit’s earlier review reported two findings; both are resolved in 0457ded and 9b9f756 with replies and resolved threads. Its latest incremental review was rate-limited. A separate current-head two-axis standards/spec review is being used rather than claiming CodeRabbit approval.