Skip to content

feat: Split Asset Share Actions PR 3 [WPB-26687]#5035

Open
MohamadJaara wants to merge 2 commits into
mo/share-forward-02-import-safetyfrom
mo/share-forward-03-asset-actions
Open

feat: Split Asset Share Actions PR 3 [WPB-26687]#5035
MohamadJaara wants to merge 2 commits into
mo/share-forward-02-import-safetyfrom
mo/share-forward-03-asset-actions

Conversation

@MohamadJaara

@MohamadJaara MohamadJaara commented Jul 7, 2026

Copy link
Copy Markdown
Member

https://wearezeta.atlassian.net/browse/WPB-26687

Summary

  • Splits asset sharing into “Share via Wire” and “Share externally” where needed.
  • Keeps direct external sharing on Android versions that support trusted Wire share identity.
  • Wires conversation, message options, conversation media, and gallery entry points into the internal import flow.
  • Fixes the conversation screen context lookup used when forwarding assets via Wire.

General Idea

This stack separates “share externally” from “forward/share inside Wire” while keeping the behavior different per Android version:

  • On Android 15+ we can rely on trusted share caller identity, so Wire can stay in the normal Android share sheet safely.
  • On older Android versions we cannot reliably know that an incoming Wire FileProvider URI came from Wire itself, so we avoid routing Wire-internal files through the public share sheet.
  • For older Android versions, internal Wire forwarding uses an explicit in-app navigation path into the import media flow.
  • External sharing uses Android chooser intents and excludes Wire where needed to prevent re-importing internal Wire files.
flowchart TD
    A["User taps Share"] --> B{"Android 15+?"}

    B -- "Yes" --> C["Use Android share sheet"]
    C --> D["Enable share identity"]
    D --> E["Wire target can be trusted"]

    B -- "No" --> F{"Target action"}
    F -- "Share externally" --> G["Open external chooser"]
    G --> H["Exclude Wire targets"]

    F -- "Share via Wire" --> I["Create shared-cache FileProvider URI"]
    I --> J["Navigate directly to ImportMediaScreen"]
    J --> K["Validate URI is from Wire shared_files root"]
    K --> L["Import as pending asset"]
Loading

Stack

This PR is part of a stacked series:

  1. mo/share-forward-01-share-plumbing
    Share-safe FileProvider helpers and chooser behavior.

  2. mo/share-forward-02-import-safety
    Incoming share validation and trusted Wire caller handling.

  3. mo/share-forward-03-asset-actions
    UI split between “Share via Wire” and “Share externally”.

  4. mo/share-forward-04-log-sharing
    Share logs as one archive, either externally or via Wire.

  5. mo/share-forward-05-stability-baselines
    Generated stability baseline updates.

@sonarqubecloud

sonarqubecloud Bot commented Jul 7, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant