The best way to control Claude Code, Codex and more from any computer or phone
fix(web): expired terminal context toasts say "them" for several contexts (#24251)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: maria-rcks <maria@kuuro.net>
MarcoDotIO committed
Oct 31, 2026 at 04:33 UTC
cd7791de1eb20fad3ae3a85b1a4e0058c5f0941c
2 files changed
+20
-2
apps/web/src/components/ChatView.logic.test.ts
+17
@@ -1,5 +1,6 @@
1
import {
2
boundAttachmentIds,
3
+ buildExpiredTerminalContextToastCopy,
4
mergeDirectPreviewAnnotation,
5
planComposerTurn,
6
snapshotComposerSend,
@@ -127,6 +128,22 @@ describe("deriveComposerSendState", () => {
128
});
129
});
130
131
+describe("buildExpiredTerminalContextToastCopy", () => {
132
+ it("refers to several expired contexts as them", () => {
133
+ expect(buildExpiredTerminalContextToastCopy(2, "empty")).toEqual({
134
+ title: "Expired terminal contexts won't be sent",
135
+ description: "Remove them or re-add them to include terminal output.",
136
+ });
137
+ expect(buildExpiredTerminalContextToastCopy(2, "omitted")).toEqual({
138
+ title: "Expired terminal contexts omitted from message",
139
+ description: "Re-add them if you want that terminal output included.",
140
+ });
141
+ expect(buildExpiredTerminalContextToastCopy(1, "omitted").description).toBe(
142
+ "Re-add it if you want that terminal output included.",
143
+ );
144
+ });
145
+});
146
+
147
describe("hasServerAcknowledgedLocalDispatch", () => {
148
it("acknowledges a settled newer background turn", () => {
149
const localDispatch = createLocalDispatchSnapshot(
apps/web/src/components/ChatView.logic.ts
+3
-2
@@ -782,15 +782,16 @@ export function buildExpiredTerminalContextToastCopy(
782
): { title: string; description: string } {
783
const count = Math.max(1, Math.floor(expiredTerminalContextCount));
784
const noun = count === 1 ? "Expired terminal context" : "Expired terminal contexts";
785
+ const pronoun = count === 1 ? "it" : "them";
786
if (variant === "empty") {
787
return {
788
title: `${noun} won't be sent`,
788
- description: "Remove it or re-add it to include terminal output.",
789
+ description: `Remove ${pronoun} or re-add ${pronoun} to include terminal output.`,
790
};
791
}
792
return {
793
title: `${noun} omitted from message`,
793
- description: "Re-add it if you want that terminal output included.",
794
+ description: `Re-add ${pronoun} if you want that terminal output included.`,
795
};
796
}
797