Skip to content

Defer folio chooser UI initialization until the first dialog request - #211

Merged
dhh merged 1 commit into
mainfrom
lazy-chooser-init
Nov 21, 2026
Merged

dhh merged 1 commit into
mainfrom
lazy-chooser-init

Conversation

@dhh

@dhh dhh commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

At login, xdg-desktop-portal activates folio chooser synchronously before exposing org.freedesktop.portal.Desktop. Previously main() built Translator, Theme, Places (which triggers GVfs/UDisks2 volume monitors), Thumbnails, Plugins, QQmlEngine, and Windows before calling Chooser::registerOn(), stalling portal startup by ~860ms on cold boot only for the chooser to exit 60 seconds later if no dialog was opened.

Register org.freedesktop.impl.portal.desktop.folio on a lightweight QObject immediately and construct the shared Session (UI and backend state) lazily on the first OpenFile / SaveFile / SaveFiles call.

Verified by Claude.

@greptile-apps

greptile-apps Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

The chooser now registers its D-Bus service before building the shared UI state.

  • The chooser waits for a dialog before building its file-browsing session.

Diagram

sequenceDiagram
    participant Portal as Desktop portal
    participant Chooser as Folio chooser
    participant Session as Shared UI state
    Portal->>Chooser: Activate service
    Chooser-->>Portal: Register D-Bus object and name
    Portal->>Chooser: First valid dialog request
    Chooser->>Session: Create once
    Session-->>Chooser: Windows
    Chooser->>Session: Open dialog
    Portal->>Chooser: Later dialog request
    Chooser->>Session: Reuse and open dialog
Loading

Reviews (1) · Last reviewed commit: "Defer folio chooser UI initialization un..." · Reviewed by Greptile

@dhh
dhh merged commit eba4276 into main Nov 21, 2026
2 checks passed
@dhh
dhh deleted the lazy-chooser-init branch November 21, 2026 16:57
@tanushgargjanuary-bot

Copy link
Copy Markdown

I just started using Omarchy, and I was stupid to use the Dev channel, and im having problem switching it to stable. lmao. Is this a known issue?

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