Group the rail's open bot with its sessions

The active row and its session previews now share one highlighted card,
with a hairline thread from the bot's icon down to the last session.
This commit is contained in:
2026-10-19 18:33:46 +01:00
parent 4d5195447b
commit 0aad723a50
6 changed files with 65 additions and 17 deletions
+19 -4
View File
@@ -1,6 +1,8 @@
import type { BotWithLastMessage } from "@/src/types";
import BotRow from "./bot-row";
import RailBotCard from "./rail-bot-card";
import RailBotSessions from "./rail-bot-sessions";
import Divider from "@moduletrace/twui/layout/Divider";
type Props = {
bot: BotWithLastMessage;
@@ -12,11 +14,24 @@ type Props = {
/**
* A worker in the rail, and its sessions while it is the open conversation.
*/
export default function RailBotEntry({ bot, href, selected, workspace_id }: Props) {
export default function RailBotEntry({
bot,
href,
selected,
workspace_id,
}: Props) {
return (
<>
<RailBotCard selected={selected}>
<BotRow bot={bot} href={href} selected={selected} />
{selected ? <RailBotSessions key={bot.id} bot={bot} workspace_id={workspace_id} /> : null}
</>
{selected ? (
<>
<RailBotSessions
key={bot.id}
bot={bot}
workspace_id={workspace_id}
/>
</>
) : null}
</RailBotCard>
);
}