feat(cli,webchat): lobster wild cards — a CLI cousin, moving day, and opt-in sounds#103412
Conversation
d70c356 to
deba84a
Compare
226b254 to
82f85bd
Compare
There was a problem hiding this comment.
💡 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); |
There was a problem hiding this comment.
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 👍 / 👎.
deba84a to
fec7d33
Compare
65bb540 to
e62295a
Compare
fec7d33 to
2b30aae
Compare
e62295a to
b476469
Compare
2b30aae to
07f9d13
Compare
There was a problem hiding this comment.
💡 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".
| if (!this.movingDayChecked && this.gatewayVersion) { | ||
| this.movingDayChecked = true; | ||
| this.movingDay = detectLobsterMovingDay(this.gatewayVersion); |
There was a problem hiding this comment.
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 👍 / 👎.
… 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.
07f9d13 to
c39e9f6
Compare
There was a problem hiding this comment.
💡 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"; |
There was a problem hiding this comment.
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 👍 / 👎.
|
Merged via squash.
|
… 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
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
openclawbanner gains a tiny ASCII lobster:Two art variants (claws-up, and just eyestalks above the waterline). Guardrails: rich TTYs only, only in
randomtagline mode (pinned/offmodes read as "keep my banner boring" and are respected), and never inCI/VITESTenvironments — the existing banner tests assert exact bytes and keep passing. The date is injectable through the existingTaglineOptions.nowseam, 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/lobsterlearns 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
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.emitCliBanner.