Repository navigation
fix(templates): six chat example blocks' copy, feedback and composer buttons respond - #12045
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 2fdc5ec |
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
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.tsxthe 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; inChatComposerDrawerWithProgress.tsxthe 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-54and:107-135,ChatComposerFullFeatured.tsx:58-60and:68-70,ChatComposerDrawerWithProgress.tsx:35-37and: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).
| HandThumbUpIcon, | ||
| HandThumbDownIcon, | ||
| } from '@heroicons/react/24/outline'; | ||
| import {useToast} from '@astryxdesign/core/Toast'; |
There was a problem hiding this comment.
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.
|
/approve-spec 480a21c |
There was a problem hiding this comment.
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 runsonClick={() => {}}, 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-54and:107-135,ChatComposerFullFeatured.tsx:58-60and:68-70,ChatComposerDrawerWithProgress.tsx:35-37and: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-blockingcomponentsUsednote). - File
ChatComposerDrawer/ChatComposerDrawerWithProgress.tsx: clear (non-blockingcomponentsUsednote). - File
ChatMessageBubble/ChatMessageBubbleCustomContent.tsx: clear (non-blockingcomponentsUsednote). - File
ChatMessageBubble/ChatMessageBubbleMetadata.tsx: clear (non-blockingcomponentsUsednote). - File
ChatMessageMetadata/ChatMessageMetadataFooter.tsx: clear (non-blockingcomponentsUsednote). - File
ChatMessageMetadata/ChatMessageMetadataShowcase.tsx: clear (non-blockingcomponentsUsednote).
|
/approve-spec 16a56a4 |
There was a problem hiding this comment.
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-54and:107-135,ChatComposerFullFeatured.tsx:58-60and:68-70,ChatComposerDrawerWithProgress.tsx:35-37and: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
MESSAGEequals 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-blockingcomponentsUsednote). - File
ChatComposerDrawer/ChatComposerDrawerWithProgress.tsx: clear (non-blockingcomponentsUsednote). - File
ChatMessageBubble/ChatMessageBubbleCustomContent.tsx: clear (non-blockingcomponentsUsednote). - File
ChatMessageBubble/ChatMessageBubbleMetadata.tsx: clear (non-blockingcomponentsUsednote). - File
ChatMessageMetadata/ChatMessageMetadataFooter.tsx: clear (non-blockingcomponentsUsednote). - File
ChatMessageMetadata/ChatMessageMetadataShowcase.tsx: clear (non-blockingcomponentsUsednote).
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):
useClipboardand shows "Copied" (or "Could not copy").Not changed: composers whose required
onSubmitis 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
Scope