From 7a92ec7d37c2087a2abae0477483e57de483872d Mon Sep 17 00:00:00 2001 From: Ben Davis <45952064+bmdavis419@users.noreply.github.com> Date: Sat, 25 Jul 2026 22:08:12 -0700 Subject: [PATCH] fix: stop the Agent page overflowing its inset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The root cause is the missing flex wrapper. `SidebarInset` is a column flex container, and `SettingsPageContainer` is `flex-1 overflow-y-auto` — but a flex child defaults to `min-height: auto`, so it refuses to shrink below its content. The page therefore grew past the `h-dvh overflow-hidden` inset instead of scrolling inside it. The settings route wraps its own `` in `min-h-0 min-w-0 flex-1 flex-col` for exactly this reason; the Agent page dropped that wrapper and put the container directly inside the inset. Three content-level cases could also push the page sideways, all of them agent-authored strings this page has no control over: - Skill bodies are arbitrary markdown and can carry a wide code fence or an unbroken URL. Now `min-w-0 overflow-x-auto`, so a wide block scrolls itself rather than widening the page. - Skill names can be long and unbroken; `flex-wrap` cannot split a single word, so the name gets `break-all`. - The header falls back to the instance id — an unbroken slug like `hermes-siva-local-c9cc0b168af9` — rendered at `text-2xl`, which overruns a narrow viewport without `break-words`. Co-Authored-By: Claude Opus 5 (1M context) --- apps/web/src/components/agents/AgentPage.tsx | 456 ++++++++++--------- 1 file changed, 238 insertions(+), 218 deletions(-) diff --git a/apps/web/src/components/agents/AgentPage.tsx b/apps/web/src/components/agents/AgentPage.tsx index 98897722d1..601ce9d830 100644 --- a/apps/web/src/components/agents/AgentPage.tsx +++ b/apps/web/src/components/agents/AgentPage.tsx @@ -119,7 +119,9 @@ function AgentSkillRow(props: { /> - + {/* Skill names are agent-authored and can be long and unbroken; + `flex-wrap` alone cannot split a single word. */} + {formatProviderSkillDisplayName(skill)} {sourceLabel ? ( @@ -139,7 +141,10 @@ function AgentSkillRow(props: { {isExpanded ? ( -
+ // `min-w-0` matters here: a skill body is arbitrary authored markdown, + // so it can contain a wide code fence or an unbroken URL. Without it + // that content sets the row's width and pushes the whole page sideways. +
{body === undefined || body.status === "loading" ? (

@@ -322,242 +327,257 @@ export function AgentPage({ instanceId }: { readonly instanceId: ProviderInstanc return ( - -

-
- -

{title}

- - {agentStatusLabel(status)} - -
-

- {description?.connection.detail?.trim() || agentStatusGuidance(status)} -

-
- - - - -
- {error ?

{error}

: null} - {instanceNotFound ? ( -

- This server has no provider instance named {instanceId}. It may have been - removed in provider settings. -

- ) : null} -
- - }> - -
- - ` the same way. */} +
+ +
+
+ - - - - - - - - -
-
-

Reported capabilities

- {capabilities.length === 0 ? ( -

- This agent did not report any capability flags. -

- ) : ( -
- {capabilities.map((capability) => ( - - {capability.label} - - ))} -
- )} + {/* Falls back to the instance id, which is an unbroken slug like + `hermes-siva-local-c9cc0b168af9` — at 2xl that overruns a + narrow viewport unless it is allowed to wrap mid-word. */} +

+ {title} +

+ + {agentStatusLabel(status)} +
-
-
- - }> - - {description !== null && description.model === null ? ( -

- This agent did not report a model. +

+ {description?.connection.detail?.trim() || agentStatusGuidance(status)} +

+
+ + + + +
+ {error ?

{error}

: null} + {instanceNotFound ? ( +

+ This server has no provider instance named {instanceId}. It may have + been removed in provider settings.

- ) : ( + ) : null} + + + }> +
+ - + + + + +
- )} -
-
- - } - headerAction={ - skills.length > 0 ? ( - {skills.length} - ) : null - } - > - - {skills.length === 0 ? ( -

- This agent did not report any skills. -

- ) : ( -
-
- - setSkillQuery(event.target.value)} - placeholder="Filter skills" - spellCheck={false} - className="pl-8" - aria-label="Filter skills" - /> -
- {visibleSkills.length === 0 ? ( -

- No skills match “{skillQuery}”. +

+

Reported capabilities

+ {capabilities.length === 0 ? ( +

+ This agent did not report any capability flags.

) : ( -
- {visibleSkills.map((skill) => ( - +
+ {capabilities.map((capability) => ( + + {capability.label} + ))}
)}
- )} - - + + - }> - -

- Not yet reported. No driver publishes its connected MCP servers today; this section - fills in once they do. -

-
-
- + }> + + {description !== null && description.model === null ? ( +

+ This agent did not report a model. +

+ ) : ( +
+ + + + + +
+ )} +
+
+ + } + headerAction={ + skills.length > 0 ? ( + {skills.length} + ) : null + } + > + + {skills.length === 0 ? ( +

+ This agent did not report any skills. +

+ ) : ( +
+
+ + setSkillQuery(event.target.value)} + placeholder="Filter skills" + spellCheck={false} + className="pl-8" + aria-label="Filter skills" + /> +
+ {visibleSkills.length === 0 ? ( +

+ No skills match “{skillQuery}”. +

+ ) : ( +
+ {visibleSkills.map((skill) => ( + + ))} +
+ )} +
+ )} +
+
+ + }> + +

+ Not yet reported. No driver publishes its connected MCP servers today; this section + fills in once they do. +

+
+
+ +
); }