Repository navigation
refactor: route external links through a platform opener seam - #80
Merged
Merged
Conversation
Email links called webbrowser::open directly, which fails on platforms that cannot spawn helper processes (there is no xdg-open and friends everywhere). The provider authorization flow already had a platform-aware opener; this generalizes the path for arbitrary external addresses: - browser::set_external_url_opener() lets a platform integration install its own opener (first registration wins). - browser::open_external() uses that opener when present and falls back to the webbrowser crate otherwise (no behavior change on desktop). - open_email_link uses it instead of calling webbrowser directly.
This was referenced Oct 17, 2026
Member
|
Thanks for this contribution, the platform opener is a useful addition. I've moved it into For #85, please replace the global |
springmin
added a commit
to springmin/mail
that referenced
this pull request
Oct 18, 2026
Tier-3 community port (maintainer: springmin), rebased onto the merged document-provider abstraction (flectar#84) and the opener seam (flectar#80). - platform/ohos: Slint backend (XComponent window adapter, software renderer with the experimental femtovg/wgpu path, input/IME, clipboard, system fonts), the NAPI cdylib that builds a PlatformContext (app-private paths, DocumentProvider over the ArkTS pickers, Asset Store credential store, loopback OAuth broker, external URL opener, notification publisher) and calls flectar_mail::run, the demo crate, the ArkTS shell and the build and packaging scripts (bundle name configurable, defaults to com.flectar.mail_ohos). - src/platform/ohos.rs: PDFium directory, renderer name, thread priority, preview lifecycle, email font directory; OpenHarmony stays under the mobile capability alias. - patches/fontique + crates/fontique: the Fontconfig opt-out as a patch queue applied by the platform/ohos workspace, verified from quality.yml. - .github/workflows/ohos.yml: manually dispatched tier-3 workflow, unsigned by default, signing material only from the FLECTAR_OHOS_* secrets. - src/documents.rs: run_request blocks the calling thread on mobile hosts; the picker covers the window, and keeping the presentation thread idle is what OpenHarmony needs (verified on device; desktop keeps the runtime request for the native dialog). - The email renderer and the compose editor load platform::email_font_dir() and the Han fallback, so CJK mail bodies and composed text render with the platform fonts. - New-mail notifications: a publisher seam fed by CoreEvent::MailNew; the host publishes through @kit.NotificationKit.
springmin
added a commit
to springmin/mail
that referenced
this pull request
Oct 20, 2026
Tier-3 community port (maintainer: springmin), rebased onto the merged document-provider abstraction (flectar#84) and the opener seam (flectar#80). - platform/ohos: Slint backend (XComponent window adapter, software renderer with the experimental femtovg/wgpu path, input/IME, clipboard, system fonts), the NAPI cdylib that builds a PlatformContext (app-private paths, DocumentProvider over the ArkTS pickers, Asset Store credential store, loopback OAuth broker, external URL opener, notification publisher) and calls flectar_mail::run, the demo crate, the ArkTS shell and the build and packaging scripts (bundle name configurable, defaults to com.flectar.mail_ohos). - src/platform/ohos.rs: PDFium directory, renderer name, thread priority, preview lifecycle, email font directory; OpenHarmony stays under the mobile capability alias. - patches/fontique + crates/fontique: the Fontconfig opt-out as a patch queue applied by the platform/ohos workspace, verified from quality.yml. - .github/workflows/ohos.yml: manually dispatched tier-3 workflow, unsigned by default, signing material only from the FLECTAR_OHOS_* secrets. - src/documents.rs: run_request blocks the calling thread on mobile hosts; the picker covers the window, and keeping the presentation thread idle is what OpenHarmony needs (verified on device; desktop keeps the runtime request for the native dialog). - The email renderer and the compose editor load platform::email_font_dir() and the Han fallback, so CJK mail bodies and composed text render with the platform fonts. - New-mail notifications: a publisher seam fed by CoreEvent::MailNew; the host publishes through @kit.NotificationKit.
springmin
added a commit
to springmin/mail
that referenced
this pull request
Oct 20, 2026
Tier-3 community port (maintainer: springmin), rebased onto the merged document-provider abstraction (flectar#84) and the opener seam (flectar#80). - platform/ohos: Slint backend (XComponent window adapter, software renderer with the experimental femtovg/wgpu path, input/IME, clipboard, system fonts), the NAPI cdylib that builds a PlatformContext (app-private paths, DocumentProvider over the ArkTS pickers, Asset Store credential store, loopback OAuth broker, external URL opener, notification publisher) and calls flectar_mail::run, the demo crate, the ArkTS shell and the build and packaging scripts (bundle name configurable, defaults to com.flectar.mail_ohos). - src/platform/ohos.rs: PDFium directory, renderer name, thread priority, preview lifecycle, email font directory; OpenHarmony stays under the mobile capability alias. - patches/fontique + crates/fontique: the Fontconfig opt-out as a patch queue applied by the platform/ohos workspace, verified from quality.yml. - .github/workflows/ohos.yml: manually dispatched tier-3 workflow, unsigned by default, signing material only from the FLECTAR_OHOS_* secrets. - src/documents.rs: run_request blocks the calling thread on mobile hosts; the picker covers the window, and keeping the presentation thread idle is what OpenHarmony needs (verified on device; desktop keeps the runtime request for the native dialog). - The email renderer and the compose editor load platform::email_font_dir() and the Han fallback, so CJK mail bodies and composed text render with the platform fonts. - New-mail notifications: a publisher seam fed by CoreEvent::MailNew; the host publishes through @kit.NotificationKit.
springmin
added a commit
to springmin/mail
that referenced
this pull request
Oct 21, 2026
Tier-3 community port (maintainer: springmin), rebased onto the merged document-provider abstraction (flectar#84) and the opener seam (flectar#80). - platform/ohos: Slint backend (XComponent window adapter, software renderer with the experimental femtovg/wgpu path, input/IME, clipboard, system fonts), the NAPI cdylib that builds a PlatformContext (app-private paths, DocumentProvider over the ArkTS pickers, Asset Store credential store, loopback OAuth broker, external URL opener, notification publisher) and calls flectar_mail::run, the demo crate, the ArkTS shell and the build and packaging scripts (bundle name configurable, defaults to com.flectar.mail_ohos). - src/platform/ohos.rs: PDFium directory, renderer name, thread priority, preview lifecycle, email font directory; OpenHarmony stays under the mobile capability alias. - patches/fontique + crates/fontique: the Fontconfig opt-out as a patch queue applied by the platform/ohos workspace, verified from quality.yml. - .github/workflows/ohos.yml: manually dispatched tier-3 workflow, unsigned by default, signing material only from the FLECTAR_OHOS_* secrets. - src/documents.rs: run_request blocks the calling thread on mobile hosts; the picker covers the window, and keeping the presentation thread idle is what OpenHarmony needs (verified on device; desktop keeps the runtime request for the native dialog). - The email renderer and the compose editor load platform::email_font_dir() and the Han fallback, so CJK mail bodies and composed text render with the platform fonts. - New-mail notifications: a publisher seam fed by CoreEvent::MailNew; the host publishes through @kit.NotificationKit.
springmin
added a commit
to springmin/mail
that referenced
this pull request
Oct 22, 2026
Tier-3 community port (maintainer: springmin), rebased onto the merged document-provider abstraction (flectar#84) and the opener seam (flectar#80). - platform/ohos: Slint backend (XComponent window adapter, software renderer with the experimental femtovg/wgpu path, input/IME, clipboard, system fonts), the NAPI cdylib that builds a PlatformContext (app-private paths, DocumentProvider over the ArkTS pickers, Asset Store credential store, loopback OAuth broker, external URL opener, notification publisher) and calls flectar_mail::run, the demo crate, the ArkTS shell and the build and packaging scripts (bundle name configurable, defaults to com.flectar.mail_ohos). - src/platform/ohos.rs: PDFium directory, renderer name, thread priority, preview lifecycle, email font directory; OpenHarmony stays under the mobile capability alias. - patches/fontique + crates/fontique: the Fontconfig opt-out as a patch queue applied by the platform/ohos workspace, verified from quality.yml. - .github/workflows/ohos.yml: manually dispatched tier-3 workflow, unsigned by default, signing material only from the FLECTAR_OHOS_* secrets. - src/documents.rs: run_request blocks the calling thread on mobile hosts; the picker covers the window, and keeping the presentation thread idle is what OpenHarmony needs (verified on device; desktop keeps the runtime request for the native dialog). - The email renderer and the compose editor load platform::email_font_dir() and the Han fallback, so CJK mail bodies and composed text render with the platform fonts. - New-mail notifications: a publisher seam fed by CoreEvent::MailNew; the host publishes through @kit.NotificationKit.
springmin
added a commit
to springmin/mail
that referenced
this pull request
Oct 23, 2026
Tier-3 community port (maintainer: springmin), rebased onto the merged document-provider abstraction (flectar#84) and the opener seam (flectar#80). - platform/ohos: Slint backend (XComponent window adapter, software renderer with the experimental femtovg/wgpu path, input/IME, clipboard, system fonts), the NAPI cdylib that builds a PlatformContext (app-private paths, DocumentProvider over the ArkTS pickers, Asset Store credential store, loopback OAuth broker, external URL opener, notification publisher) and calls flectar_mail::run, the demo crate, the ArkTS shell and the build and packaging scripts (bundle name configurable, defaults to com.flectar.mail_ohos). - src/platform/ohos.rs: PDFium directory, renderer name, thread priority, preview lifecycle, email font directory; OpenHarmony stays under the mobile capability alias. - patches/fontique + crates/fontique: the Fontconfig opt-out as a patch queue applied by the platform/ohos workspace, verified from quality.yml. - .github/workflows/ohos.yml: manually dispatched tier-3 workflow, unsigned by default, signing material only from the FLECTAR_OHOS_* secrets. - src/documents.rs: run_request blocks the calling thread on mobile hosts; the picker covers the window, and keeping the presentation thread idle is what OpenHarmony needs (verified on device; desktop keeps the runtime request for the native dialog). - The email renderer and the compose editor load platform::email_font_dir() and the Han fallback, so CJK mail bodies and composed text render with the platform fonts. - New-mail notifications: a publisher seam fed by CoreEvent::MailNew; the host publishes through @kit.NotificationKit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Email links previously called
webbrowser::opendirectly, which cannot launch a browser on hosts without desktop helper processes.PlatformContextnow carries a cloneableExternalUrlOpener. Native hosts install their URL bridge on the context; the application uses it for email links and browser-based OAuth, including reconnection, calendar authorization, and retries. Host errors propagate without falling back to desktop launchers.Email links retain their scheme allowlist and in-app
mailtohandling. OAuth validates HTTPS addresses before dispatch. Default desktop behavior is preserved, including the Linux portal and AppImage library-path handling for authorization.Hosts migrating from the initial version of this PR replace
set_external_url_opener(bridge::open_url)with:The callback must accept calls from the application event loop and OAuth worker threads. The contract and migration are documented in
platform/README.md. The stacked OpenHarmony host in #85 needs this assignment after constructing its mutable context.The dependency follow-up updates
ammoniato patched version 4.1.8 in both lockfiles and the Flatpak source manifest, and documents three maintenance-notice exceptions for crates merged into zbus 6. Slint and desktop portal dependencies still require zbus 5; vulnerability findings and all other warnings remain denied.Validation
ammonia, all core targets pass (611 passed, zero failed, two ignored), and core Clippy passes with warnings denied.Contribution and licensing
AI coding agent (LLM); I reviewed every line, ran the checks above, and
tested the behavior as described.
personal information included.