Skip to content

Resource workflow v2#306

Merged
Gonza10V merged 9 commits intomasterfrom
resourceWorkflowV2
Mar 10, 2026
Merged

Resource workflow v2#306
Gonza10V merged 9 commits intomasterfrom
resourceWorkflowV2

Conversation

@Kerem-G
Copy link
Collaborator

@Kerem-G Kerem-G commented Feb 24, 2026

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

Copy link
Contributor

Copilot AI left a comment

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 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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_resource function in API.js no longer includes sbh_user and sbh_pass fields in its paramsObj. However, the backend (views.py, lines 71–77) still lists both sbh_user and sbh_pass in required_params and returns a 400 error if either is missing. This means every call to upload_resource from the updated frontend will receive a 400 Bad Request: Parameter sbh_user not found in request response. Either the backend's required_params must be updated to remove sbh_user and sbh_pass, or the frontend must restore sending them as null.
        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>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@Kerem-G Kerem-G marked this pull request as ready for review March 6, 2026 04:15
@Kerem-G
Copy link
Collaborator Author

Kerem-G commented Mar 6, 2026

Note: current iterations still contains bugs with overwrite handling on update and writing to existing collections likely due to downstream issues with XDC.

@Kerem-G Kerem-G requested a review from Gonza10V March 6, 2026 04:17
@github-actions
Copy link

github-actions bot commented Mar 6, 2026

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

@Gonza10V
Copy link
Contributor

Gonza10V commented Mar 6, 2026

@codex review this PR

Copy link

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

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: 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".

@github-actions
Copy link

github-actions bot commented Mar 9, 2026

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

@Gonza10V Gonza10V merged commit 340ead9 into master Mar 10, 2026
8 checks passed
@Gonza10V Gonza10V deleted the resourceWorkflowV2 branch March 10, 2026 15:26
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.

Add "Update" for Resources Implement Workflow for Resources, Strains and SampleDesigns Fix Resources File Pointing

4 participants