Skip to content

feat(typefully): document link previews and add --hide-link-preview flag - #30

Merged
rajatkapoor merged 1 commit into
mainfrom
feat/typefully-hide-link-preview
Jul 27, 2026
Merged

feat(typefully): document link previews and add --hide-link-preview flag#30
rajatkapoor merged 1 commit into
mainfrom
feat/typefully-hide-link-preview

Conversation

@rajatkapoor

Copy link
Copy Markdown
Collaborator

Summary

The Typefully API now fetches link-preview metadata server-side for LinkedIn, Threads, and Bluesky drafts (typefully-backend#1674, HELP-881): when a post contains a URL, the published post gets a rich link card automatically — no skill change needed for that.

This PR documents that behavior and adds the one control users may want on top of it:

  • New --hide-link-preview flag (alias --hide_link_preview) on drafts:create and drafts:update to publish the URL as plain text with no card.
  • Suppression is limited to LinkedIn and Threads — the platforms where the Typefully editor offers the "remove preview" control. The flag errors with guidance when neither platform is targeted, and is silently skipped for other platforms in a mixed-platform draft (mirroring the --paid-partnership/--made-with-ai X-only flag pattern).
  • drafts:update --hide-link-preview works without --text: it preserves the draft's existing LinkedIn/Threads posts and just sets the flag.
  • sanitizePostForPlatform now round-trips hide_link_preview for Threads as well as LinkedIn, so --append flows don't drop it.
  • SKILL.md gains a "Link previews" section + flag-table row; CHANGELOG entry added.

Tests

  • npm run test:all — 120 passed, including 4 new tests: create applies the flag to LinkedIn/Threads but not Bluesky; create errors without an eligible platform; update hides the card without --text; update errors when the draft has no eligible posts.
  • Live smoke test against a local backend: drafts:create --platform linkedin,threads,bluesky --hide-link-preview → response shows hide_link_preview: true for LinkedIn/Threads, false for Bluesky.

https://claude.ai/code/session_01BP9uEWsmTsBnJttG1DVq9G

The API now auto-fetches link-preview cards for LinkedIn, Threads, and
Bluesky drafts. Document that behavior and add a --hide-link-preview
flag to drafts:create/drafts:update to publish the URL as plain text.

Suppression is limited to LinkedIn and Threads, matching the platforms
where the Typefully editor offers the control; the flag errors when
neither platform is targeted. On update it works without --text, and
sanitizePostForPlatform now round-trips hide_link_preview for Threads
as well as LinkedIn.

Claude-Session: https://claude.ai/code/session_01BP9uEWsmTsBnJttG1DVq9G
@rajatkapoor
rajatkapoor merged commit ee1ca93 into main Jul 27, 2026
2 checks passed
@rajatkapoor
rajatkapoor deleted the feat/typefully-hide-link-preview branch July 27, 2026 13:55
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