feat(design-system): add AI composer and compact card headers - #7533
Draft
mahanti wants to merge 1 commit into
Draft
feat(design-system): add AI composer and compact card headers#7533mahanti wants to merge 1 commit into
mahanti wants to merge 1 commit into
Conversation
Signed-off-by: Arjun Mahanti <arjun@squareup.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI composer and compact card headers
The catalog had basic inputs but no reusable prompt composer. Adds
AIComposerto@buzz/uiwith a multiline controlled draft, context and attachment slots, model/permission controls, a voice callback, and send/stop states. Keyboard and pointer sends share one guarded path; Shift+Enter and IME composition stay editable, and rejected submissions retain the draft with an explicit retry message. Hosts own model execution, uploads, speech capture, and clearing after acceptance.The new
/design/components#ai-composerexample demonstrates attachment selection/removal, annotation context, generic model/policy choices, local transcript insertion, generation/stop, and a failed-send recovery path. It sends nothing to an AI service and accesses no microphone. The catalog now contains 55 examples.Adds
CardHeaderto keep titles and subtitles 8px apart without shrinking spacing between other card sections. New multiline height tokens bound the writing area. The composer toolbar stays on one row at the tested narrow widths, and typography, icons, colors, and controls reuse the open-source Buzz foundations.Stack 4 of 5: #7522 → #7523 → #7525 → this PR → #7535. Base:
codex/design-system-catalog. All remain draft.Validation:
just cipasses the earlier gates, then stops indesktop-tauri-teston the existingbuzz-terminal::lifecycle_tests::default_prog_child_observes_the_login_argv0failure: the child does not report$0within 10 seconds. It also reproduced before this PR; no terminal or Rust code changes here. Later repository-wide stages were not reached.Run
pnpm --filter buzz-desktop-next devand open/design/components#ai-composeron port 1430. The composer API and host responsibilities are documented inpackages/ui/README.md.