Skip to content

Decide: should uploads attach auto-create a gallery per PR? (cap + lifecycle) #92

Description

@zachdunn

In plain terms

Decide whether uploads attach should automatically create (and keep in sync) a gallery for the PR or issue it targets, so every attached image gets a standalone item page (/g/<gallery>/<item>, added in #88) without any manual gallery step.

Why it's a decision, not just a feature

Auto-creating a gallery per PR collides with the current caps from the gallery contract: 100 galleries per workspace, 20 external references per gallery. At normal PR-creation rates a workspace burns through 100 galleries quickly, and today there is no archival or eviction story — deleted galleries break their public URLs.

Deciding this well probably means picking one of:

  • Raise or remove the per-workspace cap, possibly with a lifecycle policy (e.g. galleries linked to merged/closed PRs age out of the count, or become archivable without breaking URLs).
  • A dedicated lighter-weight mechanism for PR attachments that reuses gallery items/pages but doesn't count against the manual-gallery cap.
  • Keep it manual and improve the ergonomics instead (e.g. uploads gallery create --pr one-liner, or an attach --gallery opt-in flag) — cap pressure stays user-controlled.

Current state (post-#88)

  • attach uploads to stable gh/<owner>/<repo>/<kind>/<num>/ keys and embeds raw file URLs; those images link to themselves.
  • Galleries linked to a PR (manually, via gallery link) already surface in the managed comment with previews that deep-link to item pages.
  • The public gallery pages render connected work items, so the paging + issue-list experience exists — it's only reachable for images someone put in a gallery.

Acceptance criteria

  • Decision recorded (spec update) on auto-create vs opt-in vs manual-only, including the cap/lifecycle consequences
  • If any automation ships: attach is idempotent per PR (one gallery, re-runs sync items, no duplicates) and respects whatever cap policy is chosen
  • Managed comment behavior stays byte-stable for workspaces that don't use galleries

Depends on

Gallery caps/lifecycle thinking in #57; builds on #65, #66, #88.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions