Repository navigation
feat: make the chat composer resizable - #863
Conversation
[Low impact] The changes affect the chat composer in the browser. Fix the restored-height overflow before merging; it can hide the side chat and its controls. FindingsFix with agent prompt### Issue 1
ui/src/components/ChatPanel.tsx:5061-5070
The saved height is not clamped when a composer mounts. Resize the main composer to 500px, then open a side chat in the half-height stacked pane. The side chat restores the same 500px height even though its pane is shorter. The composer cannot shrink, so it can hide the conversation and push its controls outside the pane. The `60vh` cap does not protect a half-height pane.
Clamp the height after mount and whenever the pane changes size, rather than only on `window.resize`.
### Issue 2
ui/src/components/ChatPanel.tsx:7464-7471
The new keyboard-adjustable `separator` exposes no current value or bounds. Screen-reader users can press the arrow keys, but cannot hear the resulting size or tell when they reach a limit. Add `aria-valuenow`, `aria-valuemin`, and `aria-valuemax`, keeping them aligned with the rendered height.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryAdds a persistent, resizable chat composer.
Reviews (1) · Last reviewed commit: "feat: make the chat composer resizable" · Reviewed by Greptile |
9cce63e to
d6f6653
Compare
|
@sBaydin do you reproduce the focus box for the bar being the entire width can you tune that to be custom to show the keyboard focus around the focus bar itself. if not ill send an image or just have ai fix it |
|
@paperclover Yeap reproducedit, the focus ring was on the full-width separator. Fixed focus now wraps the drag bar itself with a small offset ring. And also merged the latest and resolved the locale conflicts all checks pass. |
|
oh the bot took off auto merge lol. |
The composer is now a CodeMirror editor running a port of alphaXiv's markdown live preview: formatting renders in place and its marks reveal under the caret. Reveals wait for the mouse button to come up, so a drag selects the text it started on instead of chasing marks that appear under the pointer; a drag that covers a span's text then grows to take its marks. Colors come from the theme's syntax and link tokens, so both themes hold. /commands, @paths that exist in the checkout, and attachments render as atomic chips. Pasted, dropped and uploaded files are cited in the draft as [Image #n] / [PDF #n] at the caret; a send carries only the cited attachments, renumbered in order of mention, so deleting a chip deletes the attachment and the agent sees where each image belongs. This replaces the thumbnail row and the textarea mirror that painted skill chips. Below the box, a Knife-style bar: data sources and mode chips on the left; model, effort and permissions on the right. Effort and permissions split out of the old settings menu, and autonomy joins permissions as a second section. Claude's ultracode, xhigh plus dynamic workflows, toggles beneath the effort levels. The box grows to eight lines, then scrolls; its top edge drags to a remembered height, replacing the textarea resizer from #863 under the same storage keys. Assisted-by: claude-opus-5.5
The composer is now a CodeMirror editor running a port of alphaXiv's markdown live preview: formatting renders in place and its marks reveal under the caret. Reveals wait for the mouse button to come up, so a drag selects the text it started on instead of chasing marks that appear under the pointer; a drag that covers a span's text then grows to take its marks. Colors come from the theme's syntax and link tokens, so both themes hold. /commands, @paths that exist in the checkout, and attachments render as atomic chips. Pasted, dropped and uploaded files are cited in the draft as [Image #n] / [PDF #n] at the caret; a send carries only the cited attachments, renumbered in order of mention, so deleting a chip deletes the attachment and the agent sees where each image belongs. This replaces the thumbnail row and the textarea mirror that painted skill chips. Below the box, a Knife-style bar: data sources and mode chips on the left; model, effort and permissions on the right. Effort and permissions split out of the old settings menu, and autonomy joins permissions as a second section. Claude's ultracode, xhigh plus dynamic workflows, toggles beneath the effort levels. The box grows to eight lines, then scrolls; its top edge drags to a remembered height, replacing the textarea resizer from #863 under the same storage keys. Message refs (`msg_…`) paste into the draft as chips with the cited message's author and first words, and read as pills in sent messages. Copy link on a message puts its ref on the clipboard. A ref in the user's own message now expands for the agent like one an agent sends, so the agent reads the cited words instead of an id it cannot look up. Assisted-by: claude-opus-5.5
The composer is now a CodeMirror editor running a port of alphaXiv's markdown live preview: formatting renders in place and its marks reveal under the caret. Reveals wait for the mouse button to come up, so a drag selects the text it started on instead of chasing marks that appear under the pointer; a drag that covers a span's text then grows to take its marks. Colors come from the theme's syntax and link tokens, so both themes hold. /commands, @paths that exist in the checkout, and attachments render as atomic chips. Pasted, dropped and uploaded files are cited in the draft as [Image #n] / [PDF #n] at the caret; a send carries only the cited attachments, renumbered in order of mention, so deleting a chip deletes the attachment and the agent sees where each image belongs. This replaces the thumbnail row and the textarea mirror that painted skill chips. Below the box, a Knife-style bar: data sources and mode chips on the left; model, effort and permissions on the right. Effort and permissions split out of the old settings menu, and autonomy joins permissions as a second section. Claude's ultracode, xhigh plus dynamic workflows, toggles beneath the effort levels. The box grows to eight lines, then scrolls; its top edge drags to a remembered height, replacing the textarea resizer from #863 under the same storage keys. Message refs (`msg_…`) paste into the draft as chips with the cited message's author and first words, and read as pills in sent messages. Copy link on a message puts its ref on the clipboard. A ref in the user's own message now expands for the agent like one an agent sends, so the agent reads the cited words instead of an id it cannot look up. `@` opens one add-context menu: files, alphaXiv library papers and chats in the project. A paper enters the draft as a markdown link to its alphaXiv page and shows as a chip, as does one added from the library button, now beside data sources in the bar; a chat enters as its id. Assisted-by: claude-opus-5.5
The composer is now a CodeMirror editor running a port of alphaXiv's markdown live preview: formatting renders in place and its marks reveal under the caret. Reveals wait for the mouse button to come up, so a drag selects the text it started on instead of chasing marks that appear under the pointer; a drag that covers a span's text then grows to take its marks. Colors come from the theme's syntax and link tokens, so both themes hold. /commands, @paths that exist in the checkout, and attachments render as atomic chips. Pasted, dropped and uploaded files are cited in the draft as [Image #n] / [PDF #n] at the caret; a send carries only the cited attachments, renumbered in order of mention, so deleting a chip deletes the attachment and the agent sees where each image belongs. This replaces the thumbnail row and the textarea mirror that painted skill chips. Below the box, a Knife-style bar: data sources and mode chips on the left; model, effort and permissions on the right. Effort and permissions split out of the old settings menu, and autonomy joins permissions as a second section. Claude's ultracode, xhigh plus dynamic workflows, toggles beneath the effort levels. The box grows to eight lines, then scrolls; its top edge drags to a remembered height, replacing the textarea resizer from #863 under the same storage keys. Message refs (`msg_…`) paste into the draft as chips with the cited message's author and first words, and read as pills in sent messages. Copy link on a message puts its ref on the clipboard. A ref in the user's own message now expands for the agent like one an agent sends, so the agent reads the cited words instead of an id it cannot look up. `@` opens one add-context menu: files, alphaXiv library papers and chats in the project. A paper enters the draft as a markdown link to its alphaXiv page and shows as a chip, as does one added from the library button, now beside data sources in the bar; a chat enters as its id. Assisted-by: claude-opus-5.5
The composer is now a CodeMirror editor running a port of alphaXiv's markdown live preview: formatting renders in place and its marks reveal under the caret. Reveals wait for the mouse button to come up, so a drag selects the text it started on instead of chasing marks that appear under the pointer; a drag that covers a span's text then grows to take its marks. Colors come from the theme's syntax and link tokens, so both themes hold. /commands, @paths that exist in the checkout, and attachments render as atomic chips. Pasted, dropped and uploaded files are cited in the draft as [Image #n] / [PDF #n] at the caret; a send carries only the cited attachments, renumbered in order of mention, so deleting a chip deletes the attachment and the agent sees where each image belongs. This replaces the thumbnail row and the textarea mirror that painted skill chips. Below the box, a Knife-style bar: data sources and mode chips on the left; model, effort and permissions on the right. Effort and permissions split out of the old settings menu, and autonomy joins permissions as a second section. Claude's ultracode, xhigh plus dynamic workflows, toggles beneath the effort levels. The box grows to eight lines, then scrolls; its top edge drags to a remembered height, replacing the textarea resizer from #863 under the same storage keys. Message refs (`msg_…`) paste into the draft as chips with the cited message's author and first words, and read as pills in sent messages. Copy link on a message puts its ref on the clipboard. A ref in the user's own message now expands for the agent like one an agent sends, so the agent reads the cited words instead of an id it cannot look up. `@` opens one add-context menu: files, alphaXiv library papers and chats in the project. A paper enters the draft as a markdown link to its alphaXiv page and shows as a chip, as does one added from the library button, now beside data sources in the bar; a chat enters as its id. Assisted-by: claude-opus-5.5
The composer is now a CodeMirror editor running a port of alphaXiv's markdown live preview: formatting renders in place and its marks reveal under the caret. Reveals wait for the mouse button to come up, so a drag selects the text it started on instead of chasing marks that appear under the pointer; a drag that covers a span's text then grows to take its marks. Colors come from the theme's syntax and link tokens, so both themes hold. /commands, @paths that exist in the checkout, and attachments render as atomic chips. Pasted, dropped and uploaded files are cited in the draft as [Image #n] / [PDF #n] at the caret; a send carries only the cited attachments, renumbered in order of mention, so deleting a chip deletes the attachment and the agent sees where each image belongs. This replaces the thumbnail row and the textarea mirror that painted skill chips. Below the box, a Knife-style bar: data sources and mode chips on the left; model, effort and permissions on the right. Effort and permissions split out of the old settings menu, and autonomy joins permissions as a second section. Claude's ultracode, xhigh plus dynamic workflows, toggles beneath the effort levels. The box grows to eight lines, then scrolls; its top edge drags to a remembered height, replacing the textarea resizer from #863 under the same storage keys. Message refs (`msg_…`) paste into the draft as chips with the cited message's author and first words, and read as pills in sent messages. Copy link on a message puts its ref on the clipboard. A ref in the user's own message now expands for the agent like one an agent sends, so the agent reads the cited words instead of an id it cannot look up. `@` opens one add-context menu: files, alphaXiv library papers and chats in the project. A paper enters the draft as a markdown link to its alphaXiv page and shows as a chip, as does one added from the library button, now beside data sources in the bar; a chat enters as its id. Assisted-by: claude-opus-5.5
The composer was a plain textarea. Attachments sat in a thumbnail row, and skills were painted on by a mirror behind the text. It is now a CodeMirror markdown editor, using alphaXiv's live preview: formatting renders in place, and `/commands`, `@paths`, pasted images and PDFs, and message refs appear as inline chips. Model, effort and permissions sit in a compact bar under the box. A few behaviours to know about: - Formatting marks appear only once the mouse button comes up, so a drag doesn't chase them. - An image is sent only while its `[Image #n]` chip is still in the draft, numbered in the order the chips appear, so the agent sees where each image belongs. - Claude's `ultracode` is a toggle on top of XHigh effort. - It replaces the textarea resizer that #863 added, using the same storage keys. - `@` opens one add-context menu: files, alphaXiv library papers and chats in this project. A paper goes into the draft as a markdown link to its alphaXiv page and shows as a chip, as do papers added from the library button, which now sits in the bar beside data sources. A chat goes in as its id, which agents can `read`. - **Copy link** on a message copies its ref (`msg_…`). A pasted ref becomes a chip showing who wrote the message and its first words. Until now, a ref the user typed reached the agent as an id it couldn't look up; refs in the user's own messages now expand to the cited message, the same way refs in agents' messages do. Proved by driving the dev server in headless Chromium in light and dark themes (typing, chips, paste, drag-select, resize, menus, Copy link, the `@` menu, library papers, and each review fix). For the ref expansion, a fresh OpenCode chat was asked for the secret word in a ref to another chat's message; it answered without calling any tool, both as a new turn and when steered into a running Claude turn. Also ran `pnpm typecheck`, `lint:i18n`, `lint:styles` and `pnpm test` (624 pass), plus `cargo fmt`, `clippy` and `cargo test`. Reviewed with sol-loop: 3 rounds with gpt-6.1-sol. Sol verdict: approved in round 2; round 3's one finding (refs in steered messages) fixed as suggested Assisted-by: claude-opus-5.5 Assisted-by: gpt-6.1-sol
Closes #645
Summary
Scope
Test plan
node scripts/check-i18n.mjsnode scripts/check-styles.mjstsr generate && tsc --noEmitnode --test --experimental-strip-types tests/*.test.mjs(590 passing)vite buildcargo build --release --features desktop