Skip to content

Console: lead with connections and named accounts - #318

Merged
mohanagy merged 1 commit into
developmentfrom
feat/issue-202-console-task-first
Jul 31, 2026
Merged

Console: lead with connections and named accounts#318
mohanagy merged 1 commit into
developmentfrom
feat/issue-202-console-task-first

Conversation

@mohanagy

@mohanagy mohanagy commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • lead the returning-user Console with validated MCP connections and named account profiles
  • show the durable default and whether live switching with miftah_use_profile is available
  • keep Set up another MCP visible and move the authentication ownership matrix behind collapsed reference details

Scope

This PR is the focused Console implementation slice of #202. It does not claim to complete the broader external-validation acceptance criterion. Issue #202 remains open for evidence that three external evaluators can use the flow unaided; no issue auto-close keyword is used.

Security impact

  • Credential handling: unchanged. The catalog adds only validated non-secret profile names and a boolean switching capability. No credential, token, header, path, launch argument, provider cache, or OAuth vault value is exposed.
  • Routing and policy: unchanged. The UI reports whether the existing allowProfileSwitchingFromMcp setting enables miftah_use_profile; it does not change routing, active sessions, durable defaults, confirmation requirements, or policy enforcement.
  • Redaction and audit: unchanged. Existing redaction and fail-closed audit behavior remain in place.
  • Subprocesses and containment: unchanged. No process launch path changed; no-shell argument arrays and Windows/POSIX containment remain intact.
  • Dependencies and package surface: unchanged. No dependency, package version, configuration schema, or public API compatibility change is included.
  • Failure behavior: unchanged. Unsafe or invalid catalog candidates remain omitted with bounded aggregate reasons, and Console operations retain existing strict validation and error handling.

TDD evidence

  • A failing test was observed first for the task-first Console contract. The old page had no collapsed authentication guide and placed authentication before the connection/setup flow.
  • The green contract now verifies connection/setup/auth ordering, named-profile metadata, durable-default wording, and live-switch capability.

Validation

  • npm run lint — passed
  • npm run typecheck — passed
  • npm test — 1,808 passed, 33 skipped by existing platform conditions
  • npm run test:core — 425 passed, 26 skipped by existing platform conditions
  • npm run test:coverage — 95.65% statements, 91.92% branches, 98.66% functions, 95.65% lines
  • npm run build — passed
  • node dist/cli/main.js schema via npm run smoke:cli — passed
  • npm run check:pack — package contract verified, 48 files
  • npm run test:package — 26 passed, including real tarball install and binary execution
  • npm audit --audit-level=moderate — 0 vulnerabilities
  • Fixtures, logs, screenshots, and examples contain no credentials or private data. No screenshots or private values were added; test data uses only synthetic profile labels.
  • User-facing documentation and CHANGELOG.md are updated when applicable. CHANGELOG.md records the Console change and keeps external validation explicitly incomplete.
  • Dependency and packaged-file changes are intentional and reviewed. There are no dependency or package-manifest changes; the 48-file package contract remains green.
  • Undisclosed vulnerabilities are reported privately instead of in this pull request. No vulnerability was discovered.

Refs #202

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

No new commits to review since the last review.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 6e64dfe7-9af7-466b-9448-0f93e83aa371

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The Console now shows named profiles, durable defaults, and MCP profile-switching capability. It separates active-session status from durable configuration changes, collapses authentication guidance, and adds tests for catalog metadata and dashboard ordering.

Changes

Console profile discovery and switching

Layer / File(s) Summary
Profile metadata contract and catalog
src/console/console-config-metadata.ts, src/console/console-config-catalog.ts
Configuration metadata now includes profile names and explicit MCP profile-switching capability.
Catalog and active-session dashboard
src/console/console-assets.ts
The Console displays named profiles, durable defaults, active-session status, switching guidance, and collapsed authentication details.
Flow validation and release notes
tests/console-server.test.ts, CHANGELOG.md
Tests validate metadata, profile content, dashboard ordering, and switching text. The changelog records the updated Console flow and boundaries.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant ConsoleUI
  participant ConfigurationCatalog
  participant ActiveMCP
  User->>ConsoleUI: Open configuration catalog
  ConsoleUI->>ConfigurationCatalog: Read profile names and switching capability
  ConfigurationCatalog-->>ConsoleUI: Return catalog metadata
  User->>ConsoleUI: Select profile or save durable default
  ConsoleUI->>ActiveMCP: Switch active profile when supported
  ActiveMCP-->>ConsoleUI: Return session status
Loading

Possibly related issues

Possibly related PRs

  • mohanagy/miftah#206 — Adds the configuration catalog and profile-selection functionality extended here.
  • mohanagy/miftah#241 — Introduces the durable-default workflow and related Console profile metadata.
  • mohanagy/miftah#308 — Adds returning-user setup behavior extended by this catalog and switching UI.

Poem

A rabbit finds profiles, neatly named,
Durable defaults are clearly framed.
MCP hops switch when allowed to roam,
Auth folds softly, no clutter at home.
The Console guides each account just right.


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Linked Issues check ❌ Error The Console profile and switching objectives are addressed [#202], but broader documentation, client guidance, configuration examples, and evaluator evidence remain unaddressed. Limit the issue scope explicitly to this Console subset or add the missing documentation, client guidance, schema-valid examples, and three-evaluator evidence.
✅ Passed checks (4 passed)
Check name Status Explanation
Out of Scope Changes check ✅ Passed All changes target the Console onboarding flow, metadata contract, tests, or changelog; no unrelated changes appear in the provided summary.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly summarizes the main Console change: leading with connections and named account profiles.
Description check ✅ Passed The description covers the required summary, security impact, validation results, scope, TDD evidence, and outstanding acceptance criteria.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Fix failing CI checks
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/issue-202-console-task-first

Comment @coderabbitai help to get the list of available commands.

@mohanagy

Copy link
Copy Markdown
Owner Author

@coderabbitai review

The PR description now follows the repository template, includes the full security impact and exact validation results, and explicitly scopes this as the technical Console slice of #202 while leaving the three-external-evaluator gate open.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

@mohanagy, I will review the PR. I will assess the technical Console changes within the stated scope. I will treat the external-evaluator gate for #202 as out of scope for this PR.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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.

1 participant