Skip to content

Fix dashboard freeze on Show Copyable Workflow Step (#157) - #255

Merged
RyanTheRobothead merged 4 commits into
unstablefrom
fix/157-copyable-workflow-step-freeze
Mar 27, 2026
Merged

Fix dashboard freeze on Show Copyable Workflow Step (#157)#255
RyanTheRobothead merged 4 commits into
unstablefrom
fix/157-copyable-workflow-step-freeze

Conversation

@RyanTheRobothead

Copy link
Copy Markdown
Member

Summary

  • Root cause: @vue:updated lifecycle hooks on text fields in NodeModal.vue called set_text(action) on every component re-render, not just user input. When the copyable section toggled, this created a re-render cascade causing RangeError: Maximum call stack size exceeded and 8+ second hangs.
  • Fix: Replace @vue:updated with @update:modelValue so set_text() only fires on actual value changes (14ms render, 0 errors)
  • Additional improvements: Add :deep="2" depth limit to vue-json-pretty, scope copy toggle per-action, replace manual YAML string concatenation with js-yaml

Test plan

  • Verified with dev-browser automation against example lab dashboard
  • Clicked "Show Copyable Workflow Step" on robotarm_1 transfer action — renders in 14ms (was 8,551ms with stack overflow)
  • Confirmed JSON tree and YAML copy functionality work correctly
  • yarn build passes (TypeScript + Vite)
  • Manual verification against bmg_module run_assay action (original reporter's scenario)

Fixes #157

🤖 Generated with Claude Code

RyanTheRobothead and others added 4 commits March 27, 2026 00:14
Adds :deep='2' and :showLength='true' to the vue-json-pretty component
in the 'Show Copyable Workflow Step' section of NodeModal.vue.

Without depth limiting, actions with deeply nested argument defaults
(like run_assay) create an enormous DOM tree that freezes the browser.

Fixes #157
Replace shared copy ref with per-action Record so toggling the
copyable step for one action doesn't affect other action panels.
Replace manual string concatenation in set_text() with yaml.dump(),
which was already imported but unused. Remove the now-dead cleanArgs()
function and an erroneous stream/consumers import.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…d freeze

The root cause of the dashboard freeze when clicking 'Show Copyable
Workflow Step' was @VUE:updated lifecycle hooks on text fields (lines
97 and 127) calling set_text(action), which modifies reactive refs
(json_text, text) mid-render. This triggered a re-render cascade
that caused a stack overflow (RangeError: Maximum call stack size
exceeded) with 8+ second hangs.

Replace @VUE:updated with @update:modelValue so set_text() only runs
when the user actually changes a value, not on every component
re-render. This reduces render time from ~8500ms to ~14ms.

Fixes #157

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Coverage report

This PR does not seem to contain any modification to coverable code.

@RyanTheRobothead
RyanTheRobothead merged commit 7957a32 into unstable Mar 27, 2026
4 checks passed
RyanTheRobothead added a commit that referenced this pull request Mar 31, 2026
- Complete CHANGELOG for v0.8.0 with all 9 merged PRs (#228, #235, #242,
  #255#260), properly categorized under Added/Changed/Fixed
- Fix broken ActionHandler import in module/basic and node/basic templates
  (replaced with @action decorator pattern)
- Fix self.node_definition → self.node_info in 5 module templates (device,
  instrument, camera, liquid_handler, robot_arm) and their READMEs
- Modernize self.logger.log() → self.event_client.info() in same 5 templates
- Fix stale infrastructure references in example lab README (MongoDB→FerretDB,
  MinIO→SeaweedFS, wrong ports, deprecated /definition endpoint)
- Update node module README to remove deprecated --node_definition reference

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@RyanTheRobothead
RyanTheRobothead deleted the fix/157-copyable-workflow-step-freeze branch April 9, 2026 19:47
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