Clear stale SeqJSON output when switching workspace files#1889
Conversation
|
Potentially related to this is if you load the workspace without having file selected, updating the |
duranb
left a comment
There was a problem hiding this comment.
Regardless of whether we address my comment regarding the "Untitled" file's output, I think the work done here at least fixes the issues stated. 👍🏻
On initial page load with no file selected, the SeqJSON output pane was empty because no output computation was triggered on mount. Also, typing in an untitled sequence cleared the output because Svelte 4 bypasses prop defaults on reactive updates (has bitten us before). Passing undefined from the parent set sequenceName to undefined instead of the default ''.
Had it in my head that I had fixed this already, pushed a fix. Can you give it another spin when you get a chance? |
Tested! Works great! 👍🏻 |
When switching between sequence files, the SeqJSON output panel would retain the previous file's content. This happened because the debounced output update was cancelled without scheduling a replacement, and when opening a new blank file the output was never recomputed. This PR also resolves an issue where sequence output format was not being computed and shown for untitled files on page load.
Fixes:
Closes #1888