Skip to content

Conversation

@anna-parker
Copy link
Contributor

@anna-parker anna-parker commented Nov 18, 2025

resolves #

to be merged into #5402 when it works

Screenshot

As prepro now assigns the segments the website does not know which entry in the original data corresponds to which segment - this updates prepro to also return a map with this information.

PR Checklist

  • All necessary documentation has been adapted.
  • The implemented feature is covered by appropriate, automated tests.
  • Any manual testing that has been done is documented (i.e. what exactly was tested?)

🚀 Preview: https://improve-endpoints.loculus.org

@anna-parker anna-parker changed the title Improve endpoints update processed data endpoint Nov 18, 2025
@anna-parker anna-parker changed the base branch from main to sort-multi-path November 18, 2025 16:17
@anna-parker anna-parker added preview Triggers a deployment to argocd and removed preview Triggers a deployment to argocd labels Nov 18, 2025
@anna-parker anna-parker added the preview Triggers a deployment to argocd label Nov 18, 2025
@anna-parker anna-parker marked this pull request as ready for review November 19, 2025 16:30
@anna-parker anna-parker merged commit c4ac746 into sort-multi-path Nov 19, 2025
35 of 38 checks passed
@anna-parker anna-parker deleted the improve_endpoints branch November 19, 2025 16:30
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines 100 to +104
const existingDataRows = Object.entries(initialData.originalData.unalignedNucleotideSequences).map(
([key, value]) => ({
// TODO: older entries will still have the segmentName and not the fastaHeader as a key
label: key, // TODO: In future prepro will map the fastaHeader to the segment (will be added to the label)
fastaHeader: maxNumberRows > 1 ? key : initialData.submissionId,
value: value,
initialValue: value,
key: EditableSequences.getNextKey(),
}),
([key, value]) => {
const mapped = fastaHeaderMap[key].join(', ') || '';
const label = !mapped
? `${key} (could not be classified)`

Choose a reason for hiding this comment

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

P1 Badge Guard missing segment mapping before accessing .join

fromInitialData in EditableSequences inverts sequenceNameToFastaHeaderMap and then calls fastaHeaderMap[key].join(', '). For fasta headers that were not mapped, fastaHeaderMap[key] is undefined, so the .join call throws a TypeError and prevents the sequences form from rendering right when the code intends to show “could not be classified”. Default to an empty array before joining (e.g. (fastaHeaderMap[key] ?? []).join(', ')).

Useful? React with 👍 / 👎.

@anna-parker anna-parker restored the improve_endpoints branch November 19, 2025 16:57
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants