feat(desktop): lead onboarding with Nous Portal + fix fresh-install detection (#34970)

- Feature Nous Portal as the primary onboarding card (Recommended tag,
  app logo, single pitch line); collapse other OAuth providers behind an
  "Other providers" disclosure whose open/closed state persists.
- Surface OpenRouter as a one-click API-key option inside the disclosure;
  move "I have an API key" to a quiet bottom-right link.
- Treat "no provider configured" as a normal onboarding state, not a red
  error banner (provider-setup-errors copy match).
- Fix setup.runtime_check: it reported ready when the resolved runtime had
  an empty credential or only implicit Bedrock/IAM, so fresh installs never
  saw onboarding. Now requires a usable credential.
- Auto-wire Windows fonts for WSL2 users so the renderer renders real
  Segoe UI instead of the DejaVu fallback; make WSL detection env-independent
  via the /proc kernel marker.
This commit is contained in:
brooklyn!
2026-05-29 17:00:45 -05:00
committed by GitHub
parent 696037587f
commit de8fed32fd
9 changed files with 361 additions and 42 deletions
+51
View File
@@ -1615,6 +1615,57 @@ def test_setup_status_reports_provider_config(monkeypatch):
assert resp["result"]["provider_configured"] is False
def test_setup_runtime_check_rejects_empty_runtime_key(monkeypatch):
monkeypatch.setattr("hermes_cli.main._has_any_provider_configured", lambda: True)
monkeypatch.setattr(
"hermes_cli.runtime_provider.resolve_runtime_provider",
lambda requested=None: {
"provider": "openrouter",
"api_key": "",
"source": "env/config",
},
)
resp = server.handle_request({"id": "1", "method": "setup.runtime_check", "params": {}})
assert resp["result"]["ok"] is False
assert resp["result"]["provider"] == "openrouter"
def test_setup_runtime_check_allows_no_key_custom_runtime(monkeypatch):
monkeypatch.setattr("hermes_cli.main._has_any_provider_configured", lambda: True)
monkeypatch.setattr(
"hermes_cli.runtime_provider.resolve_runtime_provider",
lambda requested=None: {
"provider": "custom",
"api_key": "no-key-required",
"source": "env/config",
},
)
resp = server.handle_request({"id": "1", "method": "setup.runtime_check", "params": {}})
assert resp["result"]["ok"] is True
assert resp["result"]["provider"] == "custom"
def test_setup_runtime_check_rejects_implicit_bedrock_when_unconfigured(monkeypatch):
monkeypatch.setattr("hermes_cli.main._has_any_provider_configured", lambda: False)
monkeypatch.setattr(
"hermes_cli.runtime_provider.resolve_runtime_provider",
lambda requested=None: {
"provider": "bedrock",
"api_key": "aws-sdk",
"source": "iam-role",
},
)
resp = server.handle_request({"id": "1", "method": "setup.runtime_check", "params": {}})
assert resp["result"]["ok"] is False
assert resp["result"]["provider"] == "bedrock"
def test_complete_slash_includes_provider_alias():
resp = server.handle_request(
{"id": "1", "method": "complete.slash", "params": {"text": "/pro"}}