Skip to content

feat(ai): add F0AiProcessingOverlay#4533

Merged
warcos-fact merged 3 commits into
mainfrom
chop/ai-processing-overlay
Jun 23, 2026
Merged

feat(ai): add F0AiProcessingOverlay#4533
warcos-fact merged 3 commits into
mainfrom
chop/ai-processing-overlay

Conversation

@warcos-fact

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

Copy link
Copy Markdown
Contributor

Description

Adds F0AiProcessingOverlay, a floating "applying changes" affordance for the F0AiChat family: while active, it blurs and locks (pointer-events-none) the wrapped panel/canvas and floats a centered pill (the One icon + a status label) over it, signalling that the surface is being regenerated and shouldn't be edited. It lifts the existing survey form-builder pattern into a reusable component so any surface paired with the chat can use it.

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

Implementation details

  • feat: add F0AiProcessingOverlay (active, label, className, children) under sds/ai, exported from sds/ai/exports.ts
  • feat: add ai.applyingChanges ("Applying changes") default translation used as the pill's fallback label

Visual behaviour is covered by the component's usage in the co-creation stories.

ui

Breaking changes

None in practice. The api_breaking bot flags the new ai.applyingChanges translation key because TranslationsType requires every key, so a consumer who hand-authors a complete translation object from scratch would need to add it. This is intentional and the standard cost of any translatable string:

  • The component, its props, and exports are purely additive.
  • The idiomatic pattern ({ ...defaultTranslations, ...overrides }) auto-inherits the new English default, so the vast majority of consumers are unaffected.
  • Affected consumers fix it with a single line; the check is non-blocking, hence feat(ai): rather than feat!:.

Floating 'applying changes' pill that blurs and locks the wrapped
panel/canvas while the assistant regenerates it. Lifts the survey
form-builder affordance into the F0AiChat family.

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

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

✅ No New Circular Dependencies

No new circular dependencies detected. Current count: 0

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

🔍 Visual review for your branch is published 🔍

Here are the links to:

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

📦 Alpha Package Version Published

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

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

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

⚠️ Breaking public API changes (1)

These public exports were renamed/removed, or had a property/parameter removed, retyped, or newly required compared to main — that breaks consumers. Adding new exports or new optional props is always safe and is not flagged. If a breaking change is intentional, note it in the PR description and use a feat!:/BREAKING CHANGE commit so the release is a major bump.

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

🌐 Translations

  • ➕ Translation keys were added: ai.applyingChanges

    The translations dictionary is embedded in many public exports (buildTranslations, defaultTranslations, i18n props, …), so its changes are summarized here once instead of being flagged on every export. Consumers maintaining full translation objects must update them.

➕ Additive changes (safe) — 4
  • f0: F0AiProcessingOverlay, F0AiProcessingOverlayProps
  • ai: F0AiProcessingOverlay, F0AiProcessingOverlayProps

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for packages/react

Status Category Percentage Covered / Total
🔵 Lines 57.14% 17901 / 31327
🔵 Statements 56.31% 18658 / 33133
🔵 Functions 49.52% 4109 / 8297
🔵 Branches 50.02% 12747 / 25481
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/react/src/lib/providers/i18n/i18n-provider-defaults.ts 100% 100% 100% 100%
packages/react/src/sds/ai/exports.ts 100% 100% 100% 100%
packages/react/src/sds/ai/F0AiProcessingOverlay/F0AiProcessingOverlay.tsx 100% 79.16% 100% 100%
packages/react/src/sds/ai/F0AiProcessingOverlay/index.ts 100% 100% 100% 100%
Generated in workflow #15028 for commit d0149dd by the Vitest Coverage Report Action

warcos-fact and others added 2 commits June 22, 2026 16:16
Adds a standalone Storybook story (title AI/F0AiProcessingOverlay, autodocs)
so the component is browsable on its own, not just embedded in the co-creation
flow. Covers active, custom label, and inactive states over a sample panel.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ingOverlay

- a11y: gate the spinning icon, pill entrance, and blur transition on
  useReducedMotion() so reduced-motion users get a static affordance
- a11y: add role="status" + aria-live="polite" so the "Applying changes"
  state is announced to screen readers
- test: cover rendering, active/inactive pill, pointer-events lock, custom
  label, and the focus-drop effect (incl. skipping the one-ai-input chat field)

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

@developerdanx developerdanx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💪

@warcos-fact warcos-fact merged commit 69be359 into main Jun 23, 2026
24 checks passed
@warcos-fact warcos-fact deleted the chop/ai-processing-overlay branch June 23, 2026 13:55
@eliseo-juan eliseo-juan mentioned this pull request Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking changes feat react Changes affect packages/react

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants