Skip to content

Commit d55a5fe

Browse files
committed
fix: moon-loader unit frames and User-Agent-only host header tests
Moon waiting-state unit tests expect MOON_SPINNER_FRAMES. SDK/host header tests assert User-Agent only under the product boundary.
1 parent c8328c9 commit d55a5fe

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

‎apps/pythinker-code/test/tui/components/chrome/moon-loader.test.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { MoonLoader } from '#/tui/components/chrome/moon-loader';
55
import {
66
BRAILLE_SPINNER_FRAMES,
77
BRAILLE_SPINNER_INTERVAL_MS,
8+
MOON_SPINNER_FRAMES,
89
formatThinkingSpinnerLabel,
910
} from '#/tui/constant/rendering';
1011

@@ -46,8 +47,8 @@ describe('MoonLoader', () => {
4647
expect(row).toContain('Tip: ctrl+s: steer mid-turn');
4748
});
4849

49-
it('uses the shared Braille mark for the waiting state', () => {
50-
expect(createLoader().renderInline()).toBe('⣷');
50+
it('uses the shared moon mark for the waiting state', () => {
51+
expect(createLoader().renderInline()).toBe(MOON_SPINNER_FRAMES[0]);
5152
});
5253

5354
it('uses the shared Braille mark and shimmer verb labels while allowing retry text to win', () => {

‎packages/node-sdk/test/sdk-rpc-client-v2.test.ts‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -343,17 +343,13 @@ describe('SDKRpcClientV2 (agent-core-v2 wiring)', () => {
343343
await expect(client.close()).resolves.toBeUndefined();
344344
});
345345

346-
it('seeds the host request headers (User-Agent + X-Msh-*) into the engine', async () => {
346+
it('seeds the host User-Agent request header into the engine', async () => {
347347
const homeDir = await mkdtemp(join(tmpdir(), 'pythinker-sdk-v2-'));
348348
tempDirs.push(homeDir);
349349
const client = new SDKRpcClientV2({ homeDir, identity: TEST_IDENTITY });
350350
try {
351-
// Without this seed the managed vendors go out with the SDK's default
352-
// User-Agent and no X-Msh-* the interactive-v2 path's identity bug.
353351
const headers = client.engineAccessor.get(IHostRequestHeaders).headers;
354352
expect(headers['User-Agent']).toBe(`pythinker-code-cli/${TEST_IDENTITY.version}`);
355-
expect(headers['User-Agent']).toContain('pythinker');
356-
expect(headers['X-Msh-Device-Id']).toBeTruthy();
357353
} finally {
358354
await client.close();
359355
}

0 commit comments

Comments
 (0)