Skip to content

Conversation

pedrokohler
Copy link
Collaborator

Context

Make toolbar interactions idempotent and pure

  • Bug: Each click mutated buttonProps.commands and re-added option commands, so commands duplicated across interactions.
  • Fix: Do not mutate. Build a fresh commands array per interaction via buildButtonCommands, then pass computed props to recordInteraction.

Also:

  • adding tests so there are no regressions
  • fixing and exporting a few types

Changes & Results

Before:

before.mp4

After:

after.mp4

Testing

Checklist

PR

  • [] My Pull Request title is descriptive, accurate and follows the
    semantic-release format and guidelines.

Code

  • [] My code has been well-documented (function documentation, inline comments,
    etc.)

Public Documentation Updates

  • [] The documentation page has been updated as necessary for any public API
    additions or removals.

Tested Environment

  • [] OS:
  • [] Node version:
  • [] Browser:

Copy link

netlify bot commented Oct 2, 2025

Deploy Preview for ohif-dev canceled.

Name Link
🔨 Latest commit 1a407a0
🔍 Latest deploy log https://app.netlify.com/projects/ohif-dev/deploys/68e506ce2c4e3e0008fb2b76

@pedrokohler pedrokohler requested a review from sedghi October 2, 2025 23:18
@pedrokohler pedrokohler requested a review from jbocce October 3, 2025 11:16
@pedrokohler pedrokohler requested a review from sedghi October 6, 2025 15:46
@pedrokohler pedrokohler requested a review from sedghi October 7, 2025 11:29
@sedghi sedghi merged commit 4d04dd5 into OHIF:master Oct 7, 2025
7 checks passed
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.

3 participants