Skip to content

feat(website): default revision to the single sequence form - #6964

Open
theosanderson-agent wants to merge 2 commits into
mainfrom
feat/default-single-sequence-revision
Open

feat(website): default revision to the single sequence form#6964
theosanderson-agent wants to merge 2 commits into
mainfrom
feat/default-single-sequence-revision

Conversation

@theosanderson-agent

@theosanderson-agent theosanderson-agent commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Closes part of #6963.

What this changes

Revising a single sequence via the form is now the default experience on the revise page, so users who want to fix one sequence no longer have to discover a tab and never have to build a metadata TSV. Bulk revision is still one click away.

Concretely:

  • The revise page defaults to inputMode=form. Visiting /<organism>/submission/<groupId>/revise with no inputMode parameter (or with an unrecognised value) now lands on the single-sequence form; you get the bulk upload flow with ?inputMode=bulk. This is the mirror image of the previous behaviour, and it is scoped to revision only — submission still defaults to bulk upload, since new submissions are much more often bulk.
  • The tab order is flipped for revision, and the labels are new. On the revise page the tabs now read Revise single sequence (left, default) and Upload bulk revisions (right). The old label mentioned the form as an implementation detail (Revise individual sequence entry using a form); that reference is dropped. Submission tabs keep their existing order and labels.
  • InputModeTabs was refactored from two hard-coded anchors into a small per-action list of {inputMode, label} rendered in order, which is what lets revision and submission differ in both order and wording without duplicating the anchor markup.
  • The submission portal card for Revise said "Upload revisions for existing sequences", which no longer describes where the link takes you; it now says "Update sequences that you have already submitted."

Screenshots

All screenshots are of the West Nile Virus revise flow for a group with sequences, at a 1280px viewport.

The revise page you land on, before and after

Previously, /<organism>/submission/<groupId>/revise opened on the bulk upload tab, and the way to revise one sequence was the second tab, labelled Revise individual sequence entry using a form:

Revise page before this change: the bulk upload tab is selected, and the tabs read "Upload bulk sequences" and "Revise individual sequence entry using a form"

Now the same URL opens on the single-sequence form. The tab order is reversed for revision and both labels are new, so the bulk route is still visible and one click away:

Revise page after this change: the "Revise single sequence" tab is selected and shows the accession search, with "Upload bulk revisions" as the second tab

The bulk tab is unchanged apart from its label and position

?inputMode=bulk (or clicking the second tab) gives the same bulk upload page as before:

Revise page with the "Upload bulk revisions" tab selected, showing the unchanged sequence file and metadata file upload panels

Submission portal card wording

The Revise card used to promise an upload, which is no longer where the link goes.

Before:

Submission portal before: the Revise card reads "Upload revisions for existing sequences."

After:

Submission portal after: the Revise card reads "Update sequences that you have already submitted."

Other updates

  • routes.revisePage(...) defaults its inputMode argument to 'form' to match the page. All existing callers that care (the "Revise this sequence" button on the sequence details page, and the edit page) already pass 'form' explicitly.
  • SubmissionRouteUtils.parseToRoute for revise now treats anything other than bulk as form, with new unit tests covering both the explicit and default cases.
  • Three integration tests exercised the bulk revision flow by navigating to the revise page without an inputMode, and would now land on the form. They pass 'bulk' explicitly: the two template-download / bulk-upload tests in revise-sequence.spec.ts and the bulk file-sharing revision test in file-sharing.spec.ts.
  • The user docs for revising sequences describe the bulk flow throughout. They now open with a short paragraph distinguishing the two routes, and the "Submitting the revision" section tells you to select the Upload bulk revisions tab.

Not included

The second half of #6963 — a guide at the top of the bulk revision page explaining how to obtain the original metadata — is not addressed here. That content partly exists in the docs already ("Downloading originally submitted data for revision"), so surfacing it in the UI is worth doing as its own change.

Test plan

  • CI=1 npm run test (website) passes, including the new SubmissionRoute cases.
  • npm run check-types passes with 0 errors.
  • npm run format clean in both website and integration-tests.
  • Integration tests were not run locally (they need a deployed cluster); the affected specs were updated to pin the bulk mode they rely on.

🤖 Generated with Claude Code

🚀 Preview: https://feat-default-single-seque.loculus.org

Revising a single sequence is now the default mode of the revise page,
and its tab is the left-most one. Tab labels for revision are now
"Revise single sequence" and "Upload bulk revisions".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@claude claude Bot added the website Tasks related to the web application label Jul 22, 2026
@theosanderson

theosanderson commented Jul 22, 2026

Copy link
Copy Markdown
Member

@theosanderson-agent update PR description with screenshots (can use the preview perhaps)

@theosanderson theosanderson added preview Triggers a deployment to argocd arm-images Add this label to a PR to let the CI build images for ARM as well. Useful for debugging the CI. and removed arm-images Add this label to a PR to let the CI build images for ARM as well. Useful for debugging the CI. labels Jul 22, 2026
@theosanderson
theosanderson marked this pull request as ready for review July 22, 2026 15:02
@claude

claude Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

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


Review of PR #6964

  • Gather context (PR description, diff, changed files)
  • Review code quality
  • Review security considerations
  • Review performance
  • Review test coverage
  • Review documentation
  • Post inline comments for specific issues (none needed)
  • Post final summary

Summary

This is a small, well-scoped change and I didn't find any bugs. The default-flip is applied consistently in both places that need it — SubmissionRoute.ts (parseToRoute) and revise.astro's inline inputMode derivation — and routes.ts's revisePage default matches. I checked all callers of revisePage/RevisionPage.goto across website and integration-tests; the two specs relying on the old bulk default (revise-sequence.spec.ts, file-sharing.spec.ts) were correctly updated to pass 'bulk' explicitly, and no stale UI-text selectors (e.g. getByRole('tab'/'link', { name: ... })) reference the old tab labels.

Code quality: The InputModeTabs refactor from two hard-coded anchors to a mapped {inputMode, label}[] is a clean simplification and correctly keys each <a> by inputMode.

Minor observation (non-blocking): The inputMode === 'bulk' ? 'bulk' : 'form' fallback logic for the revise route now lives in two places — website/src/routes/SubmissionRoute.ts:63 and website/src/pages/[organism]/submission/[groupId]/revise.astro:21 — rather than revise.astro calling SubmissionRouteUtils.parseToRoute. This duplication predates this PR and the two are kept in sync correctly here, so not a blocker, but it's a spot that could drift out of sync in a future change.

Security/performance: No concerns — this is routing/UI-copy only, no new data handling or queries.

Testing: New unit tests in SubmissionRoute.spec.ts cover both the explicit-bulk and default-to-form cases (including an unrecognised inputMode value), matching the "anything other than bulk is form" logic. CI (website-tests, format checks, docs build) is green.

Documentation: The docs update clearly distinguishes the two revise routes up front and correctly points the bulk-specific instructions at the new "Upload bulk revisions" tab label.

@theosanderson
theosanderson requested a review from tombch July 22, 2026 15:07

@tombch tombch 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.

I can see the rationale for prioritising bulk for submission and form for revision, but I also can't help feel like the tabs should be in the same order on both the submit and revise pages 🙃

@theosanderson

Copy link
Copy Markdown
Member

I think defaulting to a right tab is more confusing than the inconsistency

Comment thread website/src/pages/[organism]/submission/[groupId]/index.astro Outdated
{
title: 'Revise',
description: 'Upload revisions for existing sequences.',
description: 'Update sequences that you have already submitted.',

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.

Suggested change
description: 'Update sequences that you have already submitted.',
description: 'Update sequences that you have already released.',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@theosanderson-agent implement (and fix any tests affected)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done in 80ab5ec — changed the Revise description to "Update sequences that you have already released." No tests referenced the old string, so nothing else needed updating.

@tombch tombch 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.

Aside from one comment, looks good to me!

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@anna-parker

Copy link
Copy Markdown
Contributor

Sorry to jump in - Im very fine with switching the default tab but I also agree that it would be good to keep the tab order consistent, is that still possible?

@theosanderson

Copy link
Copy Markdown
Member

@theosanderson-agent make a second PR with tab order reversed and add a preview tag

@theosanderson

Copy link
Copy Markdown
Member

I really think there is a significant chance people fail to find the bulk revision option if we start on the right tab: I think that not loading on the left most tab is really unexpected.

@theosanderson-agent

Copy link
Copy Markdown
Collaborator Author

Done — opened #6973 as an alternative to this PR. It keeps the single-sequence form as the default revise mode but restores the original tab order (Upload bulk revisions left-most, Revise single sequence second) and adds a small Preview badge to the single-sequence tab. It's a draft based on this branch; type-check and route tests pass. The two PRs are mutually exclusive presentations of the same feature.

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.

4 participants