Skip to content

feat: make the chat composer resizable - #863

Merged
small-angel merged 7 commits into
alphaXiv:mainfrom
sBaydin:feat/resizable-composer
Nov 4, 2026
Merged

small-angel merged 7 commits into
alphaXiv:mainfrom
sBaydin:feat/resizable-composer

Conversation

@sBaydin

@sBaydin sBaydin commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Closes #645

Summary

  • Adds a drag handle above the chat composer for vertical resizing.
  • Keeps the current auto-growing behavior until the user resizes, then remembers the chosen height.
  • Supports keyboard resizing with the arrow keys, Home/double-click reset, and clamps the height to the chat pane.

Scope

  • UI-only change; no backend or protocol changes.
  • Adds the resize label and hint to all 10 locale catalogs.

Test plan

  • node scripts/check-i18n.mjs
  • node scripts/check-styles.mjs
  • tsr generate && tsc --noEmit
  • node --test --experimental-strip-types tests/*.test.mjs (590 passing)
  • vite build
  • cargo build --release --features desktop
  • Manual check in the local Linux desktop build: drag, keyboard, double-click reset, persistence

@greptile-apps

greptile-apps Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[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.

Findings

  1. P1 Saved height hides side chat ▶
  2. P2 Resize changes are silent ▶
Fix 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.

Summary

Adds a persistent, resizable chat composer.

  • Chat users can resize the composer and keep their preferred height.

Reviews (1) · Last reviewed commit: "feat: make the chat composer resizable" · Reviewed by Greptile

Comment thread ui/src/components/ChatPanel.tsx Resolved
Comment thread ui/src/components/ChatPanel.tsx Resolved
@sBaydin
sBaydin force-pushed the feat/resizable-composer branch from 9cce63e to d6f6653 Compare November 3, 2026 09:23
@small-angel

Copy link
Copy Markdown
Contributor

@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

@sBaydin

sBaydin commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor Author

@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.

@small-angel small-angel added the auto-merge Queue for automatic merge once all checks pass label Nov 4, 2026
@alphaxiv-bot alphaxiv-bot Bot removed the auto-merge Queue for automatic merge once all checks pass label Nov 4, 2026
@small-angel

Copy link
Copy Markdown
Contributor

oh the bot took off auto merge lol.

@small-angel
small-angel merged commit c5f9eb0 into alphaXiv:main Nov 4, 2026
9 checks passed
small-angel added a commit that referenced this pull request Nov 4, 2026
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
small-angel added a commit that referenced this pull request Nov 4, 2026
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
small-angel added a commit that referenced this pull request Nov 4, 2026
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
small-angel added a commit that referenced this pull request Nov 4, 2026
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
small-angel added a commit that referenced this pull request Nov 4, 2026
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
small-angel added a commit that referenced this pull request Nov 4, 2026
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
small-angel added a commit that referenced this pull request Nov 4, 2026
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
@myles332 myles332 mentioned this pull request Nov 6, 2026
3 of 5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow changing the size of the chat composer

2 participants