Is your feature request related to a problem? Please describe.
cleanCellTransient is being triggered whenever outputs are cleared (e.g. in clearOutputs) and this clears all transient data including cellStatus. This means that if outputs are manually cleared by a user mid-execution, cellStatus information (e.g. whether the cell is currently queueing, executing, etc) can be lost.
Describe the solution you'd like
It would be great if the default behavior of clearing outputs was to either leave the transient data intact or to condition it based on the current cell execution status. This way extensions can rely on the cell status being displayed correctly when outputs are cleared using the nteract CLEAR_OUTPUTS and CLEAR_ALL_OUTPUTS actions.
Describe alternatives you've considered
This issue can be worked around by implementing another set of actions to clear outputs, but this not very elegant.
Additional context
Package: reducers
I'm unsure if this is something intentional, but otherwise I would be glad to create a PR for this.
Thanks!
Thanks for opening this issue, @pwang347!
Sensible approach here is to make the clearOutputs API more explicit and remove the calls to clear out the transient state. If we need to do that in places where it is intentionally (e.g. the cell execution epics) we can dispatch a separate action to clear out the transient state.
Sounds good! I'll look into creating a PR following this approach, thanks.