Skip to content

tests: add regression coverage for chat-scoped skeleton replacement #3

@Senzo13

Description

@Senzo13

Context

JoyBoy supports multiple conversations and background jobs. Skeleton/progress replacement must target the correct active chat, not an older .image-skeleton-message or .video-skeleton-message from another conversation.

Relevant files:

  • web/static/js/chat.js
  • web/static/js/generation.js
  • web/static/js/app.js
  • tests/

Suggested approach

Extract the DOM lookup logic for scoped skeleton replacement into a small testable helper, or add a lightweight JS/unit smoke test that builds a fake DOM with two chats and verifies the newest matching skeleton is updated.

Acceptance criteria

  • A test covers two chat IDs with simultaneous/old skeletons.
  • The helper chooses the skeleton matching the requested chatId.
  • Legacy fallback still works only when no scoped skeleton exists.
  • Existing Python tests and JS syntax checks still pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    frontendBrowser-side JS/CSS workgood first issueGood for newcomerstestsAutomated tests and regression coverage

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions