feat(a2ui-playground): persist and reuse the conversation share link#2805
Conversation
Sharing a conversation uploads the serialized document and builds an
import link. Because each upload uses a fresh random storage path, every
Share click — and every share after a page reload — minted a different
link for the same, unchanged conversation.
Persist the published document URL on the conversation's IndexedDB
snapshot, paired with the meta.updatedAt it was generated for, and reuse
it while the conversation is unchanged. Repeated shares (within a session
and across reloads) now copy the same link; a new turn or rename bumps
updatedAt (and a turn also rewrites the snapshot), so the link refreshes
exactly when the shared content changes.
- types.ts: DataModelSnapshot.sharePayload { url, updatedAt }
- conversationRepo.ts: saveConversationSharePayload()
- AIChatPage.tsx: shareConversation reuses the persisted URL, or uploads
and persists a fresh one
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR adds persistent caching of conversation share URLs. The ChangesShare URL Caching
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Merging this PR will degrade performance by 42.85%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | basic-performance-large-css |
16.2 ms | 55.4 ms | -70.69% |
| ⚡ | Simulation | transform 1000 view elements |
44.9 ms | 40.3 ms | +11.4% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing PupilTong:claude/persist-share-link (6cf20be) with main (e33c08f)
Footnotes
-
26 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
Sharing a conversation uploads the serialized document and builds an import link. Because each upload uses a fresh random storage path, every Share click — and every share after a page reload — minted a different link for the same, unchanged conversation.
Persist the published document URL on the conversation's IndexedDB snapshot, paired with the meta.updatedAt it was generated for, and reuse it while the conversation is unchanged. Repeated shares (within a session and across reloads) now copy the same link; a new turn or rename bumps updatedAt (and a turn also rewrites the snapshot), so the link refreshes exactly when the shared content changes.
Summary by CodeRabbit
Checklist