Repository navigation
fix(ui): make Share default to local download, Publish as opt-in (#481) - #541
Conversation
The chat overflow menu's Share action previously opened the public-link popover as the primary flow. Per #481, the expected default is a local download of the conversation (markdown export), with public-link creation as a secondary opt-in. - message-timeline: add downloadSession() (serializeSession → blob / save-file bridge), make Download the primary overflow item and Publish the secondary (gated by shareEnabled) - i18n: add session.download.* keys - chat_bridge: extend save-file bridge from PNG-only to md/txt/markdown Fixes #481 Co-Authored-By: internal-model
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe session timeline now exports messages as Markdown through browser or VS Code save paths. It adds download labels and empty-export feedback. The save bridge accepts PNG, Markdown, and text files with extension validation and type-specific save filters. ChangesSession download
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to Share now defaults to local Markdown download while public publishing remains an explicit opt-in, with the documented build, typecheck, test, and manual verification passing; no actionable merge-blocking risk remains. Sequence Diagram(s)sequenceDiagram
participant User
participant MessageTimeline
participant serializeSession
participant SaveBridge
User->>MessageTimeline: Select Download
MessageTimeline->>serializeSession: Serialize session messages
MessageTimeline->>SaveBridge: Submit Markdown data URL
SaveBridge-->>User: Open save dialog or browser download
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Fixes #481
Summary
The Share item in the chat overflow menu previously opened the public-link flow as the primary (and effectively default) action. Per #481 the expected default is a local download — exporting the conversation as a text file — with public-link creation as an explicit secondary opt-in.
Changes
message-timeline.tsx): adddownloadSession()that serializes the session viaserializeSession→Blob(text/markdown) and triggers a download (<a download>in the browser,save-filebridge in the VS Code webview). Make Download… the primary item (always enabled) and Publish… the secondary item (gated byshareEnabled, still opens the existing public-link popover).en.ts): addsession.download.*keys.chat_bridge.ts): extend from PNG-only to*.md|*.txt|*.markdown|*.png, acceptingdata:text/markdown;base64,/data:text/plain;base64,in addition todata:image/png;base64,.Verification
pnpm -r run build+pnpm -r run typecheckpasspackages/extensiontests: 107 files, 1534 passed"<title>-<id>.md"; Publish still opens the public-link popover as a secondary action.Intake was
not-ready/suggested_path: B— user requested to proceed; this is the download-first fix.Closes #481
Summary by CodeRabbit