Display Pre-Computed Result on Recipe Selection#144
Merged
Conversation
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
meganrm
reviewed
Nov 6, 2025
src/state/store.ts
Outdated
|
|
||
| set({ | ||
| selectedRecipeId: recipeId, | ||
| resultUrl: SIMULARIUM_EMBED_URL + (sel.result_path ?? ""), |
Contributor
There was a problem hiding this comment.
you're storing redundant information in the store. if we already know the result path, we can construct it without having to store it separately here
meganrm
approved these changes
Nov 6, 2025
Contributor
meganrm
left a comment
There was a problem hiding this comment.
this is doing what we want it to do. given the amount of state management refactor already underway, I think this is fine, and then we'll progress with mine and Joes PRs afterwards
interim17
approved these changes
Nov 7, 2025
Contributor
interim17
left a comment
There was a problem hiding this comment.
Agree with megan this is a fine stepping stone as it is, definitely worth merging some things since so many different branches are floating around that touch the same files
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.
Problem
Link to story or ticket
Solution
We already know what the results for the recipes are before any changes are made, so we should show that when a user selects a recipe from the drop-down.
I previously added the
result_pathfield to the firebase collection where we store the metadata for each recipe. This is the s3 path to the simularium result file for the recipe. This PR allows cellpack studio to read this result path and display this pre-computed result until the user makes changes and has their own run.Open Question
Am I using the store right?