Skip to content

feat(website): add copy and download buttons for sequences on details…#5880

Merged
theosanderson merged 9 commits intomainfrom
claude/add-sequence-buttons-NLris
Feb 21, 2026
Merged

feat(website): add copy and download buttons for sequences on details…#5880
theosanderson merged 9 commits intomainfrom
claude/add-sequence-buttons-NLris

Conversation

@theosanderson
Copy link
Copy Markdown
Member

@theosanderson theosanderson commented Jan 26, 2026

… page

Add SequenceActionButtons component that provides:

  • Copy button to copy the sequence in FASTA format to clipboard with "Copied!" feedback
  • Download button to download the sequence as a .fasta file

The buttons are displayed at the bottom of the sequence viewer on the sequence details page, using hydration-safe Button component to prevent flaky Playwright tests.

image

🚀 Preview: Add preview label to enable

@theosanderson theosanderson added the preview Triggers a deployment to argocd label Jan 26, 2026
@claude claude Bot added the website Tasks related to the web application label Jan 26, 2026
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Jan 26, 2026

This PR resolves #5879 (Copy button and download button on sequences at bottom of details page)

@anna-parker anna-parker removed the preview Triggers a deployment to argocd label Jan 26, 2026
@theosanderson theosanderson added the preview Triggers a deployment to argocd label Feb 16, 2026
claude and others added 3 commits February 16, 2026 15:49
… page

Add SequenceActionButtons component that provides:
- Copy button to copy the sequence in FASTA format to clipboard with "Copied!" feedback
- Download button to download the sequence as a .fasta file

The buttons are displayed at the bottom of the sequence viewer on the
sequence details page, using hydration-safe Button component to prevent
flaky Playwright tests.
Move the copy and download buttons from the bottom of the sequence
viewer to the top right corner, just below the tabs. Use absolute
positioning to keep them out of the content flow.
…ion buttons

Improves visibility of copy/download buttons overlaying the sequence text.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@theosanderson-agent theosanderson-agent force-pushed the claude/add-sequence-buttons-NLris branch from ab16053 to 22cc39f Compare February 16, 2026 15:50
Add data-testid to metadata download dropdown and use it in the
integration test instead of getByText, avoiding collision with the
new sequence download button.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@theosanderson-agent theosanderson-agent force-pushed the claude/add-sequence-buttons-NLris branch from b6e050c to 2df9b34 Compare February 16, 2026 16:09
@theosanderson theosanderson marked this pull request as ready for review February 16, 2026 16:14
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Feb 16, 2026

Claude finished @theosanderson's task in 1m 23s —— View job


Code Review Complete ✓

  • Read and analyze all changed files
  • Review code quality and best practices
  • Check for security issues
  • Evaluate performance considerations
  • Review test coverage
  • Check documentation
  • Provide inline comments for specific issues
  • Post final review summary

Summary

This PR successfully adds copy and download functionality for sequences on the details page. The implementation is generally solid and follows the project's guidelines for preventing flaky Playwright tests by using the hydration-safe Button component.

Strengths:

  • Correctly uses the Button component to prevent race conditions in Playwright tests
  • Clean component structure with clear separation of concerns
  • Proper positioning with absolute positioning for the button container
  • Good use of visual feedback (Copied! message)
  • Appropriate test-id attributes for testing

Issues Found:
I've left inline comments on specific issues that should be addressed:

  1. Silent error handling in clipboard operations - users won't know if copy failed
  2. Potential memory leak in download function with synchronous cleanup of async operation
  3. Missing filename sanitization that could cause issues with special characters
  4. Minor inconsistency in variable naming between header and sequenceName

Testing:
The integration test change appears minimal (just fixing an ambiguous selector), but there are no new tests specifically for the copy/download buttons. Consider adding integration tests to verify:

  • Copy button functionality and feedback message
  • Download button creates correct file
  • Buttons are properly disabled until hydration

Documentation:
No documentation updates needed for this user-facing feature, which is appropriate given the self-explanatory nature of the buttons.

Overall, this is a good implementation that needs a few refinements around error handling and edge cases before merging.

Comment thread website/src/components/SequenceDetailsPage/SequencesDisplay/SequenceViewer.tsx Outdated
theosanderson and others added 2 commits February 16, 2026 16:29
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
@theosanderson theosanderson removed the preview Triggers a deployment to argocd label Feb 16, 2026
theosanderson and others added 2 commits February 19, 2026 15:47
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
@anna-parker anna-parker added the preview Triggers a deployment to argocd label Feb 19, 2026
Comment thread website/src/components/SequenceDetailsPage/SequencesDisplay/SequenceViewer.tsx Outdated
Copy link
Copy Markdown
Contributor

@anna-parker anna-parker left a comment

Choose a reason for hiding this comment

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

awesome! I tested it out a bit and the code looks good!

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
@theosanderson-agent theosanderson-agent removed the preview Triggers a deployment to argocd label Feb 20, 2026
@theosanderson theosanderson merged commit 3b22d5e into main Feb 21, 2026
51 of 56 checks passed
@theosanderson theosanderson deleted the claude/add-sequence-buttons-NLris branch February 21, 2026 00:07
theosanderson added a commit that referenced this pull request Feb 22, 2026
#5880)

… page

Add SequenceActionButtons component that provides:
- Copy button to copy the sequence in FASTA format to clipboard with
"Copied!" feedback
- Download button to download the sequence as a .fasta file

The buttons are displayed at the bottom of the sequence viewer on the
sequence details page, using hydration-safe Button component to prevent
flaky Playwright tests.


<img width="1343" height="432" alt="image"
src="https://github.com/user-attachments/assets/553184af-aa19-460f-9258-f2ad8c8ebfb7"
/>

🚀 Preview: Add `preview` label to enable

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Happy <yesreply@happy.engineering>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

website Tasks related to the web application

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants