The best way to control Claude Code, Codex and more from any computer or phone
test(server): remove title prompt editorial snapshots (#10063)
Julius Marminge committed
Sep 5, 2026 at 01:51 UTC
bc24d98d1630104722abe6a4d839365d24e2aa27
1 file changed
+1
-40
apps/server/src/textGeneration/TextGenerationPrompts.test.ts
+1
-40
@@ -146,7 +146,7 @@ describe("buildBranchNamePrompt", () => {
146
});
147
148
describe("buildThreadTitlePrompt", () => {
149
- it("includes the user message and the title guidance rules", () => {
149
+ it("includes the user message without absent attachment metadata", () => {
150
const result = buildThreadTitlePrompt({
151
message: "Investigate reconnect regressions after session restore",
152
});
@@ -154,18 +154,6 @@ describe("buildThreadTitlePrompt", () => {
154
expect(result.prompt).toContain("User message:");
155
expect(result.prompt).toContain("Investigate reconnect regressions after session restore");
156
expect(result.prompt).not.toContain("Attachment metadata:");
157
- expect(result.prompt).toContain(
158
- "Generate a title that will help the user recognize this T3 Code thread weeks later.",
159
- );
160
- expect(result.prompt).toContain(
161
- "Title the subject and outcome. Discard incidental instructions.",
162
- );
163
- expect(result.prompt).toContain(
164
- "Name the product change, not the mock, plan, report, branch, or PR used to produce it.",
165
- );
166
- expect(result.prompt).not.toContain(
167
- "Title should summarize the user's request, not restate it verbatim.",
168
- );
157
});
158
159
it("includes attachment metadata when attachments are provided", () => {
@@ -188,24 +176,6 @@ describe("buildThreadTitlePrompt", () => {
176
expect(result.prompt).toContain("67890 bytes");
177
});
178
191
- it.each([
192
- { mode: "initial", previousTitle: undefined },
193
- { mode: "regeneration", previousTitle: "Open Projects in Desktop App" },
194
- ])(
195
- "tells the $mode prompt not to title linked PRs from local git history",
196
- ({ previousTitle }) => {
197
- const result = buildThreadTitlePrompt({
198
- message: "$takeover https://github.com/pingdotgg/t3code/pull/8588",
199
- ...(previousTitle === undefined ? {} : { previousTitle }),
200
- });
201
-
202
- expect(result.prompt).toContain(
203
- "Local git history is not evidence of what a linked PR or issue is about.",
204
- );
205
- expect(result.prompt).toContain('such as "Take Over PR 8588"');
206
- },
207
- );
208
-
179
it("regenerates from recent thread contents and identifies the previous title", () => {
180
const result = buildThreadTitlePrompt({
181
message: `USER:\nInvestigate reconnect regressions\n\nASSISTANT:\nThe remaining issue is stale session state`,
@@ -216,15 +186,6 @@ describe("buildThreadTitlePrompt", () => {
186
"Regenerate the title for an existing T3 Code thread so the user can recognize it weeks later.",
187
);
188
expect(result.prompt).toContain('The previous title was "Investigate reconnect regressions".');
219
- expect(result.prompt).toContain(
220
- "Read the USER messages first. Identify the latest explicit durable goal.",
221
- );
222
- expect(result.prompt).toContain(
223
- "Do not promote one assistant finding into the thread subject unless the user adopts it as a new goal.",
224
- );
225
- expect(result.prompt).toContain(
226
- 'A subagent-monitoring review that finds a Codex roster bug remains "Review Subagent Monitoring Risks,"',
227
- );
189
expect(result.prompt).toContain("Thread contents:");
190
expect(result.prompt).toContain("The remaining issue is stale session state");
191
});