Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix(pipeline): render Verify-arc tooltip via portal so it escapes the scrolling button row's clip
[._.]/ Adam Eivy18ce15db93b4
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 6acb85a908..b2652727f9 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -32,4 +32,4 @@- **A TUI run whose model id is rejected by the backend now fails (and falls back) instead of returning a screen-scrape of the error.** When a Claude Code TUI run hit a non-recoverable model-id rejection — e.g. a bare Anthropic id like `claude-opus-4-8` passed to a Bedrock-backed Claude Code, which answers `API Error (…): 400 The provided model identifier is invalid` and suggests `global.anthropic.…` — the TUI just sat at an unanswered prompt. The one-shot runner saw output go idle, marked the run `success`, and (no `tui-response.txt` having been written) scraped the error *screen* and returned it as the model's "response." Downstream that surfaced as a baffling failure: AI manuscript Reformat reported `AI reformat changed the wording` (its integrity guard correctly rejecting the screen garbage), while other TUI-backed stages silently consumed the noise. The one-shot TUI runner now recognizes Claude Code's terminal model-id rejection (Bedrock 400 "model identifier is invalid" and Anthropic 404 `not_found_error`) and fails the run as `MODEL_NOT_FOUND`, so `runPromptThroughProvider` benches the provider and retries its configured fallback (e.g. `claude-code-tui` → `claude-code-bedrock`, whose Bedrock ids are valid) — turning a silent corruption into a transparent recovery, or, with no fallback, an actionable error. The check is line-anchored, requires the 400/404 to immediately follow the `API Error` prefix (so a retryable 429/500 Claude Code auto-retries is left alone), and is deliberately scoped to the one-shot runner — *not* the shared fallback detector the long-running agent spawn paths use, so an agent that merely echoes the error line in its own output (cat-ing a log, running the tests, investigating this very failure) can't have its run killed and misclassified. (`server/lib/aiToolkit/errorDetection.js`, `server/lib/tuiPromptRunner.js`)-- **The "Verify arc" hover tooltip on the series arc page no longer renders behind the nav.** The `VerifyScopeTooltip` panel in `ArcCanvas.jsx` was at `z-30`, which loses to the sidebar nav (`z-50`), so the tooltip's overflow was clipped under the nav. Bumped to `z-[60]` — the layer the app's other floating dropdowns use. (`client/src/components/pipeline/ArcCanvas.jsx`)+- **The "Verify arc" hover tooltip on the series arc page no longer renders clipped behind the nav and other cards.** The `VerifyScopeTooltip` panel sat in the arc-header's button row as an `absolute`-positioned child. That row scrolls horizontally (the "Derive from manuscript" button overflows on narrow widths), so its `overflow` clipped the popover and trapped it in an ancestor stacking context — no `z-index` could lift it above the sidebar nav or the cards below. Rewrote it as a portal-rendered (`createPortal` to `<body>`), `position: fixed` popover anchored below-right of its trigger via the live `getBoundingClientRect()`, so it floats above everything and is clamped on-screen on narrow viewports. (A prior pass bumped the z-index to `z-[60]`, which didn't help because the clip was an `overflow`/stacking-context problem, not a layering one.) `aria-describedby` wiring is preserved. (`client/src/components/pipeline/ArcCanvas.jsx`)diff --git a/client/src/components/pipeline/ArcCanvas.jsx b/client/src/components/pipeline/ArcCanvas.jsxindex 8dbe7bc0e2..56272efb0f 100644--- a/client/src/components/pipeline/ArcCanvas.jsx+++ b/client/src/components/pipeline/ArcCanvas.jsx@@ -24,6 +24,7 @@*/import { useCallback, useEffect, useMemo, useRef, useState } from 'react';+import { createPortal } from 'react-dom';import { Link } from 'react-router-dom';import {Plus, Trash2, Loader2, Sparkles, ShieldCheck, ChevronRight, ChevronDown,@@ -128,26 +129,53 @@ function VerifyScopeHint({ scope }) {);}-// Hover-revealed tooltip variant — anchors below a parent with the `group`-// class. Use this when the scope hint should sit on the button itself-// instead of taking up vertical space in the layout. The `id` is exposed so-// the triggering button can wire `aria-describedby` for screen readers.-function VerifyScopeTooltip({ scope, id }) {+// Hover-revealed tooltip variant — wraps its trigger and renders the popover+// through a portal to <body> with fixed positioning, anchored below-right of+// the trigger. The portal escapes the horizontally-scrolling button row's+// `overflow` clipping and any ancestor stacking context (a plain+// `absolute`/`z-index` popover got clipped and painted under the nav). The+// `id` is exposed so the trigger can wire `aria-describedby` for screen readers.+function VerifyScopeTooltip({ scope, id, children }) {+ const anchorRef = useRef(null);+ const [pos, setPos] = useState(null);++ const show = useCallback(() => {+ const el = anchorRef.current;+ if (!el) return;+ const r = el.getBoundingClientRect();+ setPos({ top: r.bottom + 8, right: Math.max(8, window.innerWidth - r.right) });+ }, []);+ const hide = useCallback(() => setPos(null), []);+return (<div- id={id}- role="tooltip"- className="absolute top-full right-0 mt-2 w-80 max-w-[calc(100vw-2rem)] bg-port-card border border-port-border rounded-lg shadow-lg p-3 z-[60] opacity-0 invisible group-hover:opacity-100 group-hover:visible group-focus-within:opacity-100 group-focus-within:visible transition-opacity pointer-events-none text-left normal-case tracking-normal"+ ref={anchorRef}+ className="relative"+ onMouseEnter={show}+ onMouseLeave={hide}+ onFocus={show}+ onBlur={hide}>- <p className="text-[10px] text-gray-300 font-medium mb-1 flex items-center gap-1">- <Info size={10} /> What this checks- </p>- <p className="text-[10px] text-gray-400 italic mb-2">{scope.depth}</p>- <ul className="list-disc pl-4 space-y-0.5 text-[10px] text-gray-400">- {scope.checks.map((c) => (- <li key={c}>{c}</li>- ))}- </ul>+ {children}+ {pos && createPortal(+ <div+ id={id}+ role="tooltip"+ style={{ position: 'fixed', top: pos.top, right: pos.right }}+ className="w-80 max-w-[calc(100vw-1rem)] bg-port-card border border-port-border rounded-lg shadow-lg p-3 z-[60] text-left normal-case tracking-normal pointer-events-none"+ >+ <p className="text-[10px] text-gray-300 font-medium mb-1 flex items-center gap-1">+ <Info size={10} /> What this checks+ </p>+ <p className="text-[10px] text-gray-400 italic mb-2">{scope.depth}</p>+ <ul className="list-disc pl-4 space-y-0.5 text-[10px] text-gray-400">+ {scope.checks.map((c) => (+ <li key={c}>{c}</li>+ ))}+ </ul>+ </div>,+ document.body,+ )}</div>);}@@ -763,7 +791,7 @@ function ArcHeader({ series, onSeriesUpdate, onIssuesUpdate, onFlushPending }) {{generateBtnLabel}</button>{hasGeneratedArc ? (- <div className="relative group">+ <VerifyScopeTooltip scope={VERIFY_ARC_SCOPE} id="verify-arc-scope-tooltip"><buttontype="button"onClick={runVerify}@@ -774,8 +802,7 @@ function ArcHeader({ series, onSeriesUpdate, onIssuesUpdate, onFlushPending }) {{running === 'verify' ? <Loader2 size={14} className="animate-spin" /> : <ShieldCheck size={14} />}Verify arc</button>- <VerifyScopeTooltip scope={VERIFY_ARC_SCOPE} id="verify-arc-scope-tooltip" />- </div>+ </VerifyScopeTooltip>) : null}<buttontype="button"