Files
fusion/packages/dashboard/app/components/ChatQuestionResponse.css
Fusion Agent 89427dab11 FN-076: disable chat textarea mouse resizing
Disable mouse-driven composer resizing while preserving automatic five-line sizing across chat surfaces.

- Remove pointer-based manual resize handling and related CSS affordances.
- Apply consistent autosizing and shrink-to-minimum behavior to all chat composers.
- Update regression coverage, documentation, and the published package changeset.

Files changed:
 .changeset/fn-076-removal.md                       |   7 ++
 docs/dashboard-guide.md                            |   6 +-
 .../app/components/ChatQuestionResponse.css        |   4 +-
 .../app/components/ChatQuestionResponse.tsx        |  23 ++--
 packages/dashboard/app/components/ChatView.css     |   8 +-
 packages/dashboard/app/components/ChatView.tsx     |  18 +--
 .../dashboard/app/components/ComposeChatPanel.css  |   4 +-
 .../dashboard/app/components/ComposeChatPanel.tsx  |  20 +++-
 .../app/components/StandardChatSurface.tsx         |  20 +++-
 packages/dashboard/app/components/TaskChatTab.css  |   4 +-
 packages/dashboard/app/components/TaskChatTab.tsx  |  12 +-
 .../app/components/TaskPlannerChatTab.css          |   4 +-
 .../app/components/TaskPlannerChatTab.tsx          |   8 +-
 .../__tests__/ChatQuestionResponse.test.tsx        |  38 ++++++
 .../__tests__/ChatView.autosize.test.tsx           |  26 ++--
 .../ChatView.chat-input-autosize.test.tsx          |  61 ++--------
 .../__tests__/ChatView.message-edit.test.tsx       |  10 ++
 .../components/__tests__/ComposeChatPanel.test.tsx |  25 ++++
 .../app/components/__tests__/TaskChatTab.test.tsx  |  13 +-
 .../__tests__/TaskPlannerChatTab.test.tsx          |  13 +-
 packages/dashboard/app/utils/chatInputAutosize.ts  | 132 ++-------------------
 21 files changed, 195 insertions(+), 261 deletions(-)

Fusion-Task-Id: FN-076
Fusion-Task-Lineage: d4580427-640b-41c1-b5d1-837da43c7438
Co-authored-by: Fusion <noreply@runfusion.ai>
2026-08-21 04:32:53 +00:00

233 lines
5.7 KiB
CSS

.chat-question-response {
display: flex;
flex-direction: column;
gap: var(--space-md);
margin-block: var(--space-sm);
padding: var(--space-md);
border: thin solid color-mix(in srgb, var(--accent) 28%, var(--border));
border-radius: var(--radius-lg);
background: color-mix(in srgb, var(--accent) 6%, var(--bg-secondary));
color: var(--text);
}
.chat-question-response--compact {
gap: var(--space-sm);
padding: var(--space-sm);
border-radius: var(--radius-md);
}
.chat-question-response__header,
.chat-question-response__actions {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-sm);
}
.chat-question-response__eyebrow,
.chat-question-response__answered-label,
.chat-question-response__submitted-label {
font-size: 0.75rem;
font-weight: 600;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--text-muted);
}
.chat-question-response__answered-label {
color: var(--color-success);
}
.chat-question-response__questions {
display: flex;
flex-direction: column;
gap: var(--space-md);
}
.chat-question-response__question {
display: flex;
flex-direction: column;
gap: var(--space-xs);
}
.chat-question-response__question-header {
margin: 0;
font-size: 0.875rem;
font-weight: 600;
color: var(--text-muted);
}
.chat-question-response__question-text {
margin: 0;
font-size: 1rem;
line-height: 1.3;
color: var(--text);
}
.chat-question-response--compact .chat-question-response__question-text {
font-size: 0.875rem;
}
.chat-question-response__description,
.chat-question-response__hint {
margin: 0;
font-size: 0.875rem;
line-height: 1.45;
color: var(--text-muted);
}
.chat-question-response__options,
.chat-question-response__confirm-group {
display: flex;
flex-direction: column;
gap: var(--space-xs);
margin-block-start: var(--space-xs);
}
.chat-question-response__confirm-group {
flex-direction: row;
flex-wrap: wrap;
}
.chat-question-response__option {
display: flex;
align-items: flex-start;
gap: var(--space-sm);
padding: var(--space-sm);
border: thin solid var(--border);
border-radius: var(--radius-md);
background: var(--card);
cursor: pointer;
transition: border-color var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast);
}
.chat-question-response__option:hover,
.chat-question-response__option--selected {
border-color: var(--accent);
background: color-mix(in srgb, var(--accent) 12%, var(--card));
}
/*
FNXC:ChatQuestionResponse 2026-07-05-00:00:
The confirm Yes/No buttons also carry the global `.btn` class, whose base
background and (especially) `.btn:hover` rule (specificity 0,2,0) visually
swamped the old single-class `.chat-question-response__confirm--selected`
rule (0,1,0), so a clicked answer never looked selected. Use a compound
selector (`.chat-question-response__confirm.chat-question-response__confirm--selected`,
specificity 0,2,0) plus a dedicated `:hover` override so the selected state
beats `.btn`/`.btn:hover` in every interaction state, and keep everything
token-driven (`--cta-*` / `--accent` via color-mix) so light/dark themes and
the mobile column layout stay correct without hardcoded colors.
*/
.chat-question-response__confirm {
border-color: var(--border);
background: var(--card);
color: var(--text);
font-weight: 500;
}
.chat-question-response__confirm.chat-question-response__confirm--selected {
border-color: var(--cta-border);
background: color-mix(in srgb, var(--cta-bg) 55%, var(--card));
color: var(--cta-text);
font-weight: 700;
box-shadow: var(--cta-glow), inset 0 0 0 var(--btn-border-width) var(--cta-border);
}
.chat-question-response__confirm.chat-question-response__confirm--selected:hover {
background: color-mix(in srgb, var(--cta-bg-hover) 60%, var(--card));
border-color: var(--cta-border-hover);
color: var(--cta-text);
}
.chat-question-response__confirm.chat-question-response__confirm--selected:focus-visible {
box-shadow: var(--focus-ring-strong), var(--cta-glow);
}
.chat-question-response__option input {
margin: calc(var(--space-xs) / 2) 0 0;
accent-color: var(--accent);
}
.chat-question-response__option-content {
display: flex;
flex-direction: column;
gap: calc(var(--space-xs) / 2);
min-width: 0;
}
.chat-question-response__option-label {
font-size: 0.875rem;
font-weight: 600;
color: var(--text);
}
.chat-question-response__option-description {
font-size: 0.875rem;
line-height: 1.45;
color: var(--text-muted);
}
.chat-question-response__textarea {
width: 100%;
min-height: calc(var(--space-xl) * 3);
margin-block-start: var(--space-xs);
resize: none;
overflow-y: hidden;
max-height: none;
line-height: 1.45;
}
.chat-question-response__submit {
flex: 0 0 auto;
}
.chat-question-response__submitted {
display: flex;
flex-direction: column;
gap: var(--space-xs);
padding: var(--space-sm);
border: thin solid var(--border);
border-radius: var(--radius-md);
background: var(--card);
}
.chat-question-response__submitted pre {
margin: 0;
white-space: pre-wrap;
font-family: var(--font-mono);
font-size: 0.875rem;
line-height: 1.45;
color: var(--text);
}
.chat-question-response--compact .chat-question-response__actions {
align-items: stretch;
flex-direction: column;
}
.chat-question-response--compact .chat-question-response__submit {
width: 100%;
}
@media (max-width: 768px) {
.chat-question-response {
padding: var(--space-sm);
border-radius: var(--radius-md);
}
.chat-question-response__header,
.chat-question-response__actions {
align-items: stretch;
flex-direction: column;
}
.chat-question-response__confirm-group {
flex-direction: column;
}
.chat-question-response__submit {
width: 100%;
}
}