Add KLIPY GIF search to desktop composers - #5554
Conversation
Signed-off-by: kenny lopez <klopez4212@gmail.com>
Signed-off-by: kenny lopez <klopez4212@gmail.com>
Signed-off-by: kenny lopez <klopez4212@gmail.com>
Signed-off-by: kenny lopez <klopez4212@gmail.com>
…picker Signed-off-by: kenny lopez <klopez4212@gmail.com> # Conflicts: # desktop/src/features/custom-emoji/ui/EmojiPicker.tsx # desktop/src/features/forum/ui/ForumComposer.tsx
Signed-off-by: kenny lopez <klopez4212@gmail.com>
wpfleger96
left a comment
There was a problem hiding this comment.
🤖 Thanks for putting this together — the relay proxy is genuinely well built. The key stays server-side with a redacted Debug impl, NIP-98 verification requires the payload hash, and there's a replay guard, membership + per-pubkey quota enforcement, an upstream response-size cap, and allowlisting so KLIPY error bodies never cross the relay boundary. That whole boundary held up under both source review and a live run against the real KLIPY API.
I'm requesting changes on two blocking issues, both verified end-to-end, plus one design question I'd like resolved before merge:
-
Selecting a GIF produces a message the relay refuses to ingest — the core feature doesn't work end-to-end. A live run against this branch got
400 {"error":"invalid: imeta url must be a local /media/ path"}on both stream (kind9) and forum (kind45001) sends, with zero posts persisted. Details inline atdesktop/src/features/gifs/api.ts. -
The PR breaks its own smoke test:
composer-tooltip-dismiss.spec.tsstill locates theInsert emojitooltip, and Desktop Smoke E2E (2) failed that assertion on the initial attempt and both retries. Details inline atComposerEmojiPicker.tsx. -
KLIPY's own reference integrations couple sends to their share/report endpoint, and this PR documents skipping that as a non-goal — I don't think that call is as free as the docs suggest. Inline comment on
crates/buzz-relay/src/api/gifs.rswith references.
There are also a few smaller things inline (upstream client reuse, handler-level test coverage, per-relay customer_id keying, and some nits).
Co-authored-by: Kenny Lopez <klopez4212@gmail.com> Signed-off-by: Kenny Lopez <klopez4212@gmail.com>
Co-authored-by: Kenny Lopez <klopez4212@gmail.com> Signed-off-by: Kenny Lopez <klopez4212@gmail.com>
wpfleger96
left a comment
There was a problem hiding this comment.
🤖 All feedback from the combined review is addressed at 9db36e2 — verified each finding at source, and both blockers are confirmed fixed: external GIFs now send as content-only markdown (no imeta tag, so the relay validator is never engaged) and the tooltip smoke spec is green. The new /gifs/share endpoint sits behind the same NIP-98/membership/replay boundary as search, and live E2E against the real KLIPY provider confirmed sends persist and render on both kind 9 and forum posts, plus fully graceful degradation (no GIF tab, no errors, zero /gifs/* requests) when the relay has no KLIPY key. CI is fully green at head.
Summary
Validation