feat(ui/agents): add RightPanel with Git/Terminal tabs

Wraps GitTab and TerminalTab in an antd Tabs component. Defaults to
Git per the LIT-2881 layout.
This commit is contained in:
Ishaan Jaffer 2026-05-06 15:05:29 -07:00
parent cf7c3decba
commit 6727e5a862
No known key found for this signature in database

View file

@ -0,0 +1,49 @@
"use client";
/**
* RightPanel third pane in the session view, with Git/Terminal tabs.
*
* The Git tab needs both the active Run snapshot (branches, current PR)
* and live events (commits, pr_opened). The Terminal tab only needs
* terminal_chunk events.
*/
import { Tabs } from "antd";
import GitTab from "@/app/(dashboard)/agents/components/three-pane/git-tab";
import TerminalTab from "@/app/(dashboard)/agents/components/three-pane/terminal-tab";
import type { CloudAgentRun, CloudAgentRunEvent } from "@/types/cloud-agents";
interface RightPanelProps {
run: CloudAgentRun | null;
events: CloudAgentRunEvent[];
}
export default function RightPanel({ run, events }: RightPanelProps) {
return (
<Tabs
defaultActiveKey="git"
className="flex h-full flex-col"
data-testid="right-panel"
tabBarStyle={{ paddingLeft: 12, marginBottom: 0 }}
items={[
{
key: "git",
label: "Git",
children: (
<div className="h-[calc(100%-46px)]">
<GitTab run={run} events={events} />
</div>
),
},
{
key: "terminal",
label: "Terminal",
children: (
<div className="h-[calc(100%-46px)]">
<TerminalTab events={events} />
</div>
),
},
]}
/>
);
}