Skip to content

Fix a number of issues to make more uniform and simpler for imports and uploads - #479

Merged
cjmyers merged 31 commits into
masterfrom
uniformFrontend
Sep 5, 2026
Merged

cjmyers merged 31 commits into
masterfrom
uniformFrontend

Conversation

@cjmyers

@cjmyers cjmyers commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Closes #470
Closes #471
Closes #472
Closes #461
Closes #475
Closes #469
Closes #480
Closes #474
Closes #464
Closes #481
Closes #482

Comment thread frontend/src/commands.js Fixed
Comment thread frontend/src/components/activities/explorer/ImportFile.jsx Fixed
Comment thread frontend/src/components/activities/explorer/ImportFile.jsx Fixed
Comment thread frontend/src/commands.js Fixed
Comment thread frontend/src/commands.js Fixed
Comment thread frontend/src/commands.js Fixed
Comment thread frontend/src/components/activities/explorer/ImportFile.jsx Dismissed
Comment thread frontend/src/components/activities/explorer/ImportFile.jsx Fixed
Comment thread frontend/src/components/activities/explorer/ImportFile.jsx Fixed
@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net

Comment thread frontend/src/components/activities/explorer/ExplorerList.jsx Fixed
@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net

Comment thread backend/sbs_server/app/route.py Dismissed
@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net

@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net

Comment thread frontend/src/commands.js Fixed
Comment thread frontend/src/commands.js Fixed
@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net

@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net

@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net

@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net

@Gonza10V

Gonza10V commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-01T21:04:27.048609Z 113f887 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors SynBioSuite’s import/upload workflow to be more uniform across object types, removing legacy “uploads” directories, improving spreadsheet import behavior, and expanding explorer context-menu actions (upload/open/rename) while tightening uploaded-state tracking.

Changes:

  • Update object type handling so Resources/Strains/SampleDesigns are spreadsheet-based and support import/upload/update with “single sheet” constraints.
  • Rework explorer/import/upload flows to store files alongside their sidecars (no per-type uploads/), add rename/open actions, and use upload snapshots for “uploaded” state.
  • Backend upload endpoints now return subCollectionUrl and add plate-reader outputs as SynBioHub attachments; SBOL upload also computes a top-level URI for easier navigation.

Reviewed changes

Copilot reviewed 14 out of 16 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
frontend/src/redux/hooks/workingDirectoryHooks.js Add optional addToStore control when creating files.
frontend/src/redux/hooks/panelsHooks.js Resolve experiment panels against .xdc backing files for spreadsheet handles.
frontend/src/panels.js Route metadata spreadsheets to Experiment panel; block opening certain spreadsheet types.
frontend/src/objectTypes.js Shift several object types to spreadsheet-based matching; add update/limit-one flags; remove Assays object type entry.
frontend/src/components/WelcomeScreen.jsx Update product naming in UI text.
frontend/src/components/panels/xdc/CollectionWizard.jsx Normalize stored file IDs; record uploaded snapshot fields (results/plateOutput) and use subCollectionUrl.
frontend/src/components/BrowserCompatibilityCatch.jsx Update product naming in UI text.
frontend/src/components/activities/explorer/ImportFile.jsx Remove uploads/ directory usage; add “upload now” path; create assay workflow on metadata import.
frontend/src/components/activities/explorer/ExplorerListItem.jsx Add rename modal and context commands; compute uploaded-state from upload snapshots; gate delete/open accordingly.
frontend/src/components/activities/explorer/ExplorerList.jsx Adjust study access error handling; split Import vs Upload actions; enforce limit-one behavior.
frontend/src/commands.js Add FileRename/FileOpen; adjust delete/upload/update logic for new sidecar locations; update autosave backing file handling.
frontend/src/API.js Remove unused upload_sbs; make SBML attachment reading more tolerant.
frontend/src/activities.js Remove Assays from listed activity object types.
backend/sbs_server/app/utils.py Add helper to find root SBOL ComponentDefinitions.
backend/sbs_server/app/synbiohubUpload.py Return sub-collection URL from SynBioHub submit flow.
backend/sbs_server/app/route.py Return subCollectionUrl in responses; attach plate-reader outputs; compute top-level URI for SBOL uploads.
Suppressed comments (3)

frontend/src/components/activities/explorer/ExplorerListItem.jsx:63

  • When the current file does not match the latest upload snapshot for a given .xdc, the code sets uploadInfo to null and returns immediately. This prevents checking the remaining .xdc files, so a file that is uploaded in a different assay can incorrectly appear deletable/not-uploaded.
                                if (!metadataMatches && !plateMatches && !resultsMatches) {
                                    setUploadInfo(null)
                                } else {
                                    setUploadInfo(xdc.uploads[xdc.uploads.length - 1])
                                }
                                return

frontend/src/components/activities/explorer/ExplorerListItem.jsx:67

  • If a .xdc has no uploads, the loop returns immediately, which again prevents checking other .xdc files that may contain an upload record for this file. This can incorrectly allow deleting uploaded plate-reader/results/metadata files.
                            } else {
                                setUploadInfo(null)
                                return
                            }

frontend/src/commands.js:968

  • updateFileReferences updates top-level file/metadata/plateOutput/results, but does not update references inside uploads[]. Since uploaded-state coloring and delete restrictions now key off the latest upload snapshot, renaming a file can orphan those snapshot references and make uploaded files appear not uploaded/deletable.
                // XDC results reference(s)
                if (Array.isArray(json.results)) {
                    const updated = json.results.map(replaceReference)

                    if (updated.some((value, i) =>
                        value !== json.results[i])) {
                        json.results = updated
                        changed = true
                    }
                } else if (json.results !== undefined) {
                    const updated = replaceReference(json.results)

                    if (updated !== json.results) {
                        json.results = updated
                        changed = true
                    }
                }

                if (changed) {
                    const writable = await entry.createWritable()
                    await writable.write(JSON.stringify(json, null, 2))
                    await writable.close()
                }

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread frontend/src/commands.js Outdated
Comment thread frontend/src/components/activities/explorer/ExplorerListItem.jsx Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 113f887a75

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread frontend/src/commands.js Outdated
Comment thread frontend/src/commands.js
Comment thread frontend/src/components/activities/explorer/ImportFile.jsx Outdated
Comment thread frontend/src/components/activities/explorer/ExplorerListItem.jsx Outdated
cjmyers and others added 2 commits September 2, 2026 10:21
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net

1 similar comment
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net

@Gonza10V Gonza10V left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested #470, #471, #472, #461 (works fur now you MUST have a Fj account to upload xlsx document I could not added as other, which I think should be relaxed). #475 Sample designs lost the options after uploading a template, just can recover by deleting the template. Tested and all of them loose the options after uploading a template. #469 , #480 , #474 , #464 (color is lost after renaming on metadata but not on resources, link is lost on metadata), #481 , #482 .

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net

@cjmyers

cjmyers commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

@Gonza10V

Need for FJ account is definitely a bug. Is this for Assay or any spreadsheet?

Losing options on upload is by design, since you are only allowed one resource, strain, and sample design sheet.

Color lost on renaming metadata is a bug. I may have fixed that one when fixing @Kerem-G 's issues, but will re-test.

@cjmyers

cjmyers commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

@Gonza10V
Correct about color being lost. It is not updating the file name in the XDC file.

Could not reproduce the need for FJ account for resources. Is this only for Assay? Did you create the study with a Flapjack study at the beginning?

Comment thread frontend/src/components/activities/explorer/ExplorerListItem.jsx Fixed
@cjmyers

cjmyers commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

@Gonza10V Fixed the issue with color being lost on rename for Assays.

Cannot reproduce your other issue.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net

1 similar comment
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net

@Gonza10V

Gonza10V commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Need for FJ account is definitely a bug. Is this for Assay or any spreadsheet?

This is just for Assay. The Study didnt had an Fj accoun connected at the begining and couldnt connect it afterwards.

@cjmyers

cjmyers commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Got it. Basically, this happens if you try to upload Plate Reader files with no Flapjack.

@cjmyers

cjmyers commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

That is fixed. Just one simple check. It will now add plate files as attachments in SBH but not try to use Flapjack if no repo is associated with the study. Good check.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net

@Gonza10V
Gonza10V self-requested a review September 5, 2026 01:12

@Gonza10V Gonza10V left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

bugs fixed and functions clarified

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net

@cjmyers
cjmyers merged commit be4e023 into master Sep 5, 2026
8 checks passed
@cjmyers
cjmyers deleted the uniformFrontend branch September 5, 2026 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

5 participants