Skip to content

Add share-as-image feature for notes#3236

Merged
vitorpamplona merged 3 commits into
mainfrom
claude/fervent-pascal-dy03ve
Jun 16, 2026
Merged

Add share-as-image feature for notes#3236
vitorpamplona merged 3 commits into
mainfrom
claude/fervent-pascal-dy03ve

Conversation

@vitorpamplona

Copy link
Copy Markdown
Owner

Summary

Adds a new "Share as Image" feature that allows users to export a note as a framed, shareable PNG image. The flow renders the note into a styled card, captures it to a bitmap, uploads it to a Blossom media server, and opens the Android share sheet with the resulting URL.

Changes

  • New screen ShareNoteAsImageScreen.kt: Full-screen UI for the share-as-image flow

    • Renders note in an off-screen graphics layer with async image settling (900ms delay for network media)
    • Captures bitmap preview and displays it to the user
    • Allows selection of upload destination (Blossom file server)
    • Uploads PNG via UploadOrchestrator and shares the resulting URL
    • Includes watermark with Amethyst branding
  • Navigation: Added Route.ShareNoteAsImage(id) route and wired it into AppNavigation

  • Menu integration: Added "Share as Image" option to note dropdown menu in DropDownMenu.kt

  • Strings: Added UI text keys (share_as_image, share_as_image_generating, share_as_image_watermark)

Test plan

  • Ran ./gradlew spotlessApply — repo is formatted
  • Manually exercised the change (see notes below)

Notes:

  • Opened a note's dropdown menu and tapped "Share as Image"
  • Verified the preview generates after ~1s with the note rendered in a framed card
  • Selected a different file server from the dropdown
  • Tapped Share and confirmed the upload completes and Android share sheet opens with the image URL
  • Verified the watermark appears in the bottom-right of the card

Interop suites

  • N/A — change can't affect wire bytes / decoded audio / MLS state / DM envelopes

License

  • By submitting this PR, I agree to license my contribution under the MIT license.

https://claude.ai/code/session_01Y5ipS9wu6ffCPk5rtB8k3x

claude added 3 commits June 16, 2026 21:33
Add a "Share as Image" action to the note 3-dot menu. It renders the
post into a framed card, captures it to a bitmap via a GraphicsLayer,
uploads the PNG to one of the user's Blossom media servers, and hands
the resulting URL to the Android share sheet.

The on-screen preview is the capture source, so what the user sees is
exactly what gets shared. A server spinner lets the user pick which
Blossom server to upload to, defaulting to their configured default.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y5ipS9wu6ffCPk5rtB8k3x
Convert the share-as-image flow from a dialog into a proper navigation
screen (Route.ShareNoteAsImage), reached from the note 3-dot menu. The
note is rendered off-screen into a GraphicsLayer, captured to a bitmap,
and the captured bitmap is shown as the preview via an Image composable —
so the preview is exactly what gets uploaded and shared.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y5ipS9wu6ffCPk5rtB8k3x
- Re-layout the screen as a centered "hero" preview on a subtle gradient
  backdrop, with a soft drop shadow, instead of a top-aligned full-width
  bitmap above a settings row.
- Move the primary action into a bottom bar: a clearer server picker plus
  a full-width "Share" button with an icon. Top bar is now a plain back bar.
- Brand the captured card with a divider + Amethyst logo watermark and
  roomier padding.
- Capture in two passes (quick first preview, then a refined snapshot after
  a short settle delay) so async media has time to load into the image
  instead of showing empty placeholders.
- Show real upload progress (stage + percentage) via the shared
  UploadProgressIndicator instead of a bare spinner.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y5ipS9wu6ffCPk5rtB8k3x
@vitorpamplona vitorpamplona merged commit fc35f5a into main Jun 16, 2026
1 check passed
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.

2 participants