Skip to content

feat(conversation): add ConversationThread - #14

Closed
pratikbuilds wants to merge 1 commit into
conversation/11-mediafrom
conversation/14-conversation-thread
Closed

pratikbuilds wants to merge 1 commit into
conversation/11-mediafrom
conversation/14-conversation-thread

Conversation

@pratikbuilds

Copy link
Copy Markdown
Owner

ConversationThread renders a reply conversation headed by its parent message, with a divider counting the replies, built from the same parts as the main conversation through a render prop. Each thread has its own Conversation, so a reply settles at the top of its own log, and in a keep-mounted panel tab a thread keeps its place and the host's draft while the reader switches tabs. The thread's PromptInput sits below the log, and aria-label or aria-labelledby names the log.

Stacked on #13: review only this commit. Part of corbitsdev#94.

Notes for review

  • Props: parent, replies, renderMessage(message), sentId (this thread only), scrollPolicy (default settle), labels {log, replies(count)}; aria-label or aria-labelledby name the log; children (the thread's PromptInput) sit below the log. Stateless: no "use client".
  • A thread that is unmounted, or given no size while hidden, loses its place: use PanelContent keepMounted.

Verification

  • This commit passes bun run typecheck and bun run lint on its own (the stack is checked commit by commit).
  • At the top of the stack: bun run check, bun run build, bun run dep-guard, bun run contrast-test and bun run test:e2e (Playwright specs and the Storybook axe sweep in light and dark) pass.

Closes corbitsdev#108

ConversationThread renders a reply conversation headed by its parent
message, with a divider counting the replies, built from the same parts
as the main conversation through a render prop. Each thread has its own
Conversation, so a reply settles at the top of its own log, and in a
keep-mounted panel tab a thread keeps its place and the host's draft
while the reader switches tabs. The thread's PromptInput sits below the
log, and aria-label or aria-labelledby names the log.
@pratikbuilds

Copy link
Copy Markdown
Owner Author

Moved upstream: corbitsdev#126

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