Skip to content

feat(cli,webchat): lobster wild cards — a CLI cousin, moving day, and opt-in sounds#103412

Merged
steipete merged 2 commits into
mainfrom
claude/lobster-wildcards-4abdbb
Jul 10, 2026
Merged

feat(cli,webchat): lobster wild cards — a CLI cousin, moving day, and opt-in sounds#103412
steipete merged 2 commits into
mainfrom
claude/lobster-wildcards-4abdbb

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Related: #102754 · Stacked on #103359 (memories) — lands last in the batch.

What Problem This Solves

The lobster lives in one sidebar. This PR gives the ecosystem its wild cards: a terminal cousin, a reaction to gateway upgrades, and a voice (strictly opt-in).

Why This Change Was Made

The CLI cousin. On roughly one day in sixteen — picked by a deterministic hash of the calendar date, so every terminal in the house agrees it is lobster day — the interactive openclaw banner gains a tiny ASCII lobster:

  (\/)  (\/)
   \_\  /_/
    ( o.o )
    /|__|\
🦞 OpenClaw 2026.7.1 (3dd771b) — I've survived more breaking changes than your last three relationships.

Two art variants (claws-up, and just eyestalks above the waterline). Guardrails: rich TTYs only, only in random tagline mode (pinned/off modes read as "keep my banner boring" and are respected), and never in CI/VITEST environments — the existing banner tests assert exact bytes and keep passing. The date is injectable through the existing TaglineOptions.now seam, same as holiday taglines.

Moving day. The pet remembers which gateway version it lives with (browser-local). The first page load after the version changes, it arrives carrying a bindle — stick, polka-dot bundle — and its tooltip reads "Pinchy · just moved in" for that load. The very first version sighting only records a baseline; no bindle without a previous home. Wired through app-host (serverVersion ?? hello.server.version) → sidebar → pet, latched once per load so a late-arriving hello still counts. The shed molt shell, the twin, and passers-by never carry it, and the retro grail's mega claw keeps its shoulder (it moves light).

Lobster sounds, opt-in. A new Quick Settings toggle next to Lobster visits, default off, persisting only an explicit opt-in (mirror image of the visits key, which persists only an explicit opt-out). When on: a tiny descending WebAudio blub on pokes, a rising coo on pets — synthesized, ~150ms, quiet (peak gain 0.05). The AudioContext is created inside the pointer gesture (autoplay-policy safe), all audio failures are swallowed, and the context is closed on disconnect.

Docs. /web/lobster learns about petting, cursor-watching, and the sounds toggle, plus new spoiler-light field notes (strangers who do not stop, a visitor that insists it is a lobster, familiarity, what upgrade visitors carry, the terminal cousin, vigil solidarity) and a Lobsterdex-memories line — covering this whole 4-PR batch.

User Impact

Terminal users get a rare surprise that never contaminates scripts, pipes, or CI. Upgrading the gateway earns a small visual acknowledgment. People who want a slightly audible lobster can have one; everyone else hears exactly what they hear today, which is nothing.

Evidence

Moving day moving day
Sounds toggle sounds toggle

Validation (delegated remote box):

  • pnpm test src/cli/lobster-art.test.ts src/cli/banner.test.ts ui/src/components/lobster-pet.test.ts ui/src/components/lobster-dex.test.ts ui/src/pages/config/quick.test.ts — 84/84 green (4 + 9 + 71 across the CLI and UI test projects). New coverage: day-hash determinism + rarity band + CI suppression; banner integration (art present on a probed lobster day in rich random mode, absent for plain terminals and pinned modes); bindle on upgrade + baseline-only on first sighting + same-version reloads travel light; sounds silent by default and chirping only when enabled (AudioContext constructor spy).
  • pnpm tsgo:core, pnpm tsgo:core:test, pnpm tsgo:test:ui, pnpm --dir ui build.
  • Live browser proof against the mock: the mock hello's version flowed app-host → sidebar → pet and recorded itself to storage; with sounds enabled one poke created exactly one AudioContext and started one oscillator (instrumented), startle act fired; banner render above produced with the real emitCliBanner.
  • New i18n keys synced across locale bundles.
  • Codex autoreview clean.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui cli CLI command changes size: L maintainer Maintainer-authored PR labels Jul 10, 2026
@steipete
steipete force-pushed the claude/lobster-wildcards-4abdbb branch from d70c356 to deba84a Compare July 10, 2026 05:30
@steipete
steipete force-pushed the claude/lobster-familiarity-4abdbb branch from 226b254 to 82f85bd 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: deba84a205

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

if (previous === version) {
return false;
}
storage.setItem(MOVING_DAY_KEY, version);

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 Consume moving-day only when a lobster can appear

When an upgraded browser first observes the new gateway version, this immediately records that version even if the pet never appears on that load. Because the existing visit scheduler can skip a load entirely via VISIT_SHY_CHANCE (and otherwise delays the first arrival by up to minutes), those users consume the moving-day state without ever seeing the bindle, and subsequent reloads see previous === version so the upgrade acknowledgement is lost. Persist the new version after a genuine arrival, or force an arrival while movingDay is pending.

Useful? React with 👍 / 👎.

@steipete
steipete force-pushed the claude/lobster-wildcards-4abdbb branch from deba84a to fec7d33 Compare July 10, 2026 06:00
@steipete
steipete force-pushed the claude/lobster-familiarity-4abdbb branch 2 times, most recently from 65bb540 to e62295a Compare July 10, 2026 06:26
@steipete
steipete force-pushed the claude/lobster-wildcards-4abdbb branch from fec7d33 to 2b30aae Compare July 10, 2026 06:26
@steipete
steipete force-pushed the claude/lobster-familiarity-4abdbb branch from e62295a to b476469 Compare July 10, 2026 06:42
@steipete
steipete force-pushed the claude/lobster-wildcards-4abdbb branch from 2b30aae to 07f9d13 Compare July 10, 2026 06:42

@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: 07f9d13bc7

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

Comment on lines +998 to +1000
if (!this.movingDayChecked && this.gatewayVersion) {
this.movingDayChecked = true;
this.movingDay = detectLobsterMovingDay(this.gatewayVersion);

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 Recheck moving day when the gateway version changes

When the built-in update flow restarts the gateway while the Control UI page stays open, this element has already latched movingDayChecked for the old gatewayVersion. The sidebar prop is updated again after the new hello/config refresh, but this one-shot guard prevents detectLobsterMovingDay from running for that new version, so users who upgrade without a full browser reload never see the promised moving-day bindle. Track the last checked version, or reset this latch when gatewayVersion changes, instead of using a load-wide boolean.

Useful? React with 👍 / 👎.

Base automatically changed from claude/lobster-familiarity-4abdbb to main July 10, 2026 07:10
… opt-in sounds

The openclaw banner gains a rare day-seeded ASCII lobster (rich TTYs,
random tagline mode, never CI). The web pet notices gateway upgrades and
arrives carrying a bindle for one load. A new default-off Lobster sounds
quick setting adds tiny WebAudio chirps on pokes and pets. The lobster
docs page learns about petting, sounds, and this batch's field notes.
@steipete
steipete force-pushed the claude/lobster-wildcards-4abdbb branch from 07f9d13 to c39e9f6 Compare July 10, 2026 07:12

@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: c39e9f641a

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

// The pet notices gateway upgrades: the first page load on a new version, it
// shows up carrying a bindle (moving day). The very first version sighting
// only records a baseline - no bindle without a previous home.
const MOVING_DAY_KEY = "openclaw.control.lobsterpet.gatewayVersion.v1";

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 Scope moving-day memory to the gateway

When a browser uses more than one Gateway, this unscoped key shares the moving-day version across all gateway URLs. Control UI settings are otherwise scoped by selected gateway URL (settingsKeyForGateway / readSettingsForGateway in ui/src/app/settings.ts), so switching between gateways on different versions can show a false “just moved in”, and a second gateway upgraded to a version already seen on another gateway will miss the bindle entirely. Include the gateway identity in this state instead of storing only the last version globally.

Useful? React with 👍 / 👎.

@steipete
steipete merged commit 4a4a32a into main Jul 10, 2026
98 checks passed
@steipete
steipete deleted the claude/lobster-wildcards-4abdbb branch July 10, 2026 07:49
@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 11, 2026
… opt-in sounds (openclaw#103412)

* feat(cli,webchat): lobster wild cards - a CLI cousin, moving day, and opt-in sounds

The openclaw banner gains a rare day-seeded ASCII lobster (rich TTYs,
random tagline mode, never CI). The web pet notices gateway upgrades and
arrives carrying a bindle for one load. A new default-off Lobster sounds
quick setting adds tiny WebAudio chirps on pokes and pets. The lobster
docs page learns about petting, sounds, and this batch's field notes.

* chore(webchat): regenerate keyless raw-copy i18n baseline after rebase
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 cli CLI command changes docs Improvements or additions to documentation maintainer Maintainer-authored PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant