From a1d04c0b81fe70f55277e2ecc097f72eddd53964 Mon Sep 17 00:00:00 2001 From: Mohammed Naji Date: Fri, 31 Jul 2026 21:34:22 +0400 Subject: [PATCH 1/2] Make Console setup and account switching actionable (#326) * feat(console): make setup and switching actionable * fix(console): preserve setup completion handoff * fix(console): ignore superseded setup handoffs * fix(console): defer completion until reauthentication * fix(console): restore handoff after partial refresh * fix(console): coordinate recovery handoff * fix(console): ignore stale recovery responses * fix(console): discard stale session responses * fix(console): stage setup handoff before refresh * fix(console): preserve setup refresh errors * fix(console): reset recovered action controls * test(console): bound unlock recovery waits --- src/console/console-assets.ts | 641 ++++++++++++++++++----- tests/console-server.test.ts | 923 +++++++++++++++++++++++++++++++++- 2 files changed, 1436 insertions(+), 128 deletions(-) diff --git a/src/console/console-assets.ts b/src/console/console-assets.ts index 6f076db..f4e179a 100644 --- a/src/console/console-assets.ts +++ b/src/console/console-assets.ts @@ -48,13 +48,21 @@ const page = `

One connection, named accounts. Open a connection to manage its accounts, or add another MCP.

+

-

Miftah keeps rejected names and paths hidden. For files you expect to see, check private access, validate the configuration, replace symlinks with regular files, then refresh.

+

Only validated files in Miftah's standard configuration directory appear here. Client settings and running MCP processes are never inspected.

@@ -68,11 +76,44 @@ const page = `

Miftah shows only the checks it actually ran or can safely run. It never treats configuration publication as client adoption.

-
-

-

-

-

+
+
+

1. Connection created

+

+
+
+

2. Install the client entry

+
+ + +
+

+ + +

+ +

+
+
+

3. Check readiness

+
+

+

+

+
+
+
+

4. Add and switch accounts

+

+

+
@@ -88,7 +129,7 @@ const page = ` What do you already have?

Choose one path. Nothing is saved, launched, discovered, or sent to an MCP while you are on this step.

- + @@ -102,37 +143,6 @@ const page = `
-
- How authentication works -
-

Connection ownership

-

Know who owns authentication before you connect

-
-
-

Managed here

-

Remote native OAuth

-

Miftah discovers standards-based endpoints, opens consent, and stores tokens only in the OS vault.

-
-
-

Provider-owned login

-

Provider adapter

-

Miftah launches a pinned local adapter. The upstream owns browser login and its private token cache.

-
-
-

Manual setup

-

Upstream-owned auth

-

Use the provider's documented API key, credential file, or login flow. Miftah passes only configured references.

-
-
-

Not imported

-

Unsupported state

-

Passwords, browser cookies, and arbitrary third-party token caches are never accepted or scraped.

-
-
-

Trust boundary: Profiles and a generated client entry describe local configuration; they do not prove a credential works or belongs to the intended account. A reviewed safe check may establish readiness only where declared, and a configured identity probe is separate. Miftah policy and redacted audit protect the wrapper, not provider-side token scopes or retention.

-
-
- @@ -224,8 +237,46 @@ const page = ` +
+ How authentication works +
+

Connection ownership

+

Know who owns authentication before you connect

+
+
+

Managed here

+

Remote native OAuth

+

Miftah discovers standards-based endpoints, opens consent, and stores tokens only in the OS vault.

+
+
+

Provider-owned login

+

Provider adapter

+

Miftah launches a pinned local adapter. The upstream owns browser login and its private token cache.

+
+
+

Manual setup

+

Upstream-owned auth

+

Use the provider's documented API key, credential file, or login flow. Miftah passes only configured references.

+
+
+

Not imported

+

Unsupported state

+

Passwords, browser cookies, and arbitrary third-party token caches are never accepted or scraped.

+
+
+

Trust boundary: Profiles and a generated client entry describe local configuration; they do not prove a credential works or belongs to the intended account. A reviewed safe check may establish readiness only where declared, and a configured identity probe is separate. Miftah policy and redacted audit protect the wrapper, not provider-side token scopes or retention.

+
+
+