Add repeatable --attach flags for card and comment rich text#128
Add repeatable --attach flags for card and comment rich text#128
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a repeatable --attach PATH flag to the Fizzy CLI’s rich-text workflows so users can upload files and append inline <action-text-attachment> tags automatically when creating/updating cards and comments, while keeping the existing manual embed workflow available.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Changes:
- Add repeatable
--attachsupport forcard create/updateandcomment create/update, uploading via the legacy upload flow and appending inline attachment tags in flag order. - Introduce shared helpers for resolving rich-text input, validating attachment paths, uploading files, and appending tags.
- Update docs/help text and add unit + e2e coverage for single/multi attachment flows and attachment-only comment creation.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| skills/fizzy/SKILL.md | Updates skill guidance and examples to document --attach and the manual embedding option. |
| internal/commands/upload.go | Clarifies upload file output semantics for signed_id vs attachable_sgid. |
| internal/commands/mock_client_test.go | Extends mock client to support per-call upload responses for multi-attach tests. |
| internal/commands/inline_attachments.go | Adds helper functions for content resolution, attachment validation/upload, and tag appending. |
| internal/commands/inline_attachments_test.go | Unit tests for tag appending, upload ordering, missing-file errors, and missing attachable_sgid. |
| internal/commands/comment.go | Adds --attach support to comment create/update and allows attachment-only create. |
| internal/commands/comment_test.go | Adds tests for comment create/update attachment behavior and ordering. |
| internal/commands/card.go | Adds --attach support to card create/update description handling. |
| internal/commands/card_test.go | Adds tests for card create/update attachment behavior and ordering. |
| e2e/cli_tests/attachment_ergonomics_test.go | End-to-end coverage validating attach flows and downloadable attachments. |
| SURFACE.txt | Updates surfaced CLI flag inventory to include the new --attach flags. |
| README.md | Documents simple --attach usage vs manual placement workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Fixed — preserved existing rich text on attach-only updates and broadened markdown detection for common emphasis and list syntax. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
This makes inline attachments much easier to use in the CLI by turning a multi-step, low-level workflow into a one-step command. Instead of manually uploading files, extracting
attachable_sgid, and embedding<action-text-attachment>tags, users can now pass repeatable--attachflags when creating or updating cards and comments. This keeps the common case ergonomic while preserving the existing manual HTML workflow for exact attachment placement.What changed
--attach PATHsupport to:fizzy card createfizzy card updatefizzy comment createfizzy comment update--attachis provided--imagebehavior for card header imagesfizzy upload fileplus explicit<action-text-attachment>tags--attachflow vs. manual placement flow--attachSummary by cubic
Adds repeatable
--attach PATHtocardandcommentcreate/update to upload files and append inline attachments in order. Improves markdown detection and preserves existing content when only--attachis passed.New Features
--attachtofizzy card create/updateandfizzy comment create/update; preserves flag order and allows attachment‑only comments.--description,--description_file,--body, and--body_file, with better markdown detection (emphasis, lists).--attachfetch current HTML and append attachments, keeping existing descriptions/bodies intact.<action-text-attachment>tags; docs and help updated, plus unit/e2e tests for ordering, attachment‑only, file+attach, and show/download flows. Manual HTML embedding remains for precise placement;fizzy upload fileclarifies it returns bothsigned_id(for--image) andattachable_sgid(when available).Bug Fixes
Written for commit 1d4c482. Summary will update on new commits.