Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

fix(ultrawiki): one working reader must not hide the apps that have none

Ruben Lütkec78991052a89
diff --git a/jarvis/ultrawiki/health.py b/jarvis/ultrawiki/health.py
index 58aafabf93..d45d62a3bd 100644
--- a/jarvis/ultrawiki/health.py
+++ b/jarvis/ultrawiki/health.py
@@ -442,6 +442,25 @@ def _integrations_check(
),
facts=facts,
)
+ if pending:
+ # The mixed case, and the easy one to get wrong: reporting only the
+ # readable ones would quietly drop the apps that still contribute
+ # nothing, leaving the user to wonder why their Gmail never shows up.
+ ready_names, _ = _names(ready, limit=3)
+ pending_names, _ = _names(pending, limit=3)
+ return HealthCheck(
+ id="integrations",
+ title=(
+ f"{len(ready)} connected app(s) can be imported, "
+ f"{len(pending)} cannot yet"
+ ),
+ state="ok",
+ detail=(
+ f"{ready_names} can be added as a source. {pending_names} "
+ "are connected, but UltraWiki has no reader for them yet."
+ ),
+ facts=facts,
+ )
return HealthCheck(
id="integrations",
title=f"{len(ready)} connected app(s) can be imported",
diff --git a/tests/unit/ultrawiki/test_health.py b/tests/unit/ultrawiki/test_health.py
index 3b487313df..140737a887 100644
--- a/tests/unit/ultrawiki/test_health.py
+++ b/tests/unit/ultrawiki/test_health.py
@@ -236,6 +236,28 @@ def test_an_integration_with_a_reader_is_reported_as_importable():
assert _check(health, "integrations")["state"] == "ok"
+def test_the_mixed_case_still_names_the_apps_that_cannot_be_read():
+ """One reader must not hide the apps that still contribute nothing.
+
+ Reporting only "1 app can be imported" is technically true and leaves the
+ user wondering for weeks why their Gmail never shows up.
+ """
+ health = build_health(
+ _status(),
+ [
+ {"id": "plugin:github", "label": "GitHub", "has_pull_adapter": True},
+ {"id": "plugin:gmail", "label": "Gmail", "has_pull_adapter": False},
+ {"id": "plugin:linear", "label": "Linear", "has_pull_adapter": False},
+ ],
+ )
+ check = _check(health, "integrations")
+ assert check["state"] == "ok"
+ assert check["facts"] == {"connected": 3, "readable": 1, "pending": 2}
+ assert "GitHub" in check["detail"]
+ assert "Gmail and Linear" in check["detail"]
+ assert "no reader" in check["detail"]
+
+
def test_a_silent_storage_fallback_is_surfaced():
"""Postgres configured, SQLite answering: the wiki works, elsewhere."""
health = build_health(