Skip to content

feat: Chat API and design refinements - #10577

Open
devongovett wants to merge 15 commits into
mainfrom
chat-refinement
Open

devongovett wants to merge 15 commits into
mainfrom
chat-refinement

Conversation

@devongovett

@devongovett devongovett commented Sep 4, 2026 •

Copy link
Copy Markdown
Member
  • Adjusts spacing to match design specs
  • Adds scroll fade on the thread
  • Moves some styles from the stories into the Chat/Thread components and generally simplifies the API
  • update docs

TODO:

  • look at inline TODO comments in code, mostly API questions
    • Should the scroll button be optional? ans: no (for now at least)
    • Auto-wrap ThreadItem? ans: yes but if we auto-wrap it inside a ThreadItem but that means ThreadItem's own props like isStreaming, textValue, and id are no longer reachable unless we bring those props up to the UserMessage (and others) level. Might be weird to have ThreadItem specific props if the component is used standalone. So deferring for now until the ai components are more stable and we know which are going to be used standalone and which will be used inside Thread only. Allowing users to wrap them individually gives more flexibility for now
    • Allow users to configure the GridList styles in Thread? ans: Enforce it for now, add it to coworkers first and then maybe can determine what things might need to be configurable
  • decide if we want to have a "style-less" version as well
    • yes, will want a style-less version, team seems okay to defer this for now
  • Export scrollFade (Daniel P to do)

@rspbot

rspbot commented Sep 4, 2026

Copy link
Copy Markdown

@rspbot

rspbot commented Sep 9, 2026

Copy link
Copy Markdown

@rspbot

rspbot commented Sep 9, 2026

Copy link
Copy Markdown

@rspbot

rspbot commented Sep 10, 2026

Copy link
Copy Markdown

@rspbot

rspbot commented Sep 22, 2026

Copy link
Copy Markdown

@yihuiliao yihuiliao moved this from 🩺 To Triage to 🏗 In Progress in RSP Component Milestones Sep 22, 2026
@yihuiliao yihuiliao self-assigned this Sep 22, 2026
@yihuiliao
yihuiliao marked this pull request as ready for review September 24, 2026 22:04
@rspbot

rspbot commented Sep 24, 2026

Copy link
Copy Markdown

@LFDanLu LFDanLu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looks good for the most part, just some small things I noticed

import {DOMRef, forwardRefType, Node} from '@react-types/shared';
import {filterDOMProps} from 'react-aria/filterDOMProps';
import {focusRing, style, StyleString} from '@react-spectrum/s2/style' with {type: 'macro'};
// @ts-ignore

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

mega nit, this is misplaced now, but tbh the intl file imports not having these don't even fail lint

zIndex: 1
})}>
<ThreadScrollButton>
<ActionButton slot="scroll" aria-label="Scroll to bottom">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

needs localization

// TODO: for now we enforce this, but to be configurable?
style={
{
<div

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this outer div has the same styles as the div under it plus both add the user provided styles, is that intentional?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

hmmm i don't think that was intentional

Comment on lines +349 to +354
<ThreadScrollButton>
<ActionButton slot="scroll" aria-label="Scroll to bottom">
<ChevronDown />
</ActionButton>
</ThreadScrollButton>
</div>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

now that we provide this for the user, do we need to export/document the scroll button anymore?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

good point, probably not

@rspbot

rspbot commented Sep 25, 2026

Copy link
Copy Markdown

@LFDanLu LFDanLu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

pushed some small changes to remove extra instances of the scroll button, otherwise LGTM

@rspbot

rspbot commented Sep 25, 2026

Copy link
Copy Markdown

@rspbot

rspbot commented Sep 25, 2026

Copy link
Copy Markdown
## API Changes

@react-spectrum/ai

/@react-spectrum/ai:AttachmentGrid

-AttachmentGrid <T> {
-  align?: 'start' | 'center' | 'end' = 'start'
-  aria-describedby?: string
-  aria-details?: string
-  aria-label?: string
-  aria-labelledby?: string
-  children?: ReactNode | (T) => ReactNode
-  dependencies?: ReadonlyArray<any>
-  id?: string
-  items?: Iterable<T>
-  styles?: StyleString
-}

/@react-spectrum/ai:AttachmentGridItem

-AttachmentGridItem {
-  aria-describedby?: string
-  aria-details?: string
-  aria-label?: string
-  aria-labelledby?: string
-  children: ReactNode
-  id?: Key
-  isInvalid?: boolean
-  size?: 'XS' | 'S' | 'M' | 'L' | 'XL'
-  styles?: StyleString
-  textValue?: string
-  uploadProgress?: number
-}

/@react-spectrum/ai:ThreadScrollButton

-ThreadScrollButton {
-  children?: ReactNode
-}

/@react-spectrum/ai:AttachmentGridProps

-AttachmentGridProps <T> {
-  align?: 'start' | 'center' | 'end' = 'start'
-  aria-describedby?: string
-  aria-details?: string
-  aria-label?: string
-  aria-labelledby?: string
-  children?: ReactNode | (T) => ReactNode
-  dependencies?: ReadonlyArray<any>
-  id?: string
-  items?: Iterable<T>
-  styles?: StyleString
-}

/@react-spectrum/ai:AttachmentGridItemProps

-AttachmentGridItemProps {
-  aria-describedby?: string
-  aria-details?: string
-  aria-label?: string
-  aria-labelledby?: string
-  children: ReactNode
-  id?: Key
-  isInvalid?: boolean
-  size?: 'XS' | 'S' | 'M' | 'L' | 'XL'
-  styles?: StyleString
-  textValue?: string
-  uploadProgress?: number
-}

/@react-spectrum/ai:ThreadScrollButtonProps

-ThreadScrollButtonProps {
-  children?: ReactNode
-}

@rspbot

rspbot commented Sep 25, 2026

Copy link
Copy Markdown

Agent Skills Changes

Modified (9)
Install

React Spectrum S2:

npx skills add https://d1pzu54gtk2aed.cloudfront.net/pr/5ebd1884871d7c3dcb43f65e5af92de4d8c72692/

React Aria:

npx skills add https://d5iwopk28bdhl.cloudfront.net/pr/5ebd1884871d7c3dcb43f65e5af92de4d8c72692/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: 🏗 In Progress

Development

Successfully merging this pull request may close these issues.

4 participants