Skip to content

fix pet again - #327588

Merged
justschen merged 1 commit into
mainfrom
justin/hatenna
Jul 27, 2026
Merged

fix pet again#327588
justschen merged 1 commit into
mainfrom
justin/hatenna

Conversation

@justschen

@justschen justschen commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

fix #327587

The latest animation update introduced double-buffered image switching to avoid flicker between animations:

  • Before: there was one visible . Assigning image.src was enough for the browser to display it. The load event only restarted the eye animation, so URL normalization could not prevent the pet from appearing.
  • After PR pet: add spin, heart, yap, and clap #327412: two images are created hidden. A newly loaded image is revealed only inside _onImageLoad. That handler added a stale-load guard comparing normalized image.src with the original _pendingSource string.
  • In packaged builds, spaces in the application path are percent-encoded by Chromium, the comparison fails, _onImageLoad returns early, and both images remain hidden.

Copilot AI review requested due to automatic review settings July 27, 2026 07:20

Copilot AI 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.

Pull request overview

Fixes pet sprite loading when Chromium URL-normalizes paths containing spaces.

Changes:

  • Compares raw src attributes instead of normalized URL properties.
  • Adds regression coverage for encoded application paths.
Show a summary per file
File Description
chatPetWidget.ts Corrects sprite source matching.
chatPetWidget.test.ts Tests URL-normalization behavior.

Review details

  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Medium

@justschen
justschen marked this pull request as ready for review July 27, 2026 07:25
@justschen
justschen enabled auto-merge (squash) July 27, 2026 07:25
@justschen
justschen merged commit 45f3557 into main Jul 27, 2026
30 checks passed
@justschen
justschen deleted the justin/hatenna branch July 27, 2026 07:36
@vs-code-engineering vs-code-engineering Bot added this to the 1.132.0 milestone Jul 27, 2026
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.

pet is broken

3 participants