Skip to content

Add KLIPY GIF search to message composers - #1913

Closed
klopez4212 wants to merge 1 commit into
mainfrom
kennylopez-klipy-gif-picker
Closed

Add KLIPY GIF search to message composers#1913
klopez4212 wants to merge 1 commit into
mainfrom
kennylopez-klipy-gif-picker

Conversation

@klopez4212

Copy link
Copy Markdown
Contributor

Summary

  • adds Emoji and GIF tabs to message and forum composers
  • supports KLIPY trending/search results and uploads the selected GIF through Buzz's existing media flow
  • keeps Emoji Mart aligned with Buzz's theme and picker width

@wesbillman @tlongwell-block — support for GIF search was pretty straightforward to add; this is a working end-to-end implementation.

Next steps before release

Business-side help needed:

  • request a KLIPY production API key
  • confirm that posting selected GIFs into Buzz media storage is covered by KLIPY's terms
  • confirm the required ad model, official attribution, and privacy disclosure

Engineering follow-up after those decisions: wire the production key into release builds, hide the tab when unconfigured, add the official KLIPY branding, and harden pagination and download-size limits.

Validation

  • tested trending, search, selection, upload, and light/dark themes in the staging app
  • 2,912 desktop unit tests pass
  • desktop typecheck, formatting checks, and production build pass
  • the broader local Rust gate was attempted but exhausted machine disk; GitHub CI will run the complete gate

@tlongwell-block

Copy link
Copy Markdown
Collaborator

🤖 Closing this due to a week of inactivity. We're getting a high volume of PRs and this just helps maintainers keep the queue manageable. It's nothing about this PR or you personally! Please reopen (or drop a comment) if it's still needed.

wpfleger96 added a commit that referenced this pull request Aug 25, 2026
## Summary

- Supersedes #1913 with a KLIPY-hosted URL implementation.
- Adds KLIPY GIF search and trending results to desktop message and
forum composers.
- Keeps selected GIFs hosted by KLIPY; Buzz stores only the external URL
and media metadata (no imeta tag, since relays only accept hash-backed
local `/media/` entries).
- Aligns the Emoji/GIF picker with Buzz's standard segmented control,
theme surfaces, and motion behavior.

## Relay-to-provider boundary

- The relay proxies KLIPY search/share so the `BUZZ_KLIPY_API_KEY` never
reaches the desktop; the key stays server-side behind a redacted `Debug`
impl.
- The dedicated GIF `reqwest` client sets `redirect::Policy::none()`.
Because the API key rides in the request path, following a provider
`3xx` could replay a key-bearing URL to an attacker-chosen host (an
SSRF/key-disclosure primitive). With redirects disabled, a `3xx` returns
as a non-success status that the handlers map to a generic `502`; the
`Location` target is never read or forwarded.
- Admission reuses the established NIP-98, membership, replay, and
per-pubkey rate-limit gates, with an upstream response-size cap and
allowlisting so KLIPY error bodies never cross the relay boundary.

## Accessibility

- Under `prefers-reduced-motion: reduce`, the picker grid renders a
static provider poster (a normalized `jpg` asset) instead of the
animated preview, or a named static placeholder when no poster is
available. It reacts to preference changes while mounted.
`no-preference` keeps the animated preview.
- Selected GIFs carry their title through `ImetaMedia`'s `displayLabel`,
so the composer thumbnail, preview dialog, editor, lightbox, and remove
control all derive one non-empty accessible name instead of an empty
`Attachment ` label. Ordinary hashed uploads keep their existing
hash-derived names.

---------

Signed-off-by: kenny lopez <klopez4212@gmail.com>
Signed-off-by: Kenny Lopez <klopez4212@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
Signed-off-by: Hayt <9e1c23a3fd83f61da34420e4e88ff1b16e45cafcc0cd9019eb07d4ecfa8ca9b0@buzz.block.builderlab.xyz>
Co-authored-by: Princess Donut <b238ea756dee4d98afa5883fc7f1de61eeabe65bf700e3a5a5a80db5e42e2c2b@buzz.block.builderlab.xyz>
Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Co-authored-by: Hayt <9e1c23a3fd83f61da34420e4e88ff1b16e45cafcc0cd9019eb07d4ecfa8ca9b0@buzz.block.builderlab.xyz>
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