Update fork menu tooltip and icons

- Change tooltip label from "Fork message" to "Fork chat"

- Use Split icon for both "Fork in a new tab" and "Fork in a new workspace" menu items
This commit is contained in:
Mohamed Boudra
2026-06-29 23:25:05 +02:00
parent ad803005c8
commit b571874852
2 changed files with 6 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
import { memo, useCallback, useMemo, useState } from "react";
import { useTranslation } from "react-i18next";
import { Text, View } from "react-native";
import { FolderPlus, Split } from "lucide-react-native";
import { Split } from "lucide-react-native";
import { StyleSheet, withUnistyles } from "react-native-unistyles";
import {
DropdownMenu,
@@ -19,21 +19,11 @@ interface AssistantForkMenuProps {
testID?: string;
}
const ThemedFolderPlus = withUnistyles(FolderPlus);
const ThemedSplit = withUnistyles(Split);
const foregroundColorMapping = (theme: Theme) => ({ color: theme.colors.foreground });
const foregroundMutedColorMapping = (theme: Theme) => ({ color: theme.colors.foregroundMuted });
function getIcon(target: AssistantForkTarget) {
switch (target) {
case "tab":
return <ThemedSplit size={16} uniProps={foregroundColorMapping} />;
case "workspace":
return <ThemedFolderPlus size={16} uniProps={foregroundColorMapping} />;
}
}
export const AssistantForkMenu = memo(function AssistantForkMenu({
onFork,
testID = "assistant-fork-menu",
@@ -79,6 +69,8 @@ export const AssistantForkMenu = memo(function AssistantForkMenu({
[t],
);
const forkIcon = useMemo(() => <ThemedSplit size={16} uniProps={foregroundColorMapping} />, []);
return (
<DropdownMenu open={isOpen} onOpenChange={handleOpenChange}>
<Tooltip delayDuration={250} enabledOnDesktop enabledOnMobile={false}>
@@ -106,7 +98,7 @@ export const AssistantForkMenu = memo(function AssistantForkMenu({
<DropdownMenuItem
closeOnSelect={false}
disabled={isLocked && pendingTarget !== "tab"}
leading={getIcon("tab")}
leading={forkIcon}
onSelect={handleSelect("tab")}
status={pendingTarget === "tab" ? "pending" : undefined}
testID={`${testID}-new-tab`}
@@ -116,7 +108,7 @@ export const AssistantForkMenu = memo(function AssistantForkMenu({
<DropdownMenuItem
closeOnSelect={false}
disabled={isLocked && pendingTarget !== "workspace"}
leading={getIcon("workspace")}
leading={forkIcon}
onSelect={handleSelect("workspace")}
status={pendingTarget === "workspace" ? "pending" : undefined}
testID={`${testID}-new-workspace`}

View File

@@ -244,7 +244,7 @@ export const en = {
copyCode: "Copy code",
copyTurn: "Copy turn",
copyMessage: "Copy message",
forkMenu: "Fork message",
forkMenu: "Fork chat",
forkInNewTab: "Fork in a new tab",
forkInNewWorkspace: "Fork in a new workspace",
forkUnavailable: "Update the host to use this.",