feat(webchat): pass-through visitors — strangers, and a crab that is definitely a lobster#103352
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3035798102
ℹ️ 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".
| // visits setting silence it like everything else. | ||
| const showShell = this.shellVisible && this.visitsEnabled && !this.dismissed; | ||
| if (!showSprites && !showShell) { | ||
| const showPasser = this.passer !== null && this.visitsEnabled; |
There was a problem hiding this comment.
Honor shoo dismissal for passers
When a user right-clicks the mascot, dismissed is meant to hide it for the rest of the page load (the adjacent shell path and existing test both enforce that), but pass-through visitors ignore that state here. For seeds with a planned passer, the timer can set this.passer after dismissal and this condition renders a new lobster/crab anyway, so the mascot reappears despite being explicitly shooed; include !this.dismissed (or cancel passers on dismissal) to preserve the dismissal contract.
Useful? React with 👍 / 👎.
3035798 to
e13a02d
Compare
64ef25c to
49124b8
Compare
Roughly one load in ten, someone else walks across the footer ledge once and leaves: usually a stranger lobster wearing a palette the resident pet does not (hover: 'a stranger'), and on rare loads a crab (hover: 'definitely a lobster') - wide shell, eye stalks, walks strictly sideways, smug about it. Passers never perch, never react, and never count for the Lobsterdex. Planned by a pure per-seed function, gated by the visits setting, skipped under reduced motion, and their timers reset with the seed and clean up on disconnect.
e13a02d to
eb97cf2
Compare
|
Landed on main as 20bc552 (squash). Validation: Blacksmith Testbox lobster suites + tsgo:test:ui + ui build green, hosted CI green at exact head eb97cf2, codex autoreview clean. (The merge-run status poll hit a GitHub API rate limit after merge-verify passed, so this completion note arrives out of band.) |
…aw#103352) Roughly one load in ten, someone else walks across the footer ledge once and leaves: usually a stranger lobster wearing a palette the resident pet does not (hover: 'a stranger'), and on rare loads a crab (hover: 'definitely a lobster') - wide shell, eye stalks, walks strictly sideways, smug about it. Passers never perch, never react, and never count for the Lobsterdex. Planned by a pure per-seed function, gated by the visits setting, skipped under reduced motion, and their timers reset with the seed and clean up on disconnect.
Related: #102754 · Stacked on #103344 (sentience) — lands after it.
What Problem This Solves
Your lobster is the only sea life you ever see. A world with occasional other inhabitants is more alive — and funnier.
Why This Change Was Made
Roughly one page load in ten (pure per-seed plan), a pass-through visitor crosses the footer ledge once, some minutes into the session, and leaves:
Passers are render-only walkers: no perching, no acts, no interaction; gated by the visits setting, skipped under reduced motion, timers reset with the seed and cleaned on disconnect.
User Impact
Once in a while something crosses the bottom of your sidebar. Sometimes it's a lobster you've never met. Very occasionally it is not a lobster at all, whatever its tooltip claims.
Evidence
Validation (delegated Blacksmith Testbox,
exit=0):pnpm test ui/src/components/lobster-pet.test.ts— 36/36: stranger crossing renders and despawns with a foreign palette that never enters the dex, the crab renders with its title while the dex only ever contains the resident's own palette, most loads plan no passer (~9.5% rate asserted over 2000 seeds), plus the full existing suite.pnpm tsgo:test:uiandpnpm --dir ui build.