比较提交

..

没有共同的提交。06316a324055f6b17458f5819de7d7049af095db 和 779ffc3d5540f9d5370902c04ec957950563ae0a 的历史完全不同。

共有 5 个文件被更改,包括 639 次插入 和 810 次删除

查看文件

@ -36,14 +36,6 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
### Changed
- Adding a connection now asks for four things — server address, adapter id, API key, and slot —
with the rest behind a collapsed advanced section. The SSE URL and certificate fingerprint fields
were removed because nothing reads them, and the role field was removed because it follows the
chosen slot. The display name is derived from the identity and host unless set explicitly, and the
insecure-HTTP approval appears only for an `http://` address, where it is required.
- Choosing a slot in the connection form now assigns the slot and points startup auto-connect at it,
replacing a separate slot card interaction and a separate dropdown that could disagree.
- The API key is enrolled as part of saving a new connection instead of as a second step.
- Synchronized the 13-item roadmap status with the actual P02 implementation state.
- Documented external prerequisites for HTTPS certificate pinning, signed updates, and dual-server soak testing.

查看文件

@ -650,51 +650,3 @@ Rust 107 passed / 2 ignored. Frontend 24 passed / 5 files. Playwright 5 passed.
Next: capture the frames, then batch R3.6 (message identity, pulling F-34 forward) and R3.7
(attachment chain, pulling F-33 forward).
## 2026-07-27: window controls and connection form
### Window controls (P0)
The minimize, maximize and close buttons did nothing. The handlers were correct; the ACL rejected
them. `core:default` resolves to `core:window:default`, which grants only read-only queries —
`allow-is-maximized` is in it, which is why the maximize icon tracked state, but `allow-minimize`,
`allow-toggle-maximize`, `allow-close` and `allow-start-dragging` are not. Both windows are
`decorations: false`, so with close denied the main window could not be closed except through the
tray.
Added `main-window-controls` and `pet-window-drag` capabilities rather than widening the shared one,
so the pet gains dragging alone. Routed the calls through a helper that reports failures in the
shell error banner; they were bare `void` expressions, which is why the rejection was
indistinguishable from an unwired button.
This is the second time a missing capability surfaced as a silent no-op, after the pet window
(F-03). `src-tauri/tests/capabilities.rs` now reads the shipped capability files and asserts each
permission the UI calls is granted to the window that calls it.
### Connection form
Adding a connection asked for eleven fields. Three reached nothing: the SSE URL has no consumer in
`networking/`, the certificate fingerprint is stored but TLS pinning is unimplemented, and the role
only chose a word in the profile list. The form is now server address, adapter id, API key and slot,
with the rest behind a collapsed advanced section.
The adapter id is the remote username, previously entered twice — once in the profile form, once in
the credential card. Display name, role, and the insecure-HTTP approval are now derived rather than
asked for; the approval appears only for an `http://` address and is required there, since
`normalize_url` rejects such an address without it.
Choosing a slot assigns the slot and points auto-connect at it, replacing two controls that could
disagree. The API key is enrolled in the same submit; both follow-up steps need the profile to
exist, so they report their own failures rather than failing the save.
`ProfileManager.tsx` was normalized to LF in a separate commit first. It held 603 CRLF and 85 LF
lines against an `.editorconfig` that pins LF, which is why the fix queue carried a standing warning
about editing it.
### Test status
Rust 112 passed / 2 ignored. Frontend 29 passed / 6 files. Playwright 5 passed. Build passes.
Verified in a browser against the real stylesheet rather than by inspection: four visible fields
plus a collapsed advanced section, the insecure checkbox appearing only for `http://` and carrying
`required`, and the display name resolving to identity@host.

查看文件

@ -227,16 +227,15 @@ describe("App", () => {
await openConnectionsPage();
expect(await screen.findByText("尚未保存 Profile。")).toBeInTheDocument();
fireEvent.change(screen.getByLabelText("服务器地址"), {
target: { value: "https://ops.example.test" },
});
fireEvent.change(screen.getByLabelText("适配器 ID"), {
target: { value: "opsbot" },
});
// Lives under 高级设置; the disclosure only hides it visually.
fireEvent.change(screen.getByLabelText("显示名称"), {
target: { value: "家庭运维" },
});
fireEvent.change(screen.getByLabelText("角色"), {
target: { value: "operations" },
});
fireEvent.change(screen.getByLabelText("REST 基础 URL"), {
target: { value: "https://ops.example.test" },
});
fireEvent.click(screen.getByRole("button", { name: "保存 Profile" }));
expect(
@ -355,24 +354,13 @@ describe("App", () => {
const created: ConnectionProfile = {
id: "2bdedc10-d804-4da5-8e92-39dd7f175d7a",
...request,
transportKind: request.transportKind ?? "astr-bot-open-api",
transportKind: "desktop-v1",
createdAt: "2026-07-19T03:00:00Z",
updatedAt: "2026-07-19T03:00:00Z",
};
profiles = [created];
return created;
}
if (command === "assign_connection_slot") {
const { request } = args as {
request: { slot: ActiveSlotKind; profileId: string };
};
return {
slot: request.slot,
profileId: request.profileId,
state: "disconnected",
unreadCount: 0,
};
}
throw new Error(`Unexpected command: ${command}`);
});
@ -380,18 +368,19 @@ describe("App", () => {
await openConnectionsPage();
expect(await screen.findByText("尚未保存 Profile。")).toBeInTheDocument();
fireEvent.change(screen.getByLabelText("服务器地址"), {
target: { value: "https://companion.example.test" },
});
fireEvent.change(screen.getByLabelText("适配器 ID"), {
target: { value: "companionbot" },
});
fireEvent.change(screen.getByLabelText("显示名称"), {
target: { value: "自动陪伴" },
});
// Choosing a slot is now the single control: it assigns the slot, sets the
// role, and points startup auto-connect at it.
fireEvent.change(screen.getByLabelText("槽位"), {
fireEvent.change(screen.getByLabelText("角色"), {
target: { value: "companion" },
});
fireEvent.change(screen.getByLabelText("REST 基础 URL"), {
target: { value: "https://companion.example.test" },
});
fireEvent.click(
screen.getByLabelText("启动时自动连接(不会在本阶段真正建立网络会话)"),
);
fireEvent.change(screen.getByLabelText("自动连接槽位"), {
target: { value: "companion" },
});
fireEvent.click(screen.getByRole("button", { name: "保存 Profile" }));
@ -399,25 +388,19 @@ describe("App", () => {
expect(
await screen.findByText("已创建 Profile:自动陪伴"),
).toBeInTheDocument();
expect(screen.getByText("自动连接:陪伴")).toBeInTheDocument();
expect(invoke).toHaveBeenCalledWith("create_connection_profile", {
request: {
displayName: "自动陪伴",
role: "companion",
baseUrl: "https://companion.example.test",
authenticationType: "api-key",
transportKind: "astr-bot-open-api",
remoteUsername: "companionbot",
authenticationType: "device-token",
transportKind: "desktop-v1",
allowInsecureHttp: false,
autoConnect: true,
autoConnectSlot: "companion",
},
});
expect(invoke).toHaveBeenCalledWith("assign_connection_slot", {
request: {
slot: "companion",
profileId: "2bdedc10-d804-4da5-8e92-39dd7f175d7a",
},
});
});
it("shows duplicate server-instance warnings and locks the operations slot", async () => {

文件差异内容过多而无法显示 加载差异

查看文件

@ -265,32 +265,6 @@ select:focus {
font-size: 0.9rem;
}
/* Everything the AstrBot connection does not need in order to work. Collapsed
by default so the common path is four fields. */
.profile-advanced {
padding: 0.75rem 0.9rem;
border: 1px solid var(--ui-line, rgb(137 175 232 / 26%));
border-radius: 0.65rem;
background: var(--ui-surface-soft, rgb(11 27 49 / 45%));
}
.profile-advanced > summary {
color: var(--ui-subtle, #9fb4d4);
font-size: 0.9rem;
font-weight: 650;
cursor: pointer;
list-style-position: inside;
}
.profile-advanced[open] > summary {
margin-bottom: 0.9rem;
}
.profile-advanced > label:not(:last-child),
.profile-advanced > .checkbox-field:not(:last-child) {
margin-bottom: 0.9rem;
}
.button-row {
display: flex;
flex-wrap: wrap;