Skip to content

feat(desktop): add speech bubble theme and preview button - #278

Open
pless84 wants to merge 7 commits into
OpenPetsHQ:mainfrom
pless84:feat/speech-bubble-theme
Open

pless84 wants to merge 7 commits into
OpenPetsHQ:mainfrom
pless84:feat/speech-bubble-theme

Conversation

@pless84

@pless84 pless84 commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Depends on #277. This branch builds on the speech bubble size/duration settings. Until #277 merges, this PR also lists its commits; the new work is the last two commits (feat(desktop): add a speech bubble theme setting and feat(desktop): add a speech bubble preview button).

Summary

Adds to Control Center → Settings → Pet Behavior:

  • Speech bubble theme (bubbleTheme): Light (default, today's look), Dark, or System default.
    • Dark switches transient bubbles to dark colors in pet-window-styles.ts.
    • System default wraps the same rules in @media (prefers-color-scheme: dark), so it follows the desktop's dark mode and changes live. The Control Center's own appearance setting doesn't affect it.
    • The pinned plugin HUD keeps its own look. A theme change re-renders every pet window through refreshAllPetWindows, the same path as a size change.
  • Show Test Message button: the default pet says a sample message through applyExternalPetSay, so size, duration and theme can be previewed. If the pet is paused, hidden or visiting another LAN host, the Control Center says why.

Strings are added in English and French. Docs: docs/desktop.md.

Tests

  • preference-patch.test.ts: valid and invalid bubbleTheme values.
  • pnpm --filter @open-pets/desktop check and pnpm docs:build pass.
  • Checked by hand in the Linux dev app: Light, Dark and System default themes, and the preview button.

🤖 Generated with Claude Code

pless84 and others added 6 commits October 27, 2026 18:21
Add speech bubble size (Small/Normal/Large/Huge) and duration
(Short/Normal/Long/Very long) preferences under Settings → Pet Behavior.
Bubble growth is capped so it fits above the pet, and the Linux input
shape uses the same cap. Duration scales the computed reading time;
explicit caller and media durations are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Cap media bubbles with their larger .has-media box, in both the CSS
  and the Linux input shape, so enlarged previews are not cut off.
- Re-render every pet window when the bubble size changes, including
  plugin-spawned pets and LAN visitors.
- Move the display duration math into the pure pet-transient-duration.ts
  and test the duration setting directly.
- Translate the bubble size and duration option labels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a Speech bubble theme preference (Light, Dark, System default) under
Settings → Pet Behavior. Dark switches transient bubbles to dark colors;
System default applies them only when the desktop uses dark mode and
follows changes live. Light stays the default, and the pinned plugin HUD
keeps its own look.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a Show Test Message button under the speech bubble settings that
makes the default pet say a sample message, so size, duration and theme
can be previewed. The Control Center explains when the pet cannot show
it (paused, hidden or visiting another LAN host).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The changes affect transient speech bubbles across the desktop pet experience.

The PR appears safe to merge, with non-blocking fixes for plugin bubble contrast and preview feedback.

Findings

  1. P2 Plugin messages lose contrast ▶
  2. P2 Preview shows no sample ▶

Summary

Adds speech bubble size, duration, and theme settings, plus a preview button.

  • People can set how large transient speech bubbles appear and how long they stay.
  • Transient speech bubbles can follow a light, dark, or system theme.
  • The Control Center can show a sample message in the default pet's bubble.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  Settings[Control Center settings] --> Save[Validate and save preferences]
  Save --> Refresh[Refresh all pet windows]
  Refresh --> Render[Render bubble colors and size]
  Preview[Show Test Message] --> Say[applyExternalPetSay]
  Say --> Slot{Plugin bubble active?}
  Slot -->|Yes| Plugin[Render plugin bubble instead]
  Slot -->|No| Sample[Render sample message]
Loading

Reviews (1) · Last reviewed commit: "feat(desktop): add a speech bubble previ..." · Reviewed by Greptile

Comment thread apps/desktop/src/pet-window-styles.ts
Comment thread apps/desktop/src/windows.ts
- Give accented plugin bubbles dark backgrounds in the dark theme so
  their text stays readable; pinned bubbles are unchanged.
- Report the preview as not shown while a plugin bubble holds the
  transient slot, and tell the user to try again when it closes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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