Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
5 changes: 4 additions & 1 deletion desktop/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ export default defineConfig({
"**/badge.spec.ts",
"**/channel-browser.spec.ts",
"**/channel-add-screenshots.spec.ts",
"**/add-community-screenshots.spec.ts",
"**/hosted-communities-settings-screenshots.spec.ts",
"**/invites-settings-screenshots.spec.ts",
"**/messaging.spec.ts",
"**/custom-emoji.spec.ts",
"**/profile-custom-emoji-status.spec.ts",
Expand Down Expand Up @@ -102,7 +105,7 @@ export default defineConfig({
"**/channel-sort.spec.ts",
"**/identity-lost.spec.ts",
"**/deep-link-invite.spec.ts",
"**/invite-qr-download.spec.ts",
"**/invite-link-copy.spec.ts",
"**/global-agent-config-screenshots.spec.ts",
"**/doctor-states.spec.ts",
"**/onboarding-avatar-skip.spec.ts",
Expand Down
292 changes: 239 additions & 53 deletions desktop/src/features/agents/ui/AgentCreationPreview.tsx

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions desktop/src/features/agents/ui/AgentCreationPreview.utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import type * as React from "react";

export function isAvatarFileDrag(event: React.DragEvent<HTMLElement>) {
return Array.from(event.dataTransfer.types).includes("Files");
}

export const AVATAR_APPLY_MOTION_TRANSITION = {
duration: 0.14,
ease: [0.23, 1, 0.32, 1],
} as const;

export type AvatarTab = "image" | "emoji";

export type EmojiMartEmoji = {
native?: string;
};
7 changes: 5 additions & 2 deletions desktop/src/features/communities/relayProbe.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,11 @@ test("normalizeRelayUrl_empty_returns_null", () => {
assert.equal(normalizeRelayUrl(" "), null);
});

test("normalizeRelayUrl_bare_hostname_returns_null", () => {
assert.equal(normalizeRelayUrl("relay.example.com"), null);
test("normalizeRelayUrl_bare_hostname_adds_secure_scheme", () => {
assert.equal(
normalizeRelayUrl("relay.example.com"),
"wss://relay.example.com",
);
});

test("normalizeRelayUrl_ftp_scheme_returns_null", () => {
Expand Down
13 changes: 13 additions & 0 deletions desktop/src/features/communities/relayProbe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,19 @@ export function normalizeRelayUrl(input: string): string | null {
}
}

// Match the legacy add/edit community forms: a scheme-less host is assumed
// to be a secure relay. Validation still rejects whitespace and malformed
// values instead of blindly persisting the prefixed string.
if (!trimmed.includes("://")) {
const wsUrl = `wss://${trimmed}`;
try {
new URL(wsUrl);
return wsUrl;
} catch {
return null;
}
}

return null;
}

Expand Down
Loading
Loading