Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mobile): a thread link that can't be found shows as an unavailable chip, like web #28498

OpenEtanHey(GitHub profile, opens in a new tab)wants to merge 35 commits intomain fromrefs/pull/28498/headopened View on GitHub

Showing 10 changed files with 61 additions and 21 deletions (loading 7).

x
0 of 10 viewed, 10 left
4 additions and 1 deletionapps/mobile/src/features/threads/PendingUserInputCard.test.tsxModified
View file
@@ -54,7 +54,10 @@
),
}));
vi.mock("../../state/entities", () => ({
- useLiveThreadLinkLabels: (markdown: string) => markdown,
+ useLiveThreadLinkLabels: (markdown: string) => ({ markdown, unavailable: new Set<string>() }),
+}));
+vi.mock("../../native/useEnrichedLinkVariants", () => ({
+ enrichedThreadLinkCustomization: () => undefined,
}));
vi.mock("../../native/useOpenPullRequest", () => ({
useOpenPullRequest: () => async (url: string) => {
10 additions and 4 deletionsapps/mobile/src/features/threads/PendingUserInputCard.tsxModified
View file
@@ -32,6 +32,7 @@
resolveWorkspaceRelativeFilePath,
} from "../files/filePath";
import { useLiveThreadLinkLabels } from "../../state/entities";
+import { enrichedThreadLinkCustomization } from "../../native/useEnrichedLinkVariants";
import {
isPendingUserInputOptionSelected,
type PendingUserInputDraftAnswer,
@@ -86,7 +87,7 @@
readonly preserveSoftBreaks?: boolean;
}) {
const styles = useMarkdownPreviewStyles();
- const markdown = useLiveThreadLinkLabels(props.markdown, props.environmentId);