Skip to content

[plugins] add Navbar Pets 0.1.0 - #232

Open
mannish01 wants to merge 2 commits into
Ryoku-dev:mainfrom
mannish01:add-navbar-pets
Open

mannish01 wants to merge 2 commits into
Ryoku-dev:mainfrom
mannish01:add-navbar-pets

Conversation

@mannish01

Copy link
Copy Markdown
Contributor

New community plugin: Navbar Pets for Ryoku — an original pixel-art companion scene for the bar and desktop.

This is inspired by the Omarchy Navbar Pets idea, but all artwork, QML and simulation code here are written from scratch. No upstream sprites, code or assets are copied or bundled.

Features

  • Eight original 16×16 pixel species (cat, dog, panda, fox, rat, frog, bird, dragon) with a two-frame walk cycle, drawn with QML Canvas from rect definitions in content/Pets.js.
  • Five scenic skies (Dawn, Meadow, Dusk, Night, Candy) painted in QML — gradient sky, stars, layered ridges, ground line. No image assets.
  • Treats and chasing: drop a treat, the matching pet runs to it, eats it and reacts with happy particles.
  • Physics play: bouncing ball with gravity/damped bounce, hopping when patted, and a CALM reduced-motion mode.
  • Full panel controls: species picker (including MIXED), sky cycle, 1–4 companions, sprite pixel size, treat/ball/pat/play buttons.
  • Two hosts, one shared service: bar glyph and desktop tile read the same simulation, so actions in either view are reflected in both.

Ryoku integration and safety

  • Uses the shell's Theme tokens, shared panel surface, and pluginApi.saveSetting for persistence. No helper scripts, no external commands, no network hosts, no compositor socket access, and no file writes.
  • Community submission: official: false.
  • Manifest/registry carry both preview images; per-user settings are all configurable.

Checks

  • ryoku plugin validate plugins/ryoku-navbar-pets → 0 blocking, 0 warnings.
  • tests/validate-catalogue.sh and tests/validate-store.py --root . --categories plugins → OK.
  • tools/security-screen.py --staged → 0 blocking, 234 warning(s), 0 error(s), ryoku-navbar-pets findings: 0.
  • Quickshell harnesses rendered both the panel (all controls visible) and the desktop card with no QML errors; both captures are shipped as previews.

Source repo published first: https://github.com/mannish01/Ryoku-Navbar-Pets

@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 (5) — optional, not blocking
  1. plugins/ryoku-navbar-pets/content/Widget.qml:31-37 — Possible Bug — Glyph emits requestClose() when the open glyph is clicked, but the loader never forwards that signal to the host-facing Widget. Consequently clicking the glyph again cannot close its panel; forward the signal to `r…

    Suggested change

onRequestClose: root.requestClose()
  1. plugins/ryoku-navbar-pets/service/Main.qml:4 — Maintainability — The service imports ../content/Pets.js, but the plugin contract forbids parent-relative imports. Move the shared definitions to a location accessible without traversing a parent directory and update the imports.

  2. plugins/ryoku-navbar-pets/service/Main.qml:159-161 — Bug — ball is a JavaScript object, so mutating it and assigning the same object back does not reliably emit ballChanged; the scene can leave the ball frozen at its initial position. Copy it before updating so the assignmen…

    Suggested change

var currentBall = svc.ball;
var b = { x: currentBall.x, y: currentBall.y, vx: currentBall.vx, vy: currentBall.vy, active: currentBall.active };
if (b.active) {
    b.vy += 0.22 * step;
  1. plugins/ryoku-navbar-pets/content/Widget.qml:25-30 — Bug — The loaders have no size, so their loaded items receive zero width and height even though Widget.qml has an implicit size. Size both loaders to the host so the glyph, card, and their hit areas are visible. Regenerate t…

    Suggested change

implicitWidth: view ? view.implicitWidth : 20 * root.s
implicitHeight: view ? view.implicitHeight : 20 * root.s

Loader {
    id: glyphLoader
    anchors.fill: parent
    active: root.isGlyph
  1. plugins/ryoku-navbar-pets/service/Main.qml:230-234 — Performance — The timer runs every 50 ms whenever the service is ready, even when neither scene is visible, and rebuilds the pet, treat and particle arrays on every tick. Stop or reduce simulation work when the hosts are inactive so a…

3 more nitpick(s) omitted.

@neur0map

neur0map commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

🦊 mika's review

Incremental review: new commits since the last checkpoint.

Summary

  • Add a community pixel-art companion plugin for bar and desktop.
  • Share pet simulation, treats, ball play, and settings across hosts.
  • Provide configurable species, scenery, companion count, and reduced motion.

Estimated review effort: 1/5 · risk: low

📁 Walkthrough details

plugins/registry.json

  • Registers Navbar Pets as an unofficial plugin for bar and desktop hosts.
    • Adds catalogue metadata, previews, upstream URL, and manifest hash.

plugins/ryoku-navbar-pets/service/Main.qml

  • Owns the shared in-memory simulation and persists user choices through the plugin API.
    • Simulates pets, targeted treats, particles, and a bouncing ball.
    • Exposes actions and settings for both host views.
    • Slows reduced-motion simulation and pauses when reported hosts are inactive.

plugins/ryoku-navbar-pets/content/Widget.qml

  • Dispatches the shared plugin content to a bar glyph or desktop card based on density.
    • Forwards host properties and panel-close requests to the selected view.

plugins/ryoku-navbar-pets/content/Glyph.qml

  • Displays the first companion and mood indicator in the bar.
    • Opens the scene panel on click and pats companions on right-click.
    • Reports bar activity to the simulation service.

plugins/ryoku-navbar-pets/content/Card.qml

  • Adds a desktop tile with the shared scene and quick actions.
    • Provides treat, ball, pat, and sky controls.
    • Reports desktop activity to the simulation service.

plugins/ryoku-navbar-pets/content/Panel.qml

  • Adds the full bar panel for viewing and controlling companions.
    • Provides play actions, species selection, and sky cycling.
    • Controls companion count, sprite size, and calm mode.

plugins/ryoku-navbar-pets/content/Scene.qml

  • Renders the shared scenic backdrop and simulation actors for the panel and desktop card.
    • Paints sky, stars, ridges, and ground using the selected palette.
    • Displays pets, treats, ball, and particles; forwards scene clicks.

plugins/ryoku-navbar-pets/content/PetSprite.qml

  • Renders a pixel-art pet from rectangle definitions using a QML canvas.
    • Repaints for species, walk phase, scale, and mood changes.

plugins/ryoku-navbar-pets/content/Pets.js

  • Defines eight pixel-art species and five scenic palettes.
    • Builds two-frame sprites from colored rectangles.

plugins/ryoku-navbar-pets/manifest.json

  • Declares plugin entry points, supported hosts, defaults, and settings.
    • Exposes species, sky, companion count, pixel size, ball, and calm settings.

plugins/ryoku-navbar-pets/product-manifest.json

  • Defines catalogue delivery metadata and integrity hashes for plugin files.
    • Marks runtime files for installation and documentation and previews as non-installable.

plugins/ryoku-navbar-pets/README.md

  • Documents features, settings, installation, usage, and artwork provenance.
    • Describes both hosts and their shared simulation.

plugins/ryoku-navbar-pets/LICENSE

  • Adds the MIT license and copyright notice for the plugin.

No actionable findings. Mika looked for bugs, security issues, and risks in the diff and came up empty on clear defects.

🧪 No relevant tests detected in the diff.

🚦 Merge recommendation: no_concerns_found


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

@neur0map
neur0map dismissed their stale review November 30, 2026 08:41

Blocking findings were addressed (verified at e687d4439d).

@mannish01

Copy link
Copy Markdown
Contributor Author

All five nitpicks are also addressed in e687d44:

  1. Panel close — Widget.qml now forwards onRequestClose: root.requestClose() from Glyph, so clicking an open glyph closes the panel through the host.
  2. Parent-relative import — service/Main.qml no longer imports ../content/Pets.js. The palette and species helpers it needs are local to the service; sprite rect definitions stay with the views in content/Pets.js. grep -rn 'import "\.\.' finds nothing.
  3. Ball object mutation — tick() now copies svc.ball into a fresh object before updating and assigns it back, so ballChanged fires every frame.
  4. Loader sizing — both loaders now anchors.fill: parent, so the glyph and card get real geometry and hit areas from the host-sized surface.
  5. Idle simulation — glyph and card call setHostActive("bar"|"desktop", active); the timer runs only when at least one reported host is active (defaulting to active before the first report so a standalone harness still animates).

Also fixed a name shadow found during re-test: the local palette lookup is paletteFor(), because a theme() function collided with the theme setting property.

Verification after the push: ryoku plugin validate → 0 blocking, 0 warnings; catalogue/store validators OK; security screen → 0 blocking, 234 warnings (repo-wide), 0 errors, 0 findings for this plugin. Quickshell loaded the panel cleanly with the ball disabled from settings and a correct 32 px sprite size at scale 2. Product manifest and registry hash were regenerated by pack-product.py --touch. Re-review requested.

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