8000 Fix attachments not opening by thecalamityjoe87 · Pull Request #44 · hyprlab/hylki · GitHub
[go: up one dir, main page]

Skip to content

Fix attachments not opening - #44

Closed
thecalamityjoe87 wants to merge 1 commit into
hyprlab:mainfrom
thecalamityjoe87:fix-opening-attachments
Closed

thecalamityjoe87 wants to merge 1 commit into
hyprlab:mainfrom
thecalamityjoe87:fix-opening-attachments

Conversation

@thecalamityjoe87
Copy link
Copy Markdown
Contributor

Attachments were failing to open in default app when user clicked on an attachment in the gallery

Attachments were failing to open in default app when user clicked on an attachment in the gallery
@thecalamityjoe87 thecalamityjoe87 changed the title fix attachments not opening Fix attachments not opening Aug 26, 2026
@thecalamityjoe87
Copy link
Copy Markdown
Contributor Author

Be advised, PR #49 contains this fix.

@hyprlab
hyprlab commented Aug 26, 2026
Copy link
Copy Markdown
Owner

Isaac — this one was a genuinely great find, and it landed almost verbatim (3addeca, credited to you via Co-Authored-By; shipping in v1.15.0).

Your one-character constant fix was the whole story: 0o200000 is O_DIRECTORY on Linux, not O_NOFOLLOW (0o400000) — so staging a regular attachment file failed outright, every click did nothing, and the symlink protection the flag was meant to provide had silently never been active. The landed commit adds a comment naming the old bug at that line so the wrong constant can't quietly come back.

The portal-based opening (UriLauncher, parented, with the non-portal fallback and warning log) landed as-is too — the app-chooser fallback for types with no registered default is exactly right for attachments. Only adaptation was mechanical: main had renamed items.get(i) to item_at(i) in the meantime.

Closing since it's on main. Thank you!

@hyprlab hyprlab closed this Aug 26, 2026
hyprlab added a commit that referenced this pull request Aug 26, 2026
Clicking an attachment did nothing. The staging code asked open() for
O_NOFOLLOW but passed 0o200000, which on Linux is O_DIRECTORY: creating
a regular file with it fails, so no attachment could be staged — and
the symlink refusal the flag was meant to provide was silently absent.
The constant is now the real O_NOFOLLOW (0o400000), with a comment
naming the old bug so it can't quietly return.

Opening also goes through the XDG portal (UriLauncher, properly
parented) instead of AppInfo::launch_default_for_uri, which under
Flatpak — or for a type with no registered default app — silently does
nothing; the portal shows GNOME's app chooser instead. The old call
remains as a fallback when the portal itself is unreachable.

Adapted from PR #44.

Co-Authored-By: Isaac <177023792+thecalamityjoe87@users.noreply.github.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
hyprlab added a commit that referenced this pull request Aug 26, 2026
In the attachments gallery and the in-message drawer, a PDF now renders
its first page (via poppler-glib, at 360px for sharpness, on a white
ground so transparent pages don't punch holes in dark mode) instead of
showing the generic red type icon. A PDF that fails to parse falls back
to the icon as before. The Flatpak manifest gains a poppler module
(config after Evince's, JPEG2000 off); native builds need
poppler-glib-devel / libpoppler-glib-dev.

Adapted from PR #49 (issue #48) — its copy of the #44 opening fix had
already landed separately.

Co-Authored-By: Isaac <177023792+thecalamityjoe87@users.noreply.github.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
hyprlab added a commit that referenced this pull request Aug 29, 2026
The drawer's flow gets single selection: one click paints a soft
rounded accent wash over the cell (grid and list layouts alike), and
Space or Enter then activates the highlighted attachment — images and
PDFs into the in-app lightbox, everything else to its default app —
mirroring double-click, which is untouched. The Nautilus-style flow
isorropisths asked for; the bug half of #37 (Open doing nothing)
shipped back in 1.15.x via thecalamityjoe87's PR #44.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U8NunGhmvK96frgHdaL6Vu
@thecalamityjoe87
thecalamityjoe87 deleted the fix-opening-attachments branch August 30, 2026 02:29
somepaulo pushed a commit to somepaulo/hylki that referenced this pull request Sep 24, 2026
Clicking an attachment did nothing. The staging code asked open() for
O_NOFOLLOW but passed 0o200000, which on Linux is O_DIRECTORY: creating
a regular file with it fails, so no attachment could be staged — and
the symlink refusal the flag was meant to provide was silently absent.
The constant is now the real O_NOFOLLOW (0o400000), with a comment
naming the old bug so it can't quietly return.

Opening also goes through the XDG portal (UriLauncher, properly
parented) instead of AppInfo::launch_default_for_uri, which under
Flatpak — or for a type with no registered default app — silently does
nothing; the portal shows GNOME's app chooser instead. The old call
remains as a fallback when the portal itself is unreachable.

Adapted from PR hyprlab#44.

Co-Authored-By: Isaac <177023792+thecalamityjoe87@users.noreply.github.com>
somepaulo pushed a commit to somepaulo/hylki that referenced this pull request Sep 24, 2026
In the attachments gallery and the in-message drawer, a PDF now renders
its first page (via poppler-glib, at 360px for sharpness, on a white
ground so transparent pages don't punch holes in dark mode) instead of
showing the generic red type icon. A PDF that fails to parse falls back
to the icon as before. The Flatpak manifest gains a popple
91D3
r module
(config after Evince's, JPEG2000 off); native builds need
poppler-glib-devel / libpoppler-glib-dev.

Adapted from PR hyprlab#49 (issue hyprlab#48) — its copy of the hyprlab#44 opening fix had
already landed separately.

Co-Authored-By: Isaac <177023792+thecalamityjoe87@users.noreply.github.com>
somepaulo pushed a commit to somepaulo/hylki that referenced this pull request Sep 24, 2026
The drawer's flow gets single selection: one click paints a soft
rounded accent wash over the cell (grid and list layouts alike), and
Space or Enter then activates the highlighted attachment — images and
PDFs into the in-app lightbox, everything else to its default app —
mirroring double-click, which is untouched. The Nautilus-style flow
isorropisths asked for; the bug half of hyprlab#37 (Open doing nothing)
shipped back in 1.15.x via thecalamityjoe87's PR hyprlab#44.
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

0