List the open bot's recent sessions in the rail

Show the latest five sessions under the active bot, with All sessions opening the existing modal once there are more. Share the session modal, row and hook outside the conversation page, and mark the current session with a muted row.
This commit is contained in:
2026-10-19 17:27:57 +01:00
parent dbfe48796b
commit 53cf054d70
18 changed files with 236 additions and 39 deletions
+11 -5
View File
@@ -4,6 +4,7 @@ import { AppContext } from "@/src/pages/__root";
import canManageCrew from "@/src/utils/rbac/can-manage-crew";
import type { BotWithLastMessage, WorkspaceWithActivity } from "@/src/types";
import CoordinatorRow from "./coordinator-row";
import RailBotSessions from "./rail-bot-sessions";
import RailBotsSection from "./rail-bots-section";
import RailSectionAddButton from "./rail-section-add-button";
import RailWorkspacesSection from "./rail-workspaces-section";
@@ -27,11 +28,16 @@ export default function RailCrewList({ bots, workspaces, selected_id }: Props) {
return (
<>
{coordinator ? (
<CoordinatorRow
bot={coordinator}
bots={bots}
selected={coordinator.id === selected_id}
/>
<>
<CoordinatorRow
bot={coordinator}
bots={bots}
selected={coordinator.id === selected_id}
/>
{coordinator.id === selected_id ? (
<RailBotSessions key={coordinator.id} bot={coordinator} />
) : null}
</>
) : null}
<RailBotsSection
action={<RailSectionAddButton title="Add a bot" onClick={() => openForm({ kind: "bot" })} />}