feat(composer): support link previews on message edit (Option B, follow-up to #5245)
- Dominant language
- Rust
- Stars
- 32.7k
- Forks
- 4.3k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 253
Description
## Context
Follow-up to PR #5245 (link-preview snapshot/send race fix). That PR chose **Option A**: edit mode is excluded entirely from link-preview resolution, upload, and Save-gating — editing a message shows no card, no spinner, and cannot add or change a link preview.
**Option B** is the deferred alternative: let message *edits* add, replace, or remove link-preview snapshots, carrying snapshot tags through the edit path end-to-end.
## Scope
- Carry snapshot tags through `submitMessageEdit.ts` so an edit can persist new preview tags.
- Edit-transport tag-split in `hooks.ts` (whatever splits edit tags from content on the wire).
- Timeline overlay merge in `formatTimelineMessages.ts` so an edited message's preview tags override the original's.
- Replacement/removal overlay rules: editing a link out should drop its preview; changing the link should swap the snapshot.
- Re-enable `useComposerLinkPreviews` in edit mode (Option A currently disables it via `editTarget == null`) with the same debounce, per-media degrade, and submit-guard behavior as normal send.
- Edit-mode e2e coverage mirroring the normal-send tests: resolve-on-edit, upload-failure degrade, remove-link-drops-preview.
## Notes
- Stacks AFTER Option A (PR #5245) merges.
- Product decision and the full defect/decision history live in the room canvas for channel `buzz-link-ograph-embeds`.
Contributor guide
Assessment
This issue has not been assessed yet.