Skip to content

feat(website): Add tab on revise page pointing to per-sequence revise button#6504

Open
theosanderson-agent wants to merge 5 commits into
mainfrom
revise-info-tab
Open

feat(website): Add tab on revise page pointing to per-sequence revise button#6504
theosanderson-agent wants to merge 5 commits into
mainfrom
revise-info-tab

Conversation

@theosanderson-agent
Copy link
Copy Markdown
Collaborator

@theosanderson-agent theosanderson-agent commented May 27, 2026

Summary

Inspired by #6503 but just pointing users to the "canonical place" instead

image

🚀 Preview: https://revise-info-tab.loculus.org

… button

Adds a second tab to the revise page that explains how to revise an
individual sequence entry: users can open the sequence's details page
and click "Revise this sequence" under "Sequence management". The tab
also links to the user's "My sequences" page so they can browse to
find the entry they want to revise.

The existing bulk-upload behaviour is unchanged and lives under the
first tab.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@theosanderson theosanderson added the preview Triggers a deployment to argocd label May 27, 2026
@claude claude Bot added the website Tasks related to the web application label May 27, 2026
@theosanderson
Copy link
Copy Markdown
Member

@theosanderson-agent make the text of the tab "Revising individual sequences"

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@theosanderson-agent
Copy link
Copy Markdown
Collaborator Author

Done — updated the form tab on the revise page to read "Revising individual sequences" in 0ca2a13.

@theosanderson theosanderson added preview Triggers a deployment to argocd and removed preview Triggers a deployment to argocd labels May 27, 2026
@theosanderson
Copy link
Copy Markdown
Member

@theosanderson-agent change 'form' for 'individual'

@theosanderson
Copy link
Copy Markdown
Member

also @theosanderson-agent rather than "My sequences", it should be "Released sequences".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@theosanderson-agent
Copy link
Copy Markdown
Collaborator Author

Renamed the link text and button from "My sequences"/"Browse my sequences" to "Released sequences"/"Browse released sequences" in 4431a0c.

Renames the InputMode literal from 'form' to 'individual' across the
submission UI. The pair 'individual' | 'bulk' more accurately describes
the two paths (one-at-a-time vs. file upload), especially now that the
revise variant is an info page rather than a form. Also updates the
URL query parameter (?inputMode=individual).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@theosanderson-agent
Copy link
Copy Markdown
Collaborator Author

Renamed the InputMode literal 'form''individual' across the submission UI (12 files, including type def, switch cases, URL query parsing, and tests). The URL query param is now ?inputMode=individual. Tests, types, and formatting pass. Pushed as e5166ba.

@theosanderson
Copy link
Copy Markdown
Member

@theosanderson-agent ah if we would have to change it across the UI revert. I meant just in this case

@theosanderson-agent
Copy link
Copy Markdown
Collaborator Author

Reverted the formindividual rename in 95a4488 — the user-facing tab label still reads "Revising individual sequences", but the InputMode literal and ?inputMode=form query param are back to form everywhere else.

@theosanderson theosanderson added the preview Triggers a deployment to argocd label May 27, 2026
@theosanderson theosanderson marked this pull request as ready for review May 27, 2026 14:23
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 27, 2026

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


Code Review

  • Gather context and read changed files
  • Review code quality
  • Review security and performance
  • Review test coverage
  • Post review findings

Clean, self-contained implementation. The overall approach is solid — the new SingleSequenceReviseInfo component is rendered when inputMode === 'form', guarded correctly in RevisionForm, and the routing/URL parsing is consistent between revise.astro and SubmissionRoute.ts.

Two minor notes left as inline comments:

  1. Import coupling (SingleSequenceReviseInfo.tsx:3) — importing InputModeTabs from the heavy DataUploadForm.tsx module. InputModeTabs is now reused in two places; extracting it to its own file would reduce the dependency weight and keep things tidy. Not blocking, but worth considering.

  2. Silently ignored prop (DataUploadForm.tsx:171-175) — when action === 'revise', the inputMode prop is hardcoded to 'bulk' inside the component, effectively ignoring whatever was passed in. This is safe because RevisionForm only reaches DataUploadForm for the bulk path, but it's a mild code smell.

No security, performance, or correctness issues found. No tests are strictly needed for the new component since it contains no logic — just static markup and route links.

@@ -0,0 +1,53 @@
import { type FC } from 'react';

import { InputModeTabs } from './DataUploadForm.tsx';
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.

Importing InputModeTabs from DataUploadForm.tsx couples this lightweight static component to a heavy form module (brings in all of DataUploadForm's dependencies like axios, react-query, etc.). Consider moving InputModeTabs to its own file (e.g. InputModeTabs.tsx) so both DataUploadForm and SingleSequenceReviseInfo can import it without this coupling.

Comment on lines 171 to +175
) : (
<FormOrUploadWrapper
inputMode='bulk'
setFileFactory={setFileFactory}
organism={organism}
action={action}
metadataTemplateFields={metadataTemplateFields}
submissionDataTypes={submissionDataTypes}
/>
<>
<h1 className='title'>Revise sequences</h1>
<InputModeTabs
action={action}
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.

In the revise branch here, inputMode (the prop passed to DataUploadForm) is silently ignored — both InputModeTabs and FormOrUploadWrapper are hardcoded to 'bulk'. This is fine since RevisionForm already guards against calling DataUploadForm with inputMode='form', but it means the inputMode prop accepted by DataUploadForm is meaningless for the revise action. Worth noting, though not necessarily fixing since the routing logic is handled correctly in RevisionForm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview Triggers a deployment to argocd website Tasks related to the web application

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants