checkpoint

⚒️ Generated with [Fabro](https://fabro.sh)
This commit is contained in:
Fabro 2026-05-26 22:57:06 -04:00
parent 7b161e9b08
commit 77024bed22
5 changed files with 569 additions and 146 deletions

584
run.json

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,104 @@
diff --git a/apps/fabro-web/app/components/floating-tooltip.tsx b/apps/fabro-web/app/components/floating-tooltip.tsx
index 50515fd8c..3ce087904 100644
--- a/apps/fabro-web/app/components/floating-tooltip.tsx
+++ b/apps/fabro-web/app/components/floating-tooltip.tsx
@@ -8,6 +8,7 @@ import {
import { createPortal } from "react-dom";
type FloatingTooltipPlacement = "top" | "bottom";
+type FloatingTooltipSize = { height: number; width: number };
const VIEWPORT_MARGIN = 12;
const OFFSET = 8;
@@ -39,10 +40,11 @@ function resolvePlacement(
function floatingStyle(
rect: DOMRect,
placement: FloatingTooltipPlacement,
- size: { height: number; width: number },
+ size: FloatingTooltipSize,
+ viewport: FloatingTooltipSize,
): CSSProperties {
- const viewportWidth = window.innerWidth;
- const viewportHeight = window.innerHeight;
+ const viewportWidth = viewport.width;
+ const viewportHeight = viewport.height;
const centerX = rect.left + rect.width / 2;
const availableWidth = Math.max(0, viewportWidth - VIEWPORT_MARGIN * 2);
const width = size.width > 0 ? Math.min(size.width, availableWidth) : 0;
@@ -77,6 +79,10 @@ function floatingStyle(
};
}
+function viewportSize(): FloatingTooltipSize {
+ return { height: window.innerHeight, width: window.innerWidth };
+}
+
export function FloatingTooltip({
rect,
placement,
@@ -90,6 +96,9 @@ export function FloatingTooltip({
}) {
const ref = useRef<HTMLDivElement>(null);
const [size, setSize] = useState({ height: 0, width: 0 });
+ const [viewport, setViewport] = useState<FloatingTooltipSize>(() =>
+ typeof window === "undefined" ? { height: 0, width: 0 } : viewportSize(),
+ );
useLayoutEffect(() => {
const node = ref.current;
@@ -103,17 +112,24 @@ export function FloatingTooltip({
: { height: next.height, width: next.width },
);
};
+ const updateViewport = () => {
+ const next = viewportSize();
+ setViewport((prev) =>
+ prev.height === next.height && prev.width === next.width ? prev : next,
+ );
+ };
updateSize();
+ updateViewport();
const resizeObserver =
typeof ResizeObserver === "undefined"
? null
: new ResizeObserver(updateSize);
resizeObserver?.observe(node);
- window.addEventListener("resize", updateSize);
+ window.addEventListener("resize", updateViewport);
return () => {
resizeObserver?.disconnect();
- window.removeEventListener("resize", updateSize);
+ window.removeEventListener("resize", updateViewport);
};
}, []);
@@ -123,7 +139,7 @@ export function FloatingTooltip({
<div
ref={ref}
role="tooltip"
- style={floatingStyle(rect, placement, size)}
+ style={floatingStyle(rect, placement, size, viewport)}
className={`pointer-events-none fixed z-50 ${className}`}
>
{children}
diff --git a/apps/fabro-web/app/routes/run-terminal.tsx b/apps/fabro-web/app/routes/run-terminal.tsx
index 78c7f42cf..0f7d66af9 100644
--- a/apps/fabro-web/app/routes/run-terminal.tsx
+++ b/apps/fabro-web/app/routes/run-terminal.tsx
@@ -1,4 +1,5 @@
import { useEffect } from "react";
+import { Toaster } from "sonner";
import TerminalView from "../components/terminal-view";
import { ToastProvider } from "../components/toast";
@@ -17,6 +18,9 @@ export default function RunTerminal({ params }: { params: { id: string } }) {
<div className="h-screen w-screen overflow-hidden">
<TerminalView runId={params.id} chromeless />
</div>
+ {typeof document !== "undefined" && (
+ <Toaster richColors position="bottom-right" />
+ )}
</ToastProvider>
);
}

View file

@ -0,0 +1,16 @@
Reviewed the overlay/toast changes and applied two cleanup fixes:
- `apps/fabro-web/app/components/floating-tooltip.tsx`
- Fixed resize behavior so viewport changes force a style recompute even when tooltip content size is unchanged.
- Removed direct `window.innerWidth/innerHeight` reads from style calculation and made viewport dimensions explicit state.
- `apps/fabro-web/app/routes/run-terminal.tsx`
- Mounted Sonner `<Toaster richColors position="bottom-right" />` for the standalone terminal route, since it sits outside `AppShell` where the global Toaster is mounted.
Verification run:
- `cd apps/fabro-web && bun run typecheck`
- `cd apps/fabro-web && bun test app/components/toast.test.tsx --isolate`
- `cd apps/fabro-web && bun run test` ✅ — 493 pass, 0 fail
Note: running raw `bun test` without the package scripts `--isolate` failed in unrelated shared-state tests; `bun run test` is the repos configured command and passes.

View file

@ -0,0 +1,6 @@
{
"outcome": "succeeded",
"notes": "Stage completed: simplify_gpt",
"failure_reason": null,
"timestamp": "2026-05-27T02:47:27.446567Z"
}

View file

@ -0,0 +1,5 @@
{
"script": "git fetch origin main 2>&1 && git merge --no-edit --no-stat origin/main 2>&1 && cargo +nightly-2026-04-14 fmt --all 2>&1 && cargo dev docs refresh 2>&1 && cargo +nightly-2026-04-14 fmt --check --all 2>&1 && { command -v rg >/dev/null 2>&1 || { echo 'rg is required for verify'; exit 127; }; } && ! rg -n 'AuthMode::Disabled|RunAuthMethod|RunSubjectProvenance|\\bActorRef\\b|\\bActorKind\\b|AuthenticatedSubject|AuthenticatedService|AuthorizeRunScoped|AuthorizeRunBlob|AuthorizeStageArtifact|AuthorizeCommandLog|auth_method\\s*==\\s*\"disabled\"' lib/crates apps lib/packages docs/public/api-reference/fabro-api.yaml 2>&1 && cargo +nightly-2026-04-14 clippy --workspace --all-targets -- -D warnings 2>&1 && cargo nextest run --workspace --status-level slow --profile ci 2>&1 && cargo dev docs check 2>&1 && bun install --frozen-lockfile 2>&1 && (cd apps/fabro-web && bun run typecheck) 2>&1 && (cd apps/fabro-web && bun run test) 2>&1 && (cd lib/packages/fabro-api-client && bun run typecheck) 2>&1 && cargo dev build -- -p fabro-cli --release 2>&1",
"command": "exec 2>&1\ngit fetch origin main 2>&1 && git merge --no-edit --no-stat origin/main 2>&1 && cargo +nightly-2026-04-14 fmt --all 2>&1 && cargo dev docs refresh 2>&1 && cargo +nightly-2026-04-14 fmt --check --all 2>&1 && { command -v rg >/dev/null 2>&1 || { echo 'rg is required for verify'; exit 127; }; } && ! rg -n 'AuthMode::Disabled|RunAuthMethod|RunSubjectProvenance|\\bActorRef\\b|\\bActorKind\\b|AuthenticatedSubject|AuthenticatedService|AuthorizeRunScoped|AuthorizeRunBlob|AuthorizeStageArtifact|AuthorizeCommandLog|auth_method\\s*==\\s*\"disabled\"' lib/crates apps lib/packages docs/public/api-reference/fabro-api.yaml 2>&1 && cargo +nightly-2026-04-14 clippy --workspace --all-targets -- -D warnings 2>&1 && cargo nextest run --workspace --status-level slow --profile ci 2>&1 && cargo dev docs check 2>&1 && bun install --frozen-lockfile 2>&1 && (cd apps/fabro-web && bun run typecheck) 2>&1 && (cd apps/fabro-web && bun run test) 2>&1 && (cd lib/packages/fabro-api-client && bun run typecheck) 2>&1 && cargo dev build -- -p fabro-cli --release 2>&1",
"language": "shell"
}