Skip to content

Fix code generation with wrong language and wrong path - #299

Merged
agarny merged 4 commits into
Physiome:mainfrom
akhuoa:bugfix/exposure-urls
Sep 28, 2026
Merged

agarny merged 4 commits into
Physiome:mainfrom
akhuoa:bugfix/exposure-urls

Conversation

@akhuoa

@akhuoa akhuoa commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #293.

Test Scenarios

  1. Replacing MATLAB with CPP, https://akhuoa.github.io/pmrapp-frontend/exposures/210f6601f6461be8443592ff071d2592/baylor_hollingworth_chandler_2002_a.cellml/cellml_codegen/CPP, now shows a warning message for unavailable language. And it also hides the citation for this view.
  2. Replacing cellml_codegen with cellml_codegen_x, https://akhuoa.github.io/pmrapp-frontend/exposures/210f6601f6461be8443592ff071d2592/baylor_hollingworth_chandler_2002_a.cellml/cellml_codegen_x/C, now shows a warning for unavailable view. This also hides the citation so that the users won't use the wrong pages in the citation.

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.

Copilot review overview

🟡 Changes recommended

Invalid parameters can cause citation URL resolution to throw and prevent warning pages from rendering.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
What changed in this PR

This PR adds handling for invalid exposure views and code-generation languages, with warnings and citation suppression.

Changes:

  • Adds exposure detail route aliases.
  • Validates view and language parameters.
  • Adds tests for invalid paths and recovery.
File Changes
src/​router/​routeAliases.ts Adds exposure detail route suffixes.
src/​router/​index.ts Applies the new route aliases.
src/​components/​organisms/​ExposureDetail.vue Implements validation, warnings, and citation hiding.
src/​components/​organisms/​ExposureDetail.test.ts Tests invalid-route behavior and recovery.

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

Comment thread src/components/organisms/ExposureDetail.vue
@akhuoa
akhuoa requested a review from agarny September 26, 2026 05:20

@agarny agarny left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good, just a minor request for change.

Comment thread src/components/organisms/ExposureDetail.vue Outdated
@akhuoa
akhuoa requested a review from agarny September 28, 2026 04:37
@agarny
agarny merged commit 662db79 into Physiome:main Sep 28, 2026
1 check passed
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.

Additional fixes for Codegen

3 participants