···8080 handlePaste,
8181 handleClickOn: (_view, _pos, node, _nodePos, _event, direct) => {
8282 if (!direct) return;
8383+8484+ // Check for didMention inline nodes
8585+ if (node?.type === schema.nodes.didMention) {
8686+ window.open(
8787+ didToBlueskyUrl(node.attrs.did),
8888+ "_blank",
8989+ "noopener,noreferrer",
9090+ );
9191+ return;
9292+ }
9393+9494+ // Check for atMention inline nodes
9595+ if (node?.type === schema.nodes.atMention) {
9696+ const url = atUriToUrl(node.attrs.atURI);
9797+ window.open(url, "_blank", "noopener,noreferrer");
9898+ return;
9999+ }
83100 if (node.nodeSize - 2 <= _pos) return;
8410185102 // Check for marks at the clicked position
···87104 const nodeAt2 = node.nodeAt(Math.max(_pos - 2, 0));
8810589106 // Check for link marks
9090- let linkMark = nodeAt1?.marks.find((f) => f.type === schema.marks.link) ||
107107+ let linkMark =
108108+ nodeAt1?.marks.find((f) => f.type === schema.marks.link) ||
91109 nodeAt2?.marks.find((f) => f.type === schema.marks.link);
92110 if (linkMark) {
93111 window.open(linkMark.attrs.href, "_blank");
9494- return;
9595- }
9696-9797- // Check for didMention inline nodes
9898- if (nodeAt1?.type === schema.nodes.didMention) {
9999- window.open(didToBlueskyUrl(nodeAt1.attrs.did), "_blank", "noopener,noreferrer");
100100- return;
101101- }
102102- if (nodeAt2?.type === schema.nodes.didMention) {
103103- window.open(didToBlueskyUrl(nodeAt2.attrs.did), "_blank", "noopener,noreferrer");
104104- return;
105105- }
106106-107107- // Check for atMention inline nodes
108108- if (nodeAt1?.type === schema.nodes.atMention) {
109109- const url = atUriToUrl(nodeAt1.attrs.atURI);
110110- window.open(url, "_blank", "noopener,noreferrer");
111111- return;
112112- }
113113- if (nodeAt2?.type === schema.nodes.atMention) {
114114- const url = atUriToUrl(nodeAt2.attrs.atURI);
115115- window.open(url, "_blank", "noopener,noreferrer");
116112 return;
117113 }
118114 },
+2-5
src/utils/mentionUtils.ts
···1919 const uri = new AtUri(atUri);
20202121 if (isPublicationCollection(uri.collection)) {
2222- // Publication URL: /lish/{did}/{rkey}
2323- return `/lish/${uri.host}/${uri.rkey}`;
2222+ return `/lish/uri/${encodeURIComponent(atUri)}`;
2423 } else if (isDocumentCollection(uri.collection)) {
2525- // Document URL - we need to resolve this via the API
2626- // For now, create a redirect route that will handle it
2724 return `/lish/uri/${encodeURIComponent(atUri)}`;
2825 }
2926···4239export function handleMentionClick(
4340 e: MouseEvent | React.MouseEvent,
4441 type: "did" | "at-uri",
4545- value: string
4242+ value: string,
4643) {
4744 e.preventDefault();
4845 e.stopPropagation();