Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(mcp): honour an embedder's workspace, drop a retry time the tick cannot keep, unsqueeze the detail line\n\nThree findings from the review pass, all verified against the branch before\nacting on them.\n\n1. active_workspace_dir() bypassed the embedder-config override.\n config::ops::load_config_with_timeout short-circuits on\n CoreContext::current_embedder_config(); this resolver did not, so an\n embedding host that supplied its own Config got the process-global\n workspace instead. should_announce compares that against the event's\n workspace_dir, so the mismatch is not a wrong banner — it is NO banner,\n permanently, with only a debug! line. Now prefers the embedder config, the\n same precedence the config loader documents.\n\n NOT covered by a test: CoreContext::for_test takes no embedder_config and\n is #[cfg(test)]-only, so proving this needs a new seam through the author's\n test constructor. Flagged rather than quietly claimed.\n\n2. The unavailable banner promised "retrying in {retry_in_secs}s".\n retry_in_secs is tinymcp's backoff (5s on the first failure) and is\n faithful on the event, but this host drives Supervisor::tick from its own\n 60s interval, so the backoff only decides eligibility on the NEXT tick.\n Every sub-tick step (5/10/20/40s) was under-reported and the user watched a\n "5s" banner sit for a minute. The banner now says it retries automatically;\n the exact backoff is still on the event and in the Event Log row via\n log_detail, where it can be read against the tick interval.\n\n The test that pinned the old string is replaced, not deleted, by a stronger\n pair: the false precision is asserted ABSENT and the replacement present.\n\n3. The Event Log detail line was squeezed to a few characters. The sibling\n event span had truncate without min-w-0, so it could not shrink below\n min-content and the detail span — which does set min-w-0 — absorbed all\n overflow. Defeated the column this PR added. min-w-0 added.\n\nAlso formats settings-theme-import-validation.spec.ts, which main added after\nthis branch's last merge and which fails prettier there.\n\nVerified: cargo fmt clean; 186 lib tests pass across desktop::notifications and\nconfig::schema::load; pnpm typecheck exit 0; EventLogPanel vitest 12/12.\n

M3gA-Mind8eb0ead20ddc
diff --git a/app/src/components/settings/panels/EventLogPanel.tsx b/app/src/components/settings/panels/EventLogPanel.tsx
index d4347157fd..08b135aec9 100644
--- a/app/src/components/settings/panels/EventLogPanel.tsx
+++ b/app/src/components/settings/panels/EventLogPanel.tsx
@@ -327,7 +327,12 @@ const EventLogPanel = () => {
{entry.agent}
</span>
)}
- <span className="text-xs text-content truncate">{entry.event}</span>
+ {/* `min-w-0` is load-bearing: a flex item with `truncate` cannot
+ shrink below min-content without it, so this span would hold its
+ full width and the detail span beside it (which does set
+ `min-w-0`) would absorb every pixel of overflow and render as a
+ few characters — defeating the column it was added for. */}
+ <span className="text-xs text-content truncate min-w-0">{entry.event}</span>
{entry.detail && (
<span
className="text-[10px] text-content-muted truncate min-w-0 pt-0.5"
diff --git a/app/test/playwright/specs/settings-theme-import-validation.spec.ts b/app/test/playwright/specs/settings-theme-import-validation.spec.ts
index 9679e37ded..89263c19a0 100644
--- a/app/test/playwright/specs/settings-theme-import-validation.spec.ts
+++ b/app/test/playwright/specs/settings-theme-import-validation.spec.ts
@@ -90,11 +90,7 @@ test.describe('Theme Studio — import validation', () => {
}
test('still accepts a theme carrying a single colour token', async ({ page }) => {
- const valid = JSON.stringify({
- name: 'Minimal',
- isDark: false,
- colors: { surface: '1 2 3' },
- });
+ const valid = JSON.stringify({ name: 'Minimal', isDark: false, colors: { surface: '1 2 3' } });
await attemptImport(page, valid);
diff --git a/src/openhuman/config/schema/load/dirs.rs b/src/openhuman/config/schema/load/dirs.rs
index ff06a434bf..234432a1cc 100644
--- a/src/openhuman/config/schema/load/dirs.rs
+++ b/src/openhuman/config/schema/load/dirs.rs
@@ -313,6 +313,18 @@ pub(crate) async fn resolve_runtime_config_dirs(
/// asks only for the handful of workspace-bound events a supervisor tick
/// produces, and returns before calling it for everything else.
pub async fn active_workspace_dir() -> Result<PathBuf> {
+ // An embedding host that supplied its own `Config` is authoritative, and
+ // `config::ops::load_config_with_timeout` already short-circuits on it for
+ // exactly this reason. Resolving from disk/env here instead would answer
+ // with the process-global workspace, which for an embedder is a directory
+ // it never chose — and the one caller of this function compares the answer
+ // against an event's `workspace_dir` to decide whether to announce. A
+ // mismatch there is not a wrong banner, it is *no* banner, permanently,
+ // with only a `debug!` line to say so. See AGENTS.md, "CoreBuilder::config
+ // alone configures boot and nothing else".
+ if let Some(config) = crate::core::runtime::context::CoreContext::current_embedder_config() {
+ return Ok(config.workspace_dir);
+ }
let (default_openhuman_dir, default_workspace_dir) = default_config_and_workspace_dirs()?;
let (_, workspace_dir, source) =
resolve_runtime_config_dirs(&default_openhuman_dir, &default_workspace_dir).await?;
diff --git a/src/openhuman/desktop/notifications/bus.rs b/src/openhuman/desktop/notifications/bus.rs
index 2ee662ede3..1bede92c21 100644
--- a/src/openhuman/desktop/notifications/bus.rs
+++ b/src/openhuman/desktop/notifications/bus.rs
@@ -347,15 +347,23 @@ pub fn event_to_notification(event: &DomainEvent) -> Option<CoreNotificationEven
qualified_name,
error,
failures,
- retry_in_secs,
..
} if *failures == 1 => Some(CoreNotificationEvent {
id: format!("mcp-unavailable:{}:{}", server_id, ts),
category: CoreNotificationCategory::System,
title: "MCP server unavailable".into(),
+ // Deliberately no "retrying in Ns": `retry_in_secs` is tinymcp's
+ // backoff (5s for the first failure) and is faithful on the event,
+ // but this host drives `Supervisor::tick` from its own 60s
+ // interval, so the backoff only decides *eligibility* on the next
+ // tick. Every sub-tick step (5/10/20/40s) would be under-reported
+ // to the user, who then watches a "5s" banner sit there for a
+ // minute. The exact backoff is still in the Event Log row via
+ // `DomainEvent::log_detail`, where a developer can read it against
+ // the tick interval; a banner cannot carry that caveat.
body: format!(
"{qualified_name} stopped answering, so its tools are unavailable until it \
- reconnects (retrying in {retry_in_secs}s). {}",
+ reconnects. It retries automatically. {}",
error.chars().take(120).collect::<String>()
),
deep_link: Some("/connections?tab=mcp".into()),
diff --git a/src/openhuman/desktop/notifications/bus_tests_2_tests.rs b/src/openhuman/desktop/notifications/bus_tests_2_tests.rs
index d19fa21981..01c6bec5ab 100644
--- a/src/openhuman/desktop/notifications/bus_tests_2_tests.rs
+++ b/src/openhuman/desktop/notifications/bus_tests_2_tests.rs
@@ -195,7 +195,13 @@ fn mcp_first_failed_reconnect_tells_the_user_tools_are_unavailable() {
assert_eq!(n.category, CoreNotificationCategory::System);
assert_eq!(n.title, "MCP server unavailable");
assert!(n.body.contains("ac.inference.sh/mcp"), "{}", n.body);
- assert!(n.body.contains("retrying in 5s"), "{}", n.body);
+ // Deliberately NOT "retrying in 5s". `retry_in_secs` is tinymcp's backoff
+ // and is faithful on the event, but this host drives `Supervisor::tick`
+ // from its own 60s interval, so the backoff only decides eligibility on the
+ // next tick — a "5s" banner sits there for a minute. Pinned as an absence
+ // as well as a presence, so the false precision cannot come back.
+ assert!(!n.body.contains("retrying in"), "{}", n.body);
+ assert!(n.body.contains("retries automatically"), "{}", n.body);
assert!(n.body.contains("connection reset"), "{}", n.body);
assert_eq!(n.deep_link.as_deref(), Some("/connections?tab=mcp"));
assert!(n.id.starts_with("mcp-unavailable:srv-1:"));