Skip to content

chore: disable duos access request option for anvil datasets (#4855)#4856

Merged
NoopDog merged 5 commits into
mainfrom
fran/4855-disable-duos-access-request
Jun 3, 2026
Merged

chore: disable duos access request option for anvil datasets (#4855)#4856
NoopDog merged 5 commits into
mainfrom
fran/4855-disable-duos-access-request

Conversation

@frano-m
Copy link
Copy Markdown
Contributor

@frano-m frano-m commented Jun 3, 2026

Summary

  • Adds a DUOS_ENABLED = false constant in getRequestAccessOptions() and gates the existing DUOS branch behind it.
  • Leaves the DUOS code path intact so the option can be re-enabled by flipping the constant to true.
  • dbGaP behaviour is unchanged.

Closes #4855

Test plan

  • On an AnVIL dataset detail page with a duos_id but no dbGapId, confirm the "Request Access" dropdown does not show DUOS.
  • On a dataset with both a duos_id and a dbGapId, confirm only the dbGaP option is listed.
  • On a dataset with only a dbGapId, confirm the dbGaP option still renders as before.

🤖 Generated with Claude Code

image

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
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 disables the DUOS “Request Access” menu option for AnVIL dataset detail pages by gating the existing DUOS option behind a hardcoded DUOS_ENABLED = false flag, while keeping the DUOS code path intact for easy re-enablement later. This aligns with issue #4855 and preserves existing dbGaP behavior.

Changes:

  • Introduced a DUOS_ENABLED constant set to false to temporarily disable DUOS request-access options.
  • Wrapped the DUOS option logic in getRequestAccessOptions() behind DUOS_ENABLED && duosId.
  • Left dbGaP option logic unchanged.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/components/Detail/components/AnVILCMG/components/RequestAccess/utils.ts Outdated
frano-m and others added 2 commits June 3, 2026 11:21
…4855)

with duos disabled, datasets that have only a duos_id no longer render the
request access button. the e2e test was picking the first "required" row,
which can be duos-only and times out. select a row with a dbgap identifier
explicitly so the button is guaranteed to render.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@frano-m frano-m marked this pull request as ready for review June 3, 2026 01:24
frano-m and others added 2 commits June 3, 2026 11:40
playwright's hasText evaluates against innertext, which can include
surrounding whitespace from the layout around the <p>phs######</p>, so
^phs\d never matches in webkit/firefox. drop the anchor.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…4855)

the cc-dev catalog used by anvil e2e returns only three sample datasets
to unauthenticated users; none of them have a dbgap identifier. the old
"displays request access button" test passed before because the duos-only
sample still rendered the button via the duos option. with duos disabled
that path is gone, so flip the assertion: confirm the button does not
render for the required-access sample. this directly validates the
disable behavior in the environment we actually have.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@NoopDog NoopDog merged commit 4d15705 into main Jun 3, 2026
3 checks passed
@frano-m frano-m deleted the fran/4855-disable-duos-access-request branch June 3, 2026 03:02
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.

Disable DUOS access request option for AnVIL datasets

3 participants