Skip to content

feat(pets): each pet speaks in its own voice, at seven moments - #37

Merged
NovusEdge merged 13 commits into
mainfrom
feat/pet-lines
Oct 8, 2026
Merged

NovusEdge merged 13 commits into
mainfrom
feat/pet-lines

Conversation

@NovusEdge

@NovusEdge NovusEdge commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Every pet used to say Clawd's lines from one table of three moods, three lines each, and the Haiku prompt always called the speaker Clawd. Each pet now has its own voice, speaks at more moments, and picks up lines by time of day.

What changed

  • hooks/lines.ts holds a line table for each of Clawd, the robot and the egg, with at least six lines per moment. clawd-shiny uses Clawd's table.

    • Clawd stays dry and warm.
    • The robot speaks in uppercase status lines (FAULT: 3 TESTS, REPAIR SUCCESSFUL.).
    • The egg mostly makes sounds.
  • Four new moments sit beside done, fail and needs-you:

    Moment When it speaks
    green A passing test run after a failed one in the session
    hello Once per session at the first pane draw, unless another bubble spoke first; also when a turn starts after 30 minutes away
    long-done A turn that ran 5 minutes or more ends
    compact The context is compacted

    hooks/moments.ts decides which moment an event speaks.

  • Keys like done@night, hello@morning and hello@christmas add flavour lines by daypart, on Fridays, and on the holiday outfit dates. Bubble lines whose {file}, {n} or {command} slot has no value are skipped.

  • Pet files with "format": 2 can carry lines and a Haiku voice, and validation names the offending key. Glowup 0.12 and earlier refuse format 2.

  • Haiku lines speak in the pet's voice. Hello and compact never call Haiku, so they cannot use up a turn's one Haiku call.

  • The default bubbles.moods turns on all seven moments. Setups are now saved as "format": 2. A setup saved before this release that still holds the old default (needs-you,fail,done) gets all seven, and choosing those three on purpose now sticks.

  • The studio labels the four new mood checkboxes, and the landing page reads the new tables.

  • Fixed: a custom pet shorter than its bubble cut the bubble off, because the pane's pet row was only as tall as the sprite. This bug was on main as well.

Testing

  • pnpm test passes 893 of 893 on the branch merged with main, tsc is clean, and docs/web builds.
  • Checked in a live Claude Code session in tmux, with this checkout loaded by --plugin-dir:
    • a Clawd hello at session start;
    • the robot's FAULT: 3 TESTS, then REPAIR SUCCESSFUL. on a passing run in the next turn;
    • CONTEXT COMPRESSED. after /compact;
    • a custom format 2 pet saying its own done line, including the 2×2 pet from the docs example.

Summary by CodeRabbit

  • New Features

    • Added seven pet speech moments, including greetings, compact updates, test results, and long-running task completions.
    • Pet files can now include custom dialogue and a voice description for Haiku-generated bubbles.
    • Dialogue can vary by time of day, weekday, and seasonal or celebratory overlays.
  • Bug Fixes

    • Existing setups using the previous default moment list are updated to the new defaults; explicitly selected settings are preserved.
    • The pet strip now expands to fit a taller speech bubble.

…and holiday flavours

Signed-off-by: NovusEdge <novusedge0@gmail.com>
Signed-off-by: NovusEdge <novusedge0@gmail.com>
Signed-off-by: NovusEdge <novusedge0@gmail.com>
Signed-off-by: NovusEdge <novusedge0@gmail.com>
…urns and on compaction

Signed-off-by: NovusEdge <novusedge0@gmail.com>
Setups are now written as format 2, so a deliberate needs-you,fail,done
choice survives re-reading. The changelog also notes that Haiku lines use
each pet's voice.

Signed-off-by: NovusEdge <novusedge0@gmail.com>
Signed-off-by: NovusEdge <novusedge0@gmail.com>
Signed-off-by: NovusEdge <novusedge0@gmail.com>
…dropped hello

The greeted session id lives in $.state, which survives a hot reload.
A hello dropped because the pane was not yet reported shown sets
helloDue again so the next draw retries. Renames the local red in the
Pane render hook to reduced; it shadowed the module's red.

Signed-off-by: NovusEdge <novusedge0@gmail.com>
The row beside the pet was as tall as the sprite, so a 2x2 px pet's
one-row strip clipped the three-row bubble away.

Signed-off-by: NovusEdge <novusedge0@gmail.com>
Signed-off-by: NovusEdge <novusedge0@gmail.com>
A done turn that edited no file picked "done. {file} looks better" and
showed an ellipsis mid-sentence. When every line has an empty slot, the
whole pool stays, so a fail with no count still speaks.

Signed-off-by: NovusEdge <novusedge0@gmail.com>
Signed-off-by: NovusEdge <novusedge0@gmail.com>

# Conflicts:
#	CHANGELOG.md
@NovusEdge NovusEdge self-assigned this Oct 8, 2026
@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: b3f458d0-d844-4b4e-8c54-766afa6254be
📥 Commits

Reviewing files that changed from the base of the PR and between ee04420 and 7f1874a.

📒 Files selected for processing (26)
  • .docket/ledger.jsonl
  • CHANGELOG.md
  • docs/pet-sprites.md
  • docs/pets.md
  • docs/web/app/landing/Terminal.tsx
  • docs/web/app/landing/data.ts
  • docs/web/app/studio/SetupControls.tsx
  • hooks/bubbles.ts
  • hooks/eggs.ts
  • hooks/lines.ts
  • hooks/moments.ts
  • hooks/pane.tsx
  • hooks/petfile.ts
  • hooks/pets.ts
  • hooks/register.tsx
  • hooks/setup.ts
  • test/bubbles.test.ts
  • test/haiku-wiring.test.ts
  • test/kit.ts
  • test/lines.test.ts
  • test/moments.test.ts
  • test/pane.test.ts
  • test/pet-wiring.test.ts
  • test/petfile.test.ts
  • test/setup.test.ts
  • types/state.d.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

This change adds pet-specific dialogue and voice, seven bubble moments, format-2 setup and pet-file support, and pane sizing that accounts for bubble height. It also updates bubble delivery, landing and studio references, documentation, and tests.

Changes

Pet dialogue and bubble behavior

Layer / File(s) Summary
Dialogue and format contracts
hooks/lines.ts, hooks/petfile.ts, hooks/pets.ts, hooks/setup.ts, CHANGELOG.md, docs/pet-sprites.md, .docket/ledger.jsonl, test/lines.test.ts, test/petfile.test.ts, test/setup.test.ts
Adds line tables, flavours, and pet-file format 2 fields for custom lines and voice. Setup format 2 supports seven moods and updates the old default mood list for older or unspecified formats.
Moment selection and bubble delivery
hooks/moments.ts, hooks/eggs.ts, hooks/bubbles.ts, hooks/register.tsx, types/state.d.ts, docs/pets.md, CHANGELOG.md, test/bubbles.test.ts, test/haiku-wiring.test.ts, test/kit.ts, test/moments.test.ts, test/pet-wiring.test.ts
Selects moments from model events and test state. Bubble delivery uses pet-specific lines, time and overlay flavours, and pet voice descriptions for Haiku. Session state tracks greetings and prior test failures.
Bubble layout and UI surfaces
hooks/pane.tsx, test/pane.test.ts, docs/web/app/landing/Terminal.tsx, docs/web/app/landing/data.ts, docs/web/app/studio/SetupControls.tsx
Pane sizing accounts for the bubble height when the bubble appears beside the pet. Landing and studio references use the built-in line data and labels for the added moments.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~50 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant ModelEvents
  participant momentOf
  participant registerSay
  participant linesPool
  participant Pane
  ModelEvents->>momentOf: model state and event
  momentOf->>registerSay: selected moment and variables
  registerSay->>linesPool: pet lines, moment, and flavours
  linesPool->>registerSay: candidate dialogue lines
  registerSay->>Pane: bubble text and moment
Loading

Merge Risk: ⚪ Minimal · up to 7f187

No issue requiring a change before merge was established; proceed with normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 31.25% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 32 functions across 22 files. (4 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main changes: per-pet dialogue and support for seven moments.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 31.25% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 32 functions across 22 files. (4 skipped: 4 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

I’m a rabbit, and I hop through the day,
Seven small moments now have their say.
Pet voices mingle with flavours that bloom,
A taller bubble fits neatly in the room.
Format two keeps each line in its place,
I thump my paws and greet the new space.

Comment @coderabbitai help to get the list of available commands.

@NovusEdge
NovusEdge merged commit 5dfba96 into main Oct 8, 2026
7 checks passed
@NovusEdge
NovusEdge deleted the feat/pet-lines branch October 8, 2026 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant