Skip to content
Open
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
18 changes: 9 additions & 9 deletions apps/desktop/e2e/side-chat-followups.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,15 @@ test('Side Chat follow-ups survive queue actions, Host handoffs and reconnect',
return created[0]!.id;
}, originalSessionIds);
const queued = companion.locator('.maka-composer-queue');
for (const text of ['first follow-up', 'second follow-up', 'retract this follow-up']) {
const queueFollowUp = async (text: string): Promise<void> => {
await sideComposer.fill(text);
// The queue is optimistic; its appearance does not settle send admission.
await awaitSendReady(companion);
await sideComposer.press('Enter');
await expect(queued).toContainText(text);
};
for (const text of ['first follow-up', 'second follow-up', 'retract this follow-up']) {
await queueFollowUp(text);
}
await expect(queued.locator('.maka-composer-queue-text')).toHaveText([
'first follow-up', 'second follow-up', 'retract this follow-up',
Expand All @@ -121,6 +124,9 @@ test('Side Chat follow-ups survive queue actions, Host handoffs and reconnect',
await edit.press('Enter');
await expect(queued.locator('.maka-composer-queue-text').first()).toHaveText('edited first follow-up');
const grips = queued.locator('[draggable="true"]');
// The Host projection can update before the edit request's pending UI
// state settles. A draggable grip is the user-visible readiness boundary.
await expect(grips).toHaveCount(3);
await grips.nth(1).dragTo(grips.nth(0));
await expect(queued.locator('.maka-composer-queue-text')).toHaveText([
'second follow-up', 'edited first follow-up', 'retract this follow-up',
Expand Down Expand Up @@ -155,10 +161,7 @@ test('Side Chat follow-ups survive queue actions, Host handoffs and reconnect',
await sideComposer.press('Enter');
await expect(companion.getByRole('button', { name: '停止', exact: true })).toBeVisible();
for (const text of ['successor one', 'successor two']) {
await sideComposer.fill(text);
await awaitSendReady(companion);
await sideComposer.press('Enter');
await expect(queued).toContainText(text);
await queueFollowUp(text);
}
await page.screenshot({ path: testInfo.outputPath('side-chat-queue.png'), fullPage: true });
await sideComposer.fill('release the held response');
Expand All @@ -176,10 +179,7 @@ test('Side Chat follow-ups survive queue actions, Host handoffs and reconnect',
await sideComposer.press('Enter');
await expect(companion.getByRole('button', { name: '停止', exact: true })).toBeVisible();
for (const text of ['reconnected successor one', 'reconnected successor two']) {
await sideComposer.fill(text);
await awaitSendReady(companion);
await sideComposer.press('Enter');
await expect(queued).toContainText(text);
await queueFollowUp(text);
}
await armConnectionGap(app);
// Capture the actual Desktop client before closing its transport.
Expand Down
28 changes: 28 additions & 0 deletions packages/cli/src/__tests__/acp-environment-mcp-fixture.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import { createHash } from 'node:crypto';

// The manager redacts configured environment values in tool output. Observe
// each child process's environment through a derived value instead.
process.env.ACP_SESSION_FINGERPRINT = createHash('sha256')
.update(process.env.ACP_SESSION_SENTINEL ?? 'missing')
.digest('hex');

await import('@maka/mcp/test-only/stdio-server');
Loading
Loading