mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-10-08 03:10:26 +00:00
fix(web): keep terminal clear of steer bar
This commit is contained in:
parent
fe77c2a688
commit
bf6bd670ce
2 changed files with 11 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ import { describe, expect, test } from "bun:test";
|
|||
import {
|
||||
buildTerminalWebSocketUrl,
|
||||
parseTerminalServerMessage,
|
||||
TERMINAL_DOCK_CLEARANCE_CLASS,
|
||||
} from "./run-terminal";
|
||||
|
||||
function locationLike(url: string): Location {
|
||||
|
|
@ -31,4 +32,8 @@ describe("run terminal route helpers", () => {
|
|||
expect(parseTerminalServerMessage('{"type":"unknown"}')).toBeNull();
|
||||
expect(parseTerminalServerMessage("{")).toBeNull();
|
||||
});
|
||||
|
||||
test("reserves space above the run steering bar", () => {
|
||||
expect(TERMINAL_DOCK_CLEARANCE_CLASS).toContain("--fabro-interview-dock-clearance");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ import { apiData, humanInTheLoopApi } from "../lib/api-client";
|
|||
import { useRunState } from "../lib/queries";
|
||||
|
||||
export const handle = { wide: true, fullHeight: true };
|
||||
export const TERMINAL_DOCK_CLEARANCE_CLASS =
|
||||
"pb-[calc(1.5rem+var(--fabro-interview-dock-clearance,0px))]";
|
||||
|
||||
type ConnectionStatus = "connecting" | "ready" | "closed" | "error";
|
||||
|
||||
|
|
@ -249,7 +251,10 @@ export default function RunTerminal({ params }: { params: { id: string } }) {
|
|||
}, [connectionKey, params.id]);
|
||||
|
||||
return (
|
||||
<main className="flex h-full min-h-0 flex-col" aria-labelledby={terminalId}>
|
||||
<main
|
||||
className={`flex h-full min-h-0 flex-col ${TERMINAL_DOCK_CLEARANCE_CLASS}`}
|
||||
aria-labelledby={terminalId}
|
||||
>
|
||||
<div className="mb-3 flex shrink-0 flex-wrap items-center justify-between gap-3">
|
||||
<div className="min-w-0">
|
||||
<h2 id={terminalId} className="text-sm font-semibold text-fg">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue