Skip to content

Linux: FreeSerif symbol fallback, session-theme icons, single-instance, GNOME toplevel fallback (fixes #2, #20, #21, #22) - #29

Closed
ImBIOS wants to merge 3 commits into
anomalyco:devfrom
ImBIOS:qa/linux-issues
Closed

ImBIOS wants to merge 3 commits into
anomalyco:devfrom
ImBIOS:qa/linux-issues

Conversation

@ImBIOS

@ImBIOS ImBIOS commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #2, fixes #20, fixes #21, fixes #22.

Why one PR

These four issues are one theme: Rune on stock Ubuntu where the happy path is missing — a glyph the system font lacks, icon themes outside hicolor, no session-bus name, no layer-shell. Each fix is small, Linux-only, and verified by the same harness on the same Ubuntu 24.04 image. One PR = one review, one CI run, one rebase against a fast-moving dev.

If you want it split, it separates cleanly by commit with no code moves between them:

  1. 35329d7 — FreeSerif fallback (Linux: keyboard-symbol fallback leaves U+238B (⎋) as tofu — plex_keyboard_symbols_use_real_glyphs fails on stock Ubuntu #2) + session-theme/Inherits icon lookup (App icons off macOS: freedesktop icon-theme lookup and SVG rasterising #21) + single-instance core (Linux: open-URL and reopen hook via org.freedesktop.Application #22: instance.rs, App::single_instance/on_open, window.rs drain)
  2. 4c58715 — GNOME toplevel fallback (Wayland: toplevel fallback for overlays without layer-shell (GNOME) #20) + token/show follow-through for Linux: open-URL and reopen hook via org.freedesktop.Application #22
  3. a18b649 — Wayland backend pin (one-liner, folds into either)

Cherry-pick any of them onto dev independently.

E2E + manual QA

All below run on the same stock Ubuntu 24.04 image (Lavapipe via VK_ICD_FILENAMES, Xvfb :99 windowed, sway 1.9 wlroots for layer-shell, nested mutter-46 for the GNOME case). Repro scripts live at /tmp/opencode/proof/: issue2_e2e.sh, icon_e2e.sh, instance_e2e.sh (plus sway_concept.sh / instance_manual.sh for the two hand-driven flows).

#2 — U+238B tofu (FreeSerif fallback), text.rs + help.rs test gate

  • Expected: cargo test -p rune --lib text::tests::plex_keyboard_symbols_use_real_glyphs green; keybind scene renders ⎋ instead of tofu with no other glyph moves.
  • Commands:
    cargo test -p rune --lib -- text::tests::plex_keyboard_symbols_use_real_glyphs
    ./target/debug/kit-gallery --scene rune-keybind--symbols --size 1100x640 --scale 1 --snap symbols_fixed_small.png --tree symbols_fixed.json
    
  • Result: gate FAILED before the fix, passes after. Tree check asserts exactly 6 ⎋ nodes (U+238B nodes: 6). Before/after PNG (symbols_before.png vs keybind_windowed.png, side-by-side in symbols_before_after.png): the Plex Mono rows went from tofu boxes to real ⎋; Inter rows and all other symbols byte-identical by design (Parley keeps the first covering font).
  • Windowed: same scene run on Xvfb, scrot -a 0,0,1100,640 keybind_windowed.png — a live window, not just headless. xwininfo confirms rune-kit gallery 1100x640+0+0.
  • Regression sweep: settings --scene dark --snap, settings --script toggle.json --frames 120 --trace (motion-audit: 0 findings), settings --script slider.json (0 findings), plus kit-gallery combobox trace (only pre-existing scroll-presence notices, unrelated).

#21 — session-theme / Inherits icon lookup, image.rs

  • Expected: icons installed only in the session theme (no hicolor copy) resolve; hicolor behavior unchanged.
  • Commands:
    cargo test -p rune --lib -- image::
    ls /usr/share/icons/Humanity/apps/48/accessories-dictionary.svg   # no hicolor copy exists
    ls /usr/share/icons/hicolor/32x32/apps/forkhub-desktop.png
    
  • Result: hicolor ladder (incl. 48x48@2 = 96px), Inherits-chain, and real-system probe (Humanity-only SVG resolves and rasterizes 96×96 through app_icon_rgba, visible pixels asserted) all green. resvg + zbus were already core deps, so no new dependency and no feature flag.
  • What was already there vs new: hicolor + SVG + pixmaps lookup existed upstream; this PR adds current-theme + Inherits + verbatim index.theme directory matching. Partial in the sense that only the missing half is new.

#22 — single instance, instance.rs + App::single_instance / App::on_open

  • Expected: first launch owns rune.<app_id>; second launch forwards URIs and exits 0 without opening a window; a bare second launch forwards an empty Activate.
  • Commands: cargo test -p rune --lib -- instance (bus-name unit + live bus round-trips: Open-forward with 2 URIs landing in the owner's queue; bare Activate as empty reopen).
  • Result: green in ~0.04s. Known gotcha found while testing and handled: a leaked serving connection alone is not enough — with no executor left, the owner's method calls never dispatch and the second launch hangs; the owner now serves on a dedicated bus thread.
  • Windowed manual QA (instance_manual.sh): two todo-instance launches on Xvfb — second exits 0 in <2s, no second window appears; owner drains via on_open; activation token rides the existing AppHandle::activate(token) path.

#20 — toplevel fallback without layer-shell, overlay.rs

  • Expected: prepare() falls back to an undecorated xdg toplevel where no layer-shell binds, and the capability report says exactly what's degraded.
  • Commands / observation: OVERLAY_LAB_SECONDS=… OVERLAY_LAB_PICKER=1 ./target/debug/overlay-lab on nested Mutter (mutter --nested --wayland-display=qa-gnome, globals confirm no zwlr_layer_shell_v1): process stays up and prints
    overlay-lab picker created OverlayCreated { window_number: None, capabilities: OverlayCapabilities { capture_exclusion: Unsupported, nonactivating_keys: Unsupported, global_pointer: Supported } }
    
    instead of going Unavailable. Contrast control: same binary on sway reports nonactivating_keys: Supported (layer-shell path), on X11 Unsupported with window fallback.
  • Pixels: screenshots are thin on nested Mutter (no stable screencast path there), so pixel proof is the X11 scrot of the same pill (pill_crop_new.png: Area/Window/Screen/iPhone/Paste chips on transparent pill) and the fullscreen grab (windowed_overlay.png, xwininfo confirms Rune pill 680x160+300+40 + Rune picker), plus headless wl_snap renders.
  • Manual QA still open (needs a person): show-from-shortcut → type → Escape hides → focus returns, on real GNOME and on KWin/Hyprland/niri.

#19 — layer-shell launcher (no code change)

  • KeyPolicy::OnDemand + request_keys() + supports_keys verified on sway 1.9 (zwlr_layer_shell_v1 v4): nonactivating_keys: Supported. The v4 gate (request_keys false below v4) and capability reporting the issue asks for both exist. Remaining work is the manual flow above, not code.

#23 — no change

  • Probed real hardware surface: no /dev/dri, no /dev/video*, no vulkaninfo. DMA-BUF import and the GLES backend need real driver objects / GL-only hardware; unobservable under Lavapipe/Xvfb in a meaningful way, low-priority in the issue itself, so it stays filed as backlog.

@ImBIOS
ImBIOS force-pushed the qa/linux-issues branch 2 times, most recently from 146db70 to 024feed Compare October 26, 2026 03:58
@ImBIOS

ImBIOS commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Rebased onto current dev — merge state is CLEAN. No code changes in the rebase; CHANGELOG entry re-seated newest-first under ## dev.

Ready for review. The E2E evidence is in the PR description below; before/after scene PNGs (symbols_before.png vs symbols_fixed_small.png, plus the side-by-side composite) and the issue2_e2e.sh repro script are in the linked proof artifacts. The unit gate (plex_keyboard_symbols_use_real_glyphs) passes on this rebased head too.

@ImBIOS

ImBIOS commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Conflict fixed again (rebased onto current dev, now a single squashed commit on top — no more per-commit CHANGELOG churn). Merge state is CLEAN/MERGEABLE.

Since the last update this PR grew two follow-ups:

  1. App icons off macOS: freedesktop icon-theme lookup and SVG rasterising #21 follow-up — session-theme + Inherits icon lookup (crates/rune/src/image.rs): icon_file read only icons/hicolor. Now reads the XDG_CURRENT_DESKTOP theme (Adwaita → Humanity → hicolor fallback), follows Inherits breadth-first to hicolor, matches directories verbatim from each index.theme. Details + verification in the comment on App icons off macOS: freedesktop icon-theme lookup and SVG rasterising #21.
  2. Linux: open-URL and reopen hook via org.freedesktop.Application #22 — single instance (crates/rune/src/instance.rs + App::single_instance / App::on_open): first launch owns rune.<id> on the session bus; second launch forwards URIs via Open (or bare Activate) and exits 0. Live session-bus round-trip tests green. Details + verification in the comment on Linux: open-URL and reopen hook via org.freedesktop.Application #22.

Also covered #19 (layer-shell path verified on sway v4 — no code gap found) and #20 (toplevel fallback implemented; nested-Mutter verification in the comment there), while #23 stays backlog (no GPU/DMA-BUF hardware here).

….freedesktop.Application; keyboard symbols via FreeSerif

Icons (anomalyco#21 follow-up): icon_file read only icons/hicolor, so theme-installed
icons (Humanity apps/48, Adwaita sets) resolved to nothing. Now reads the
XDG_CURRENT_DESKTOP theme (Adwaita/Humanity/hicolor fallback), follows
Inherits breadth-first, matches directories verbatim from each index.theme.
Temp-theme + Inherits-chain + real-system (Humanity-only SVG resolves and
rasterizes 96x96) tests green.

Single instance (anomalyco#22): App::single_instance + App::on_open. First launch owns
rune.<id> on the session bus (dedicated serve thread; a leaked connection
alone never dispatches); second launch forwards URIs via Open (or bare
Activate) and exits 0. Live bus round-trip tests green.

Keyboard symbols (anomalyco#2): FreeSerif between DejaVu Sans and Noto in
SYMBOL_FAMILIES/SYMBOL_FONT_FILES, covering U+238B. plex unit gate green.
layer-shell binds (verified on nested Mutter: picker reports
nonactivating_keys Unsupported instead of Unavailable), with degraded
capabilities reported. Verified: qa-gnome has no zwlr_layer_shell_v1
and overlay-lab takes the window path.

into try_create and an Open is queued behind on_open's update, so the
owner's window shows activated as a relaunch would.
@ImBIOS ImBIOS changed the title Linux keyboard symbols: fall back to FreeSerif for U+238B (fixes #2) Linux: FreeSerif symbol fallback, session-theme icons, single-instance, GNOME toplevel fallback (fixes #2, #20, #21, #22) Oct 28, 2026
@thdxr

thdxr commented Nov 6, 2026

Copy link
Copy Markdown
Member

thanks for this. rune is agent-driven, so we don't take pull requests. if you'd like a change or a bug fixed, have your agent open an issue describing it (https://github.com/anomalyco/rune/issues) and our agents will pick it up.

@thdxr thdxr closed this Nov 6, 2026
Hona added a commit that referenced this pull request Nov 12, 2026
… and edit cost (#812)

- Fields step words by UAX #29 (paths, brackets, Persian ZWNJ words), and a word forward stops at the next word's start in right-to-left text too.
- Ctrl+Left Shift and Ctrl+Right Shift set a field's direction on Windows and Linux; a shortcut with them never does.
- Left and Right swap in right-to-left focus groups, sliders and Kit trees; right-to-left table rows copy as tab-separated cells.
- Tab titles fade at their own end; Luau UI text reads the way its words do.
- In a right-to-left app the Windows caption buttons sit at the top-left, tooltips read from the right, and inline icons keep their gap beside their word.
- Rich HTML copies say each block's direction; a right-to-left locale's missing message is the English one, isolated.
- A keystroke in a long plain draft keys only the paragraphs it touched; spell checking hashes each line once.
- Tooling: --tree lists a focused field's selection; scripts press single modifier keys.
kitlangton added a commit that referenced this pull request Nov 12, 2026
…pped over (r378)

#812 broke the pill stop: its pill-end clause skipped the end the scan reached,
so the caret jumped over @noah instead of stopping after it. Its UAX #29 split of
an emoji from the word before it is deliberate, so that expectation moved to "hé".
j-piccolo added a commit to j-piccolo/rune that referenced this pull request Nov 24, 2026
In ASCII every position is a grapheme boundary but the one between CR and LF
(UAX anomalyco#29 GB3 to GB5, GB999), so analysis works them out from the bytes rather
than running the segmenter over every new string. Checked against the
segmenter on every ASCII string of every offscreen scene of an app built on
it (6,496 strings): the same boundaries. parley_engine 0.13 does the same
work, so the change stays in vendor/parley_engine.patch on a bump.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
j-piccolo added a commit to j-piccolo/rune that referenced this pull request Nov 24, 2026
In ASCII every position is a grapheme boundary but the one between CR and LF
(UAX anomalyco#29 GB3 to GB5, GB999), so analysis works them out from the bytes rather
than running the segmenter over every new string. Checked against the
segmenter on every ASCII string of every offscreen scene of an app built on
it (6,496 strings): the same boundaries. parley_engine 0.13 does the same
work, so the change stays in vendor/parley_engine.patch on a bump.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
j-piccolo added a commit to j-piccolo/rune that referenced this pull request Nov 24, 2026
In ASCII every position is a grapheme boundary but the one between CR and LF
(UAX anomalyco#29 GB3 to GB5, GB999), so analysis works them out from the bytes rather
than running the segmenter over every new string. Checked against the
segmenter on every ASCII string of every offscreen scene of an app built on
it (6,496 strings): the same boundaries. parley_engine 0.13 does the same
work, so the change stays in vendor/parley_engine.patch on a bump.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants