Skip to content

ui: polish chat interface with centered empty state and smooth transitions#3

Merged
Orsso merged 3 commits into
mainfrom
ui/chat-polish
Mar 18, 2026
Merged

ui: polish chat interface with centered empty state and smooth transitions#3
Orsso merged 3 commits into
mainfrom
ui/chat-polish

Conversation

@Orsso

@Orsso Orsso commented Mar 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Centered empty state: BrandLogo hero + subtitle + prompt bar centered vertically when chat is empty, with smooth layoutId transition to bottom-docked prompt on first message
  • Skeleton shimmer loading: replaces static SVG spinner with animated skeleton chips that crossfade into real suggestions (via AnimatePresence mode="popLayout")
  • Streaming polish: inline CSS cursor (pseudo-element) eliminates the line-jump flash when streaming completes; entry animation skipped for messages transitioning from streaming to final render
  • Visual fixes: message bubble padding asymmetry (CSS specificity), double border on prompt bar, prompt focus border visibility, submit-only disable (textarea stays editable during streaming)
  • Scroll-to-bottom button: fade in/out with AnimatePresence

Files changed

File Change
page.tsx Restructured to dual-layout (centered empty / conversation), shared promptBar with layoutId, transition tracking refs
globals.css .streaming-cursor pseudo-element, .skeleton-shimmer animation, .prose-agent first/last-child margin fix
conversation.tsx Scroll button wrapped in AnimatePresence
message.tsx Removed broken Tailwind layer utilities for prose margin
prompt-input.tsx Neutralized InputGroup border/ring to avoid double border

Test plan

  • Empty chat: logo + subtitle + prompt centered, no flash on reload if suggestions already loaded
  • Send message: prompt bar slides smoothly from center to bottom
  • Streaming: inline cursor blinks, no layout jump when response completes
  • Skeleton → suggestions: smooth crossfade with stagger when analyzing finishes
  • Message bubbles: equal vertical padding (no asymmetry)
  • Prompt focus: single visible border on focus, matching rounded-xl
  • Scroll-to-bottom: fades in/out smoothly
  • Textarea stays editable during streaming, submit button disabled
  • Dark mode: verify all states render correctly

… visual fixes

- Centered layout with BrandLogo hero when chat is empty, prompt bar
  elevated inline instead of stuck at bottom
- Smooth layout transition (layoutId) when prompt slides from center
  to bottom on first message
- Skeleton shimmer placeholders during starter question loading,
  replacing the static SVG spinner
- Suggestion chips with Sparkles icons, hover effects, responsive grid
- Prompt bar: backdrop-blur, visible focus border, submit-only disable
  (textarea stays editable during streaming)
- Streaming cursor: inline CSS pseudo-element instead of block-level
  span (eliminates line-jump on stream completion)
- Fix message bubble padding asymmetry (CSS specificity: prose-agent
  margin rules moved out of Tailwind layers)
- Fix double border on prompt bar (InputGroup border/ring neutralized)
- Scroll-to-bottom button: AnimatePresence fade in/out
- Skip entry animation on messages transitioning from streaming to final

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b11bde032e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +171 to +175
<PromptInputTextarea
ref={textareaRef}
placeholder={placeholderText}
className="border-0 bg-transparent focus-visible:ring-0"
/>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep Enter available for drafting while submit is disabled

Leaving PromptInputTextarea enabled here makes the existing handleKeyDown logic in frontend/components/ai-elements/prompt-input.tsx user-visible: it calls e.preventDefault() before checking whether the submit button is disabled. During streaming or while follow-up questions are pending, pressing Enter in the now-editable composer drops the keystroke instead of inserting a newline, so users cannot draft multi-line follow-ups until the response finishes.

Useful? React with 👍 / 👎.

Adrien Reibel added 2 commits March 18, 2026 17:34
…fects)

- Replace ref-based streaming transition tracking with role-based
  approach: assistant messages never animate entry (they are either
  loaded from history or just streamed — both already visible)
- Convert wasAnalyzing ref to state using "set state during render"
  pattern (React 19 compliant, no effect needed)
Move preventDefault() after the disabled-button check so that
pressing Enter while streaming inserts a newline instead of
silently dropping the keystroke.
@Orsso
Orsso merged commit de269f4 into main Mar 18, 2026
6 checks passed
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