Skip to content

shift enter#74

Open
thinkter wants to merge 2 commits into
ACM-VIT:mainfrom
thinkter:hotfix/shiftenter
Open

shift enter#74
thinkter wants to merge 2 commits into
ACM-VIT:mainfrom
thinkter:hotfix/shiftenter

Conversation

@thinkter

Copy link
Copy Markdown
Contributor

shift enter in chat

@vercel

vercel Bot commented May 19, 2026

Copy link
Copy Markdown

@thinkter is attempting to deploy a commit to the Outreach - ACM Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps

greptile-apps Bot commented May 19, 2026

Copy link
Copy Markdown

Greptile Summary

This PR replaces the single-line <input type="text"> with an auto-resizing <textarea> in both the desktop and mobile chat panels, enabling multiline input via Shift+Enter while keeping plain Enter as the send action. Messages are also updated to render with whitespace-pre-wrap so stored newlines display correctly.

  • Input → textarea: Both panels swap <input> for <textarea rows={1}> with resize-none, a min-h floor, and a max-h cap; a useEffect driven by the input value resets height to auto then expands to scrollHeight, switching overflowY to auto only when content exceeds the CSS max-height.
  • Key handling: All Enter-to-submit paths are guarded with !e.shiftKey; the command-picker exact-match branch now calls handleSubmit(e) explicitly (previously it relied on the form's native submit from <input>, which textareas don't fire).
  • Message display: whitespace-pre-wrap is added to the message <p> element in both panels so characters saved in messages render as visible line breaks.

Confidence Score: 5/5

Safe to merge — the changes are self-contained UI enhancements with no impact on message persistence or networking.

Both panels convert input to textarea in a consistent, parallel way. The auto-resize logic correctly handles the max-height CSS constraint via the scrollHeight/clientHeight comparison, the Enter/Shift+Enter split is applied uniformly across all suggestion-picker branches, and the explicit handleSubmit call in the exact-match command branch correctly fills the gap left by switching away from a native-submit input. No regressions are evident in submit, autocomplete, or mention flows.

No files require special attention.

Important Files Changed

Filename Overview
apps/web/src/app/components/ChatPanel.tsx Converts single-line input to auto-resizing textarea; Shift+Enter inserts newlines, plain Enter submits; adds whitespace-pre-wrap for message rendering; auto-resize useEffect logic is correct.
apps/web/src/app/components/mobile/MobileChatPanel.tsx Mirrors desktop changes: input→textarea, auto-resize effect, Shift+Enter/Enter key split, whitespace-pre-wrap on messages, items-end alignment in the form footer.

Reviews (2): Last reviewed commit: "increase height of text box" | Re-trigger Greptile

Comment thread apps/web/src/app/components/ChatPanel.tsx
Comment thread apps/web/src/app/components/mobile/MobileChatPanel.tsx
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.

1 participant