Repository navigation
fix(web): give a decline with files the typed words as its reason - #193
TheGreatAxios wants to merge 1 commit into
Conversation
A send with files while an approval card was open declined it with no reason and sent the words with the files, so the coordinator was told the person left no feedback. The words now go as the decline's reason and the files follow on their own; a send with no words keeps the bare decline.
|
Triage: Pass No changes needed from you. A maintainer will review this pull request. |
| decline: async (approvalId) => { | ||
| if (!(await deliverMail(text, true, declineWith(approvalId)))) | ||
| return false; | ||
| // The words already went with the decline; alone, the files get the hub's own note. | ||
| return deliverFiles(""); |
There was a problem hiding this comment.
P3 · Settled card now sends the words and files as two separate messages
When the card is already settled (409), declineWith falls back to mail(text), which sends the words as a plain message. deliverFiles("") then uploads the files with no text. Before this change, onDecideApproval returned null for a settled card and deliverFiles sent the words together with the files. The description says the settled-card path is unchanged, but it now splits into two messages.
Send typed words with attached files while the cached open card has just been decided elsewhere or its run has moved on (decline gets a 409).
Resolve this comment. Triage will not finish while it is open.
A send with typed words and attached files, while a coordinator approval card is open, declined the card with no reason and then sent the words with the files as a separate message. The coordinator was told the person left no feedback. Now the words go as the decline's reason and the files follow on their own. A send with no words keeps the bare decline, and a send with no card open is unchanged.
deliverFilestakes the text as a parameter instead of reading the composer, andsendFilespasses adeclinethat mails the words first, then uploads the files without them. If the decline fails, nothing is uploaded and the composer keeps both.Fixes CL-12150. Replaces #190.
Verification
Before the fix, a temporary web test reproduced the bare decline followed by a separate message. Independent correctness and craft reviews traced the no-card, no-words, failed-decline, settled-card and upload-failure paths, and found each unchanged apart from the intended case.
bun run lint,format:check,typecheckandtest(291 pass) pass on currentmain.Already on
mainand not changed here: the coordinator can read the words a moment before the files arrive, and a file removed while the send is in flight is still uploaded.