What
ReviewProposalCard.vue pairs presentation headlines with operations by array index, but the two arrays are not guaranteed to be in the same order, so a multi-operation proposal can display the wrong headline against an operation.
Mechanism
AutomationProposalService.BuildPresentation (backend/src/Taskdeck.Application/Services/AutomationProposalService.cs:1735-1737) builds presentation.operationHeadlines sorted by Sequence.
MapToDto (same file, :1650) maps proposal.Operations in unordered EF .Include order.
ReviewProposalCard.vue:120-126 then indexes one array with the other's position.
When EF returns operations in an order that does not match Sequence, headline n is rendered against operation n of a differently-ordered list. On a review surface whose entire purpose is that the human sees exactly what will be applied, a mispaired headline is a trust defect rather than a cosmetic one.
Why it is filed rather than fixed in PR #2541
Found during the review of #2541 (move-card headline enrichment). It is pre-existing, independent of that PR's gate fix, and fixing it there would have widened a scoped fix beyond its finding.
Suggested fix
Sort operations by sequence before indexing. PaperReviewView.vue:953-956 already does exactly this and is the reference shape.
Belt-and-braces alternative: have the backend emit operations pre-sorted by Sequence in MapToDto, so both consumers get a stable contract instead of each re-sorting. That is the better fix if the DTO order is not relied on elsewhere.
Also worth knowing (declined, recorded so it is not re-raised)
A related concern about operationColumnId falling back to sourceColumnId was raised and declined as unreachable: grep -rn "sourceColumnId" backend/src finds it only as a local variable in ProposalConflictDetector.cs:411-424. No operation parameters payload ever carries that key.
Refs #1761
What
ReviewProposalCard.vuepairs presentation headlines with operations by array index, but the two arrays are not guaranteed to be in the same order, so a multi-operation proposal can display the wrong headline against an operation.Mechanism
AutomationProposalService.BuildPresentation(backend/src/Taskdeck.Application/Services/AutomationProposalService.cs:1735-1737) buildspresentation.operationHeadlinessorted bySequence.MapToDto(same file, :1650) mapsproposal.Operationsin unordered EF.Includeorder.ReviewProposalCard.vue:120-126then indexes one array with the other's position.When EF returns operations in an order that does not match
Sequence, headline n is rendered against operation n of a differently-ordered list. On a review surface whose entire purpose is that the human sees exactly what will be applied, a mispaired headline is a trust defect rather than a cosmetic one.Why it is filed rather than fixed in PR #2541
Found during the review of #2541 (move-card headline enrichment). It is pre-existing, independent of that PR's gate fix, and fixing it there would have widened a scoped fix beyond its finding.
Suggested fix
Sort operations by
sequencebefore indexing.PaperReviewView.vue:953-956already does exactly this and is the reference shape.Belt-and-braces alternative: have the backend emit operations pre-sorted by
SequenceinMapToDto, so both consumers get a stable contract instead of each re-sorting. That is the better fix if the DTO order is not relied on elsewhere.Also worth knowing (declined, recorded so it is not re-raised)
A related concern about
operationColumnIdfalling back tosourceColumnIdwas raised and declined as unreachable:grep -rn "sourceColumnId" backend/srcfinds it only as a local variable inProposalConflictDetector.cs:411-424. No operation parameters payload ever carries that key.Refs #1761