Skip to content

fix(templates): six chat example blocks' copy, feedback and composer buttons respond - #12045

Merged
josephfarina merged 3 commits into
mainfrom
josephfarina/block-controls-chat
Nov 16, 2026
Merged

josephfarina merged 3 commits into
mainfrom
josephfarina/block-controls-chat

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

What

In the chat example blocks (full-featured composer, composer drawer with progress, message bubble with custom content and with metadata, message metadata footer and showcase):

  • Copy copies the message text with Core's useClipboard and shows "Copied" (or "Could not copy").
  • Retry, Good response, Bad response, Mention, Attach and the report card show an honest "Demo: ... would ... here" toast instead of doing nothing.

Not changed: composers whose required onSubmit is a stub (that is where an app wires its own send), and the full-featured composer's microphone, model and settings menus and attachment remove buttons, and the drawer's remove buttons.

Why

Some controls in these example blocks did nothing when used. The controls listed above now do what they say or say plainly that the example stops there. Other controls in these blocks and in other blocks are unchanged. No props, API, layout or styling change.

Evidence

  • Pixel-identical at rest at 390 and 1280 px, with script on and off (full-page screenshots before and after, zero changed pixels); the toast appears only after a click.
  • Browser check: each changed control shows its note (Copy really copies).
  • Build replay over real build requests: no start, alternatives list or block list changes.
  • Typecheck (strict, no unused locals), lint and prettier pass.

Scope

  • Example blocks only; no component or API change.
  • Public text contains no internal context.

@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 16, 2026 10:48am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 16, 2026
@astracat-bot

astracat-bot Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 16, 2026, 11:05 AM UTC

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 2fdc5ec

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 480a21c

Storybook · Sandbox · built from this PR's head

Current run: The current CI run concluded cancelled. Current analysis is unavailable.


Generated by PR Enrichment workflow | View current CI run

@astracat-bot astracat-bot Bot 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.

Requesting changes: the new copy and demo-toast handlers work as described, and one sentence in the description overstates the change.

  • The description says each control that did nothing "now either does what it says or says plainly that the example stops there", but 16 controls in the composer blocks still do nothing (in ChatComposerFullFeatured.tsx the Microphone button at lines 118-124, the seven model and settings menu items at 94-97 and 110-112, and the five attachment remove buttons at 48-52; in ChatComposerDrawerWithProgress.tsx the three remove buttons at 22-24), so please narrow that sentence to the controls this pull request changes, as the changeset already does, or give those controls the same treatment.

Not blocking: each block now imports useToast from @astryxdesign/core/Toast, so add 'Toast' to componentsUsed in the six .doc.mjs files, as useToastHookUsage.doc.mjs does. The main CI workflow did not run on this head because CI was full; Lint and the CLI smoke test passed.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Changeset: Copy now copies the message and says so: verified (ChatMessageMetadataFooter.tsx:61-65, ChatMessageMetadataShowcase.tsx:93-99, ChatMessageBubbleMetadata.tsx:49-53; in the browser each writes exactly its bubble's text).
  • Changeset: Retry, the thumbs, Mention, Attach and the report card show a short demo note instead of doing nothing: verified (ChatMessageMetadataFooter.tsx:73-101, ChatMessageMetadataShowcase.tsx:50-54 and :107-135, ChatComposerFullFeatured.tsx:58-60 and :68-70, ChatComposerDrawerWithProgress.tsx:35-37 and :45-47, ChatMessageBubbleCustomContent.tsx:47-51; browser check).
  • Changeset: a patch release of the CLI: verified (only CLI template files change).
  • Description: the six named blocks are the ones changed: verified (six block files).
  • Description: Copy uses Core's useClipboard and shows Copied or Could not copy: verified.
  • Description: the other controls show a "Demo: ... would ... here" toast instead of doing nothing: verified.
  • Description: composers whose required onSubmit is a stub are unchanged: verified (ChatComposerDrawerWithProgress.tsx:19).
  • Description: these blocks rendered buttons and menu items that did nothing: verified on the base.
  • Description: each of them now does what it says or says the example stops there: false (16 controls in the two composer blocks still do nothing; finding above).
  • Description: no props, API, layout or styling change: verified (only handlers and a text constant change).
  • Description: pixel-identical at rest at 390 and 1280 px, with the toast only after a click: verified with script on (six blocks at 1280 px, three at 390 px); script off not reproduced.
  • Description: each changed control shows its note, and Copy really copies: notes verified for all eight probed controls; Copy writes the right text, but the headless browser refused the write, so only the "Could not copy" branch was seen.
  • Description: build replay unchanged: not reproduced; consistent, since no template doc, description or component list changes.
  • Description: strict typecheck with no unused locals, lint and Prettier pass: verified by running them on the changed files.
  • Description: example blocks only, no component or API change: verified.
  • Description: no internal context in public text: verified.
  • File .changeset/block-controls-chat.md: clear.
  • File ChatComposer/ChatComposerFullFeatured.tsx: its untouched Microphone button, menu items and remove buttons are the blocking finding; the changed handlers are clear.
  • File ChatComposerDrawer/ChatComposerDrawerWithProgress.tsx: its untouched remove buttons are part of the blocking finding; the changed handlers are clear.
  • File ChatMessageBubble/ChatMessageBubbleCustomContent.tsx: clear (non-blocking componentsUsed note).
  • File ChatMessageBubble/ChatMessageBubbleMetadata.tsx: clear (non-blocking componentsUsed note).
  • File ChatMessageMetadata/ChatMessageMetadataFooter.tsx: clear (non-blocking componentsUsed and length notes).
  • File ChatMessageMetadata/ChatMessageMetadataShowcase.tsx: clear (non-blocking componentsUsed note).

Automated review (maintainer link)

HandThumbUpIcon,
HandThumbDownIcon,
} from '@heroicons/react/24/outline';
import {useToast} from '@astryxdesign/core/Toast';

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.

Non-blocking: this block now uses Toast, so add 'Toast' to componentsUsed in ChatMessageMetadataFooter.doc.mjs, as useToastHookUsage.doc.mjs does for the same hook-only use; the other five changed blocks need the same line.

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 480a21c

@astracat-bot astracat-bot Bot 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.

Requesting changes: the copy and demo-toast handlers work as described, and the description now matches the change, but the changeset still claims one control that the pull request does not change.

  • Miss: the changeset says Attach in the chat example blocks shows a short demo note, but ChatComposerDrawerShowcase.tsx (lines 36-43) is a chat example block whose Attach still runs onClick={() => {}}, so give that button the same note or scope the changeset to the six blocks this pull request changes.

Not blocking: each block now imports useToast, so add 'Toast' to componentsUsed in the six .doc.mjs files. The main CI workflow did not run on this head because CI was full; Lint and the CLI smoke test passed.

Claims and files checked

Review mode: incremental; reason: none

  • Recipe unchanged since the last review: changed rules (0).
  • Changeset: a patch release of the CLI: verified (only CLI template files change).
  • Changeset: Copy in the chat example blocks copies the message and says so: verified (ChatMessageBubbleMetadata.tsx:49-53, ChatMessageMetadataFooter.tsx:61-65, ChatMessageMetadataShowcase.tsx:93-99; in Chromium each writes exactly its bubble's text and shows "Copied").
  • Changeset: Retry, the thumbs, Mention, Attach and the report card show a short demo note instead of doing nothing: false for Attach in ChatComposerDrawerShowcase.tsx:42 (finding above); verified for every control the pull request changes.
  • Description: in the six named blocks, Copy uses Core's clipboard hook and shows "Copied" or "Could not copy": verified (both branches seen in the browser).
  • Description: Retry, Good response, Bad response, Mention, Attach and the report card show a "Demo: … would … here" note: verified (ChatMessageMetadataFooter.tsx:73-101, ChatMessageMetadataShowcase.tsx:50-54 and :107-135, ChatComposerFullFeatured.tsx:58-60 and :68-70, ChatComposerDrawerWithProgress.tsx:35-37 and :45-47, ChatMessageBubbleCustomContent.tsx:47-51).
  • Description: stub submit handlers, the full-featured composer's microphone, model and settings menus and remove buttons, and the drawer's remove buttons are unchanged: verified (ChatComposerFullFeatured.tsx:48-52, :94-97, :110-112, :118-124; ChatComposerDrawerWithProgress.tsx:19, :22-24).
  • Description: other controls in these and other blocks are unchanged, with no props, API, layout or styling change: verified (only handlers, hooks and a text constant change).
  • Description: pixel-identical at rest at 390 and 1280 px, with the toast only after a click: verified with script on (seven blocks at 1280 px, three at 390 px); script off not reproduced.
  • Description: each changed control shows its note and Copy really copies: verified (12 controls probed).
  • Description: build replay unchanged: not reproduced; consistent, since no template doc or block list changes.
  • Description: strict typecheck with no unused locals, lint and Prettier pass: verified by running them on the changed files.
  • Description: example blocks only, no component or API change: verified.
  • Description: no internal context in public text: verified.
  • File .changeset/block-controls-chat.md: its Attach claim is the blocking finding.
  • File ChatComposer/ChatComposerFullFeatured.tsx: clear (non-blocking componentsUsed note).
  • File ChatComposerDrawer/ChatComposerDrawerWithProgress.tsx: clear (non-blocking componentsUsed note).
  • File ChatMessageBubble/ChatMessageBubbleCustomContent.tsx: clear (non-blocking componentsUsed note).
  • File ChatMessageBubble/ChatMessageBubbleMetadata.tsx: clear (non-blocking componentsUsed note).
  • File ChatMessageMetadata/ChatMessageMetadataFooter.tsx: clear (non-blocking componentsUsed note).
  • File ChatMessageMetadata/ChatMessageMetadataShowcase.tsx: clear (non-blocking componentsUsed note).

Automated review (maintainer link)

Comment thread .changeset/block-controls-chat.md Resolved
@josephfarina josephfarina changed the title fix(templates): chat blocks' copy and feedback buttons respond fix(templates): six chat example blocks' copy, feedback and composer buttons respond Nov 16, 2026
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 16a56a4

@astracat-bot astracat-bot Bot 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.

Approved pending CI: the main CI workflow has not finished on this head yet. The changeset now names the six blocks it changes, which resolves the earlier finding, and the copy and demo-toast handlers work as described.

Not blocking: each changed block now imports useToast, so consider adding 'Toast' to componentsUsed in the six .doc.mjs files, as the Toast examples do.

Claims and files checked

Review mode: incremental; reason: none

  • Recipe unchanged since the last review: changed rules (0).
  • Changeset: a patch release of the CLI: verified (only CLI template files change).
  • Changeset: in the six named blocks, Copy copies the message and says so: verified (ChatMessageBubbleMetadata.tsx:49-53, ChatMessageMetadataFooter.tsx:61-65, ChatMessageMetadataShowcase.tsx:93-99; in Chromium each writes its bubble's exact text and shows "Copied").
  • Changeset: Retry, the thumbs, Mention, Attach and the report card show a short demo note instead of doing nothing: verified (ChatMessageMetadataFooter.tsx:73-101, ChatMessageMetadataShowcase.tsx:50-54 and :107-135, ChatComposerFullFeatured.tsx:58-60 and :68-70, ChatComposerDrawerWithProgress.tsx:35-37 and :45-47, ChatMessageBubbleCustomContent.tsx:47-51).
  • Changeset: other chat examples are unchanged: verified (only the six block files change).
  • Changeset: the six blocks it names are the ones the pull request changes: verified.
  • Description: Copy uses Core's clipboard hook and shows "Copied" or "Could not copy": verified (both branches seen in Chromium).
  • Description: Retry, Good response, Bad response, Mention, Attach and the report card show a "Demo: … would … here" note: verified (same lines as above; each note seen in Chromium).
  • Description: stub submit handlers, the full-featured composer's microphone, model and settings menus and remove buttons, and the drawer's remove buttons are unchanged: verified (ChatComposerFullFeatured.tsx:48-52, :94-97, :110-112, :118-124; ChatComposerDrawerWithProgress.tsx:19, :22-24).
  • Description: other controls in these and other blocks are unchanged, with no props, API, layout or styling change: verified (only handlers, hooks and a text constant change).
  • Description: pixel-identical at rest at 390 and 1280 px, with the toast only after a click: verified with script on (nine rest pairs identical); with script off the rendered markup is unchanged, since only handlers change and each MESSAGE equals the old text.
  • Description: each changed control shows its note and Copy really copies: verified (12 of the 15 controls pressed in Chromium; the other three share the footer block's handler code).
  • Description: build replay shows no recommendation or block-list change: verified against the code (block search reads only the unchanged block docs, _gather-templates.mjs:69-80).
  • Description: strict typecheck with no unused locals, lint and Prettier pass: verified (no type error in the six blocks; ESLint and Prettier clean; the Lint workflow passed on this head).
  • Description: example blocks only, with no component or API change: verified.
  • Description: public text contains no internal context: verified.
  • File .changeset/block-controls-chat.md: clear.
  • File ChatComposer/ChatComposerFullFeatured.tsx: clear (non-blocking componentsUsed note).
  • File ChatComposerDrawer/ChatComposerDrawerWithProgress.tsx: clear (non-blocking componentsUsed note).
  • File ChatMessageBubble/ChatMessageBubbleCustomContent.tsx: clear (non-blocking componentsUsed note).
  • File ChatMessageBubble/ChatMessageBubbleMetadata.tsx: clear (non-blocking componentsUsed note).
  • File ChatMessageMetadata/ChatMessageMetadataFooter.tsx: clear (non-blocking componentsUsed note).
  • File ChatMessageMetadata/ChatMessageMetadataShowcase.tsx: clear (non-blocking componentsUsed note).

Automated review (maintainer link)

@josephfarina
josephfarina merged commit 312604a into main Nov 16, 2026
77 checks passed
@github-actions
github-actions Bot deleted the josephfarina/block-controls-chat branch November 17, 2026 06:03

This branch was successfully deployed

1 active deployment
Preview — 16a56a45 Deployed Nov 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant