Skip to content

Animate reaction counts#904

Merged
wesbillman merged 2 commits into
mainfrom
kennylopez-animated-reaction-counts
Jun 8, 2026
Merged

Animate reaction counts#904
wesbillman merged 2 commits into
mainfrom
kennylopez-animated-reaction-counts

Conversation

@klopez4212

@klopez4212 klopez4212 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a local animated count component for reaction-style counters.
  • Use it for message reaction pills and Pulse like counts.
  • Keep Pulse like pending state from showing a not-allowed cursor.
Screen.Recording.2026-06-08.at.17.42.42.mov

Tests

  • pnpm --dir desktop test
  • pnpm --dir desktop typecheck
  • pnpm --dir desktop build
  • pnpm --dir desktop exec playwright test tests/e2e/custom-emoji.spec.ts --project=smoke -g "reacting with a custom emoji"

@klopez4212 klopez4212 marked this pull request as ready for review June 8, 2026 16:54
@klopez4212 klopez4212 requested a review from a team as a code owner June 8, 2026 16:54

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 78d15a4375

ℹ️ 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".

Comment on lines +120 to +124
return {
current: formattedValue,
direction,
previous: currentTransition.current,
version: currentTransition.version + 1,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reset the previous count after the roll finishes

When a count shrinks across a formatting boundary, e.g. 1,000999, this keeps previous set to the longer string indefinitely. getAnimatedCountSlots(transition.previous, transition.current) then continues rendering five slots with leading non-breaking spaces after the animation completes, so reaction/like buttons stay artificially wide until another count update happens. Clear previous back to current after the animation (or otherwise render current-only slots once settled) so the layout matches the displayed count.

Useful? React with 👍 / 👎.

@wesbillman wesbillman merged commit dd08f98 into main Jun 8, 2026
15 checks passed
@wesbillman wesbillman deleted the kennylopez-animated-reaction-counts branch June 8, 2026 17:47
tlongwell-block pushed a commit that referenced this pull request Jun 9, 2026
* origin/main: (32 commits)
  docs: add NIP-ER event reminders (#875)
  feat(acp): pass slash commands through to ACP connectors (#919)
  fix(sdk): resolve multi-word display names and add NIP-27 nostr:npub mention extraction (#905)
  fix(desktop): re-enable mcp_command reconciliation and harden spawn site (#909)
  Fix desktop DM and sidebar UI polish (#908)
  Animate reaction counts (#904)
  Mobile custom emoji + settings redesign (#906)
  Renew TTL when unarchiving ephemeral channels (#902)
  chore(release): release version 0.3.13 (#903)
  Collapse channel header actions (#901)
  sprout-agent: make Databricks defaults env-only (#868)
  Restyle settings sections (#894)
  Add emoji reaction particles (#890)
  Move settings into the app shell (#893)
  Tune chat text sizing (#891)
  Style channel header navigation (#889)
  fix: rename missed known_acp_provider_exact → known_acp_runtime_exact (#900)
  chore(deps): update radix-ui-primitives monorepo (#898)
  chore(deps): update actions/checkout digest to df4cb1c (#897)
  refactor: rename ACP "provider" to "runtime" across the codebase (#783)
  ...

# Conflicts:
#	desktop/src/features/agents/ui/CreateAgentDialog.tsx
tlongwell-block pushed a commit that referenced this pull request Jun 9, 2026
* origin/main: (32 commits)
  docs: add NIP-ER event reminders (#875)
  feat(acp): pass slash commands through to ACP connectors (#919)
  fix(sdk): resolve multi-word display names and add NIP-27 nostr:npub mention extraction (#905)
  fix(desktop): re-enable mcp_command reconciliation and harden spawn site (#909)
  Fix desktop DM and sidebar UI polish (#908)
  Animate reaction counts (#904)
  Mobile custom emoji + settings redesign (#906)
  Renew TTL when unarchiving ephemeral channels (#902)
  chore(release): release version 0.3.13 (#903)
  Collapse channel header actions (#901)
  sprout-agent: make Databricks defaults env-only (#868)
  Restyle settings sections (#894)
  Add emoji reaction particles (#890)
  Move settings into the app shell (#893)
  Tune chat text sizing (#891)
  Style channel header navigation (#889)
  fix: rename missed known_acp_provider_exact → known_acp_runtime_exact (#900)
  chore(deps): update radix-ui-primitives monorepo (#898)
  chore(deps): update actions/checkout digest to df4cb1c (#897)
  refactor: rename ACP "provider" to "runtime" across the codebase (#783)
  ...

Signed-off-by: npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@sprout-oss.stage.blox.sqprod.co>

# Conflicts:
#	desktop/src/features/agents/ui/CreateAgentDialog.tsx
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.

2 participants