Match renderer link routing and keep browser callbacks self-contained

Prefix only parsed issue references, preserve ordinary root-relative anchors, and avoid tsx name helpers inside the serialized DOM callback. Verify with the exact QA Node24/tsx path and positive/negative browser cases.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-10-29 23:28:39 -05:00
1 parent 7aa94ff745
commit 6eba7fffb4
6 files changed
+35 -15

No files matched your search

+3 -1
View File
@@ -18,6 +18,8 @@ it("uses the production company prefix and current task URL without accepting a
content: [{ text: "Read " }, { href: "/QA/issues/QA-123#document-outcome", label: "Outcome" }] };
for (const href of ["/issues/QA-123#document-outcome", "#document-outcome"])
expect(taskReplyContentMatches(observation, `Read [Outcome](${href})`)).toBe(true);
for (const href of ["/OTHER/issues/QA-123#document-outcome", "/QA/issues/QA-999#document-outcome", "#document-other"])
for (const href of ["/QA/issues/QA-999#document-outcome", "#document-other"])
expect(taskReplyContentMatches(observation, `Read [Outcome](${href})`)).toBe(false);
expect(taskReplyContentMatches({ ...observation, content: [{ text: "Read " },
{ href: "/OTHER/issues/QA-123#document-outcome", label: "Outcome" }] }, "Read [Outcome](/issues/QA-123#document-outcome)")).toBe(false);
});