Skip to content

fix(ui): make Share default to local download, Publish as opt-in (#481) - #541

Merged
Rchari1 merged 2 commits into
mainfrom
fix/481-share-download-first
Aug 23, 2026
Merged

Rchari1 merged 2 commits into
mainfrom
fix/481-share-download-first

Conversation

@Rchari1

@Rchari1 Rchari1 commented Aug 23, 2026 •

Copy link
Copy Markdown
Member

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 overflow menu (message-timeline.tsx): add downloadSession() that serializes the session via serializeSession → Blob (text/markdown) and triggers a download (<a download> in the browser, save-file bridge in the VS Code webview). Make Download… the primary item (always enabled) and Publish… the secondary item (gated by shareEnabled, still opens the existing public-link popover).
  • i18n (en.ts): add session.download.* keys.
  • Save bridge (chat_bridge.ts): extend from PNG-only to *.md|*.txt|*.markdown|*.png, accepting data:text/markdown;base64, / data:text/plain;base64, in addition to data:image/png;base64,.

Verification

  • pnpm -r run build + pnpm -r run typecheck pass
  • packages/extension tests: 107 files, 1534 passed
  • Manual: Share → downloads "<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

  • New Features
    • Added the ability to download session messages as Markdown.
    • Downloaded files use sanitized, session-specific filenames.
    • Downloads work in both the embedded app and standard browsers.
    • Added support for exporting Markdown and plain-text files alongside PNG images.
    • Added clear feedback for successful downloads and empty sessions.
  • UI Updates
    • Updated session menu labels to use “Publish” terminology.

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
@coderabbitai

coderabbitai Bot commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 21443f37-eb2d-4389-9b9e-682e3df0224b

📥 Commits

Reviewing files that changed from the base of the PR and between 3f3348a and dbeef49.

📒 Files selected for processing (4)
  • packages/app-bundle/manifest.json
  • packages/app-bundle/overlay/packages/app/src/i18n/en.ts
  • packages/app-bundle/overlay/packages/app/src/pages/session/timeline/message-timeline.tsx
  • packages/extension/src/chat_bridge.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The 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.

Changes

Session download

Layer / File(s) Summary
Session export UI
packages/app-bundle/overlay/packages/app/src/pages/session/timeline/message-timeline.tsx, packages/app-bundle/overlay/packages/app/src/i18n/en.ts, packages/app-bundle/manifest.json
The timeline serializes sessions, validates empty exports, creates sanitized filenames, exposes Download actions in both menus, updates share labels to Publish, adds localization strings, and refreshes bundle hashes.
Local save bridge
packages/extension/src/chat_bridge.ts
The bridge accepts PNG, Markdown, and text data URLs, validates supported extensions, selects save filters, and writes decoded content.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to dbeef

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
Loading

Suggested reviewers: aarontrowbridge

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the primary change: Share now downloads locally by default and Publish remains opt-in.
Linked Issues check ✅ Passed The changes satisfy issue #481 by making local Markdown download the default and keeping public-link publishing as an explicit secondary action.
Out of Scope Changes check ✅ Passed The localization, serialization, save-bridge, menu, and manifest changes directly support the download-first sharing behavior.
Docstring Coverage ✅ Passed Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/481-share-download-first

Comment @coderabbitai help to get the list of available commands.

@Rchari1
Rchari1 merged commit 3eabf61 into main Aug 23, 2026
8 checks passed
@Rchari1
Rchari1 deleted the fix/481-share-download-first branch August 23, 2026 23:46
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.

BUG: Share action defaults to public link rather than local download

1 participant