Improve sidebar workspace readability and host identity (#2790)
* fix(app): align turn footer actions Keep running-turn actions in the same position as completed-turn actions and use the shared small icon size for both copy and fork controls. * feat(app): improve sidebar workspace identity Make dense sidebar workspace rows easier to scan and let each device control how connected hosts are identified. * fix(app): keep host badges readable Use a compact display menu and keep identity color on the host icon so translated controls fit and badge text retains standard contrast. * fix(app): announce selected sidebar badge mode * fix(app): retain icon-only host names for screen readers * fix(app): name hoisted workspace rows * fix(app): retain host identity in workspace labels * fix(app): retain workspace status in row labels * fix(app): defer host appearance until identity resolves * fix(app): serialize host appearance writes * fix(app): serialize host registry writes * fix(app): bound sidebar host badge labels * test(app): match workspace status labels * fix(app): consolidate sidebar identity behavior * test(app): assert status grouping behavior * fix(app): keep sidebar row actions accessible * fix(app): stabilize optimistic message layout
This commit is contained in:
@@ -3,6 +3,7 @@ import { useTranslation } from "react-i18next";
|
||||
import { FolderOpen } from "lucide-react-native";
|
||||
import { withUnistyles } from "react-native-unistyles";
|
||||
import { DropdownMenuItem } from "@/components/ui/dropdown-menu";
|
||||
import { ContextMenuItem } from "@/components/ui/context-menu";
|
||||
import { getIsElectron } from "@/constants/platform";
|
||||
import { useToast } from "@/contexts/toast-context";
|
||||
import type { Theme } from "@/styles/theme";
|
||||
@@ -11,6 +12,7 @@ import { openDesktopTarget, useDesktopOpenTargets } from "@/workspace/desktop-op
|
||||
interface OpenInFileManagerMenuItemProps {
|
||||
path?: string | null;
|
||||
testID: string;
|
||||
surface?: "context" | "dropdown";
|
||||
}
|
||||
|
||||
const ThemedFolderOpen = withUnistyles(FolderOpen);
|
||||
@@ -21,7 +23,11 @@ const foregroundMutedColorMapping = (theme: Theme) => ({
|
||||
|
||||
const leadingIcon = <ThemedFolderOpen size={14} uniProps={foregroundMutedColorMapping} />;
|
||||
|
||||
export function OpenInFileManagerMenuItem({ path, testID }: OpenInFileManagerMenuItemProps) {
|
||||
export function OpenInFileManagerMenuItem({
|
||||
path,
|
||||
testID,
|
||||
surface = "dropdown",
|
||||
}: OpenInFileManagerMenuItemProps) {
|
||||
const { t } = useTranslation();
|
||||
const toast = useToast();
|
||||
const isElectron = getIsElectron();
|
||||
@@ -46,9 +52,17 @@ export function OpenInFileManagerMenuItem({ path, testID }: OpenInFileManagerMen
|
||||
return null;
|
||||
}
|
||||
|
||||
const label = t("sidebar.project.actions.openFolder");
|
||||
if (surface === "context") {
|
||||
return (
|
||||
<ContextMenuItem testID={testID} leading={leadingIcon} onSelect={openInFileManager}>
|
||||
{label}
|
||||
</ContextMenuItem>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<DropdownMenuItem testID={testID} leading={leadingIcon} onSelect={openInFileManager}>
|
||||
{t("sidebar.project.actions.openFolder")}
|
||||
{label}
|
||||
</DropdownMenuItem>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user