Conversation
There was a problem hiding this comment.
Pull request overview
This PR implements version 2 of the resources workflow, introducing a new file structure with separate uploads directories, automatic file naming collision resolution, and an update feature for resources, strains, and sample designs. The changes reorganize how workflow files are stored and tracked, moving from a flat structure to a hierarchical one with JSON metadata files and separate uploads subdirectories.
Changes:
- Moved upload functionality from ResourcesWizard to ImportFile component with integrated SynBioHub collection browser
- Implemented automatic file naming collision resolution that appends numeric suffixes to prevent overwrites
- Added FileUpdate command that allows updating previously uploaded resources while tracking upload history
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| frontend/src/components/panels/resources-editor/ResourcesWizard.jsx | Removed upload button and handler; now displays upload history in reverse chronological order with visual distinction for older versions |
| frontend/src/components/activities/explorer/ImportFile.jsx | Added workflow subdirectory handling, file naming collision resolution, and integrated upload to SynBioHub during import |
| frontend/src/commands.js | Enhanced file deletion to handle uploads subdirectory, improved download to read from new file structure, and added comprehensive file update command with authentication |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.
Comments suppressed due to low confidence (1)
frontend/src/API.js:70
- The
upload_resourcefunction inAPI.jsno longer includessbh_userandsbh_passfields in itsparamsObj. However, the backend (views.py, lines 71–77) still lists bothsbh_userandsbh_passinrequired_paramsand returns a 400 error if either is missing. This means every call toupload_resourcefrom the updated frontend will receive a400 Bad Request: Parameter sbh_user not found in requestresponse. Either the backend'srequired_paramsmust be updated to removesbh_userandsbh_pass, or the frontend must restore sending them asnull.
const paramsObj = {
sbh_url: sbh_url,
sbh_token: sbh_token,
fj_url: "charmmefj-api.synbiohub.org",
fj_token: null,
fj_user: null,
fj_pass: null,
sbh_collec: sbh_collec,
sbh_collec_desc: sbh_collec_desc,
sbh_overwrite: sbh_overwrite,
fj_overwrite: 1,
version: "",
attachments: {}
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Note: current iterations still contains bugs with overwrite handling on update and writing to existing collections likely due to downstream issues with XDC. |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-306.centralus.5.azurestaticapps.net |
|
@codex review this PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 753e8c1ede
ℹ️ 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".
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://witty-hill-08172a210-306.centralus.5.azurestaticapps.net |
Implements changes to the resources workflow which includes file structure changes and update functionality.
Closes #288 - File structure
Closes #301 - Updated resources, strains, and sample design workflow
Closes #303 - Implements an "update" button