Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ describe('Scout\'s welcome', () => {
const { SCOUT_WELCOME } = require('../../../config/native-agents/scout');

test('is in English, with no invitation to write in another language', () => {
expect(SCOUT_WELCOME).toBe('What would you like to do first?');
expect(SCOUT_WELCOME).toBe("I'm Scout, your first agent here. Pick one below, or just tell me what you're working on.");
expect(SCOUT_WELCOME).not.toMatch(/[\u3040-\u30ff\u3400-\u9fff\uac00-\ud7af\uff00-\uffef]/);
});
});
Expand Down
15 changes: 11 additions & 4 deletions backend/__tests__/unit/config/scoutWelcome.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,21 @@ const {

describe('Scout welcome locale', () => {
it('keeps the English welcome unchanged', () => {
expect(scoutWelcomeFor('en')).toBe('What would you like to do first?');
expect(SCOUT_WELCOME).toBe('What would you like to do first?');
expect(scoutWelcomeFor('en')).toBe("I'm Scout, your first agent here. Pick one below, or just tell me what you're working on.");
expect(SCOUT_WELCOME).toBe("I'm Scout, your first agent here. Pick one below, or just tell me what you're working on.");
});

it('returns a zh-CN welcome with no English in it', () => {
it('returns a zh-CN welcome whose only English is Scout\'s name', () => {
const zh = scoutWelcomeFor('zh-CN');
expect(zh).not.toBe(SCOUT_WELCOME);
expect(zh).not.toMatch(/[A-Za-z]{2,}/);
expect(zh.replace(/Scout/g, '')).not.toMatch(/[A-Za-z]{2,}/);
});

// TASK-644, ruled by UX Lead: the line says who Scout is and that typing
// works, and never calls the buttons "starts" (an internal name).
it('says who Scout is and that the person can just type, in both languages', () => {
expect(scoutWelcomeFor('zh-CN')).toBe('我是 Scout,你在这里的第一个智能体。选下面一项开始,或者直接告诉我你在做什么。');
expect(SCOUT_WELCOME).not.toMatch(/\bstarts?\b/i);
});

it('falls back to English for anything that is not zh-CN', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ describe('workspace onboarding guide identity fork (2026-08-13)', () => {

const welcome = mockPostMessage.mock.calls[0][0];
expect(welcome.content).toBe(SCOUT_WELCOME);
expect(welcome.content).toBe('What would you like to do first?');
expect(welcome.content).toBe("I'm Scout, your first agent here. Pick one below, or just tell me what you're working on.");
expect(welcome.payload).toEqual({
kind: 'starts',
starts: [
Expand Down
8 changes: 6 additions & 2 deletions backend/config/native-agents/scout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,14 @@ export const SCOUT_HOSTED_START = { id: 'run-hosted', label: 'Run an agent here'
* body is stored once, at signup, in the language the person signed up in
* (TASK-550). The starts above keep their English labels: Scout matches on
* them, and only the displayed button text is translated, by id.
*
* The body says who Scout is and that typing works too (TASK-644): two new
* people opened their workspace under the old one-line question, "What would
* you like to do first?", and left without clicking a start or typing.
*/
const SCOUT_WELCOME_BY_LOCALE = {
en: 'What would you like to do first?',
'zh-CN': '你想先做什么?',
en: "I'm Scout, your first agent here. Pick one below, or just tell me what you're working on.",
'zh-CN': '我是 Scout,你在这里的第一个智能体。选下面一项开始,或者直接告诉我你在做什么。',
} as const;

export type ScoutLocale = keyof typeof SCOUT_WELCOME_BY_LOCALE;
Expand Down
Loading