Compare commits

..

2 Commits

Author SHA1 Message Date
Kit Langton fa1448649e test(tui): remove redundant export dialog coverage 2026-08-06 19:56:43 -04:00
Kit Langton 8587b39747 fix(tui): show export copy focus 2026-08-06 19:56:43 -04:00
6 changed files with 9 additions and 13 deletions
@@ -128,7 +128,6 @@ export function DialogMcp() {
{
title: toggleTitle(),
command: "dialog.mcp.toggle",
variant: toggleTitle() === "disconnect" ? "destructive" : "primary",
onTrigger: (option) => {
setFocused(option.value as string)
toggle(option.value as string)
@@ -372,7 +372,6 @@ export function DialogMoveSession(props: DialogMoveSessionProps) {
{
command: "dialog.move_session.delete",
title: "delete",
variant: "destructive",
disabled: (option) => {
const value = option?.value
if (!value || value.type !== "directory" || value.subdirectory) return true
@@ -236,7 +236,6 @@ export function DialogSessionList() {
{
command: "session.delete",
title: "delete",
variant: "destructive",
onTrigger: (option: { value: string }) => {
if (toDelete() !== option.value) {
setToDelete(option.value)
@@ -75,7 +75,6 @@ export function DialogStash(props: { onSelect: (entry: StashEntry) => void }) {
{
command: "stash.delete",
title: "delete",
variant: "destructive",
onTrigger: (option) => {
if (toDelete() === option.value) {
stash.remove(option.value)
@@ -200,10 +200,12 @@ export function DialogExportOptions(props: DialogExportOptionsProps) {
<box
paddingLeft={4}
paddingRight={4}
backgroundColor={overlayTheme.background.default}
backgroundColor={
store.active === "copy" ? theme.background.action.primary.focused : overlayTheme.background.default
}
onMouseUp={() => confirm("copy")}
>
<text fg={overlayTheme.text.default}>Copy</text>
<text fg={store.active === "copy" ? theme.text.action.primary.focused : overlayTheme.text.default}>Copy</text>
</box>
<box
paddingLeft={4}
+5 -7
View File
@@ -45,7 +45,6 @@ export interface DialogSelectProps<T> {
type DialogSelectActionBase<T> = {
command: string
title: string
variant?: "primary" | "destructive"
side?: "left" | "right"
hidden?: boolean
disabled?: boolean | ((option: DialogSelectOption<T> | undefined) => boolean)
@@ -552,19 +551,18 @@ export function DialogSelect<T>(props: DialogSelectProps<T>) {
const item = action.item
const active = createMemo(() => isActionFocused(item))
const disabled = createMemo(() => isActionDisabled(item))
const variant = () => item.variant ?? "primary"
return (
<box
flexDirection="row"
backgroundColor={active() ? theme.background.action[variant()].focused : RGBA.fromInts(0, 0, 0, 0)}
backgroundColor={active() ? theme.background.action.primary.focused : RGBA.fromInts(0, 0, 0, 0)}
onMouseUp={() => trigger(item)}
>
<text
fg={
disabled()
? theme.text.action[variant()].disabled
? theme.text.action.primary.disabled
: active()
? theme.text.action[variant()].focused
? theme.text.action.primary.focused
: theme.text.default
}
attributes={active() ? TextAttributes.BOLD : undefined}
@@ -574,9 +572,9 @@ export function DialogSelect<T>(props: DialogSelectProps<T>) {
<text
fg={
disabled()
? theme.text.action[variant()].disabled
? theme.text.action.primary.disabled
: active()
? theme.text.action[variant()].focused
? theme.text.action.primary.focused
: theme.text.subdued
}
>