fix: hca-dcp matrices tab honours project access gating (#4858)#4859
Merged
Conversation
The matrices tab on hca-dcp project detail pages rendered the matrix list unconditionally, even when the user did not have access to the project. Download / copy buttons in those rows hit gated file URLs and returned 404, producing confusing broken behaviour instead of a clear "you don't have access" surface. Apply the same PROJECT_ACCESS_WARNING + ConditionalComponent pattern that Download / Export / Metadata already use: - New site-config/hca-dcp/ma-dev/entities/projects/entity/tab/ matrices.ts wraps the matrices main column in a ConditionalComponent gated by renderExportEntity, with the access warning spread in front. - detail.ts now imports MATRICES instead of the raw matricesMainColumn. ma-prod inherits via makeConfig, no separate edit needed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes hca-dcp project Matrices tab behavior to honor project access gating, aligning it with the existing Download / Export / Metadata tabs. When a user lacks access to an “Access Required” project, the existing PROJECT_ACCESS_WARNING is shown and the matrices content is not rendered.
Changes:
- Added a new
MATRICEStab config that prependsPROJECT_ACCESS_WARNINGand conditionally renders matrices content usingrenderExportEntity. - Updated the project
DETAILtab configuration to useMATRICESinstead of directly renderingmatricesMainColumn.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| site-config/hca-dcp/ma-dev/entities/projects/entity/tab/matrices.ts | Introduces MATRICES config that applies the same access gating pattern used by Export/Metadata/Download tabs. |
| site-config/hca-dcp/ma-dev/entities/projects/entity/detail.ts | Switches the Matrices tab to use the new gated MATRICES config. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
NoopDog
approved these changes
Jun 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PROJECT_ACCESS_WARNINGalert renders when the user lacks project access, and the matrix list is not rendered behind it.site-config/hca-dcp/ma-dev/entities/projects/entity/tab/matrices.tsthat wrapsmatricesMainColumnin aConditionalComponentgated byrenderExportEntity, withPROJECT_ACCESS_WARNINGspread in front.detail.tsupdated to use the newMATRICESconfig. ma-prod inherits viamakeConfig.Closes #4858.
Test plan
/projects/<id>/project-matrices→ sees the "To export this project, please sign in and, if necessary, request access." warning. No matrix rows render.npm run build-ma-dev:hca-dcp) succeeds.🤖 Generated with Claude Code