Skip to content

Add repeatable --attach flags for card and comment rich text#128

Merged
robzolkos merged 5 commits intomasterfrom
feature/attachment-ergonomics
Apr 13, 2026
Merged

Add repeatable --attach flags for card and comment rich text#128
robzolkos merged 5 commits intomasterfrom
feature/attachment-ergonomics

Conversation

@robzolkos
Copy link
Copy Markdown
Collaborator

@robzolkos robzolkos commented Apr 13, 2026

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 --attach flags 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

  • Added repeatable --attach PATH support to:
    • fizzy card create
    • fizzy card update
    • fizzy comment create
    • fizzy comment update
  • Added shared command helpers to:
    • resolve markdown/HTML content
    • validate attachment paths
    • upload files through the existing legacy upload flow
    • append inline attachment tags in the same order as the flags were passed
  • Made comment creation accept attachment-only content when --attach is provided
  • Preserved existing --image behavior for card header images
  • Preserved the advanced manual workflow using fizzy upload file plus explicit <action-text-attachment> tags
  • Updated help text and docs to clarify the simple --attach flow vs. manual placement flow
  • Added unit and e2e coverage for:
    • single attachment flows
    • multiple attachment ordering
    • attachment-only comments
    • file-based rich text content combined with --attach

Summary by cubic

Adds repeatable --attach PATH to card and comment create/update to upload files and append inline attachments in order. Improves markdown detection and preserves existing content when only --attach is passed.

  • New Features

    • Added --attach to fizzy card create/update and fizzy comment create/update; preserves flag order and allows attachment‑only comments.
    • Rich text now accepts markdown or HTML for --description, --description_file, --body, and --body_file, with better markdown detection (emphasis, lists).
    • Updates with only --attach fetch current HTML and append attachments, keeping existing descriptions/bodies intact.
    • Helpers handle content resolution, path validation, legacy upload, and appending <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 file clarifies it returns both signed_id (for --image) and attachable_sgid (when available).
  • Bug Fixes

    • Fixed variable shadowing in attach update paths to satisfy linting.

Written for commit 1d4c482. Summary will update on new commits.

Copilot AI review requested due to automatic review settings April 13, 2026 19:43
@github-actions github-actions bot added the enhancement New feature or request label Apr 13, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 12 files

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 --attach support for card create/update and comment 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.

@robzolkos
Copy link
Copy Markdown
Collaborator Author

Fixed — preserved existing rich text on attach-only updates and broadened markdown detection for common emphasis and list syntax.

Copilot AI review requested due to automatic review settings April 13, 2026 20:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Copilot AI review requested due to automatic review settings April 13, 2026 21:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@robzolkos robzolkos merged commit d1d4eb9 into master Apr 13, 2026
24 checks passed
@robzolkos robzolkos deleted the feature/attachment-ergonomics branch April 13, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants