Skip to content

feat(design-system): add AI composer and compact card headers - #7533

Draft
mahanti wants to merge 1 commit into
codex/design-system-catalogfrom
codex/design-system-composer
Draft

feat(design-system): add AI composer and compact card headers#7533
mahanti wants to merge 1 commit into
codex/design-system-catalogfrom
codex/design-system-composer

Conversation

@mahanti

@mahanti mahanti commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

AI composer and compact card headers

The catalog had basic inputs but no reusable prompt composer. Adds AIComposer to @buzz/ui with 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-composer example 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 CardHeader to 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:

  • Production package/catalog builds and TypeScript pass.
  • Design-system formatting, token freshness, typography, APCA/control contrast, and all 8 token/schema/renderer tests pass.
  • All 26 Chromium tests pass, including both-theme accessibility, no external runtime requests, IME/modifier handling, send/stop, failed-send retry, attachments and limits, model selection, 390/884/1440px composer layouts, and card header spacing.
  • Repository-wide just ci passes the earlier gates, then stops in desktop-tauri-test on the existing buzz-terminal::lifecycle_tests::default_prog_child_observes_the_login_argv0 failure: the child does not report $0 within 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 dev and open /design/components#ai-composer on port 1430. The composer API and host responsibilities are documented in packages/ui/README.md.

Signed-off-by: Arjun Mahanti <arjun@squareup.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant