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
2 changes: 1 addition & 1 deletion frontend/src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1704,7 +1704,7 @@
"verified": "{{name}} is listening — mentions will wake it.",
"stillWaiting": "Still no check-in from {{name}}. Run the command above in Terminal on your computer, and this page will confirm it.",
"ctaWarning": "{{name}} isn’t listening yet: it won’t answer mentions until the command above is running.",
"needs": "Needs Node 18+ with npm and {{tool}} signed in. Run all four lines in one window: the exports last only there.",
"needs": "Needs Node 20+ with npm and {{tool}} signed in. Run all four lines in one window: the exports last only there.",
"osLabel": "Setting up on:",
"osLinux": "Linux",
"osMac": "Mac",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/i18n/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1764,7 +1764,7 @@
"verified": "{{name}} 已在监听 —— @提及 会唤醒它。",
"stillWaiting": "{{name}} 还没接入。请在你电脑的终端里运行上面的命令,这里会自动确认。",
"ctaWarning": "{{name}} 尚未监听:上面的命令运行起来之前,它不会回复 @提及。",
"needs": "需要 Node 18+(含 npm)和已登录的 {{tool}}。四行都要在同一个窗口里运行,换了窗口 export 就失效。",
"needs": "需要 Node 20+(含 npm)和已登录的 {{tool}}。四行都要在同一个窗口里运行,换了窗口 export 就失效。",
"osLabel": "你的系统:",
"osLinux": "Linux",
"osMac": "Mac",
Expand Down
13 changes: 12 additions & 1 deletion frontend/src/v2/__tests__/V2AgentBYOListenSnippet.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ import { MemoryRouter } from 'react-router-dom';
import V2AgentBYO from '../components/V2AgentBYO';
import { AuthContext } from '../../context/AuthContext';

// The page names the Node floor the CLI declares. Read it from cli/package.json
// rather than copying the number, so a CLI engines bump fails this test.
const CLI_NODE_FLOOR = Number(require('../../../../cli/package.json').engines.node.match(/\d+/)[0]);

jest.mock('../components/V2NavRail', () => () => null);
jest.mock('axios', () => {
const mock = {
Expand Down Expand Up @@ -143,11 +147,18 @@ describe('BYO listener snippet', () => {
test('what it needs is said before the command it is about', async () => {
await issueToken();
const needs = screen.getByTestId('byo-listen-needs');
expect(needs).toHaveTextContent(/Needs Node 18\+ with npm and Claude Code signed in/);
expect(needs).toHaveTextContent(new RegExp(`Needs Node ${CLI_NODE_FLOOR}\\+ with npm and Claude Code signed in`));
// eslint-disable-next-line no-bitwise
expect(needs.compareDocumentPosition(listenCommand()) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy();
});

// The page renders in English here, so the English test above never reads the
// zh-CN copy. Read the zh-CN string straight from the locale file.
test('the zh-CN "needs" line names the same Node floor', () => {
const zhNeeds: string = require('../../i18n/locales/zh-CN.json').agentByo.listen.needs;
expect(zhNeeds).toMatch(new RegExp(`需要 Node ${CLI_NODE_FLOOR}\\+`));
});

test('"I use Codex instead" gives a Codex command and says Codex is what it needs', async () => {
await issueToken();
fireEvent.click(screen.getByTestId('byo-listen-adapter-switch'));
Expand Down
Loading