Add a live chat-style task detail tab for following and steering active agent work. - Add TaskChatTab with grouped agent log bubbles, live-follow scrolling, and steering message composer. - Share chat input autosize helpers between ChatView and task chat. - Wire the Chat tab into task detail navigation with localized labels and regression coverage. Files changed: docs/dashboard-guide.md | 2 + .../dashboard/app/components/AgentLogViewer.tsx | 2 +- packages/dashboard/app/components/ChatView.tsx | 25 +- packages/dashboard/app/components/TaskChatTab.css | 193 ++++++++++++++ packages/dashboard/app/components/TaskChatTab.tsx | 276 +++++++++++++++++++++ .../dashboard/app/components/TaskDetailModal.tsx | 13 +- .../app/components/__tests__/TaskChatTab.test.tsx | 181 ++++++++++++++ .../TaskDetailModal.attachments-and-tabs.test.tsx | 19 +- .../TaskDetailModal.definition-actions.test.tsx | 104 ++++---- ...etailModal.responsive-and-dependencies.test.tsx | 2 +- packages/dashboard/app/utils/chatInputAutosize.ts | 18 ++ packages/i18n/locales/en/app.json | 1 + packages/i18n/locales/es/app.json | 1 + packages/i18n/locales/fr/app.json | 1 + packages/i18n/locales/ko/app.json | 1 + packages/i18n/locales/zh-CN/app.json | 1 + packages/i18n/locales/zh-TW/app.json | 1 + 17 files changed, 757 insertions(+), 84 deletions(-) Fusion-Task-Id: FN-6300 Fusion-Task-Lineage: 1eb8a17b-3ca5-4cba-81c6-ac7ccce0a113
19 lines
847 B
TypeScript
19 lines
847 B
TypeScript
// Keep a generous cap so pasted multi-paragraph text stays visible while
|
|
// still preventing the composer from overtaking the message pane on short viewports.
|
|
export const CHAT_INPUT_MAX_HEIGHT_PX = 640;
|
|
export const TABLET_INPUT_MAX_HEIGHT_PX = 200;
|
|
|
|
export function resolveChatInputOverflowY(
|
|
scrollHeight: number,
|
|
maxHeight: number = CHAT_INPUT_MAX_HEIGHT_PX,
|
|
): "auto" | "hidden" {
|
|
return scrollHeight > maxHeight ? "auto" : "hidden";
|
|
}
|
|
|
|
export function clampChatInputHeight(scrollHeight: number, maxHeight: number = CHAT_INPUT_MAX_HEIGHT_PX): number {
|
|
// Floor matches QuickChat (clampQuickChatInputHeight) and the CSS min-height,
|
|
// so a 0-scrollHeight measurement (e.g. before layout) still yields a
|
|
// sensible inline height instead of collapsing the composer to 0.
|
|
return Math.max(40, Math.min(scrollHeight, maxHeight));
|
|
}
|