Skip to content

Richer Discord cards for share links - #1394

Merged
Zach Dunn (zachdunn) merged 3 commits into
mainfrom
claude/project-thread-q6g73x
Nov 6, 2026
Merged

Zach Dunn (zachdunn) merged 3 commits into
mainfrom
claude/project-thread-q6g73x

Conversation

@zachdunn

@zachdunn Zach Dunn (zachdunn) commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Requested by Zach · project thread

Discord has no unfurl API like Slack's chat.unfurl; it builds embeds from Open Graph tags plus the page's oEmbed link. Share pages already emit Discord-safe OG/Twitter tags (large image, inline og:video, PNG/JPEG card copies for AVIF/WebP, 2048-char URL cap, held/private files 404 so they fall back to the default card). What was missing compared with the Slack unfurl is the context line and facts, so this adds those without a bot:

  • File pages: og:description (and the page's meta description) now lead with the file's caption metadata, or the issue/PR title when there's no caption, then type · size · path (e.g. Saved settings toast / PNG · 182 KB · /settings). Before, every file used the fixed sentence "Public file hosted by uploads.sh.", which is now only the fallback. Gallery items already used their caption.
  • oEmbed: responses now include author_name/author_url for what the link belongs to. Discord renders this as a linked line above the title, matching the Slack subtitle:
    • file attached to a PR/issue → acme/app#42 linking to GitHub
    • live link item → the live link's title linking to /c/<id>
    • gallery item → the gallery title linking to /g/<id>

Data still comes only from the public read endpoints, so nothing appears that the share page itself doesn't show.

Testing

  • vitest for oembed, public-file, unfurl, and embed-player (new cases cover author fields, caption precedence, and the description).
  • pnpm --filter @uploads/web typecheck is clean.
  • Not yet checked in a real Discord client. Once this deploys, paste a PR-attached /f/ link in Discord. Discord caches embeds, so test with a link that hasn't been posted before.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KeLbkfdAHN8afAsFhmJWkd

File pages now describe the file the way the Slack unfurl does: the issue
or PR title, then type, size and path, instead of a fixed sentence. The
oEmbed response names what a link belongs to (the PR for a file, the live
link or gallery for an item) as author_name/author_url, which Discord
shows as a linked line above the title.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KeLbkfdAHN8afAsFhmJWkd
@changeset-bot

changeset-bot Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 0cd6612

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@zachdunn Zach Dunn (zachdunn) self-assigned this Nov 6, 2026
@uploads-sh

uploads-sh Bot commented Nov 6, 2026

Copy link
Copy Markdown

No uploads on this PR yet

This PR changes UI files (apps/web/src/pages/f/[workspace]/[...key].astro). Screenshots help reviewers see what changed.

  • From the CLI: uploads put before.png after.png --pr 1394
  • From an agent: ask it to attach screenshots with uploads.sh
  • By hand: drag images into the PR description and they're imported automatically
Tips for agents

Label each shot so reviewers know what they're seeing. Labels apply to every file in a call, so run one put per shot:

uploads put after.png --pr 1394 --meta path=/settings --state after --caption "Saved settings toast"
uploads put chat.png --pr 1394 --app ios --screen "Chat" --state after

No CLI? With the Uploads MCP, call sign_upload_url for files on disk (or put) with repo, pr: 1394 and the same screen, state and caption fields.

This comment updates with each upload, so you don't need to post the images yourself. A shot or two in the PR description is still welcome. Check what's attached with uploads list --pr 1394. More in the github-screenshots skill or the agent docs.

Workspace admins can turn this comment off in Settings → GitHub · docs

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one): 2

  • coderabbit:review
  • review
🚫 Excluded labels (none allowed): 1

  • wip

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 302b2e60-0e01-4f3f-8fd5-c059c29858ad

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@zachdunn
Zach Dunn (zachdunn) merged commit 9cfbdc3 into main Nov 6, 2026
4 checks passed
@zachdunn
Zach Dunn (zachdunn) deleted the claude/project-thread-q6g73x branch November 6, 2026 17:22
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.

2 participants