Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions client/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Before editing host-app UI, read `../DESIGN.md` and the relevant rules in `../.a
## Entities

- **Workspace** — Top-level container. Has a name and contains widgets and a chat. One workspace is active at a time.
- **Widget** — A configurable card inside the workspace's main area. Displayed in a grid. When there are no widgets, the chat fills the whole panel.
- **Chat** — The agent conversation. Contains a scrollable message list and an input. Always lives in the panel. Two modes: sidebar (a bounded pane beside the widgets, or the full panel when there are no widgets) and floating (popover). Floating only applies when there are widgets and they need the room.
- **Widget** — A configurable card inside Overview. Displayed in a grid.
- **Chat** — The agent conversation. Contains a scrollable message list and an input. Available on Overview, Scratchpad, and views through a docked sidebar or floating popup.

## Conventions

Expand Down
9 changes: 3 additions & 6 deletions client/features/chat/ChatPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ type ChatPanelProps = {
// into the trailing assistant run so a thinking-only
// preview folds into the current tool group. See client/lib/preview-turn.ts.
previewTurn?: Turn | null
// Selected session id — used only as the scroll reset key (jump to bottom on
// session switch).
sessionId?: string | null
processing: boolean
composerBanner?: ComposerBanner
Expand All @@ -64,8 +62,7 @@ type ChatPanelProps = {
send: (text: string, options?: ChatSendOptions) => Promise<void>
stop: () => void
onNavigateFromWelcome: (destination: WelcomeDestination) => void
// Chat on a separate tab doesn't have a close button
onClose?: () => void
onClose: () => void
viewDraft?: ViewChatDraft
}

Expand Down Expand Up @@ -181,7 +178,7 @@ export function ChatPanel({
<div className="flex h-7 min-w-0 flex-1">
<ChatSelector className={cn('text-foreground', docked && 'text-muted-foreground')} />
</div>
{onClose && docked && (
{docked && (
<Tooltip>
<TooltipTrigger
render={
Expand All @@ -193,7 +190,7 @@ export function ChatPanel({
<TooltipContent>Undock chat</TooltipContent>
</Tooltip>
)}
{!viewDraft && onClose && !docked && (
{!viewDraft && !docked && (
<Button variant="ghost" size="icon-sm" onClick={onClose} aria-label="Close chat">
<IconX stroke={2} />
</Button>
Expand Down
8 changes: 1 addition & 7 deletions client/features/chat/sessions/ChatSelector.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,6 @@ describe('groupSessionsForTab', () => {
const groups = groupSessionsForTab(
[
...sessions,
{
sessionId: 'agent',
summary: 'Agent',
lastModified: now.getTime() - 4,
tabId: 'agent'
},
{
sessionId: 'older',
summary: 'Older',
Expand All @@ -119,7 +113,7 @@ describe('groupSessionsForTab', () => {
expect(
groups.map(group => [group.label, group.sessions.map(session => session.sessionId)])
).toEqual([
['Today', ['scratchpad', 'overview', 'generic', 'agent']],
['Today', ['scratchpad', 'overview', 'generic']],
['Yesterday', ['older']]
])
expect(sessions.map(session => session.sessionId)).toEqual([
Expand Down
2 changes: 1 addition & 1 deletion client/features/views/ViewManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type ViewManagerProps = {
views: CompiledView[]
// The view the active tab names, or null when another tab is on screen. The
// manager stays mounted either way — that is what makes coming back from the
// agent or Overview tab instant too.
// Overview or Scratchpad tab instant too.
activeViewId: string | null
// The active view's URL query params. Parked views retain their last values.
params: Record<string, string>
Expand Down
Loading
Loading