feat(desktop): roaming pet (opt-in) - #55114
Merged
Merged
Conversation
Opt-in $petRoam (localStorage), $petMotion (run/jump pose) and $petRoamDir (-1/0/1) feed the shared $petState only while the agent is at rest ($petAtRest), so a wander never overrides real activity.
roamWalkRow() prefers running-left/running-right rows, falling back to the generic running row with a mirror for pets that lack them.
usePetRoam re-measures ledges from the live DOM each beat and walks/hops/falls between them, driving DOM position imperatively (no per-frame re-render).
Tag both bars with data-slots; the roam loop stands on the status bar's top edge (not over it) and treats the profile rail as a climbable ledge.
…urface Walk speed is derived from the sprite's animation loop + on-screen size (one body-width per loop) instead of a fixed px/s, so it steps rather than glides; the pet also sinks a few px so its feet meet the surface instead of hovering.
When a full-screen route overlay (settings/profiles/cron/agents/command-center) is up, the pet's walkable surface swaps to a single ledge at the overlay card's bottom edge — derived from OverlayView's shared inset, not measured — so it patrols there; closing the overlay restores the normal surfaces and it drops back down.
OutThisLife
enabled auto-merge
June 29, 2026 19:58
OutThisLife
disabled auto-merge
June 29, 2026 19:58
1 task
waefrebeorn
pushed a commit
to waefrebeorn/slermes
that referenced
this pull request
Jul 2, 2026
feat(desktop): roaming pet (opt-in)
habarmc1223-sudo
pushed a commit
to habarmc1223-sudo/hermes-agent-fluxmem
that referenced
this pull request
Jul 8, 2026
feat(desktop): roaming pet (opt-in)
santhreal
pushed a commit
to santhreal/hermes-agent
that referenced
this pull request
Jul 13, 2026
feat(desktop): roaming pet (opt-in)
Gravezzz
pushed a commit
to Gravezzz/hermes-agent
that referenced
this pull request
Jul 21, 2026
feat(desktop): roaming pet (opt-in)
leewenjie
pushed a commit
to leewenjie/hermes-agent
that referenced
this pull request
Aug 7, 2026
feat(desktop): roaming pet (opt-in)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an opt-in "roam" mode for the desktop floating pet. Instead of sitting in one spot, the pet wanders the app like a little platformer character: it walks along surfaces, hops up onto the composer / profile rail, drops back down, and patrols the base of any open overlay — with proper directional walk/jump animations, paced to the sprite so it steps instead of gliding.
localStoragelike the pet's drag position — never runs when the pet is popped out into the OS overlay, and pauses while the agent is working (only roams when at rest).usePetRoam): re-measures walkable ledges from the live DOM each beat — the window floor, the composer (data-slot="composer-surface"), and the profile rail (data-slot="profile-rail") — then walks / hops / falls between them. Tracks the composer growing, the sidebar opening, window resizes, and falls back to the floor when a perch disappears (e.g. dropped mid-air after a drag).data-slot="statusbar") when present.OverlayView's shared inset (titlebar-height + padding) via the existinguseRouteOverlayActive()signal — no element measuring.roamWalkRow()uses the sprite'srunning-left/running-rightrows for the travel direction, falling back to the genericrunningrow + CSS mirror for pets that lack them. Hops/falls use thejumppose.el.styleimperatively each frame (no per-frame React re-render, mirroring the existing drag handler); pose + direction publish through small nanostores ($petMotion,$petRoamDir) the canvas already subscribes to. State commits back to React only when the pet settles.Implementation notes
$petStatefolds in a roam pose only when$petAtRest(agent idle), so a wander can never mask real agent activity.data-slotmarkers.Test plan
tsc --noEmit, eslint, vitest (store/pet.test.tscovers at-rest gating + pose precedence) all green.