Skip to content

Conversation

@alexpargon
Copy link
Contributor

Button visibility depends on repository files.

Do not merge until the Pensive API

https://api.pennsieve.net/discover/datasets/${this.datasetId}/versions/1/assets/browse?path=&limit=5&offset=0&file=.hornet/manifest.json

Is in production, as it will not allow you to view/test the button

@cypress
Copy link

cypress bot commented Aug 18, 2025

SPARC Vue3 Portal Testing    Run #783

Run Properties:  status check passed Passed #783  •  git commit 775e270abd: Merge branch 'main' into add-osparc-link-generator
Project SPARC Vue3 Portal Testing
Branch Review add-osparc-link-generator
Run status status check passed Passed #783
Run duration 16m 32s
Commit git commit 775e270abd: Merge branch 'main' into add-osparc-link-generator
Committer Alejandro Parcet Gonzalez
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 39
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 170
View all changes introduced in this branch ↗︎

@alexpargon alexpargon self-assigned this Aug 19, 2025
@alexpargon alexpargon requested a review from Copilot August 19, 2025 06:05
@alexpargon alexpargon added the enhancement New feature or request label Aug 19, 2025
Copy link

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 adds conditional visibility for the "Run on Osparc" button based on the presence of a .hornet/manifest.json file in the dataset repository. The button is now shown/hidden asynchronously by checking for the file's existence via the Pennsieve API.

Key changes:

  • Replaced static osparcLink computed property with async getOsparcLink() method that checks for manifest file existence
  • Modified button visibility to conditionally display based on API response
  • Updated component styling to use consistent button widths

Reviewed Changes

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

File Description
pages/datasets/[datasetId].vue Added async link generation logic and replaced computed property with async method
components/DatasetDetails/SourceCodeInfo.vue Updated button visibility logic and styling for consistent width handling

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@alexpargon
Copy link
Contributor Author

alexpargon commented Aug 29, 2025

With this last change we introduce two global variables to:

  • OSPARC_DISABLE_HORNET_BUTTON
    • Enables/Disables button visibility by not generating the URL and thus hiding the button
  • OSPARC_ENABLE_CHECK_HORNET_MANIFEST
    • Enables/Disables the .hornet/cad_manifest.json file in case this endpoint does not work as expected

In case no globals are added to the environment variables, the button will be enabled and no cad_manifest.json will be searched for on pennsive.

This PR can be merged as soon as @pcrespov enables the new API endpoint on osparc side, or sooner with the Global variables setted to disable the button for now.

@pcrespov pcrespov requested a review from egauzens September 1, 2025 14:20
@pcrespov
Copy link

pcrespov commented Sep 1, 2025

This PR can be merged as soon as @pcrespov enables the new API endpoint on osparc side

Everything ready on the osparc API

Copy link
Collaborator

@egauzens egauzens left a comment

Choose a reason for hiding this comment

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

@alexpargon Just a couple comments to address. Also, is there a dataset id that I can test this on?

Signed-off-by: Alejandro Parcet <[email protected]>
@alexpargon
Copy link
Contributor Author

@alexpargon Just a couple comments to address. Also, is there a dataset id that I can test this on?

Hello @egauzens !

I just solved the comments 😄.

About testing, right now as far as i know, no dataset has the proper .hornet/cad_manifest.json file, we should add a repository that has the proper structure to be sure.

@egauzens
Copy link
Collaborator

@alexpargon Just a couple comments to address. Also, is there a dataset id that I can test this on?

Hello @egauzens !

I just solved the comments 😄.

About testing, right now as far as i know, no dataset has the proper .hornet/cad_manifest.json file, we should add a repository that has the proper structure to be sure.

Hey @alexpargon I unresolved the conversations since I did not see the requested changes applied. Perhaps you forgot to push them?

@alexpargon
Copy link
Contributor Author

@alexpargon Just a couple comments to address. Also, is there a dataset id that I can test this on?

Hello @egauzens !
I just solved the comments 😄.
About testing, right now as far as i know, no dataset has the proper .hornet/cad_manifest.json file, we should add a repository that has the proper structure to be sure.

Hey @alexpargon I unresolved the conversations since I did not see the requested changes applied. Perhaps you forgot to push them?

You were right! 🤯

@alexpargon alexpargon requested a review from egauzens October 17, 2025 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants