chore(foundry): improve sandbox impl + status pill (#252)

* Improve Daytona sandbox provisioning and frontend UI

Refactor git clone script in Daytona provider to use cleaner shell logic for GitHub token authentication and branch checkout. Add support for private repository clones with token-based auth. Improve Daytona provider error handling and git configuration setup.

Frontend improvements include enhanced dev panel, workspace dashboard, sidebar navigation, and UI components for better task/session management. Update interest manager and backend client to support improved session state handling.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* Add header status pill showing task/session/sandbox state

Surface aggregate status (error, provisioning, running, ready, no sandbox)
as a colored pill in the transcript panel header. Integrates task runtime
status, session status, and sandbox availability via the sandboxProcesses
interest topic so the pill accurately reflects unreachable sandboxes.

Includes mock tasks demonstrating error, provisioning, and running states,
unit tests for deriveHeaderStatus, and workspace-dashboard integration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
Nathan Flurry 2026-03-14 12:14:06 -07:00 committed by GitHub
parent 5a1b32a271
commit 70d31f819c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
82 changed files with 2625 additions and 4166 deletions

View file

@ -118,10 +118,21 @@ export const UnreadDot = memo(function UnreadDot() {
);
});
export const TaskIndicator = memo(function TaskIndicator({ isRunning, hasUnread, isDraft }: { isRunning: boolean; hasUnread: boolean; isDraft: boolean }) {
export const TaskIndicator = memo(function TaskIndicator({
isRunning,
isProvisioning,
hasUnread,
isDraft,
}: {
isRunning: boolean;
isProvisioning: boolean;
hasUnread: boolean;
isDraft: boolean;
}) {
const t = useFoundryTokens();
if (isRunning) return <SpinnerDot size={8} />;
if (isProvisioning) return <SpinnerDot size={8} />;
if (hasUnread) return <UnreadDot />;
if (isDraft) return <GitPullRequestDraft size={12} color={t.textSecondary} />;
return <GitPullRequest size={12} color={t.statusSuccess} />;
@ -173,8 +184,75 @@ export const AgentIcon = memo(function AgentIcon({ agent, size = 14 }: { agent:
}
});
export type HeaderStatusVariant = "error" | "warning" | "success" | "neutral";
export interface HeaderStatusInfo {
variant: HeaderStatusVariant;
label: string;
spinning: boolean;
tooltip?: string;
}
export const HeaderStatusPill = memo(function HeaderStatusPill({ status }: { status: HeaderStatusInfo }) {
const [css] = useStyletron();
const t = useFoundryTokens();
const colorMap: Record<HeaderStatusVariant, { bg: string; text: string; dot: string }> = {
error: { bg: `${t.statusError}18`, text: t.statusError, dot: t.statusError },
warning: { bg: `${t.statusWarning}18`, text: t.statusWarning, dot: t.statusWarning },
success: { bg: `${t.statusSuccess}18`, text: t.statusSuccess, dot: t.statusSuccess },
neutral: { bg: t.interactiveSubtle, text: t.textTertiary, dot: t.textTertiary },
};
const colors = colorMap[status.variant];
return (
<div
title={status.tooltip}
className={css({
display: "inline-flex",
alignItems: "center",
gap: "5px",
padding: "2px 8px",
borderRadius: "999px",
backgroundColor: colors.bg,
fontSize: "11px",
fontWeight: 500,
lineHeight: 1,
color: colors.text,
whiteSpace: "nowrap",
flexShrink: 0,
})}
>
{status.spinning ? (
<div
style={{
width: 8,
height: 8,
borderRadius: "50%",
border: `1.5px solid ${colors.dot}40`,
borderTopColor: colors.dot,
animation: "hf-spin 0.8s linear infinite",
flexShrink: 0,
}}
/>
) : (
<div
style={{
width: 6,
height: 6,
borderRadius: "50%",
backgroundColor: colors.dot,
flexShrink: 0,
}}
/>
)}
<span>{status.label}</span>
</div>
);
});
export const TabAvatar = memo(function TabAvatar({ tab }: { tab: AgentTab }) {
if (tab.status === "running") return <SpinnerDot size={8} />;
if (tab.status === "running" || tab.status === "pending_provision" || tab.status === "pending_session_create") return <SpinnerDot size={8} />;
if (tab.unread) return <UnreadDot />;
return <AgentIcon agent={tab.agent} size={13} />;
});