Problem
The AI chat message composer (the input area at the bottom of the thread chat view) is too small for any prompt longer than two or three lines. Pasting a substantial prompt — a code snippet, a detailed specification, a multi-paragraph instruction — causes the editor to scroll internally rather than expanding to show the content. Users cannot see what they typed or verify the full paste without awkward scrolling inside a tiny 80 px box.
Affected surfaces:
- Blazor portal (
src/MeshWeaver.Blazor.Portal/Chat/ThreadChatView.razor, lines 848–858): MonacoEditorView is configured with Height="80px" and MaxHeight="200px". The component's AutomaticLayout = true only responds to external CSS container resizes — it does not expand the container based on content height. There is no onDidContentSizeChange listener in MonacoEditorView.razor.js. Content wraps and scrolls invisibly within the fixed 80 px box; the max-height: 80px rule on .input-container (ThreadChatView.razor.css line 207) additionally caps any attempt to grow via CSS.
- React client (
clients/react/src/controls/threadChat.tsx, lines 456–463): Textarea is rendered with resize="vertical" only — it has no auto-grow behaviour and no explicit initial height, rendering at the Fluent UI default (typically 2 rows).
The command-palette widget in the same Blazor file already uses max-height: min(440px, calc(100vh - 180px)) (ThreadChatView.razor.css line 566), which adapts to the viewport — the composer should follow the same pattern.
Expected behaviour
The composer input should auto-grow line by line as the user types or pastes content, expanding from a comfortable baseline (≈ 3–4 lines / 96 px) up to a viewport-relative ceiling such as min(440px, calc(100vh - 180px)), and then scroll internally once that ceiling is reached. Pasted content should never be clipped without the editor first expanding to show it.
Proposed fix
Blazor — three-file change:
src/MeshWeaver.Blazor.Portal/Chat/ThreadChatView.razor lines 854–855 — raise Height from "80px" to "96px" (≈ 4 lines) and MaxHeight from "200px" to "min(440px, calc(100vh - 180px))".
src/MeshWeaver.Blazor/Components/Monaco/MonacoEditorView.razor.js — add an editor.onDidContentSizeChange listener that reads editor.getContentHeight() and sets container.style.height = Math.min(contentHeight, maxHeightPx) + "px", so the container grows reactively with content up to the ceiling. maxHeightPx is derived from the MaxHeight CSS value resolved at mount time.
src/MeshWeaver.Blazor.Portal/Chat/ThreadChatView.razor.css line 207 — remove or raise the max-height: 80px rule on .input-container so the CSS does not override the JS-driven height.
React:
- Replace
resize="vertical" on the Fluent Textarea (clients/react/src/controls/threadChat.tsx line 463) with an onInput handler that sets element.style.height = "auto"; element.style.height = Math.min(element.scrollHeight, maxHeightPx) + "px" on each keystroke, up to the same min(440, calc(100vh - 180px)) ceiling.
- Set
rows={3} as the starting baseline.
Both changes are scoped to the existing MonacoEditorView and Textarea controls — no new control types or layout rewiring needed.
Acceptance criteria
Problem
The AI chat message composer (the input area at the bottom of the thread chat view) is too small for any prompt longer than two or three lines. Pasting a substantial prompt — a code snippet, a detailed specification, a multi-paragraph instruction — causes the editor to scroll internally rather than expanding to show the content. Users cannot see what they typed or verify the full paste without awkward scrolling inside a tiny 80 px box.
Affected surfaces:
src/MeshWeaver.Blazor.Portal/Chat/ThreadChatView.razor, lines 848–858):MonacoEditorViewis configured withHeight="80px"andMaxHeight="200px". The component'sAutomaticLayout = trueonly responds to external CSS container resizes — it does not expand the container based on content height. There is noonDidContentSizeChangelistener inMonacoEditorView.razor.js. Content wraps and scrolls invisibly within the fixed 80 px box; themax-height: 80pxrule on.input-container(ThreadChatView.razor.cssline 207) additionally caps any attempt to grow via CSS.clients/react/src/controls/threadChat.tsx, lines 456–463):Textareais rendered withresize="vertical"only — it has no auto-grow behaviour and no explicit initial height, rendering at the Fluent UI default (typically 2 rows).The command-palette widget in the same Blazor file already uses
max-height: min(440px, calc(100vh - 180px))(ThreadChatView.razor.cssline 566), which adapts to the viewport — the composer should follow the same pattern.Expected behaviour
The composer input should auto-grow line by line as the user types or pastes content, expanding from a comfortable baseline (≈ 3–4 lines / 96 px) up to a viewport-relative ceiling such as
min(440px, calc(100vh - 180px)), and then scroll internally once that ceiling is reached. Pasted content should never be clipped without the editor first expanding to show it.Proposed fix
Blazor — three-file change:
src/MeshWeaver.Blazor.Portal/Chat/ThreadChatView.razorlines 854–855 — raiseHeightfrom"80px"to"96px"(≈ 4 lines) andMaxHeightfrom"200px"to"min(440px, calc(100vh - 180px))".src/MeshWeaver.Blazor/Components/Monaco/MonacoEditorView.razor.js— add aneditor.onDidContentSizeChangelistener that readseditor.getContentHeight()and setscontainer.style.height = Math.min(contentHeight, maxHeightPx) + "px", so the container grows reactively with content up to the ceiling.maxHeightPxis derived from theMaxHeightCSS value resolved at mount time.src/MeshWeaver.Blazor.Portal/Chat/ThreadChatView.razor.cssline 207 — remove or raise themax-height: 80pxrule on.input-containerso the CSS does not override the JS-driven height.React:
resize="vertical"on the FluentTextarea(clients/react/src/controls/threadChat.tsxline 463) with anonInputhandler that setselement.style.height = "auto"; element.style.height = Math.min(element.scrollHeight, maxHeightPx) + "px"on each keystroke, up to the samemin(440, calc(100vh - 180px))ceiling.rows={3}as the starting baseline.Both changes are scoped to the existing
MonacoEditorViewandTextareacontrols — no new control types or layout rewiring needed.Acceptance criteria