feat: Z36 host_meta-only publish + Z37 SyncPage LWW UX

Allow display-name-only publish via host_meta; stop treating company conflicts 403 as a fault and ship rebuilt web dist.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
whm
2026-08-07 12:01:18 +08:00
parent 4b6c90904b
commit 4f9087bd38
9 changed files with 597 additions and 387 deletions

379
web/dist/assets/index-C41vYD6l.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
web/dist/index.html vendored
View File

@@ -7,7 +7,7 @@
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Manrope:wght@400;500;600;700&display=swap" rel="stylesheet" />
<script type="module" crossorigin src="/assets/index-WRB2YG1b.js"></script>
<script type="module" crossorigin src="/assets/index-C41vYD6l.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-CtqUfnO-.css">
</head>
<body>

View File

@@ -313,7 +313,7 @@ export function PlatformTenantsPage(props: {
next.tenantName = r.name;
onSession?.(next);
setInfo(`已打开「${r.name}」管理视图(身份仍是平台超管)`);
message.success(`已打开「${r.name}`);
message.success(`已打开「${r.name}管理视图(身份仍是平台超管)`);
onEnteredCompany?.();
} catch (e: any) {
message.error(e.message || String(e));

View File

@@ -1,5 +1,6 @@
import { useEffect, useState } from "react";
import {
Alert,
App as AntApp,
Button,
Checkbox,
@@ -486,6 +487,13 @@ export function SyncPage(props: {
线 A <Typography.Text code>postgres</Typography.Text>
</Typography.Paragraph>
<Alert
type="info"
showIcon
style={{ marginBottom: 12 }}
message="冲突已自动按 LWW 处理;覆盖审计请到「平台超管 · 租户/公司 · LWW 覆盖日志」查看。公司侧无冲突台。"
/>
<Space style={{ marginBottom: 12 }} wrap>
<Button type="primary" icon={<PlusOutlined />} onClick={openCreate}>
@@ -511,6 +519,11 @@ export function SyncPage(props: {
loading={loading}
dataSource={visibleChannels}
pagination={false}
locale={{
emptyText: filterAgentId
? "该智能体暂无同步通道"
: "该公司暂无同步通道(未绑定智能体或尚未创建通道)",
}}
columns={[
{
title: "通道 ID",
@@ -908,7 +921,7 @@ export function SyncPage(props: {
/>
<Typography.Paragraph type="secondary" style={{ marginTop: 16 }}>
LWW 5
5
= agent push
线 push Binding
Binding <Typography.Text code>shared=true</Typography.Text>

View File

@@ -1017,13 +1017,16 @@ export async function stopSyncChannel(session: Session, id: string) {
return data;
}
/** @deprecated 公司侧已 403请用 listPlatformLwwOverrides */
/** @deprecated 公司侧已 403请用 listPlatformLwwOverrides。预期 403 静默返回空,勿当故障。 */
export async function listSyncConflicts(session: Session, unresolved = true) {
const q = unresolved ? "?unresolved=1" : "?unresolved=0";
const res = await apiFetch(`/api/v1/admin/sync/conflicts${q}`, {
headers: { Authorization: `Bearer ${session.accessToken}` },
});
const data = await readJson(res);
if (res.status === 403) {
return { items: [] as SyncConflict[] };
}
throwIfBad(res, data, "list conflicts failed (公司侧已禁用,请用超管 LWW 审计)");
return data as { items: SyncConflict[] };
}