refactor: remove unused internal helpers and state (#5667)

* refactor: remove unused internal helpers and state

* test(tui): await deferred submissions before reconnect attach
This commit is contained in:
chengyongru authored and GitHub committed 2026-09-05 22:09:12 +08:00
1 parent f37ba60ed4
commit 63cc5f270d
11 files changed
+12 -118

No files matched your search

+3 -5
View File
@@ -2,13 +2,12 @@ import { describe, expect, it } from "vitest";
import {
formatCompactWebUrl,
parsePublicHttpUrl,
parseSafeActivityHttpUrl,
} from "@/components/thread/activity/web-url";
describe("activity web URLs", () => {
it("keeps public HTTP URLs and removes query noise from their label", () => {
const url = parsePublicHttpUrl("https://www.example.com/docs/?token=private#section");
const url = parseSafeActivityHttpUrl("https://www.example.com/docs/?token=private#section");
expect(url).not.toBeNull();
expect(formatCompactWebUrl(url!)).toBe("example.com/docs");
});
@@ -24,9 +23,8 @@ describe("activity web URLs", () => {
"http://192.168.1.1",
"http://[::1]",
"http://[::ffff:127.0.0.1]",
"https://user:password@example.com",
])("rejects private or credential-bearing target %s", (value) => {
expect(parsePublicHttpUrl(value)).toBeNull();
])("rejects private target %s", (value) => {
expect(parseSafeActivityHttpUrl(value)).toBeNull();
});
it("normalizes credential-bearing public URLs for safe activity display", () => {