镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

AIDA-2425: Preserve links beside pasted images - #2520

Merged
ravarora2 merged 1 commit into
mainfrom
rarora/AIDA-2425/preserve-pasted-links
Nov 5, 2026
Merged

ravarora2 merged 1 commit into
mainfrom
rarora/AIDA-2425/preserve-pasted-links

Conversation

@ravarora2

@ravarora2 ravarora2 commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Why

Pasting a sentence with an inline image could drop every labelled link. Buzz discarded image alt text, then rejected the HTML because it no longer matched the clipboard's plain text.

Related: AIDA-2425. This fixes the reproduced inline-image case; the original Slack report still needs its own clipboard capture.

What

Keep image alt text and safe link destinations when pasting external HTML. Keep plain-text paste, the text-match guard, and URL filtering unchanged.

How

Replace images with text nodes before stripping HTML attributes in the existing external-paste converter. Cover images beside links, images inside labels, empty alt text, unsafe destinations, mismatched text, and undo.

Risk

This changes external HTML paste in the shared composer. Clipboards whose text still differs fall back to plain text. No image loading or attachment behavior is added.

Testing

Independent review of a7fb6366e3f93b92a62fea9c5e657f2e9efd8abf found no blocking correctness or security issue. Final head 4eba754c5d05fbde15eaf0f09cd188ec44116aff rebases onto b621738454064985fe42de0c077e8d381ca0037b. The only conflict was adjacent help-guide additions; both the upstream /leave instructions and paste guidance are retained. Paste implementation and tests are unchanged from the reviewed commit.

Opened the sample page in Chromium on macOS. Copied each sample, pressed ordinary ⌘V in the actual composer, and sent each draft through the fixture relay. Both kept the labelled URL; the image sample kept :wave:. The independent reviewer repeated this successfully at the rebased commit.

Browser cases added/removed: 0/0. The existing external-link journey includes an inline image and checks the composer and published message. The independent reviewer ran the complete paste file on the rebased commit: 8 passed, 2 existing platform skips across Chromium and WebKit. The case matrix stays in the mounted editor tests.

All mandatory push hooks passed at a7fb6366e after rerunning with one test worker. Following the author's request to push, the final documentation-conflict rebase skipped the long TypeScript/related-test lane; design and push-policy hooks still passed. Current-head CI is pending.

Validation limits: the first rebased push-hook run failed 9 tests across retained-page, ChannelsPage.conversion, useConversationTabs.panels, huddle/composer, and MessageEdit.integration. Most failures were timeouts; their cause is unverified. A separate exploratory full frontend run was interrupted after reporting three agent-service failures and one MessageComposer timeout, so it is not a completed full-suite result. Earlier full-suite failures and old-head CI failures are not established baseline defects. Installed Tauri, Slack Desktop, and human acceptance remain unverified.

Generated with Codex

@ravarora2
ravarora2 marked this pull request as ready for review November 5, 2026 13:44
@ravarora2
ravarora2 requested a review from a team as a code owner November 5, 2026 13:44
@ravarora2
ravarora2 force-pushed the rarora/AIDA-2425/preserve-pasted-links branch from 5c69d4c to a7fb636 Compare November 5, 2026 14:08
Keep inline image alt text before sanitizing external clipboard HTML. Retain the plain-text agreement guard and safe destination filtering.

Co-authored-by: BuzzPRReviewAssistant1 <a581a7e8115222acdc32ffb14bfce55d48c24478d98e155f8eba126b69b83c7b@buzz.block.builderlab.xyz>
Signed-off-by: Ravneet Arora <rarora@squareup.com>
@ravarora2
ravarora2 force-pushed the rarora/AIDA-2425/preserve-pasted-links branch from a7fb636 to 4eba754 Compare November 5, 2026 14:15

@kazemek21 kazemek21 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kyle reviewed this PR and the Nexus review-tracker notes and approved with no comments.

Posted by Codex (gpt-6.1-sol) on behalf of kylez.

@kalvinnchau kalvinnchau left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Approved based on review of 5c69d4c: no actionable findings. Clipboard regression checks passed in Chromium and WebKit; native/source-app clipboard behavior remains unverified. Current head 4eba754 is newer and is not covered by this review.

@ravarora2
ravarora2 merged commit 8230222 into main Nov 5, 2026
44 checks passed
@ravarora2
ravarora2 deleted the rarora/AIDA-2425/preserve-pasted-links branch November 5, 2026 20:30
wpfleger96 added a commit that referenced this pull request Nov 5, 2026
…leanup

* origin/main:
  AIDA-2425: Preserve links beside pasted images (#2520)
  feat(activity): show reactions to your messages in Activity (#2638)

# Conflicts:
#	docs/inbox.md
wpfleger96 added a commit that referenced this pull request Nov 5, 2026
…-service

* origin/main:
  fix(sidebar): highlight collapsed sections with unread channels (#2539)
  perf(threads): isolate thread rows inside the scroller (#2462)
  perf(messages): skip the glass on closed message action bars (#2461)
  perf(threads): measure long-thread scrolling in browsers and the macOS app (#2460)
  docs(threads): set scrolling requirements and targets for long threads (#2459)
  fix(composer): seed required recipients in saved briefs (#2667)
  fix: preserve agent activity ownership and remove Solo composer gap (#2613)
  feat(agents): open agent card links in Create agent (#2662)
  Align Bestie messaging with the shared conversation workspace (#2614)
  feat(messages): add a compact message density (#2547)
  fix(dialog): limit footer click-through to the gradient gutter (#2545)
  fix(channels): put the huddle launcher after the other header tools (#2660)
  feat(drafts-sent): bundle Drafts & sent for everyone (#2644)
  feat(identity): one Builderlab sign-in, the native NIP-FI session (#2576)
  fix(agents): let people dismiss connection setup cards (#2631)
  AIDA-2425: Preserve links beside pasted images (#2520)
  feat(activity): show reactions to your messages in Activity (#2638)

# Conflicts:
#	docs/identity.md
#	src-tauri/src/federated_identity/agent/mod.rs
#	src-tauri/src/federated_identity/mod.rs
#	src-tauri/src/federated_identity/tests.rs
#	src/bundled/codex/runtime.ts
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.

3 participants