Skip to content

refactor(ai): welcome suggestions above the composer#4537

Closed
warcos-fact wants to merge 1 commit into
mainfrom
chop/textarea-suggestions-above
Closed

refactor(ai): welcome suggestions above the composer#4537
warcos-fact wants to merge 1 commit into
mainfrom
chop/textarea-suggestions-above

Conversation

@warcos-fact

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

Copy link
Copy Markdown
Contributor

Description

On the F0AiChat welcome screen, when the triggering team supplies welcomeScreenSuggestions, the suggestions row now sits above the composer in fullscreen too (previously it sat below in fullscreen, above in sidepanel). With the row above, the suggestion popover opens upward into empty space instead of covering the composer. When no suggestions are supplied the row simply doesn't render — unchanged.

Extracted from the co-creation patterns PR (#4307). Note: this changes existing fullscreen placement, so it's worth a design sign-off.

Implementation details

  • refactor: always render the welcome suggestions row above the textarea; drop the fullscreen "below" branch
  • refactor: WelcomeScreenSuggestionsRow popover defaults to opening upward (side="top"); "bottom" remains available
  • test: update the welcome-layout test to assert the row renders above the textarea in fullscreen
suggestions 2

When the triggering team supplies welcomeScreenSuggestions, render them
above the textarea in fullscreen too (previously below), so the popover
opens upward into empty space instead of covering the composer. No change
when no suggestions are supplied — the row simply doesn't render.

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 refactor react Changes affect packages/react labels Jun 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ No New Circular Dependencies

No new circular dependencies detected. Current count: 0

@github-actions

Copy link
Copy Markdown
Contributor

📦 Alpha Package Version Published

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

Use pnpm i github:factorialco/f0#a3ad72c2ed3a9212443e2b9f6f8318622e066e4c 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

✅ No breaking public API changes

No public exports were removed, renamed, or had existing props/types changed in a breaking way compared to main.

Comparing f0, experimental and ai against main. Adding components, types, or optional props is safe. This check is non-blocking.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage Report for packages/react

Status Category Percentage Covered / Total
🔵 Lines 56.28% 17353 / 30830
🔵 Statements 55.46% 18073 / 32583
🔵 Functions 48.49% 3948 / 8141
🔵 Branches 49.22% 12402 / 25194
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/react/src/sds/ai/F0AiChatTextArea/F0AiChatTextArea.tsx 86.56% 59.37% 80.76% 89.43% 45, 110-115, 233, 237, 268, 286-292, 298, 302-303, 467
packages/react/src/sds/ai/F0AiChatTextArea/components/WelcomeScreenSuggestionsRow.tsx 85.18% 78.57% 85.71% 91.3% 27, 70, 128
Generated in workflow #14989 for commit 146d36e by the Vitest Coverage Report Action

@warcos-fact

Copy link
Copy Markdown
Contributor Author

Superseded by #4549, which folds this suggestions-above change in alongside the native welcome cards (was #4534). 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

Folded into #4550 — the "suggestions above the composer" change ships alongside the native welcomeScreenCards work there.

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

react Changes affect packages/react refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant