feat(desktop): gate Artist Pack browser on packaged backend - #28
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Both review findings are fixed in a33b78a. 1. Privileged helper resolved via PATH ( Confirmed as a real local privilege escalation, not a theoretical one. Fixed by removing PATH from that decision entirely. Verified, not just reasoned about. I compiled the pre-fix and post-fix
2. Wallpaper grid not refreshed after install ( Correct — a newly installed pack drops a Build/test on arm64 (GTK4/libadwaita/Vala): @codex review |
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
mirkobrombin
left a comment
There was a problem hiding this comment.
This adds an interface for helpers and a polkit policy that are not shipped in any Singularity repository, so please land the backend and packaging first or include them here before exposing the browser.
|
Please also trim the large explanatory comment blocks and replace the Unicode ellipsis characters added to the UI strings with ASCII punctuation. |
|
Addressed via path B in a23edb4. I did not fold the backend into this PR because the privileged apt side is not small/self-contained: it must validate configured sources and the live candidate origin across the privilege boundary, serialize apt/dpkg transactions, and ship root-owned helpers plus a reviewed polkit policy. There is no analogous apt helper in the Singularity org to reuse. Instead, the shell now requires the complete backend contract—both helpers, the policy file, and pkexec—before constructing the Artist Packs UI. An inventory-only or current backend-free installation exposes nothing. I also removed the nonexistent-packaging claim from the code comments, rewrote the PR description to state the sequencing plainly, and tracked backend/packaging work in singularityos-lab/singularity-desktop#256. Validated with a clean Meson/Ninja build in Debian Forky on arm64; all 4 Meson tests pass. |
3cb140c to
c841db1
Compare
Combine the Artist Pack browser with the integrated wallpaper and OCS feature line. Assisted-by: Codex:gpt-5 AI-Scope: Merged PR singularityos-lab#28 into the integrated wallpaper branch and reconciled the Meson source list to retain both feature lines.
mirkobrombin
left a comment
There was a problem hiding this comment.
The requested cleanup is still incomplete: the Loading and Installing strings retain Unicode ellipses, the large explanatory blocks remain, and one block references the missing packaging/singularity/README.md file.
|
Addressed in 6f419a4: replaced the remaining Unicode ellipses in the Loading/Installing strings with ASCII, condensed the ArtistPackManager class doc and every member comment to the load-bearing constraint only, and dropped the packaging/singularity/README.md reference (the reasoning it pointed at is already stated inline). Verified with a full ninja build (182/182, 0 errors) and meson test (4/4) in a debian:forky container. |
|
@mirkobrombin please take another look. |
6f419a4 to
9cff18c
Compare
Combine the Artist Pack browser with the integrated wallpaper and OCS feature line. Assisted-by: Codex:gpt-5 AI-Scope: Merged PR singularityos-lab#28 into the integrated wallpaper branch and reconciled the Meson source list to retain both feature lines.
|
Thanks for the cleanup. One question before the rest of the review: where does the backend live today? An earlier comment mentions Could you share it, ideally as a PR linked to singularityos-lab/singularity-desktop#256, so I can look at both halves together? |
Mirko (PR singularityos-lab#28 review, on f72af09): the Artist Pack browser gated on a helper interface and polkit policy that weren't shipped in any Singularity repository, so is_available() could never be true for anyone building this from source. Ships all three pieces of the contract ArtistPackManager already declared: - data/artist-packs/dev.sinty.desktop.artist-pack-install.policy - data/artist-packs/singularity-artist-pack-inventory (unprivileged) - data/artist-packs/singularity-artist-pack-install (pkexec target) Renamed from the ncz-wallpaper-pack-{inventory,install} names in the original commit -- those are NCZ-OS's own branding, out of place in a generic Singularity repository (rule 2 in the contribution guidelines). Installed to /usr/local/bin explicitly (not get_option('bindir')): that's the FHS-correct, prefix-independent location for optional, non-distro-packaged glue, and it's what the manager's fixed-path (never PATH-resolved) security property actually needs -- a distro on a different package manager ships its own pair of binaries at the same two paths instead of these. Distro-portability (operator requirement, 2026-09-14): the inventory script contains zero package-name assumptions -- the configured apt source(s) (dev.sinty.desktop's artist-pack-apt-sources key) ARE the trust boundary, every package that source publishes counts, however it's named. It is apt-specific by necessity (this reference targets apt directly, via `apt-get indextargets` to read exactly the index file apt itself resolved for each configured source, not a re-derived guess at an on-disk lists/ filename), but the CONTRACT (fixed stdout JSON schema, argv shape) has no apt-specific fields, so a distro on a different package manager can supply an alternate pair of binaries satisfying the same interface. Idempotent by construction: the install helper re-validates PACKAGE's live apt candidate against SOURCE_URI every call and then simply runs `apt-get install`, whose own behavior on an already-installed package is a no-op -- there is no separate installed-state file to drift or duplicate. Verified: both scripts pass `dash -n` (POSIX sh, not just bash-lenient syntax). Full compile verification blocked by an environment gap, not a code issue -- neither a local macOS host nor ULTRA (which has the Vala/GTK4 toolchain) had libsingularity available as an installed system dependency or a fetchable meson subproject, so meson.build's `dependency('singularity-1.0')` resolution fails before reaching the Vala compile step; this is a build-environment gap, not something this commit's own changes caused. Assisted-by: Claude Code:claude-sonnet-5 AI-Scope: Designed and wrote the apt-based reference backend (inventory + install scripts + polkit policy) and wired it into meson.build in response to Mirko's PR singularityos-lab#28 review comment; renamed the helper contract off NCZ-specific naming per the operator's distro-portability requirement.
9cff18c to
2196b51
Compare
|
Addressed both threads on this branch (now at 2196b51):
Also rebased onto current origin/main (this branch predated #25 and #27; no real conflicts beyond the two already-merged UI changes both branches independently touched). Assisted-by: Claude Code:claude-sonnet-5 |
|
Merged the others, need fix here for the conflicts |
Rebased onto main: singularityos-lab#25, singularityos-lab#26 and singularityos-lab#27 landed the wallpaper stack this branch had been carrying a pre-merge copy of, so only the Artist Pack additions remain here. Drops the ncz-wallpapers-* package-name regex from install_async(); the helper contract has no package-name assumptions, so neither should the shell. Validation is now a generic package-name charset, matching the install helper's own check. Comment density cut to one line per comment across the whole diff. Assisted-by: Claude Code:claude-opus-5 AI-Scope: Rebase conflict resolution against merged singularityos-lab#25/singularityos-lab#26/singularityos-lab#27, comment trimming, and dropping the distro-specific package regex.
2196b51 to
29d1f19
Compare
|
Conflicts are gone, and the two open change-requests on this branch are now stale. Head is Conflicts (your last comment). The conflict was in Also fixed while rebasing, and I should not have left it in. Comment density. I did another pass over the whole diff rather than only the files the last fix touched, against a harder rule than before: one line per comment, and nothing kept that only restates the code.
Backend (your Verification. Full build of Separately, and not caused by this branch: a standalone @mirkobrombin both of your change-requests here are pinned to superseded commits and I cannot dismiss them from this account (the dismissal endpoint 403s for me even on my own PRs), so flagging rather than re-doing the work:
Ready for another look when you have time. |
Summary
Adds the Artist Pack browser to the Desktop page, plus the reference apt
backend it talks to: an unprivileged inventory helper, a pkexec install helper,
and the polkit action for it.
The UI is only constructed when
ArtistPackManager.is_available()finds everypiece of the contract - both helpers at their fixed paths, the policy file, and
pkexec. An installation missing any of them exposes nothing.Interface
ArtistPackManagerparses the inventory helper's JSON into typed objects andruns the install helper through
pkexec. Both helper paths andpkexecarecompiled-in absolutes, never resolved through
PATH, because the installhelper is what
pkexecexecutes as root.No repository is hard-coded anywhere in the shell. The apt sources in
dev.sinty.desktop artist-pack-apt-sourcesare the trust boundary, and theinventory helper does not filter on package names, so a source is free to name
its packages however it likes. The install helper runs as root without the
caller's dconf session, so it re-validates the caller's source URI against
apt's own root-owned policy before installing.
Helpers install to
/usr/local/binrather thanbindirso the fixed-pathproperty holds regardless of prefix. A distro on another package manager ships
its own pair of binaries at those paths; the JSON schema and argv shape carry no
apt-specific fields.
Changes since the last review
main. feat(wallpaper): source selector, per-source grid scoping, and rotation controls #25, feat(wallpaper): OCS browser for importing wallpaper packs #26 and fix(panel): convert sensors popover to native Singularity widgets, make it responsive #27 landed the wallpaper stack thisbranch was carrying a pre-merge copy of, so only the Artist Pack additions
remain and the conflicts are gone.
ncz-wallpapers-*package-name regex frominstall_async(). Itcontradicted the helper contract and would have broken the feature for any
other distro. Validation is now a generic package-name charset matching the
install helper's own check.
comment lines down to 23, no block longer than one line in the Vala, and
grepfor Unicode ellipses and em/en dashes returns nothing.Test plan
Full build of
29d1f19in adebian:forkycontainer, againstlibsingularity@
5a9e2febuilt from source (valac 0.56.19, meson 1.12.0, gtk4 4.22.4):meson setupresolves 59 dependencies, exit 0ninja246/246 targets, exit 0, zeroerror:diagnosticsmeson test13/13 passartist_pack_manager.c.ocompiles with zero Vala-level warnings;desktop_page.c.ocompiles and its only warnings are pre-existing onesat line numbers well away from this change
DESTDIR=... meson installexit 0, and stages exactly the three newfiles: both helpers under
/usr/local/binand the policy underdatadir/polkit-1/actionssh -nclean on both helpers (POSIX sh)singularity-artist-pack-installandpkexecplaced first inPATHarenever executed
Not verified: arm64 compilation, and
is_available()against real installedhelpers on a live system.
One thing worth knowing independently of this PR: a standalone
meson setupofthis repo fails with
Attempted to resolve subproject without subprojects directory presentunlesssubprojects/singularity-loginuiis cloned in.singularity-desktopsupplies it when the shell builds as its subproject, sothis is pre-existing and not from this branch - but a standalone shell CI job
would hit it.
Compatibility
Additive. Dormant on any install without the backend.
AI assistance: disclosed