Widen sidebar session titles
This commit is contained in:
@@ -479,11 +479,6 @@ const ClawSessionList: FC = () => {
|
||||
const active = activeSessionId === session.session_id;
|
||||
const loading = loadingSessionId === session.session_id;
|
||||
const badge = sessionBadges.bySessionId.get(session.session_id);
|
||||
const actionPinned =
|
||||
badge?.running === true ||
|
||||
badge?.unread === true ||
|
||||
deletingSessionId === session.session_id ||
|
||||
openMenuSessionId === session.session_id;
|
||||
return (
|
||||
<div
|
||||
key={`claw-session-${session.session_id}-${session.modified_at}`}
|
||||
@@ -520,9 +515,7 @@ const ClawSessionList: FC = () => {
|
||||
) : (
|
||||
<button
|
||||
type="button"
|
||||
className={`aui-thread-list-item-trigger flex h-full min-w-0 flex-1 items-center overflow-hidden pl-3 text-start text-sm ${
|
||||
actionPinned ? "pr-7" : "pr-2 group-hover:pr-7"
|
||||
}`}
|
||||
className="aui-thread-list-item-trigger flex h-full min-w-0 flex-1 items-center overflow-hidden px-3 pr-1 text-start text-sm"
|
||||
onClick={async () => {
|
||||
console.log("[session-list] click", {
|
||||
sessionId: session.session_id,
|
||||
@@ -532,7 +525,7 @@ const ClawSessionList: FC = () => {
|
||||
await openSession(session.session_id);
|
||||
}}
|
||||
>
|
||||
<span className="min-w-0 overflow-hidden whitespace-nowrap">
|
||||
<span className="min-w-0 truncate">
|
||||
{loading
|
||||
? "回放中..."
|
||||
: session.preview || session.session_id}
|
||||
@@ -725,7 +718,7 @@ function SessionActionSlot({
|
||||
}) {
|
||||
const hasBadge = running || unread;
|
||||
return (
|
||||
<div className="absolute top-1/2 right-1 z-10 flex size-6 -translate-y-1/2 items-center justify-center">
|
||||
<div className="relative mr-2 flex size-7 shrink-0 items-center justify-center">
|
||||
<span
|
||||
aria-hidden={!hasBadge}
|
||||
className="pointer-events-none absolute inset-0 flex items-center justify-center text-muted-foreground transition-opacity group-hover:opacity-0 data-[hidden=true]:opacity-0 data-[open=true]:opacity-0"
|
||||
|
||||
@@ -26,7 +26,7 @@ import { cn } from "@/lib/utils";
|
||||
|
||||
const SIDEBAR_COOKIE_NAME = "sidebar_state";
|
||||
const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
||||
const SIDEBAR_WIDTH = "16rem";
|
||||
const SIDEBAR_WIDTH = "17.5rem";
|
||||
const SIDEBAR_WIDTH_MOBILE = "18rem";
|
||||
const SIDEBAR_WIDTH_ICON = "3rem";
|
||||
const SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
||||
|
||||
Reference in New Issue
Block a user