Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function ClaudeRuntimePicker({
)}
>
<div className="flex flex-col gap-1.5">
<Label className={labelClass}>Claude モデル</Label>
<Label className={labelClass}>Model</Label>
<Select
value={model}
onValueChange={(v) => onModelChange(v as ClaudeModelPick)}
Expand All @@ -71,7 +71,7 @@ export function ClaudeRuntimePicker({
</Select>
</div>
<div className="flex flex-col gap-1.5">
<Label className={labelClass}>思考 effort</Label>
<Label className={labelClass}>Effort</Label>
<Select
value={effort}
onValueChange={(v) => onEffortChange(v as ClaudeEffortPick)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,16 @@ export function ScheduleListRow({
</span>
</div>
<div className="text-[10px] text-muted-foreground mt-0.5 flex flex-wrap gap-x-2">
<span>モデル: {getClaudeModelLabel(schedule.claudeModel)}</span>
<span>effort: {getClaudeEffortLabel(schedule.claudeEffort)}</span>
<span>Model: {getClaudeModelLabel(schedule.claudeModel)}</span>
<span>Effort: {getClaudeEffortLabel(schedule.claudeEffort)}</span>
</div>
{schedule.lastRunAt && (
<div className="text-[10px] text-muted-foreground mt-0.5">
最終: {new Date(schedule.lastRunAt).toLocaleString("ja-JP")}
</div>
)}
</button>
<DropdownMenu>
<DropdownMenu modal={false}>
<DropdownMenuTrigger asChild>
<Button
type="button"
Expand All @@ -113,12 +113,21 @@ export function ScheduleListRow({
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
<DropdownMenuItem onClick={onEdit}>
<DropdownMenuItem
onSelect={() => {
// Defer opening the editor Dialog so the dropdown's own
// pointer-up / focus-return doesn't race with Dialog's
// outside-click detection and immediately close it.
setTimeout(onEdit, 0);
}}
>
<HiMiniPencil className="mr-2 size-4" />
編集
</DropdownMenuItem>
<DropdownMenuItem
onClick={() => void handleDelete()}
onSelect={() => {
setTimeout(() => void handleDelete(), 0);
}}
className="text-destructive focus:text-destructive"
>
<HiMiniTrash className="mr-2 size-4" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ function SessionRow({

const handleRenameKey = useCallback(
(e: ReactKeyboardEvent<HTMLInputElement>) => {
if (e.key === "Enter") {
if (e.key === "Enter" && !e.nativeEvent.isComposing) {
e.preventDefault();
e.stopPropagation();
void commitRename();
Expand Down Expand Up @@ -1526,12 +1526,12 @@ function SessionDetail({ session, onDeleted }: SessionDetailProps) {
</div>

<div className="grid grid-cols-2 gap-4">
<DetailBlock label="Claude モデル">
<DetailBlock label="Model">
<div className="text-xs">
{getClaudeModelLabel(session.claudeModel)}
</div>
</DetailBlock>
<DetailBlock label="思考 effort">
<DetailBlock label="Effort">
<div className="text-xs">
{getClaudeEffortLabel(session.claudeEffort)}
</div>
Expand Down Expand Up @@ -1634,7 +1634,11 @@ function SessionDetail({ session, onDeleted }: SessionDetailProps) {
rows={2}
className="resize-none min-h-[44px] max-h-40 text-xs leading-relaxed"
onKeyDown={(e) => {
if (e.key === "Enter" && !e.shiftKey) {
if (
e.key === "Enter" &&
!e.shiftKey &&
!e.nativeEvent.isComposing
) {
e.preventDefault();
void handleSendInput();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Tooltip, TooltipContent, TooltipTrigger } from "@superset/ui/tooltip";
import { Popover, PopoverContent, PopoverTrigger } from "@superset/ui/popover";
import { useMemo, useState } from "react";
import type { IconType } from "react-icons";
import { SiClaude, SiOpenai } from "react-icons/si";
Expand Down Expand Up @@ -53,24 +53,23 @@ function hostOrFallback(statusUrl: string, fallback: string): string {

interface ServiceStatusIndicatorProps {
snapshot: ServiceStatusSnapshot;
onClick: () => void;
onOpenStatusPage: () => void;
}

function ServiceStatusIndicator({
snapshot,
onClick,
onOpenStatusPage,
}: ServiceStatusIndicatorProps) {
const dotClass = LEVEL_DOT_CLASS[snapshot.level];
const levelLabel = LEVEL_LABEL[snapshot.level];
const displayHost = hostOrFallback(snapshot.statusUrl, snapshot.label);
const Icon = SERVICE_ICON[snapshot.id];

return (
<Tooltip delayDuration={300}>
<TooltipTrigger asChild>
<Popover>
<PopoverTrigger asChild>
<button
type="button"
onClick={onClick}
aria-label={`${snapshot.label} status: ${levelLabel}`}
className="no-drag relative flex items-center justify-center size-7 rounded-md text-foreground/80 hover:text-foreground hover:bg-accent/60 transition-colors"
>
Expand All @@ -79,17 +78,10 @@ function ServiceStatusIndicator({
className={`absolute -bottom-0.5 -right-0.5 size-2 rounded-full ring-2 ring-background ${dotClass}`}
/>
</button>
</TooltipTrigger>
{/* Project's TooltipContent defaults to an inverted color pair
* (`bg-foreground` + `text-[var(--background)]`). For this
* multi-line status card we want the regular popover surface
* instead so description / meta colors (muted-foreground, etc.)
* work normally. `!` prefix forces the override past the
* component defaults. */}
<TooltipContent
</PopoverTrigger>
<PopoverContent
side="bottom"
showArrow={false}
className="!bg-popover !text-popover-foreground border shadow-md p-3 max-w-[280px] space-y-1.5 text-sm"
className="p-3 max-w-[280px] w-auto space-y-1.5 text-sm"
>
<div className="flex items-center gap-1.5 font-semibold">
<Icon className="size-3.5 shrink-0" />
Expand All @@ -102,11 +94,15 @@ function ServiceStatusIndicator({
{formatCheckedAt(snapshot.checkedAt)}
{snapshot.fetchError ? ` · ${snapshot.fetchError}` : ""}
</div>
<div className="text-xs text-muted-foreground">
クリックで {displayHost} を開く
</div>
</TooltipContent>
</Tooltip>
<button
type="button"
onClick={onOpenStatusPage}
className="text-xs text-primary hover:underline focus:outline-none focus-visible:underline"
>
{displayHost} を開く
</button>
</PopoverContent>
</Popover>
);
}

Expand Down Expand Up @@ -147,7 +143,7 @@ export function ServiceStatusIndicators() {
<ServiceStatusIndicator
key={snapshot.id}
snapshot={snapshot}
onClick={() => openUrl.mutate(snapshot.statusUrl)}
onOpenStatusPage={() => openUrl.mutate(snapshot.statusUrl)}
/>
))}
</div>
Expand Down
Loading