You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pending messages: show the translated note for capabilities_unknown on a held-copy resend #1809
Follow-up from #1808 (CodeRabbit thread on src/lib/ws.ts).
Repro path
The composer's pending list holds a held copy: a message kept after a send that did not go.
The page reconnects. Before the bridge's snapshot arrives (a slow link or a busy PC), the user presses Send now on the held copy.
useComposerSends.ts (~157-173) sends it again through submitComposerMessage, which goes to HerdrSocket.submit. That waits SNAPSHOT_WAIT_MS (2 s), then returns capabilities_unknown (fix(composer): name a late capability snapshot, not a dropped connection, in the not-sent note #1808). The row records { code: "capabilities_unknown", message: "this PC has not said yet what it supports; nothing was sent" }. The row is not marked uncertain: submitNotTyped lists the code.
src/components/PendingMessages.tsx (~79-80) uses submitNote only for input_draft, held_input, not_transmitted, rewind_dialog_open and first_message_unattended. Every other code shows t("Not sent: {message}") with the result's English message. A Korean, Japanese or Chinese page therefore shows the English sentence after its translated "Not sent:" prefix, not the note fix(composer): name a late capability snapshot, not a dropped connection, in the not-sent note #1808 added in src/lib/i18n/composer.{ko,ja,zh}.ts.
Change needed
Add "capabilities_unknown" to that code list in src/components/PendingMessages.tsx, so the row shows submitNote("capabilities_unknown", …).
Cover it in src/components/PendingMessages.test.tsx: a held row that failed with capabilities_unknown shows the translated note, not the English message.
Open PR #1795 changes src/components/PendingMessages.tsx and src/components/PendingMessages.test.tsx. This change waits for #1795 to merge, or can be folded into it. #1808 does not touch the file.
Activity
fix(composer): show the translated note for a held copy's capabilitie…