Skip to content
Merged
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
68 changes: 64 additions & 4 deletions apps/app/src/components/promptbox/FollowUpPromptBox.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,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 @@ -317,6 +331,7 @@ const detachedWorktreeEnvironmentSummary: ReactNode = makeEnvironmentSummary({
status: "ready",
}),
host: localEnvironmentDisplayHost,
machineName: "Bersabel's MacBook Pro",
environmentCheckout: formatWorkspaceCheckoutDisplay({
checkout: {
kind: "detached",
Expand Down Expand Up @@ -842,6 +857,7 @@ function StackedCardsWithPillsRow() {
stack={contextBannerElement}
queuedMessages={queuedMessages}
contextWindowUsage={usage}
environmentSummary={remoteEnvironmentSummary}
/>
);
}
Expand All @@ -868,6 +884,7 @@ export function Overview() {
submitMode={{ kind: "queue", onStop: noop }}
threadRuntimeDisplayStatus="active"
contextWindowUsage={usage}
environmentSummary={worktreeEnvironmentSummary}
/>
</StoryRow>
<StoryRow
Expand All @@ -877,13 +894,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 @@ -904,6 +925,7 @@ export function Overview() {
isFollowUpSubmitting
threadRuntimeDisplayStatus="active"
initialMessage="And confirm the new env summary renders correctly."
environmentSummary={namedWorktreeEnvironmentSummary}
/>
</StoryRow>
<StoryRow
Expand All @@ -923,6 +945,7 @@ export function Overview() {
loadFailed: false,
},
}}
environmentSummary={unmanagedWorktreeEnvironmentSummary}
/>
</StoryRow>
<StoryRow
Expand All @@ -943,6 +966,7 @@ export function Overview() {
loadError: codexModelLoadError,
},
}}
environmentSummary={remoteEnvironmentSummary}
/>
</StoryRow>
<StoryRow label="no models" hint="locked provider with empty catalog">
Expand All @@ -960,6 +984,7 @@ export function Overview() {
loadError: null,
},
}}
environmentSummary={detachedWorktreeEnvironmentSummary}
/>
</StoryRow>
<StoryRow
Expand All @@ -971,10 +996,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 @@ -990,6 +1020,7 @@ export function Overview() {
providerId: "claude-code",
prompt: "inspect the failing command before making changes",
}}
environmentSummary={remoteEnvironmentSummary}
/>
</StoryRow>
<StoryRow
Expand Down Expand Up @@ -1022,6 +1053,7 @@ export function Overview() {
stack={contextBannerElement}
queuedMessages={queuedMessages}
contextWindowUsage={usage}
environmentSummary={namedWorktreeEnvironmentSummary}
/>
</StoryRow>
<StoryRow
Expand Down Expand Up @@ -1084,6 +1116,7 @@ export function Overview() {
execution={readOnlyExecution}
permission={readOnlyPermission}
readOnly
environmentSummary={remoteEnvironmentSummary}
/>
</StoryRow>
</StoryCard>
Expand Down Expand Up @@ -1130,7 +1163,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 @@ -1139,13 +1172,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