Files
fusion/packages/dashboard/app/components/TaskPlannerChatTab.css
gsxdsm 51e389199a FN-7634: widen Planner Chat stop button to match send button
Fix the Planner Chat composer's streaming Stop button rendering narrower than the idle Send button by giving both variants a shared width floor.

- Declare a locally-scoped --chat-input-control-size on .task-planner-chat-composer (same formula as ChatView.css's .chat-input-row so the shared .chat-input-send/.chat-input-stop classes no longer read an undefined custom property and fall back to width: auto.
- Add a min-inline-size floor bound to that property on .task-planner-chat-send (present on both send and stop variants) so neither button renders narrower than the other on desktop.
- Add a regression test asserting the desktop control-size floor, the pre-existing mobile square sizing, and the FN-7594 stop-icon visibility contract.
- Add a changeset documenting the fix as a patch release.

Files changed:
 .changeset/fn-7634-planner-stop-button-width.md    |  7 +++++
 .../app/components/TaskPlannerChatTab.css          |  8 ++++++
 .../__tests__/TaskPlannerChatTab.test.tsx          | 33 ++++++++++++++++++++++
 3 files changed, 48 insertions(+)
EOF
)

Fusion-Task-Id: FN-7634

Fusion-Task-Lineage: e73c836f-3c2d-4871-ac93-fdf5e52de5f6

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-07 22:04:54 -07:00

298 lines
9.3 KiB
CSS

.task-planner-chat {
position: relative;
display: flex;
flex: 1 1 auto;
flex-direction: column;
gap: var(--space-md);
min-height: 0;
}
/*
FNXC:TaskDetailPlannerChat 2026-07-02-00:28:
Planner Chat should not render a redundant in-panel title/header. The transcript starts at the top of the chat area, the expand button floats over the view, and the planning model/provider icon appears only as a small empty-state affordance.
*/
.task-planner-chat-expand-toggle {
flex: 0 0 auto;
min-inline-size: calc(var(--space-2xl) - var(--space-xs));
min-block-size: calc(var(--space-2xl) - var(--space-xs));
padding: 0;
}
/*
FNXC:TaskDetailPlannerChat 2026-07-02-00:16:
Planner Chat expansion should use the same in-view floating affordance as Activity Live/Feed, not a header action that shifts layout. Anchor it to the chat panel so it remains visible while the transcript scrolls.
*/
.task-planner-chat-expand-toggle--overlay {
position: absolute;
top: var(--space-sm);
right: var(--space-sm);
z-index: 3;
background: var(--surface);
border-color: var(--border);
box-shadow: var(--shadow-sm);
}
.task-planner-chat-empty-model {
position: absolute;
top: 0;
left: 0;
display: inline-flex;
flex: 0 0 auto;
align-items: center;
justify-content: center;
inline-size: calc(var(--space-2xl) - var(--space-xs));
block-size: calc(var(--space-2xl) - var(--space-xs));
border: var(--btn-border-width) solid var(--border);
border-radius: var(--radius);
padding: 0;
color: var(--text-muted);
background: var(--surface-subtle);
}
.task-planner-chat-error {
border: var(--btn-border-width) solid var(--color-error);
border-radius: var(--radius-md);
padding: var(--space-sm) var(--space-md);
color: var(--color-error);
background: var(--surface-subtle);
}
.task-planner-chat-transcript {
flex: 1 1 auto;
min-height: 0;
overflow: auto;
display: flex;
flex-direction: column;
gap: var(--space-md);
border: var(--btn-border-width) solid var(--border);
border-radius: var(--radius-lg);
padding: var(--space-md);
background: var(--surface);
}
.task-planner-chat-state,
.task-planner-chat-empty {
display: flex;
align-items: center;
gap: var(--space-sm);
color: var(--text-muted);
text-align: center;
}
.task-planner-chat-state {
margin: auto;
}
.task-planner-chat-empty {
position: relative;
flex-direction: column;
width: 100%;
max-width: 42rem;
margin: 0 auto auto;
gap: var(--space-lg);
padding-top: var(--space-md);
}
/*
FNXC:TaskDetailPlannerChat 2026-07-02-00:41:
An empty Planner Chat transcript should enter at the top of the chat surface instead of auto-centering or inheriting the message auto-scroll-to-bottom behavior. Once real messages exist, message streaming still scrolls to the latest entry.
*/
.task-planner-chat-empty-copy {
display: flex;
flex-direction: column;
gap: var(--space-xs);
}
.task-planner-chat-empty-copy h5,
.task-planner-chat-empty-copy p {
margin: 0;
}
.task-planner-chat-empty-copy h5 {
color: var(--text);
font-size: var(--font-size-lg);
}
.task-planner-chat-starters {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: var(--space-sm);
width: 100%;
}
.task-planner-chat-starter {
align-items: flex-start;
justify-content: flex-start;
min-width: 0;
height: auto;
white-space: normal;
text-align: left;
}
.task-planner-chat-starter-label,
.task-planner-chat-starter-description {
display: block;
}
.task-planner-chat-starter-label {
color: var(--text);
font-weight: 600;
}
.task-planner-chat-starter-description {
margin-top: var(--space-xs);
color: var(--text-muted);
font-size: var(--font-size-xs);
line-height: var(--line-height-tight);
}
.task-planner-chat-steering-confirmation {
margin-top: var(--space-sm);
border: var(--btn-border-width) solid var(--color-success);
border-radius: var(--radius-md);
padding: var(--space-sm);
color: var(--text);
background: var(--surface);
}
.task-planner-chat-steering-confirmation--pending {
border-color: var(--color-warning);
}
.task-planner-chat-steering-confirmation--error {
border-color: var(--color-error);
color: var(--color-error);
}
.task-planner-chat-steering-confirmation strong,
.task-planner-chat-steering-confirmation p {
margin: 0;
}
.task-planner-chat-steering-confirmation p {
margin-top: var(--space-xs);
color: var(--text-muted);
}
.task-planner-chat .chat-question-response {
max-width: 100%;
overflow-wrap: anywhere;
}
/*
FNXC:TaskDetailPlannerChat 2026-06-30-00:00:
The Planner Chat composer should behave like a compact input/button row on desktop: match the textarea's default height to the Activity chat input and let flex wrapping, not a forced column, decide when the controls no longer fit inline.
FNXC:TaskDetailPlannerChat 2026-06-30-23:58:
Keep the composer outside the transcript scroller and make the panel fill the modal body. Loading, errors, starters, history, and streaming content scroll inside `.task-planner-chat-transcript`, while the input row remains pinned and reachable in normal and mobile-expanded detail layouts.
FNXC:TaskDetailPlannerChat 2026-06-30-20:06:
Planner Chat must keep visual height parity with Activity chat: desktop textareas use the Activity compact min-height token, and the stacked mobile composer switches to the Activity mobile touch-height token without hardcoded dimensions.
FNXC:TaskDetailPlannerChat 2026-07-01-23:54:
Mobile Planner Chat should match regular task chat: keep the composer as a single input row with a one-line textarea and a square send affordance on the right instead of stacking the labeled button below the input.
FNXC:TaskDetailPlannerChat 2026-07-07-00:00:
The Planner Chat streaming Stop button must occupy the same width footprint as the Send button it replaces (no shift/shrink on swap) and mirror the regular Chat view's stop-button sizing (`.chat-input-row`'s `--chat-input-control-size` in ChatView.css). The shared `.chat-input-send` / `.chat-input-stop` classes read that custom property from `.chat-input-row`, which the Planner composer never renders inside of, so the property was undefined here and `width` fell back to `auto`, sizing each button from its own content only. Declare the same control-size formula scoped to `.task-planner-chat-composer` and give `.task-planner-chat-send` (present on both the send and stop button variants) a matching `min-inline-size` floor so neither button can render narrower than the other on desktop, without touching ChatView.css's own token.
*/
.task-planner-chat-composer {
/* FN-7634: same formula as ChatView.css's `.chat-input-row { --chat-input-control-size: … }` so the Planner stop/send buttons share the regular Chat view's control-size floor. */
--chat-input-control-size: calc(var(--space-lg) * 2.5);
display: flex;
flex: 0 0 auto;
flex-wrap: wrap;
align-items: stretch;
gap: var(--space-sm);
}
.task-planner-chat-input {
box-sizing: border-box;
flex: 1 1 calc(var(--space-2xl) * 8);
min-width: min(100%, calc(var(--space-2xl) * 8));
height: calc(var(--space-2xl) + var(--space-sm));
min-height: calc(var(--space-2xl) + var(--space-sm));
max-height: var(--task-chat-composer-max-height, 40vh);
padding: var(--btn-padding);
resize: vertical;
}
.task-planner-chat-send {
flex: 0 0 auto;
min-block-size: calc(var(--space-2xl) + var(--space-sm));
/* FN-7634: floor both the Send and Stop button variants (both carry this class) at the same width so the streaming swap never narrows or widens the control. */
min-inline-size: var(--chat-input-control-size);
}
@media (max-width: 768px) {
.task-planner-chat {
min-height: 0;
}
.task-planner-chat-expand-toggle {
min-inline-size: var(--space-2xl);
min-block-size: var(--space-2xl);
}
.task-planner-chat-expand-toggle--overlay {
top: var(--space-sm);
right: var(--space-sm);
}
.task-planner-chat-composer {
flex-direction: row;
flex-wrap: nowrap;
align-items: flex-end;
gap: var(--space-xs);
}
.task-planner-chat-input {
flex: 1 1 auto;
min-width: 0;
height: calc(var(--space-2xl) + var(--space-lg));
min-height: calc(var(--space-2xl) + var(--space-lg));
max-height: calc(var(--space-2xl) + var(--space-lg));
resize: none;
}
.task-planner-chat-starters {
grid-template-columns: 1fr;
}
.task-planner-chat-send {
--btn-icon-size: calc(var(--space-2xl) + var(--space-sm));
flex: 0 0 auto;
justify-content: center;
inline-size: calc(var(--space-2xl) + var(--space-lg));
min-inline-size: calc(var(--space-2xl) + var(--space-lg));
block-size: calc(var(--space-2xl) + var(--space-lg));
min-block-size: calc(var(--space-2xl) + var(--space-lg));
padding: 0;
}
/*
FNXC:TaskDetailPlannerChat 2026-07-01-08:09:
Mobile Planner Chat hides compact action text labels, but the shared thinking/streaming stop affordance draws its icon with `.chat-input-stop-icon` on a span. Exclude that icon span so the stop button never becomes an empty-looking shell while preserving the first-tap send/stop button contract.
*/
.task-planner-chat-send span:not(.chat-input-stop-icon) {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0 0 0 0);
white-space: nowrap;
border: 0;
}
.task-planner-chat .chat-message {
max-width: 100%;
}
.task-planner-chat .chat-question-response {
margin-inline: 0;
}
}