a bot is a card, not a conversation in a list
it looked like the generic chat panel because it WAS one, and that leaks the implementation at exactly the wrong moment: a bot is a chat underneath, and nobody using this should have to hold that. the session list says "conversation, last touched" because that is what a conversation is. so it gets Command HQ's object instead — a card with a name, an id pill, rename and delete, selected ring, controls on hover. same arrangement: the whole card is the link with the buttons layered over it, so a click anywhere opens it and the controls still work. the pill is the first eight characters of the session, which is also what an @mention carries. that is the point rather than a coincidence — the thing shown on the card is the thing typed to reference it. the panel's own header picker is gone. the cards are the list, and a second picker in the panel bar is the same choice offered twice. command hq does not have one either. deleting the selected bot navigates back to /bots, or the route points at something that no longer exists and renders an empty chat. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Officer-Session: 656f5c85-e49a-4f1f-b9f3-042a04b4d043
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type { LayoutNode } from 'officerdev';
|
||||
import { WorkspaceView, ChatPanelWrapper, ChatHeader } from 'officerdev';
|
||||
import { WorkspaceView, ChatPanelWrapper } from 'officerdev';
|
||||
import { useParams } from 'react-router';
|
||||
import { useAuthoredLayout } from 'state/useAuthoredLayout';
|
||||
import { defaultLayout } from './defaultLayout';
|
||||
@@ -40,10 +40,6 @@ const BotsChat = ({ panelId }: { panelId: string }) => {
|
||||
);
|
||||
};
|
||||
|
||||
const BotsChatHeader = ({ panelId }: { panelId: string }) => (
|
||||
<ChatHeader panelId={panelId} chatContext={CHAT_CONTEXT} />
|
||||
);
|
||||
|
||||
export const BotsScreen = () => {
|
||||
const workspace = useAuthoredLayout('screens/bots', defaultLayout as LayoutNode);
|
||||
|
||||
@@ -54,7 +50,9 @@ export const BotsScreen = () => {
|
||||
appTypes={{ allowed: ['bots-list', 'bots-chat'], fallback: 'bots-chat' }}
|
||||
components={{
|
||||
'bots-list': BotsList,
|
||||
'bots-chat': { component: BotsChat, header: BotsChatHeader },
|
||||
// No header picker: the cards on the left are the list, and a second one in the panel bar would be
|
||||
// the same choice offered twice. Command HQ does not have one either, for the same reason.
|
||||
'bots-chat': BotsChat,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user