Skip to content

Commit b5ebb27

Browse files
authored
Merge pull request #277 from TokenDanceLab/fix/base-ci-green-dev-trump
fix(ci): 修复 dev/trump 基线检查
2 parents 4e7841f + c393a1e commit b5ebb27

23 files changed

Lines changed: 654 additions & 76 deletions

.github/workflows/checks.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
branches: [master, dev/delicious233, dev/trump]
88

99
env:
10-
GO_VERSION: "1.25"
10+
GO_VERSION: "1.25.11"
1111
GOLANGCI_LINT_VERSION: "v2.12.2"
1212
NODE_VERSION: "22"
1313
PNPM_VERSION: "10"
@@ -329,11 +329,14 @@ jobs:
329329
- name: Install
330330
run: pnpm install --frozen-lockfile
331331
working-directory: ./app
332+
- name: Install Playwright browsers
333+
run: pnpm exec playwright install --with-deps chromium
334+
working-directory: ./app
332335
- name: Build desktop
333336
run: pnpm build
334337
working-directory: ./app/desktop
335338
- name: Smoke test
336-
run: pnpm exec playwright test --project=chromium
339+
run: pnpm exec playwright test --config e2e/playwright.config.ts --project=chromium
337340
working-directory: ./app
338341

339342
# ── Validation ───────────────────────────────

app/desktop/src/__tests__/hubClient.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ describe('hubClient', () => {
522522

523523
await client.me();
524524

525-
expect(fetchSpy.mock.calls[0]?.[0]).toBe('https://api.hub.vectorcontrol.tech/client/auth/me');
525+
expect(fetchSpy.mock.calls[0]?.[0]).toBe('http://localhost:8080/client/auth/me');
526526
});
527527
});
528528
});

app/e2e/playwright.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default defineConfig({
77
retries: process.env.CI ? 2 : 0,
88
reporter: process.env.CI ? [['html'], ['json', { outputFile: 'results.json' }]] : 'html',
99
use: {
10-
baseURL: 'http://127.0.0.1:5173',
10+
baseURL: 'http://127.0.0.1:5175',
1111
trace: 'on-first-retry',
1212
screenshot: 'only-on-failure',
1313
},
@@ -22,8 +22,8 @@ export default defineConfig({
2222
},
2323
],
2424
webServer: {
25-
command: 'pnpm --filter agenthub-web dev',
26-
port: 5173,
25+
command: 'corepack pnpm --filter agenthub-web dev --host 127.0.0.1',
26+
port: 5175,
2727
reuseExistingServer: !process.env.CI,
2828
},
2929
});

app/shared/src/ui/ArtifactPreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
Download,
1515
ArrowRight,
1616
} from 'lucide-react';
17-
import Modal from '@shared/ui/Modal';
17+
import Modal from './Modal';
1818
import styles from './ArtifactPreview.module.css';
1919

2020
export type ArtifactType = 'iframe' | 'page' | 'image' | 'file';

app/web/src/__e2e__/oidc-login.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ interface MockOIDCParams {
2525
function mockOIDCFlow(page: import('@playwright/test').Page, params: MockOIDCParams = {}) {
2626
const {
2727
state = 'web-test-state-mock-12345',
28-
code = 'web-test-auth-code-67890',
2928
authError,
3029
tokenError,
3130
deviceId = '00000000-0000-0000-0000-000000000002',
@@ -139,7 +138,7 @@ test.describe('Web OIDC Login — Happy Path', () => {
139138
});
140139

141140
test('callback URL completes full OIDC login cycle', async ({ page }) => {
142-
const counters = mockOIDCFlow(page);
141+
mockOIDCFlow(page);
143142

144143
// Plant pending PKCE data in sessionStorage
145144
await page.goto('/');

app/web/src/components/ChatView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { ReactNode } from 'react';
33
import { useTranslation } from 'react-i18next';
44
import type { TFunction } from 'i18next';
55
import { useVirtualizer } from '@tanstack/react-virtual';
6-
import { Copy, RefreshCw, Trash2, ArrowDown, FileText, Pencil, Terminal, Search, FolderOpen, Globe, Bot, CheckSquare, Wrench, ChevronDown, AlertTriangle, ExternalLink, RefreshCcw, Reply, X } from 'lucide-react';
6+
import { Copy, RefreshCw, Trash2, ArrowDown, FileText, Pencil, Terminal, Search, FolderOpen, Globe, Bot, CheckSquare, Wrench, AlertTriangle, ExternalLink, RefreshCcw, Reply } from 'lucide-react';
77
import type { ChatMessage, MessageBlock, ToolResultBlock, FileDiff, ReplyTarget } from './ChatView.types';
88
import MarkdownRenderer from './MarkdownRenderer';
99
import CodeBlock from './CodeBlock';
@@ -589,7 +589,7 @@ function extractMessageText(msg: ChatMessage): string {
589589
}
590590

591591
// ── ChatView ────────────────────────────────
592-
export default function ChatView({ messages, isStreaming, onRetry, onDelete, onReply, onRegenerate, replyTo, onCancelReply }: Props) {
592+
export default function ChatView({ messages, isStreaming, onRetry, onDelete, onReply, onRegenerate, replyTo }: Props) {
593593
const { t, i18n } = useTranslation();
594594
const addToast = useToastStore((s) => s.addToast);
595595
const scrollRef = useRef<HTMLDivElement>(null);

app/web/src/components/IM/IMContactList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useState, useMemo, useCallback, memo } from 'react';
2-
import { MessageSquare, Plus, SearchX, Pin } from 'lucide-react';
2+
import { MessageSquare, Plus, Pin } from 'lucide-react';
33
import { useTranslation } from 'react-i18next';
44
import { EmptyState } from '@shared/ui';
55
import type { IMContact } from './types';

app/web/src/components/IM/IMMessageView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useRef, useEffect, memo, useState, useCallback } from 'react';
22
import { useTranslation } from 'react-i18next';
33
import type { TFunction } from 'i18next';
4-
import { MessageSquareText, CornerUpLeft, Forward, RotateCcw, X } from 'lucide-react';
4+
import { MessageSquareText, CornerUpLeft, Forward, RotateCcw } from 'lucide-react';
55
import { EmptyState, MessageBubble } from '@shared/ui';
66
import MarkdownRenderer from '@/components/MarkdownRenderer';
77
import type { IMMessage } from './types';

app/web/src/components/IM/TeamApprovalPanel.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ interface TeamApprovalPanelProps {
1616
memberNames: Record<string, string>;
1717
}
1818

19-
const DECIDED_STATUSES = new Set(['approved', 'denied', 'allow', 'deny', 'decided', 'resolved']);
20-
2119
function isPending(a: TeamApprovalState): boolean {
2220
const s = a.status.toLowerCase();
2321
return ['pending', 'requested', 'waiting', 'waiting_for_approval'].includes(s);

app/web/src/components/RunDetail.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,11 @@ export default function RunDetail({
159159
const hubClient = useMemo(() => createHubClient({ getToken: getAccessToken }), []);
160160

161161
const [summary, setSummary] = useState<AgentRunEventSummary | null>(null);
162-
const [summaryError, setSummaryError] = useState(false);
163162

164163
useEffect(() => {
165164
const taskId = run?.runId;
166165
if (!taskId || !getAccessToken()) {
167166
setSummary(null);
168-
setSummaryError(false);
169167
return;
170168
}
171169

@@ -175,13 +173,11 @@ export default function RunDetail({
175173
.then((data) => {
176174
if (!cancelled) {
177175
setSummary(data);
178-
setSummaryError(false);
179176
}
180177
})
181178
.catch(() => {
182179
if (!cancelled) {
183180
setSummary(null);
184-
setSummaryError(true);
185181
}
186182
});
187183

0 commit comments

Comments
 (0)