Skip to content

feat(ai): add F0AiChatWelcomeCards#4534

Closed
warcos-fact wants to merge 1 commit into
chop/ai-processing-overlayfrom
chop/ai-chat-welcome-cards
Closed

feat(ai): add F0AiChatWelcomeCards#4534
warcos-fact wants to merge 1 commit into
chop/ai-processing-overlayfrom
chop/ai-chat-welcome-cards

Conversation

@warcos-fact

@warcos-fact warcos-fact commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Description

Adds F0AiChatWelcomeCards, a data-driven row of action/prompt cards shown below the F0AiChat welcome-screen composer (the chat footer slot), rendered with F0CardHorizontal. Two card kinds: prompt cards (a message sent to onSelect on click) and action cards (a custom onClick, which takes precedence). Runtime-agnostic — the caller supplies the cards and decides what onSelect does.

Extracted from the co-creation patterns PR (#4307) so it can be reviewed on its own.

Stacked on top of #4533 (chop/ai-processing-overlay); review that first.

Implementation details

  • feat: add F0AiChatWelcomeCards + F0AiChatWelcomeCard type under sds/ai, exported from sds/ai/exports.ts
  • test: unit tests covering prompt-card onSelect, action-card onClick precedence, and rendering
suggestions

Data-driven action/prompt cards shown below the F0AiChat welcome-screen
composer (the chat footer slot), rendered with F0CardHorizontal. Prompt
cards call onSelect with their message; action cards run a custom onClick.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@warcos-fact warcos-fact requested a review from a team as a code owner June 22, 2026 11:37
@github-actions github-actions Bot added the feat label Jun 22, 2026
@github-actions github-actions Bot added the react Changes affect packages/react label Jun 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📦 Alpha Package Version Published

Use pnpm i github:factorialco/f0#npm/alpha-pr-4534 to install the package

Use pnpm i github:factorialco/f0#f8fa866c7eeefd58974b7f9c84dad3ca89970d89 to install this specific commit

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Visual review for your branch is published 🔍

Here are the links to:

@github-actions

Copy link
Copy Markdown
Contributor

Coverage Report for packages/react

Status Category Percentage Covered / Total
🔵 Lines 56.27% 17359 / 30848
🔵 Statements 55.45% 18079 / 32602
🔵 Functions 48.5% 3952 / 8147
🔵 Branches 49.21% 12409 / 25213
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/react/src/sds/ai/exports.ts 100% 100% 100% 100%
packages/react/src/sds/ai/F0AiChatWelcomeCards/F0AiChatWelcomeCards.tsx 100% 75% 100% 100%
packages/react/src/sds/ai/F0AiChatWelcomeCards/index.ts 100% 100% 100% 100%
Generated in workflow #14986 for commit 7925910 by the Vitest Coverage Report Action

@warcos-fact

Copy link
Copy Markdown
Contributor Author

Superseded by #4549, which combines this with #4537 and bakes the welcome cards into F0AiChat as a data-driven welcomeScreenCards prop (symmetric with welcomeScreenSuggestions), dropping the standalone F0AiChatWelcomeCards component. Closing in favor of #4549.

warcos-fact added a commit that referenced this pull request Jun 22, 2026
Bake the welcome-cards capability into F0AiChat as a data-driven
`welcomeScreenCards` prop (symmetric with `welcomeScreenSuggestions`),
rendered by an internal WelcomeScreenCardsRow — replacing the standalone
F0AiChatWelcomeCards component, which the consumer had to hand-wire through
the `footer` slot. Also always render the welcome suggestions row above the
composer so its popover opens upward instead of covering the input.

Combines and supersedes #4534 and #4537.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@warcos-fact

Copy link
Copy Markdown
Contributor Author

Superseded by #4550, which bakes this capability into F0AiChat as the native welcomeScreenCards prop instead of a standalone component. Closing in favour of that.

warcos-fact added a commit that referenced this pull request Jun 23, 2026
…mposer

Bake the welcome-cards capability into F0AiChat as a data-driven
welcomeScreenCards prop (symmetric with welcomeScreenSuggestions), rendered by
an internal WelcomeScreenCardsRow — capped at 4 (2x2 grid). Replaces the
standalone F0AiChatWelcomeCards component the consumer had to hand-wire through
the footer slot. Also always render the welcome suggestions row above the
composer so its popover opens upward instead of covering the input.

Supersedes #4534 and #4537.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat react Changes affect packages/react

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant