Add reactions for status channel changes and refactor UI handling of __error and __result channel#3745
Add reactions for status channel changes and refactor UI handling of __error and __result channel#3745yytelliot wants to merge 28 commits intosource-academy:masterfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the dummy conductor evaluator to utilize the conductor runner API and introduces new interpreter actions for handling streaming results and execution status. Key changes include the addition of appendInterpreterResult, appendInterpreterError, and setIsRunning actions, along with corresponding reducer logic and saga updates to manage runner statuses. Review feedback suggests removing redundant properties in action creators, maintaining consistent relative import paths, and enhancing type safety by replacing any with specific error types in the workspace reducer.
25a45fd to
e5f1431
Compare
7b99109 to
c13993a
Compare
…ademy#3731) * Elongate works? * Format fix * Fixes for TS typing * Sentry error and possible render isLive fix * Fix formatting error * Sentry --------- Co-authored-by: Richard Dominick <34370238+RichDom2185@users.noreply.github.com> Co-authored-by: Martin Henz <henz@comp.nus.edu.sg>
Coverage Report for CI Build 24340336543Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage increased (+0.006%) to 40.892%Details
Uncovered Changes
Coverage Regressions1 previously-covered line in 1 file lost coverage.
Coverage Stats💛 - Coveralls |
Description
Added status handling in the frontend. Frontend state now reacts to changes in conductor evaluator status, specifically STOPPED, ERROR and RUNNING, instead of being inferred from the result and error channels.
Added a new workspace reducer setIsRunning as the manager for isRunning state. Added new reducers appendInterpreterResult and appendIntepreterError as new reducers for the result and error channel so they do not stop execution.
Note that this change will cause the status of evaluators that do not send status updates to be inaccurately reflected in the frontend. Evaluator implementers will have to update their program state accordingly so that changes in state can now be reflected on the frontend.
Type of change
How to test
Use updateStatus(RunnerStatus.RUNNING, true) and updateStatus(RunnerStatus.RUNNING, false)
See if the run button updates accordingly
Use updateStatus(RunnerStatus.Running, true)
Conduit instance should be terminated and new lines are no longer accepted in the REPL
UI state gets cleared: UI elements return to their state before execution
Checklist