Skip to content

fix(web): give a decline with files the typed words as its reason - #193

Closed
TheGreatAxios wants to merge 1 commit into
mainfrom
cl-12150-send-a-decline-that-includes-a-file-as-the-persons-feedback
Closed

TheGreatAxios wants to merge 1 commit into
mainfrom
cl-12150-send-a-decline-that-includes-a-file-as-the-persons-feedback

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

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.

deliverFiles takes the text as a parameter instead of reading the composer, and sendFiles passes a decline that 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, typecheck and test (291 pass) pass on current main.

Already on main and 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.

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.
@linear-code

linear-code Bot commented Nov 5, 2026

Copy link
Copy Markdown

CL-12150

@corbits-triage

corbits-triage Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Triage: Pass

No changes needed from you. A maintainer will review this pull request.

Comment on lines +1123 to +1127
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("");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant