fix: return failed ActionResult instead of 500 for typed endpoints (#187) - #256
Merged
Merged
Conversation
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>
…ints (#187) When a typed action (e.g. `-> int`) fails, the action-specific result endpoint returned a 500 because Pydantic rejected `json_result=None` against the non-Optional return type. Wrap `json_result_type` in `Optional[]` in `create_dynamic_model()`, add a client-side fallback to the generic endpoint, and add a regression test. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||
Narrow exception catch from bare `except Exception` to `requests.HTTPError` with a 5xx status check so non-server errors are re-raised. Add structured warning log on fallback. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
json_result_typeinOptional[]increate_dynamic_model()so Pydantic acceptsNonefor failed/in-progress actions instead of returning a 500get_action_result_by_name()to the generic endpoint if the typed endpoint errors-> int) returns 200 withstatus=failedCloses #187
Test plan
test_failed_typed_action_returns_200passesmadsci_common,madsci_node_module,madsci_clientpass🤖 Generated with Claude Code