Fix a number of issues to make more uniform and simpler for imports and uploads - #479
Conversation
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
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
subCollectionUrland 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
updateFileReferencesupdates top-levelfile/metadata/plateOutput/results, but does not update references insideuploads[]. 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.
There was a problem hiding this comment.
💡 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".
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>
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net |
1 similar comment
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net |
Gonza10V
left a comment
There was a problem hiding this comment.
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 .
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net |
|
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. |
|
@Gonza10V 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? |
|
@Gonza10V Fixed the issue with color being lost on rename for Assays. Cannot reproduce your other issue. |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net |
1 similar comment
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net |
This is just for Assay. The Study didnt had an Fj accoun connected at the begining and couldnt connect it afterwards. |
|
Got it. Basically, this happens if you try to upload Plate Reader files with no Flapjack. |
|
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. |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net |
Gonza10V
left a comment
There was a problem hiding this comment.
bugs fixed and functions clarified
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-479.centralus.5.azurestaticapps.net |
Closes #470
Closes #471
Closes #472
Closes #461
Closes #475
Closes #469
Closes #480
Closes #474
Closes #464
Closes #481
Closes #482