Skip to content

fix(linux): allow local file links under /home - #57

Merged
melonamin merged 1 commit into
melonamin:linux-portfrom
mvs3d:fix/linux-home-file-links
Nov 7, 2026
Merged

melonamin merged 1 commit into
melonamin:linux-portfrom
mvs3d:fix/linux-home-file-links

Conversation

@mvs3d

@mvs3d mvs3d commented Nov 7, 2026

Copy link
Copy Markdown

Problem and fix

Ctrl-clicking a local file under /home was ignored on Linux, even though agtermctl session overlay open --markdown could open the same file. Both plain printed paths and explicit OSC 8 file links reach LinkPolicy.localPath, which unconditionally applied the macOS automount-root denylist, including /home. The CLI follows a separate validation path.

Apply the existing automount-root check only on macOS. Linux home files now follow the existing routes: Markdown and supported images open as generated pages, while ordinary files reveal their containing folder. macOS retains the same denylist, and shared non-local host, UNC, scheme, and lexical normalization checks are unchanged. The core remains host-free, with no new control command or protocol change.

Add regression coverage for absolute paths, explicitly expanded ~/ paths, empty-host and localhost file URLs, dot normalization, and Markdown/image/ordinary-file routing. Extend the existing GTK click scenario to exercise plain paths and OSC 8 links under both /tmp and /home, including root-run CI fixtures. Update Linux behavior and validation documentation.

Validation

  • Before the fix, the new regression failed all 36 assertions; after the fix, all 34 link-policy tests passed.
  • Complete core/CLI suite: 4,959 tests in 223 suites passed.
  • Complete Linux package suite: 580 tests in 87 suites passed.
  • GTK app and Linux CLI debug build passed with Swift 6.3.2, Zig 0.16.0, and the repository-pinned Ghostty/zmx revisions in a local Ubuntu Noble Podman image.
  • SwiftLint 0.65.0 strict check, Linux CLI drift check, core-boundary check, and git diff --check passed. The boundary check used CI's exact v0.40.0 commit (c63e5158e637662ded7ba3a12eac4881b24caef1) because the tag was absent locally.
  • Real GTK links-v0400 scenario passed on a private Xvfb display, including all eight image/Markdown, plain/OSC 8, /tmp//home combinations.
  • User manually verified the isolated native Fedora 44 GNOME/Wayland instance: plain paths, OSC 8 links, Markdown, images, ordinary-file folder opening, and CLI opening behaved as expected.

Limitations

macOS builds/tests and the full GTK smoke matrix were not run. The focused GTK scenario was run; native Wayland acceptance was manual. SwiftPM emitted pkg-config prohibited-flag warnings, and the successful GTK run logged an AT-SPI cache warning at startup. No installed RPM, production sessions, or persistent personal configuration were changed.

@mvs3d
mvs3d marked this pull request as ready for review November 7, 2026 14:08
@mvs3d
mvs3d requested a review from melonamin as a code owner November 7, 2026 14:08
@melonamin
melonamin merged commit 77009b6 into melonamin:linux-port Nov 7, 2026
5 checks passed
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