Skip to content

feat(webchat): lobster pet sentience — gaze, petting, honest run reactions, vigil#103344

Merged
steipete merged 1 commit into
mainfrom
claude/lobster-sentience-4abdbb
Jul 10, 2026
Merged

feat(webchat): lobster pet sentience — gaze, petting, honest run reactions, vigil#103344
steipete merged 1 commit into
mainfrom
claude/lobster-sentience-4abdbb

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Related: #102754 (lobster pet series, round 3)

What Problem This Solves

The pet reacts to status but not to you, and its reactions are dishonest at the edges: a failed or user-aborted run currently earns the same cheer as a success.

Why This Change Was Made

Four sentience behaviors, element-scoped:

  • Gaze: between acts the pet watches your pointer — facing follows the cursor (120ms throttle, inert under reduced motion, during acts, and while keeping vigil).
  • Petting: press-and-hold (600ms) pets it: content closed eyes and a floating heart, and it forgives any grumpiness. A quick tap remains a poke with all the existing mood consequences. Releasing after a completed pet does not double-fire a poke.
  • Honest run reactions: a new resolveLobsterRunOutcome picks the most recently ended session (endedAt first — activity stamps move on unrelated events — with fallbacks) and the busy→idle reaction now branches: success cheers, failure/timeout earns a sympathetic droop (sagging antennae, slow sad head-shake), and a user-killed run gets a plain acknowledging startle rather than a celebration.
  • Vigil: a run that passes ten minutes summons the pet into a settled waiting pose — visible for the duration, acts paused — until the run ends. Solidarity.

User Impact

The lobster looks at your cursor, can be petted, reacts truthfully to how your run actually ended, and sits with you through the long ones. No config changes; reduced-motion stays fully inert on every new path.

Evidence

sentience

Validation (delegated Blacksmith Testbox, exit=0):

  • pnpm test ui/src/components/lobster-pet.test.ts — 33/33: outcome resolver units (latest-ended ordering, endedAt precedence, aborted classification), hold-pets vs tap-pokes without double-fire, droop on failed runs, vigil arming from the initial busy render + act pause + release, pointer-gaze facing flips, plus the full existing suite.
  • pnpm tsgo:test:ui and pnpm --dir ui build.
  • Live verification against pnpm dev:ui:mock: gaze both directions, hold-pet with heart animation, droop on error outcome, vigil class.
  • Codex autoreview over four cycles accepted and led to fixes for: pet-act eyes losing the blink cascade (the nap lesson, reapplied), vigil never arming on initial busy render (the seedChanged branch swallows the first mode update), resolver ignoring endedAt, and killed runs being celebrated; final review clean.

…s, vigil

The pet watches your pointer between acts (facing follows the cursor,
throttled, reduced-motion inert). Press-and-hold now pets it - content
closed eyes and a floating heart - while a quick tap stays a poke.
Run endings are honest: resolveLobsterRunOutcome picks the most recently
ended session (endedAt first, activity stamps as fallback) so successes
cheer, failures earn a sympathetic droop with sagging antennae, and
user-aborted runs just get an acknowledging startle. Runs longer than
ten minutes summon the pet into a settled vigil pose that pauses all
acts until the run ends.
@steipete
steipete force-pushed the claude/lobster-sentience-4abdbb branch from 64ef25c to 49124b8 Compare July 10, 2026 05:30

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 49124b8f43

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

this.vigilTimer = null;
}
if (this.mode === "busy") {
this.vigilTimer = window.setTimeout(() => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Base vigil timing on the run start

When the sidebar mounts or reconnects while a run is already older than ten minutes, this always starts a fresh 600s timer from the current render; app-sidebar only passes mode/runOutcome, even though session rows carry startedAt, so an already-long run can wait another full ten minutes before the vigil appears. Use the active run's elapsed time to arm immediately or with only the remaining delay.

Useful? React with 👍 / 👎.

this.vigil = false;
this.trackVigil();
} else if (changed.has("mode")) {
this.trackVigil();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Preserve the finish act after vigil

When the pet is visible only because vigil was active, a busy→idle transition calls trackVigil() first, clearing this.vigil; after performAct() sets the cheer/droop/startle, reconcilePresence() sees wantsVisible() as false and clears the act while starting departure, so long-run failures/successes just leave instead of showing the honest finish reaction. Keep the vigil presence until the finish act completes, or defer clearing it until after that reaction is visible.

Useful? React with 👍 / 👎.

@steipete
steipete merged commit 7bb3df9 into main Jul 10, 2026
73 checks passed
@steipete
steipete deleted the claude/lobster-sentience-4abdbb branch July 10, 2026 05:54
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 10, 2026
…s, vigil (openclaw#103344)

The pet watches your pointer between acts (facing follows the cursor,
throttled, reduced-motion inert). Press-and-hold now pets it - content
closed eyes and a floating heart - while a quick tap stays a poke.
Run endings are honest: resolveLobsterRunOutcome picks the most recently
ended session (endedAt first, activity stamps as fallback) so successes
cheer, failures earn a sympathetic droop with sagging antennae, and
user-aborted runs just get an acknowledging startle. Runs longer than
ten minutes summon the pet into a settled vigil pose that pauses all
acts until the run ends.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant