Skip to content

[ryoku] shell: single-instance locks carry the uid - #1052

Open
marcchabot wants to merge 219 commits into
Ryoku-dev:mainfrom
marcchabot:fix/lock-uid
Open

marcchabot wants to merge 219 commits into
Ryoku-dev:mainfrom
marcchabot:fix/lock-uid

Conversation

@marcchabot

@marcchabot marcchabot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Two accounts share my box, and the one that first opens one of these apps
keeps breaking the keybinds on the other session. The launcher spawns the
Hub through flock -n -o, and that file gets created 0644 by whoever
touched the Hub first: the other account's open() then fails EACCES
before flock even runs, and Super+comma silently does nothing there. A
cleanup only held until the next Hub open from the first account - on my
box it broke the second session twice in one day, once from a stale lock
and once six hours later from the same shared path.

The same shared literals also guard the super-k legend, the ryostore and
ryovm desktop entries, the rashin and ryovm summons, the screenshot pin
and the omarchy agents, so the fix is one shape everywhere: the lock path
carries the uid, /tmp/ryoku-hub-$(id -u).lock in sh contexts and
fmt.Sprintf("/tmp/ryoku-hub-%d.lock", os.Getuid()) in Go. A stale
same-uid file stays harmless - the open() succeeds and flock re-locks -
which was already the behavior for a single account before this change.

Tests: go build/vet/test on the ryoku-shell, ryostore, niri and wayfire
modules (the wayfire golden composes its two flock lines at test time
now), and luac -p on the changed Lua. Deployed and running on the box
described.

Note: Fixed: Super+comma comes up on the second account, however the first one opened the Hub.

Confidence Score: 3/5RetriggerView in Greptile

The latest quoting changes look safe, but the existing NixOS Game Mode failure and possible import overwrite still block merging.

FindingsFix All in Claude Code

  1. P1 Game Mode skips NixOS helpers ▶
  2. P1 Imports can overwrite another file ▶
  3. P2 Deck caches old wallpaper colors ▶
  4. P2 Input page probes hardware directly ▶
  5. P2 New corners ignore shared styles ▶
Fix with agent prompt
### Issue 1
ryoku/shell/scripts/ryoku-cmd-game-mode:35-36
The new `/usr/bin` defaults skip both helpers on NixOS. `ryoku-helpers.nix` installs them under `$out/bin` without rewriting these paths, so the executable checks return without changing system tuning or Wi-Fi power saving. The [NixOS authorization rules](https://github.com/ryoku-dev/ryoku-on-nixos/blob/HEAD/nix/modules/ryoku.nix#L1384-L1404) also expect the installed Nix paths. Substitute trusted package paths during the Nix build instead of assuming `/usr/bin`.

### Issue 2
ryoku/shell/ryogami/daemon/library_import.go:241-246
On filesystems without hard links, the hidden claim excludes other imports but not a file manager or download creating `dest` after `Lstat` checks it. `os.Rename` then replaces that file, losing its contents. Use a no-replace move or another method that refuses an occupied destination.

### Issue 3
ryoku/shell/ryogami/picker/qml/deck/DeckPalettes.qml:178-181
`_apply()` stamps returned colors with the latest `_specs[key].mtime`, not the version requested. If a wallpaper changes during generation, an older reply can be saved as current. If the refresh fails, later checks see matching timestamps and keep those old colors. Capture each requested timestamp and discard replies for changed entries.

### Issue 4
ryoku/hub/quickshell/pages/InputPage.qml:84-87
The new `Process` reads touchpad hardware directly from QML. The repository requires the Go daemon to gather system state and QML to read it through `Bus`, `ShellSettings`, or `BusTopic`. Publish touchpad presence through that shared path instead of adding a separate `/proc` probe. This architecture requirement must be satisfied before merging.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

### Issue 5
ryoku/shell/ryogami/picker/qml/deck/DeckCard.qml:undefined-33
`thumbRadius: 10 * u` keeps the new Deck thumbnail rounded regardless of the chosen style. The new `WeekChart.qml` also uses `Scaler.s(3)`. The UI contract forbids hand-set corner radii, so derive these from the shared style tokens. This requirement must be satisfied before merging.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

The latest revision quotes the per-account lock paths in the screenshot and Kit launchers.

  • Each account now gets its own lock when it opens a Ryoku app.

Reviews (2) · Last reviewed commit: "[ryoku] shell: quote $(id -u) in flock l..." · Reviewed by Greptile

neur0map and others added 30 commits November 17, 2026 08:04
The pointer block told agents to write notes to `memory/` and `journal/`
without saying whose. Read next to an agent's own memory directory, that
looks like the agent's store. Name both as vault folders, and sync the
docs example, which had drifted from the block the code writes.

Note: Fixed: the agent pointer now says its memory/ and journal/ folders live in the Rashin vault
GO-2026-5024 truncates on a 16-bit length overflow in NewNTUnicodeString and
is fixed in v0.44.0. The symbol sits in the windows build of the package, so
no Ryoku target was exposed, but four modules were pinned below the fix.

Vendored trees regenerated for the shell IPC daemon, the Hub backend and the
shell installer. ryoku/cli stays at v0.27.0: v0.44.0 needs go 1.25, and
raising that module's directive turns on the non constant format string vet
check, which its i18n call sites do not pass yet.

Refs Ryoku-dev#888
Every gpu.lua that pins a render GPU set no_hardware_cursors = true. The
reason it gives is reverse PRIME: a monitor wired to a GPU other than the
renderer gets its cursor across GPUs, and the hardware cursor plane cannot
reliably import that buffer, so the shape can stick. A desktop whose only
monitor is on the GPU that renders has no such monitor, yet it was forced
onto software cursors too, and a software cursor is painted into every
captured frame.

gpu.lua now forces software cursors only while ryoku-gpu other-screen
finds a monitor lit on a GPU other than the pinned one. It checks when the
file loads (login and every config reload, which resets the option) and on
monitor.added, so a monitor plugged into an iGPU port mid-session switches
to software cursors before its cursor can stick. A hotplug never switches
back; the next reload or login does. The route pin is unchanged: its
laptop panel is on the other GPU by definition.

Hyprland's own default still picks software cursors on NVIDIA with more
than one GPU, so those machines keep them unless the user overrides it.

Note: Fixed: a desktop rendering on its dGPU keeps hardware cursors when no monitor is on the other GPU
ryoku-gpu other-screen reads connector status, so a monitor that is
connected but disabled counts. The generated gpu.lua comment, the
helper's comment, the test and the changelog said "lit"; they now say
connected, and gpu.lua notes that a disabled monitor counts.
ryoku-clamshell gains an opt-in closed-lid policy: with
`ryoku-power lid set keepRunningOnAc true` and the charger attached, a
non-docked close locks the session through ryoku-shell and blanks the
internal panel through the seam's output.power action instead of asking
for the secure suspend transaction. Battery always suspends, an
unconfirmed lock falls back to suspend, and unplugging AC while the lid
is already shut suspends at once. A config reload with the lid shut runs
the same policy through `lid sync`.

ryoku-power owns the setting in power.json (lid.keepRunningOnAc, off by
default) and reports it in capabilities on laptops; the Hub's Machine
page renders it as a LID card. Covered by tests/power.sh and
tests/clamshell-policy.sh.

Note: New: keep a laptop running on AC with the lid closed, locking and blanking the screen instead of suspending
`ryoku-power lid get keepRunningOnAc` reported failure for false, because
`jq -e` treats false as no output. Read it with `jq -r` and assert a
successful exit in the test.

An in-flight secure suspend was cancelled when the opt-in became active,
even though the opt-in itself had not locked the session. Only a live
docked close may cancel that transaction now, and a regression test turns
the setting on mid-retry.

Also drop the redundant LID section comment from the Hub page.
A shut lid only keeps the session awake under the keep-running opt-in
when a lock has been confirmed for the current close. A docked close
hands the panel to the external display without locking; if the display
is unplugged while the lid remains shut, or if the session was unlocked
while docked, evaluate() locks the session and confirms the lock before
allowing the opt-in to hold the session awake. If the lock cannot be
confirmed, it falls back to the secure suspend transaction. Re-docking
clears the confirmation so subsequent undocks require a fresh lock.

Also preserve the power config file in ryoku-power lid_cfg_set when
JSON parsing fails, instead of truncating on jq errors.
When an external display is disconnected after a docked close with the
opt-in enabled on AC, evaluate() now blanks internal panels through
power_off_internal_panels in addition to confirming the session lock.
Update tests/clamshell-policy.sh to expect the power-off action and
guard the lid-watcher stub against startup timing races.

In ryoku-hub backend cputune, log ryoku-clamshell lid sync failures to
stderr instead of discarding them, preserving the successful config save.
The Workspaces widget's Marker gains Icons: the numbers cell with a
Material Symbol in place of the digit, through the module's IconText.
qsbar.workspaceIcons holds one symbol name per workspace in order, and
an empty entry shows the number.

While the marker is chosen, the Workspaces row in QS Bar Settings >
Widgets shows a picker: a cell per workspace, then the number, 39
offered symbols and a field for any other name. It is not a catalogue
row because the catalogue has no list type or conditional display.

The value persists through persistWidgetsToConfig like isolateMonitors,
and the Identity preview draws the new marker. The daemon already
validates catalogue choices, so only its fixture and a test change.

Note: New: QS Bar workspaces can show an icon each (Marker > icons)
Normalise typed names and refuse unknown symbols, save the field before
switching workspace, clamp the slot when Shown shrinks, accept only
whole-number workspace names, and find icons in settings search.

Note: Fixed: QS Bar keeps the Pacman marker when restored from its cache
Share the numbers badge in the bar and preview, move the picker tile to
CcGlyphTile, read sizes from Tokens, and parse the icon list once.
The media-key step and the bar's volume wheel were hardcoded literals:
ryoku-volume snapped to a five-point grid (with a 65 to 67 detour on the way up),
the brightness binds carried +5/-5 into each compositor's config, and the shell's
audio verb stepped the sink on its own. Ryoku Settings now owns both numbers.

audio.step and display.brightnessStep are passthrough shell.json keys, so the
daemon needs no schema or migration. The helpers read them and clamp to the 1-25
range the stepper offers; a missing, non-numeric or fractional value keeps or
rounds to a whole step, and a negative value clamps to 1. The audio verb now runs
ryoku-volume, so the bar's wheel lands where the key lands and can reach the
boost cap. Desktop > Notifications gains Volume step and Brightness step.

The brightness binds pass up/down instead of a number on Hyprland, niri and
Wayfire, so the setting never has to rewrite a compositor config, and
ryoku-cmd-brightness still takes +N/-N for scripts and configs written before
this.

Note: New: choose how far the volume and brightness keys step
ryoku-volume assumed wpctl reported exactly the level it had just set. A sink
that rounds reads back one point high (65 reports 66), so the down path computed
65 again and the key looked stuck for a press or two (Ryoku-dev#910). The same drift
stalls the other way: 64 up landed on 65.

A reported level within one point of the step grid now snaps onto that level
before stepping, for steps of 4 and up. A value genuinely between levels still
moves a full step in the pressed direction, so 43 up is 45 rather than the 50
that nearest rounding alone gives. Steps of 1 to 3 keep no tolerance, because
one point is too much of such a step to tell drift from a value in between.

The ends are unchanged: 99 up reaches 100 without boost, and 100 up reaches 105
with qsbar.audioBoost on.

tests/key-steps.sh gains the reported 66 down, 64 up, 67 up, step 10 71 down and
69 up, and the 99 and 100 boost cases.

Fixes Ryoku-dev#910
Note: Fixed: the volume keys no longer stall on a sink that reports a rounded level
Qt Multimedia's FFmpeg device initialization (av_hwdevice_ctx_create
-> vkCreateDevice) during card video previews crashes with SIGSEGV
inside MangoHud's implicit Vulkan layer. Opt out on the picker process
via DISABLE_MANGOHUD=1, matching RyoStore (Ryoku-dev#831, Ryoku-dev#903).

Note: Fixed: opening the wallpaper picker no longer crashes when MangoHud is installed
Route discrete output controls through the shared Hub setting, preserve the default curve, and persist changes through the settings daemon.

Note: New: Change the volume key step across bars, docks and shell controls
The Window Manager chips read the compositor's workspace list, which emits no event when a workspace layout changes, so they kept the old value after a click. They now show the layout the helper last applied, which the helper re-reads on every action.

Note: Fixed: the per-display tiling chips now show the layout you just picked
Records the Window Manager chip readback fix for users.

Note: Fixed: the per-display tiling chips show the layout you picked
A layout set from the bar never reaches the helper's saved state. The chip now falls back to the compositor's workspace layout when there is no saved entry, so it shows what the bar set.

Note: Fixed: a display's tiling chip shows the layout set from the bar
The chip read the helper's saved layout first, so a layout changed later from the bar showed the old value. The compositor is now read first; the saved entry is the fallback.

Note: Fixed: a display's tiling chip follows a layout changed from the bar
The layout demo read the draft under 'appearance.layout', but the key is
'desktop.appearance.layout', so it always drew dwindle. The chip also
read the compositor first, which stopped the buttons redrawing after a
click. Read the helper's saved layout first again, with the compositor
as the fallback.

Note: Fixed: the per-display tiling buttons redraw when a layout is picked
A layout set from the bar reaches the chip only once the Hub records it.

Note: Fixed: the per-display tiling chip can lag a layout changed from the bar
The QS Bar bell panel clamped each body to two lines with no way to
read the rest, and clicking an actionless notification dismissed it
instead, so a long alert from pacman or cron was gone the moment the
user tried to read it. The body now toggles between its clamped and
full form on click; the click handler invokes the default action only
when the notification carries one, and the unused openNotification
helper is gone.

Note: Fixed: notification entries in the bell panel now expand to
show the full body when clicked, instead of dismissing a notification
you were still reading.
The expanded state is keyed on the notification id rather than a
delegate-local bool, so a Repeater that reuses a delegate after the list
changes cannot carry an expanded body over to a different alert. The
unlimited line count uses the largest int rather than Infinity, which
is not a valid value for an integer QML property.

The shell changelog carries the Ryoku-dev#909 note.
AJIADb9 and others added 22 commits November 30, 2026 00:03
Hyprland's mirrorOf is the source monitor's numeric ID ("0"), but the
Displays editor keys its mirror picker by output name, so a mirrored
display showed MIRROR OF: None, and an Apply carried the ID into
monitors.lua and monitors-applied.json, where it can name another
display after a replug or reorder. Resolve the ID through the same
monitor list; a value that is already a name, or an ID no listed
output holds, passes through.

Note: Fixed: Displays shows which screen a mirrored display copies
hyprctl reports mirrorOf as the source monitor's numeric ID ("0"), and
monitors_json passed it through, so list, persist (monitors.lua) and
the Super+P snapshot carried an ID where hl.monitor's mirror field and
the Displays page expect an output name. Resolve it in monitors_json
from the same hyprctl output: a name passes through, and so does an
ID no listed output holds. tests/monitor-persist.sh covers list,
persist and apply with a DP-2 mirroring HDMI-A-1 by ID.

Note: Fixed: a mirrored display is saved by the name of the screen it copies
…-dev#1008)

Takes the PR's DesktopMenu in place of the earlier Ryoku-dev#1004 fix: the card
wrapper owns the fade and scale, and only a panel-sized inner layer is
rasterised for the shadow. The earlier changelog line in ryoku/CHANGELOG.md
is dropped so the PR's shell entry is the only one.
…1009)

Takes the PR's MprisSelect in place of the earlier Ryoku-dev#1005 fix, with its
offscreen regression harness. The earlier ryoku/CHANGELOG.md line is
dropped so the PR's shell entry is the only one.
Any PASS line counted as success, so a clean exit after the first check
passed without exercising the grace or the drop. Match the closing
marker instead.
A browser changes properties on the same MPRIS object rather than being
replaced, so the harness now flips a fake QtObject's state and title in
place and checks it is held, then recovers without the grace dropping it.
Both power cutover paths silenced only stdout of `ryoku wm act
config.reload`, so the exit 4 notice niri prints leaked into every
`ryoku update`. They now share a helper that holds stderr and replays it
only on a real failure, as ryoku-power-cutover does.

Note: Fixed: ryoku update on niri no longer prints a misleading config reload error
Hyprland, niri and Wayfire floated the Hub, Ryostore, Ryovm and the
welcome window by their window title, which I18n.tr translates, so a
non-English desktop opened them tiled. The apps carry stable app ids now,
so every rule and the Hub's work-area fit match those instead. The welcome
window gets its own app id, the shadowed Ryostore title rule is gone, and
niri floats Ryostore and Ryovm like Hyprland does.

Note: Fixed: Ryoku Settings, Ryostore, Ryovm and the welcome window open floating at their size in every language
The plugin RPMs require the exact Hyprland build they compiled against, but
the stable repo only rebuilds on a release tag, so when sdegler/hyprland
replaced 0.57.2-1 with 0.57.2-3 (new libhyprgraphics soname) the 1.1.0
plugins became uninstallable.

The plugin Release now names the Hyprland build, so a rebuild is a newer
package instead of new bytes under the same name. Ryoku-tree RPMs get input
digests like upstream ones, so rerunning a release tag reuses every
unchanged package. A scheduled workflow compares each channel's plugins with
the COPR and republishes the channel that pins an older Hyprland.

Note: Fixed: Hyprland plugins and key sounds install on Fedora again after the Hyprland COPR rebuilds Hyprland
On unstable-dev window_rules.lua requires modules.process_tag, which the
sandboxed loader could not find, so the test and its workflow failed
before any rule was checked. Hand the module a stub tagger.
Ryotunes 1.2.8 maps with the app id ryotunes instead of org.quickshell,
so the Quickshell-plus-title rule missed it and the class-only rule would
float the mini player too. One rule now matches the ryotunes app id with
the Ryotunes title on Hyprland and Wayfire; niri has no Ryotunes rule.

Note: Fixed: Ryotunes opens floating again while its mini player stays tiled
…1013)

Firmware that keeps ASPM (FADT or _OSC) makes the kernel answer EPERM to
every policy write, root included, while the policy still reads, so
Settings offered PCIe power saving and every change failed with a raw
printf write error. The escalated write now reports the refusal as exit 3
with a plain reason; the caller records it for this kernel, command line
and BIOS, and status, capabilities and apply treat ASPM as unsupported
while that holds. pkexec is no longer exec'd so the caller sees the
result; tests/power.sh covers both sides.

Note: Fixed: PCIe power saving no longer fails with a write error on laptops whose firmware keeps that setting; it is hidden there instead
hyprpm.toml in hyprland-plugins has no pin for Hyprland 0.57.x, so
prepare() built HEAD. HEAD (022d759) already chases Hyprland git and
hyprbars no longer compiles against 0.57.2 (Math::SCornerRadii), which
fails build-repo.sh and blocks every [ryoku] publish.

When no exact pin matches, ryoku-hypr-plugins and hypr-dynamic-cursors
now take a Ryoku pin keyed by Hyprland major.minor: 2e03a09 and 2a8d0b7,
the last upstream commits before the next chase. HEAD stays the last
resort for a release neither table knows.

Note: Fixed: Hyprland title bars and plugin updates reach unstable again
The QML gate in the publish container now reads an onAnchoring handler
inside an anchor block as an unknown signal and refuses the build, which
held every unstable package back. The handlers move to a Connections on
the window's anchor, the form PopupCard already uses.

Note: Fixed: unstable updates publish again after the dock and Nomarchy popups failed the QML check
dnf builddep reads every spec before Hyprland is in the buildroot, so the
release tag picked up rpm's "package hyprland is not installed" text and
the spec failed to parse. The Hyprland build now reads as 0 until it is
installed, and the real build still names it.

Note: Fixed: the Fedora repos publish again
The Fedora fetch fell back to upstream HEAD whenever hyprpm.toml had no
pin, and hyprland-plugins HEAD now needs a newer Hyprland than 0.57.2,
so hyprbars failed to build. The fetch now takes a per-package pin for
the shipped Hyprland release before HEAD, the same commits the Arch
packages pin.

Note: Fixed: the Fedora Hyprland plugins build again
A grid laid its cards on a 16 ms timer after they changed, so a page that
rebuilds its cards painted a frame or two with every new card stacked at
the origin first. The Keybinds search rebuilds the legend on every
keystroke, so typing flashed the page each time: at 120 fps, 31 of 36
keystrokes showed two or three stacked frames.

Mark the grid dirty instead, ask the window for a frame, and lay during
that frame's afterAnimating, which runs after the polish pass (so new
cards have their heights) and before the scene is synced to the
renderer. Width changes take the same path. A grid not yet in a window
falls back to the timer. The Connections dies with the grid, so the
lay can't run against a page the Hub has already destroyed.

Measured on the same run: 0 of 35 keystrokes show a stacked frame, and
Hub page switches (Graphics & Power, Input, Keybinds) still reveal only
once `settled` holds.

Note: Fixed: typing in the Keybinds search no longer flashes the shortcut cards
[ryoku] ui: lay CardColumns in the frame that shows the change
Two accounts share a box, and whichever opens one of these apps first
creates the /tmp lock 0644 under its uid: every other account then fails
the open() with EACCES before flock runs, and its keybind silently does
nothing. One account's stale /tmp/ryoku-hub.lock left Super+comma dead on
the other session, twice in one day, and each cleanup only held until the
next Hub open from the owner account.

The lock paths now carry the uid - /tmp/ryoku-hub-$(id -u).lock - for the
Hub (daemon hub(), ryostore settings, the launcher action), the keys
legend, the ryostore and ryovm desktop entries, the rashin and ryovm
summons (hyprland, niri, wayfire and the Ask surface), the screenshot
pin, and the omarchy agents. The wayfire golden composes its two flock
lines at test time.

Note: Fixed: Super+comma comes up on the second account, however the first one opened the Hub

@neur0map neur0map left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Changes requested — 0 critical and 2 major issue(s): see the inline comments and the walkthrough for fixes and an agent-ready prompt.

🧹 Nitpicks (1) — optional, not blocking
  1. ryoku/shell/ryogami/picker/qml/deck/DeckRibbon.qml:164-170 — Suggestion: performance — Bound ribbon preview image decoding

    Suggested change

Image {
    anchors.fill: parent
    source: glimpse.shown
    sourceSize: Qt.size(Math.ceil(width), Math.ceil(height))
    fillMode: Image.PreserveAspectCrop
    asynchronous: true
    smooth: true
}

for channel in stable testing; do
if [[ $channel == stable ]]; then dir="fedora/$fedora/x86_64"; else dir="fedora/$fedora/channels/testing/x86_64"; fi
repo="$RUNNER_TEMP/$fedora-$channel"
rclone copy "Ryoku:$R2_BUCKET/$dir/repodata/" "$repo/repodata/" || continue

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 minor · Possible Bug · fix: medium effort

A failed rclone copy is silently treated like a channel with no stale packages. A transient R2 or credential failure can therefore leave incompatible plugin RPMs published while the scheduled check reports success. Distinguish an absent channel from a retrieval failure and fail the job for the latter.

Reply here to discuss, say it's fixed, or explain why it's intended — no mention needed.

Comment thread VERSION
@@ -1 +1 @@
1.1.0
1.1.1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 minor · Maintainability · fix: high effort

This diff includes a release version bump, Fedora packaging, desktop features and the lock fix in one PR. Split or rebase it so the review and release history contain one logical change.

Reply here to discuss, say it's fixed, or explain why it's intended — no mention needed.

Comment on lines +156 to +160
if not exchange(stage, final):
old = stage.with_name(stage.name + ".old")
if final.exists():
os.rename(final, old)
os.rename(stage, final)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 major · Possible Bug · fix: medium effort

If renameat2 is unavailable or the filesystem does not support exchange, the fallback moves the live theme away before installing the staged directory. A theme load in that interval sees no theme, and a failure on the second rename leaves it missing. Preserve the existing theme on failure and use a publication method that does not expose a missing path.

Reply here to discuss, say it's fixed, or explain why it's intended — no mention needed.

Comment on lines +60 to +63
// Per-uid lock: a shared /tmp file is created 0644 by the first account
// that touched the app and every other account then fails the open with
// EACCES, silently. Same-uid stale files reopen fine.
return openConfig("ryostore", fmt.Sprintf("/tmp/ryostore-%d.lock", os.Getuid()), args[0])

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 minor · Maintainability · fix: low effort

The per-user lock change is user-visible, but the changed area changelog does not mention it. Add a note describing the multi-account launch fix.

Reply here to discuss, say it's fixed, or explain why it's intended — no mention needed.

GenericName=Ryoku Store
Comment=Discover and install Ryoku lockscreens, rices, bar styles, plugins and bundles
Exec=env DISABLE_MANGOHUD=1 flock -n -o /tmp/ryostore.lock qs -c ryostore
Exec=sh -c "DISABLE_MANGOHUD=1 flock -n -o /tmp/ryostore-$(id -u).lock qs -c ryostore"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 major · Security · fix: medium effort

Adding the UID does not make a predictable path in world-writable /tmp private. Another local account can pre-create /tmp/ryostore-<victim-uid>.lock with restrictive permissions or hold a flock on it, preventing the victim from opening Ryostore; the same pattern affects the other changed locks. Put the locks in a user-owned runtime directory and use the same path across launchers.

CWE: CWE-377
Reachability: A local account creates or locks the predictable victim-specific file before the victim opens Ryostore from its desktop entry.

Reply here to discuss, say it's fixed, or explain why it's intended — no mention needed.

Comment on lines +171 to +177
}

Text {
width: parent.width
text: ribbon.names[glimpse.index] || ""
elide: Text.ElideRight
font.family: Theme.sans

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 minor · Performance · fix: low effort

glimpse.shown can point to a full-resolution wallpaper, so hovering through the ribbon can decode large images at their original size. Bound sourceSize to the preview geometry.

Suggested change

Suggested change
}
Text {
width: parent.width
text: ribbon.names[glimpse.index] || ""
elide: Text.ElideRight
font.family: Theme.sans
Image {
anchors.fill: parent
source: glimpse.shown
sourceSize: Qt.size(Math.ceil(width), Math.ceil(height))
fillMode: Image.PreserveAspectCrop
asynchronous: true
smooth: true
}

Reply here to discuss, say it's fixed, or explain why it's intended — no mention needed.

Comment on lines +12 to +16
void DeckLayout::reset(const LayoutContext &ctx)
{
Q_UNUSED(ctx)
m_scrollAccum = 0;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 minor · Bug · fix: low effort

reset() leaves m_rects populated with row geometry from the previous model, so a reset or reorder can give overlays stale card positions. Clear the cached rectangles alongside the scroll accumulator.

Suggested change

Suggested change
void DeckLayout::reset(const LayoutContext &ctx)
{
Q_UNUSED(ctx)
m_scrollAccum = 0;
}
void DeckLayout::reset(const LayoutContext &ctx)
{
Q_UNUSED(ctx)
m_scrollAccum = 0;
m_rects.clear();
}

💡 Related suggestion (bug)

Clear stale card rectangles on reset

Suggested change

Suggested change
void DeckLayout::reset(const LayoutContext &ctx)
{
Q_UNUSED(ctx)
m_scrollAccum = 0;
}
void DeckLayout::reset(const LayoutContext &ctx)
{
Q_UNUSED(ctx)
m_scrollAccum = 0;
m_rects.clear();
}

Reply here to discuss, say it's fixed, or explain why it's intended — no mention needed.

@neur0map

neur0map commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

🦊 mika's review

Incremental review: new commits since the last checkpoint.

Summary

  • Isolate single-instance launch locks between user accounts.
  • Add wallpaper import, enterprise Wi-Fi, and closed-lid controls.
  • Expand input, AI usage, and desktop customization.
  • Fix display, packaging, and notification behavior; add regression coverage.

Change diagram

flowchart LR
  User["User actions"] --> Hub["Hub settings"]
  User --> Launch["Per-user app locks"]
  User --> Dolphin["Dolphin wallpaper action"]
  Dolphin --> Ryogami["Ryogami library"]
  Hub --> Power["Power and lid policy"]
  Hub --> WM["Compositor providers"]
  Collectors["AI usage collectors"] --> Bars["Bar widgets"]
  COPR["Fedora Hyprland COPR"] --> Packaging["Plugin rebuild workflow"]
Loading

Estimated review effort: 3/5 · risk: high

📁 Walkthrough details

ryoku/apps/ryostore/backend/routing.go

  • Uses UID-specific locks for Store and Hub launches, avoiding cross-account permission failures.
    • Shares the Hub lock name with other per-user launch paths.

ryoku/apps/ryostore/ryostore.desktop

  • Launches Ryostore under a UID-specific single-instance lock.
    • Retains the MangoHud opt-out.

ryoku/apps/ryovm/ryovm.desktop

  • Launches Ryoport under a UID-specific single-instance lock.
    • Runs the lock command through a shell to resolve the UID.

ryoku/apps/ryostore/quickshell/shell.qml

  • Assigns Ryostore a stable application ID for window identification.
    • Sets the Quickshell AppId to ryostore.

ryoku/apps/ryovm/quickshell/shell.qml

  • Assigns Ryovm a stable application ID for window identification.
    • Sets the Quickshell AppId to ryovm.

ryoku/apps/dolphin/ryoku-set-wallpaper.desktop

  • Adds a Dolphin action that imports an image through Ryogami and sets it as wallpaper.
    • Hides the Ryoku action in KDE sessions.

ryoku/hub/backend/cputune.go

  • Exposes the AC-only closed-lid policy as a laptop power toggle.
  • Saves changes and requests a lid-policy sync for an already closed lid.
    • Parses lid capabilities and maps toggle values to stored booleans.
    • Logs sync failures separately from successful saves.

ryoku/hub/backend/cputune_test.go

  • Adds coverage for lid capability visibility and toggle value conversion.
    • Checks laptop and desktop capability cases.

ryoku/cli/internal/host/power.go

  • Routes ryoku power lid commands to ryoku-power.
    • Adds lid to the supported power subcommands.

ryoku/cli/internal/doctor/reconcile_gpu_pin.go

  • Detects older GPU pins that force software cursors and offers to refresh them.
    • Preserves the GPU pin while updating its cursor policy.

ryoku/cli/internal/doctor/reconcile_gpu_pin_test.go

  • Covers GPU cursor-pin detection, repair, and refresh failures.
    • Verifies check mode and repair without unpinning.

ryoku/hub/backend/icon_theme.go

  • Syncs the configured GTK default icon theme to gsettings when no explicit theme is saved.
    • Validates that the theme is installed without recording a new selection.

ryoku/cli/internal/updater/materialize.go

  • Runs icon-theme application after materialization even without a saved theme choice.
    • Allows the Hub to sync the GTK default for libadwaita applications.

ryoku/hub/backend/lock.go

  • Matches installed Store lock themes to catalogue artwork when no local preview exists.
    • Reads product IDs from receipts and queries the Store snapshot with a timeout.
    • Accepts cached file and HTTPS artwork URLs.

ryoku/apps/ryostore/backend/main.go

  • Exposes the Store catalogue snapshot path for consumers such as lock-theme previews.
    • Adds the internal snapshot command.

.github/workflows/fedora-hyprland-rebuild.yml

  • Checks published Fedora plugin dependencies against the Hyprland COPR build.
  • Dispatches stable or testing repository publishes when plugin dependencies are stale.
    • Runs every six hours and avoids dispatching an already-running publish.

fedora/packages/rpm/fetch/hypr-plugin

  • Falls back to a release-specific plugin commit when upstream lacks a matching Hyprland pin.
    • Uses upstream HEAD only when neither pin is available.

fedora/packages/rpm/prepare-srpms.sh

  • Preserves release suffixes when rewriting spec releases and records Ryoku-tree RPM inputs.
    • Supports reuse of unchanged package builds.

release/packages/hyprland-preview-share-picker/headless-output-physical-size.patch

  • Defaults missing physical dimensions and skips incomplete outputs instead of aborting the picker.
    • Adds physical and headless output builder tests.

release/packages/ryoku-cursor-material/ryoku-cursor-material-recolor

  • Stages and serializes cursor-theme publication to avoid exposing a partially rebuilt theme.
    • Preserves unchanged cursor parts and uses an atomic exchange when available.

Findings

Severity Category Fix effort File Issue
🟡 minor correctness low ryoku/shell/ryogami/picker/qml/deck/DeckCard.qml Bug — The applied-wallpaper badge displays hard-coded English even when the picker is localized. Route the label through the shared I18n runtime.

⚡ Quick fixes by effort

Low effort (apply from the diff):

  • ryoku/shell/ryogami/picker/qml/deck/DeckCard.qml:188 — Bug — The applied-wallpaper badge displays hard-coded English even when the picker is localized. Route the label through the shared I18n runtime.
🤖 Prompt for AI agents (click, copy, paste into Claude/Codex)
Fix the following issues found by mika-agent on Ryoku-dev/ryoku#1052 (branch fix/lock-uid):

- ryoku/shell/ryogami/picker/qml/deck/DeckCard.qml:188-196 — Bug (minor severity, low effort): The applied-wallpaper badge displays hard-coded English even when the picker is localized. Route the label through the shared `I18n` runtime.
  suggested fix:

Text {
anchors.verticalCenter: parent.verticalCenter
text: I18n.tr("current")
font.family: Theme.sans
font.pixelSize: 10 * card.u
font.weight: Font.Bold
font.letterSpacing: 0.4 * card.u
color: card.dress.accentInk
}


For each: verify it is real in the current code, apply the smallest correct fix, and run the repo's tests. Skip anything already resolved and say why.
🛠 Deterministic checks run
  • golangci-lint: not installed (skip)
  • shellcheck: not installed (skip)
  • actionlint 1.7.12: 0 finding(s)

⚠️ Security concerns: Predictable per-UID lock files in shared /tmp allow another local account to block application launches.

🚦 Merge recommendation: changes_required


🦊 Generated by Mika — the Ryoku org's self-hosted AI code reviewer. Machine findings: verify before merging.

@neur0map

neur0map commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Thanks for the work here, this needs to target unstable-dev instead of main

Comment on lines +35 to +36
wifi_helper="${RYOKU_WIFI_POWERSAVE_BIN-/usr/bin/ryoku-wifi-powersave}"
tune_helper="${RYOKU_GAME_TUNE_BIN-/usr/bin/ryoku-game-tune}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Game Mode skips NixOS helpers

The new /usr/bin defaults skip both helpers on NixOS. ryoku-helpers.nix installs them under $out/bin without rewriting these paths, so the executable checks return without changing system tuning or Wi-Fi power saving. The NixOS authorization rules also expect the installed Nix paths. Substitute trusted package paths during the Nix build instead of assuming /usr/bin.

Prompt To Fix With AI
This is a comment left during a code review.
Path: ryoku/shell/scripts/ryoku-cmd-game-mode
Line: 35-36

Comment:
**Game Mode skips NixOS helpers**

The new `/usr/bin` defaults skip both helpers on NixOS. `ryoku-helpers.nix` installs them under `$out/bin` without rewriting these paths, so the executable checks return without changing system tuning or Wi-Fi power saving. The [NixOS authorization rules](https://github.com/ryoku-dev/ryoku-on-nixos/blob/HEAD/nix/modules/ryoku.nix#L1384-L1404) also expect the installed Nix paths. Substitute trusted package paths during the Nix build instead of assuming `/usr/bin`.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Claude Code Fix in Codex

Comment on lines +241 to +246
if _, err := os.Lstat(dest); err == nil {
return os.ErrExist
} else if !errors.Is(err, os.ErrNotExist) {
return err
}
return renameFile(tmp.Name(), dest)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Imports can overwrite another file

On filesystems without hard links, the hidden claim excludes other imports but not a file manager or download creating dest after Lstat checks it. os.Rename then replaces that file, losing its contents. Use a no-replace move or another method that refuses an occupied destination.

Prompt To Fix With AI
This is a comment left during a code review.
Path: ryoku/shell/ryogami/daemon/library_import.go
Line: 241-246

Comment:
**Imports can overwrite another file**

On filesystems without hard links, the hidden claim excludes other imports but not a file manager or download creating `dest` after `Lstat` checks it. `os.Rename` then replaces that file, losing its contents. Use a no-replace move or another method that refuses an occupied destination.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Claude Code Fix in Codex

Comment on lines +178 to +181
const spec = palettes._specs[key] || ({})
next[key] = {
m: Number(spec.mtime || 0),
c: colors

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Deck caches old wallpaper colors

_apply() stamps returned colors with the latest _specs[key].mtime, not the version requested. If a wallpaper changes during generation, an older reply can be saved as current. If the refresh fails, later checks see matching timestamps and keep those old colors. Capture each requested timestamp and discard replies for changed entries.

Prompt To Fix With AI
This is a comment left during a code review.
Path: ryoku/shell/ryogami/picker/qml/deck/DeckPalettes.qml
Line: 178-181

Comment:
**Deck caches old wallpaper colors**

`_apply()` stamps returned colors with the latest `_specs[key].mtime`, not the version requested. If a wallpaper changes during generation, an older reply can be saved as current. If the refresh fails, later checks see matching timestamps and keep those old colors. Capture each requested timestamp and discard replies for changed entries.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Claude Code Fix in Codex

Comment on lines +84 to +87
Process {
running: true
command: ["grep", "-qi", "touchpad", "/proc/bus/input/devices"]
onExited: (code) => pg.hasTouchpad = code === 0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Input page probes hardware directly

The new Process reads touchpad hardware directly from QML. The repository requires the Go daemon to gather system state and QML to read it through Bus, ShellSettings, or BusTopic. Publish touchpad presence through that shared path instead of adding a separate /proc probe. This architecture requirement must be satisfied before merging.

Rule Used: RYOKU ARCHITECTURE INVARIANTS (ryoku repo). (1) A compositor's config is authored in that compositor's own language: Hyprland is Lua modules under ryoku/hyprland/ (never a hand-written hyprland.conf; use the hl API, do not shell out to hyprctl when h... (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: ryoku/hub/quickshell/pages/InputPage.qml
Line: 84-87

Comment:
**Input page probes hardware directly**

The new `Process` reads touchpad hardware directly from QML. The repository requires the Go daemon to gather system state and QML to read it through `Bus`, `ShellSettings`, or `BusTopic`. Publish touchpad presence through that shared path instead of adding a separate `/proc` probe. This architecture requirement must be satisfied before merging.

**Rule Used:** RYOKU ARCHITECTURE INVARIANTS (ryoku repo). (1) A compositor's config is authored in that compositor's own language: Hyprland is Lua modules under ryoku/hyprland/ (never a hand-written hyprland.conf; use the hl API, do not shell out to hyprctl when h... ([source](https://app.greptile.com/-/switch-tenant?tenant=ryoku&next=%2Fcustom-context%3Fmemory%3D67df9a15-6bfd-412e-8746-da4968cdd862))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Claude Code Fix in Codex


readonly property real pad: 9 * u
readonly property real radius: Theme.radius * 2
readonly property real thumbRadius: 10 * u

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 New corners ignore shared styles

thumbRadius: 10 * u keeps the new Deck thumbnail rounded regardless of the chosen style. The new WeekChart.qml also uses Scaler.s(3). The UI contract forbids hand-set corner radii, so derive these from the shared style tokens. This requirement must be satisfied before merging.

Rule Used: RYOKU UI DESIGN CONTRACT (source of truth: docs/lithic/ on the branch). Every Ryoku UI wears the reader's style and colours with no app-local picker and no hand-set corner radius or colour value: the four styles Lithic (default), Material, Adwaita, F... (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: ryoku/shell/ryogami/picker/qml/deck/DeckCard.qml
Line: 33

Comment:
**New corners ignore shared styles**

`thumbRadius: 10 * u` keeps the new Deck thumbnail rounded regardless of the chosen style. The new `WeekChart.qml` also uses `Scaler.s(3)`. The UI contract forbids hand-set corner radii, so derive these from the shared style tokens. This requirement must be satisfied before merging.

**Rule Used:** RYOKU UI DESIGN CONTRACT (source of truth: docs/lithic/ on the branch). Every Ryoku UI wears the reader's style and colours with no app-local picker and no hand-set corner radius or colour value: the four styles Lithic (default), Material, Adwaita, F... ([source](https://app.greptile.com/-/switch-tenant?tenant=ryoku&next=%2Fcustom-context%3Fmemory%3D6731b636-d4c4-4786-8700-ed033e975ff7))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Claude Code Fix in Codex

@neur0map neur0map added area:ryoku Ryoku project area type:bug A reported problem labels Dec 2, 2026

@neur0map neur0map left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Review findings — 1 blocking issue(s): see the inline comments and the walkthrough for details.

Comment on lines +188 to +196
text: "current"
font.family: Theme.sans
font.pixelSize: 10 * card.u
font.weight: Font.Bold
font.letterSpacing: 0.4 * card.u
color: card.dress.accentInk
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 minor · Bug · fix: low effort

The applied-wallpaper badge displays hard-coded English even when the picker is localized. Route the label through the shared I18n runtime.

Suggested change

Suggested change
text: "current"
font.family: Theme.sans
font.pixelSize: 10 * card.u
font.weight: Font.Bold
font.letterSpacing: 0.4 * card.u
color: card.dress.accentInk
}
}
Text {
anchors.verticalCenter: parent.verticalCenter
text: I18n.tr("current")
font.family: Theme.sans
font.pixelSize: 10 * card.u
font.weight: Font.Bold
font.letterSpacing: 0.4 * card.u
color: card.dress.accentInk
}

💡 Related suggestion (bug)

Translate the current wallpaper badge

Suggested change

Suggested change
text: "current"
font.family: Theme.sans
font.pixelSize: 10 * card.u
font.weight: Font.Bold
font.letterSpacing: 0.4 * card.u
color: card.dress.accentInk
}
}
Text {
anchors.verticalCenter: parent.verticalCenter
text: I18n.tr("current")
font.family: Theme.sans
font.pixelSize: 10 * card.u
font.weight: Font.Bold
font.letterSpacing: 0.4 * card.u
color: card.dress.accentInk
}

Reply here to discuss, say it's fixed, or explain why it's intended — no mention needed.

This branch has not been deployed

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

Labels

area:ryoku Ryoku project area type:bug A reported problem

Projects

None yet

Development

Successfully merging this pull request may close these issues.