Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 67 additions & 4 deletions apps/app/src/components/promptbox/FollowUpPromptBox.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,20 @@ const remoteWorktreeEnvironmentSummary: ReactNode = makeEnvironmentSummary({
onCreateNewThreadInWorktree: noop,
});

const unmanagedWorktreeEnvironmentSummary: ReactNode = makeEnvironmentSummary({
environment: makeEnvironment({
name: "Linked review tree",
managed: false,
isWorktree: true,
workspaceProvisionType: "unmanaged",
status: "ready",
}),
host: localEnvironmentDisplayHost,
machineName: "Bersabel's MacBook Pro",
branchName: STORY_BRANCH_NAME,
onCreateNewThreadInWorktree: noop,
});

const namedWorktreeEnvironmentSummary: ReactNode = makeEnvironmentSummary({
environment: makeEnvironment({
name: "Design system polish",
Expand All @@ -329,6 +343,7 @@ const detachedWorktreeEnvironmentSummary: ReactNode = makeEnvironmentSummary({
status: "ready",
}),
host: localEnvironmentDisplayHost,
machineName: "Bersabel's MacBook Pro",
environmentCheckout: formatWorkspaceCheckoutDisplay({
checkout: {
kind: "detached",
Expand Down Expand Up @@ -883,6 +898,7 @@ function StackedCardsWithPillsRow() {
stack={contextBannerElement}
queuedMessages={queuedMessages}
contextWindowUsage={usage}
environmentSummary={remoteEnvironmentSummary}
/>
);
}
Expand All @@ -895,6 +911,9 @@ export function ControlEmphasis() {
);
}

// This catalog is intentionally mixed across direct/worktree and local/remote
// environments. Leaving every functional row on Row's local default hides the
// environment icon and label variants this overview is meant to expose.
export function Overview() {
return (
<StoryCard>
Expand All @@ -909,6 +928,7 @@ export function Overview() {
submitMode={{ kind: "queue", onStop: noop }}
threadRuntimeDisplayStatus="active"
contextWindowUsage={usage}
environmentSummary={worktreeEnvironmentSummary}
/>
</StoryRow>
<StoryRow
Expand All @@ -918,13 +938,17 @@ export function Overview() {
<Row
submitMode={{ kind: "stop-only", onStop: noop }}
threadRuntimeDisplayStatus="host-reconnecting"
environmentSummary={remoteEnvironmentSummary}
/>
</StoryRow>
<StoryRow
label="blocked: pending interaction"
hint="agent is waiting on a tool decision — composer locked"
>
<Row submitMode={{ kind: "blocked", reason: "pending-interaction" }} />
<Row
submitMode={{ kind: "blocked", reason: "pending-interaction" }}
environmentSummary={remoteWorktreeEnvironmentSummary}
/>
</StoryRow>
<StoryRow
label="stop-only: starting"
Expand All @@ -945,6 +969,7 @@ export function Overview() {
isFollowUpSubmitting
threadRuntimeDisplayStatus="active"
initialMessage="And confirm the new env summary renders correctly."
environmentSummary={namedWorktreeEnvironmentSummary}
/>
</StoryRow>
<StoryRow
Expand All @@ -964,6 +989,7 @@ export function Overview() {
loadFailed: false,
},
}}
environmentSummary={unmanagedWorktreeEnvironmentSummary}
/>
</StoryRow>
<StoryRow
Expand All @@ -984,6 +1010,7 @@ export function Overview() {
loadError: codexModelLoadError,
},
}}
environmentSummary={remoteEnvironmentSummary}
/>
</StoryRow>
<StoryRow label="no models" hint="locked provider with empty catalog">
Expand All @@ -1001,6 +1028,7 @@ export function Overview() {
loadError: null,
},
}}
environmentSummary={detachedWorktreeEnvironmentSummary}
/>
</StoryRow>
<StoryRow
Expand All @@ -1012,10 +1040,15 @@ export function Overview() {
threadRuntimeDisplayStatus="active"
queuedMessages={queuedMessages}
contextWindowUsage={usage}
environmentSummary={remoteWorktreeEnvironmentSummary}
/>
</StoryRow>
<StoryRow label="with promptbox context banner">
<Row submitMode={{ kind: "ready" }} stack={contextBannerElement} />
<Row
submitMode={{ kind: "ready" }}
stack={contextBannerElement}
environmentSummary={localEnvironmentSummary}
/>
</StoryRow>
<StoryRow
label="plan mode: permission locked"
Expand All @@ -1031,6 +1064,7 @@ export function Overview() {
providerId: "claude-code",
prompt: "inspect the failing command before making changes",
}}
environmentSummary={remoteEnvironmentSummary}
/>
</StoryRow>
<StoryRow
Expand Down Expand Up @@ -1063,6 +1097,7 @@ export function Overview() {
stack={contextBannerElement}
queuedMessages={queuedMessages}
contextWindowUsage={usage}
environmentSummary={namedWorktreeEnvironmentSummary}
/>
</StoryRow>
<StoryRow
Expand Down Expand Up @@ -1125,6 +1160,7 @@ export function Overview() {
execution={readOnlyExecution}
permission={readOnlyPermission}
readOnly
environmentSummary={remoteEnvironmentSummary}
/>
</StoryRow>
</StoryCard>
Expand Down Expand Up @@ -1171,7 +1207,7 @@ export function EnvironmentMatrix() {
</StoryRow>
<StoryRow
label="ready · local worktree"
hint="worktree icon · Local worktree tooltip"
hint="managed worktree · worktree icon · Local worktree tooltip"
>
<Row
submitMode={{ kind: "ready" }}
Expand All @@ -1180,13 +1216,40 @@ export function EnvironmentMatrix() {
</StoryRow>
<StoryRow
label="ready · remote worktree"
hint="worktree icon · Remote worktree tooltip"
hint="managed worktree · worktree icon · Remote worktree tooltip"
>
<Row
submitMode={{ kind: "ready" }}
environmentSummary={remoteWorktreeEnvironmentSummary}
/>
</StoryRow>
<StoryRow
label="ready · unmanaged worktree"
hint="linked worktree · same worktree icon; ownership is not encoded here"
>
<Row
submitMode={{ kind: "ready" }}
environmentSummary={unmanagedWorktreeEnvironmentSummary}
/>
</StoryRow>
<StoryRow
label="ready · named worktree"
hint="worktree icon · custom environment name"
>
<Row
submitMode={{ kind: "ready" }}
environmentSummary={namedWorktreeEnvironmentSummary}
/>
</StoryRow>
<StoryRow
label="ready · detached worktree"
hint="worktree icon · detached commit checkout"
>
<Row
submitMode={{ kind: "ready" }}
environmentSummary={detachedWorktreeEnvironmentSummary}
/>
</StoryRow>
<StoryRow
label="destroying / destroyed"
hint="composer hidden; lifecycle state remains in the context banner"
Expand Down
Loading