Skip to content

Conversation

@ascibisz
Copy link
Contributor

@ascibisz ascibisz commented Nov 5, 2025

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_path field 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?

@github-actions
Copy link

github-actions bot commented Nov 5, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 21.18% 366 / 1728
🔵 Statements 21.18% 366 / 1728
🔵 Functions 40.35% 23 / 57
🔵 Branches 71.42% 80 / 112
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/App.tsx 0% 0% 0% 0% 1-13, 15-16, 18-25, 27, 29-31, 33-39, 41-47, 49-63, 65-109, 111-119, 121-146, 148-152, 154-158, 160-179, 181, 183
src/components/RecipeForm/index.tsx 0% 0% 0% 0% 1-3, 8, 14-17, 19-39, 41-48, 50, 52, 54-55
src/constants/firebase.ts 100% 100% 100% 100%
src/state/store.ts 0% 0% 0% 0% 1, 51, 53-59, 61-63, 65-73, 75-90, 92-93, 95-115, 117-119, 121-123, 125-128, 131-144, 147-162, 164-166, 168-169, 171-178, 180-182, 184-187, 189-203, 205-217, 219-235, 238-252, 255-268
src/types/index.ts 100% 100% 100% 100%
src/utils/firebase.ts 27.22% 62.5% 26.66% 27.22% 33-34, 39-40, 74-76, 79-89, 92-96, 99-107, 111-124, 127-132, 135-137, 140-164, 167-190, 204-205, 208-218, 220-229, 231, 233-237, 239-244
Generated in workflow #116

@github-actions
Copy link

github-actions bot commented Nov 5, 2025

PR Preview Action v1.6.2
Preview removed because the pull request was closed.
2025-11-07 21:23 UTC

@ascibisz ascibisz marked this pull request as ready for review November 5, 2025 23:46
@ascibisz ascibisz linked an issue Nov 5, 2025 that may be closed by this pull request

set({
selectedRecipeId: recipeId,
resultUrl: SIMULARIUM_EMBED_URL + (sel.result_path ?? ""),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor

@meganrm meganrm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor

@interim17 interim17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@ascibisz ascibisz merged commit 92641e5 into main Nov 7, 2025
2 checks passed
@ascibisz ascibisz deleted the feature/show-precomputed-results branch November 7, 2025 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When a recipe is selected it should show pre-computed results

4 participants