Skip to content

Use GTK file chooser again instead of Files - #19461

Open
ThePrimeagen wants to merge 2 commits into
omacom:quattrofrom
ThePrimeagen:fix/f67ed632-dbbd-4854-aa26-d562c7df0dca
Open

ThePrimeagen wants to merge 2 commits into
omacom:quattrofrom
ThePrimeagen:fix/f67ed632-dbbd-4854-aa26-d562c7df0dca

Conversation

@ThePrimeagen

Copy link
Copy Markdown
Contributor

Clicking Cancel in the Files file chooser does not close it or return, so omarchy-file-select hangs until its timeout instead of exiting with nothing picked.

Screenshots

Before After
before after

Reproduce

  1. Open a terminal with Super+Enter.
  2. Run omarchy file select --multiple.
  3. Wait for the Files file chooser to appear.
  4. Click Cancel at the bottom right of the chooser.
  5. The chooser stays open and omarchy-file-select keeps waiting instead of exiting 1.

Related

Files' portal chooser does not close or answer Cancel, so every portal
picker hangs until timeout. Removing the folio FileChooser preference
restores the GTK chooser that answers Cancel, and a migration undoes
the preference on installs that already received it.

A fresh install seeded from /etc/skel can still carry the folio line
with no migration run to remove it, so omarchy-file-select names gtk
in the portal config and restarts the portal before asking it, making
the GTK chooser answer on every install.
@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge; no new actionable issues were found.

Summary

This PR restores GTK file dialogs and repairs the old Files preference while preserving user choices.

  • File pickers use GTK so Cancel returns an empty selection.

Both previous findings are addressed. No new actionable issues were found.

Reviews (2) · Last reviewed commit: "Match exact legacy FileChooser line and ..." · Reviewed by Greptile

Comment thread bin/omarchy-file-select Resolved
Comment thread bin/omarchy-file-select Resolved
@omarchybot

Copy link
Copy Markdown
Collaborator

Codex High read the diff, surrounding picker and migration code, and existing review comments at afa78bb3e47fcde8c87058ad95e3325ec408bf23. I classified this as a bug fix, but the second classifier returned no classification, so the classification remains unsettled. CI passed on this head; no runtime tests or code review by a second model ran in this session, and nothing was pushed. Verification is waiting for the maintainer to resolve the classification.

@omarchybot

Copy link
Copy Markdown
Collaborator

GPT-6 in Codex (reasoning effort not exposed) read the diff, surrounding picker and migration code, and review comments at 755911857bc68977667d95d31781222f6b946aeb, including the exact legacy-line match and locking changes. I classify this as a bug fix, but the second classifier, deepseek-v4p1-flash, returned no valid classification, so classification remains unsettled. The separate code-review models answered their health check; no second code review or runtime tests ran in this session, and nothing was pushed or labelled. Verification is waiting for the classification to be resolved.

@omarchybot omarchybot added the bug Something isn't working label Nov 20, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 7559118 by Claude Fable 5.2, with a second opinion from Opus 5.5 High and muse-wonder (thinking high). Nothing was pushed, and this is waiting on the maintainer.

I could not reproduce the hang. On a worker built from the Omarchy ISO at quattro b20d787 with folio 0.6.1, omarchy file select --multiple opens the Files chooser, it stays open while untouched, a pointer click on Cancel closes it and the command exits 1 within two seconds, and Escape does the same. Chromium's Ctrl+O dialog is the same chooser and Cancel closes that too. A click one to four pixels above the button does nothing (the button's top edge is at y 665 with the window where the screenshot has it, and clicks at 661 to 664 miss), and the pointer in the Before screenshot sits about there, so that click may have missed the button. That last part is my reading of a picture, not something I could test. Which folio version was this on (pacman -Q folio)? If Cancel is dead in some version, that is a bug in Files and belongs in omacom/folio.

Sending these dialogs to Files was a deliberate change five days ago (#19035), so going back to GTK for every app is the maintainer's decision rather than a bug fix, and I have left it with him.

If it does go back, the config line and the migration are the whole change. The migration behaved on the worker in throwaway homes: it removes the exact line, a second run changes nothing, a user's own FileChooser=folio is left alone, a symlinked config is written through, and a missing file is skipped. Its name, 1794861758, sorts before nine migrations already on quattro; it would still run, since completion is tracked per file, but it wants a current timestamp. The comment in default/hypr/apps/system.lua and the paragraph in docs/theming.md that say Files is the chooser would both need changing.

use_gtk_chooser() in bin/omarchy-file-select and its test file should not go in either way. Run on the worker against a stock config, picking a file rewrote the user's hyprland-portals.conf and restarted xdg-desktop-portal.service. A restart from inside a file picker drops whatever other apps have in flight through the portal, a screen share or another app's open dialog. It writes the config in place rather than through a rename, so a failed write can leave it empty. And it pins FileChooser=gtk where the migration deletes the line, so the two paths leave different configs, and a later migration written like #19035's, which skips any config that already names a chooser, would pass over every machine the picker repaired. The new install and the pending migration it is there for are covered by the config default and by omarchy update running migrations.

The second opinion agreed that the bug is not shown and that the runtime repair should not land; where it agreed with what I had already written down, its independence is not guaranteed. The =gtk against delete mismatch and the in-place write are findings the reviewers reached that I had not, and I checked both against the source.

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants