Skip to content

fix(wallpapers-ocs): choices() must fetch its own index - #4

Open
perlowja wants to merge 1 commit into
singularityos-lab:mainfrom
perlowja:fix/ocs-choices-self-fetch
Open

perlowja wants to merge 1 commit into
singularityos-lab:mainfrom
perlowja:fix/ocs-choices-self-fetch

Conversation

@perlowja

Copy link
Copy Markdown

Summary

The plugin-based wallpaper manager refactor (132efb7 in singularity-shell)
made the browser provider-generic and now always calls choices("") --
the old OCS-specific static index-file load in the shell's browser page
was removed as part of making that page provider-agnostic. WallpaperOcs.categories()
then fails to parse the empty string as JSON:

Could not load OCS Network choices: Expected a JSON object

Confirmed live on real hardware (Dell Inspiron 5521, current desktop build).

wallpapers-bing's choices() already fetches its own data from the helper
(command({helper, "markets"}, ...)) rather than relying on the passed-in
index; this brings wallpapers-ocs in line with that same pattern by
fetching the index from the helper's own index subcommand.

Test plan

  • Real build: meson setup + ninja wallpapers-ocs/libwallpapers-ocs.so
    against current main + this fix, compiled clean (only pre-existing
    unrelated warnings).
  • Live smoke test on a running desktop (mine is mid-way through
    unrelated work tonight; will confirm once available).

AI assistance: disclosed

The plugin-based wallpaper manager refactor made the browser
provider-generic and always passes an empty index string to
choices(); WallpaperOcs.categories() then fails to parse "" as JSON
("Expected a JSON object"), confirmed live on real hardware. Fetch the
index from the helper directly, same pattern wallpapers-bing already
uses for its own choices().

Assisted-by: Claude Code:claude-sonnet-5
AI-Scope: Root-caused and fixed choices() against the empty index string the refactored browser now always passes.
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.

1 participant