Skip to content
Open
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
2 changes: 2 additions & 0 deletions apps/desktop/src/preview/Manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,8 @@ const APP_FORWARDED_SHORTCUTS: ReadonlyArray<{
{ key: "j", meta: true, shift: true, control: false },
// mod+K → command palette
{ key: "k", meta: true, shift: false, control: false },
// mod+T → board
{ key: "t", meta: true, shift: false, control: false },
// mod+, → settings (macOS convention)
{ key: ",", meta: true, shift: false, control: false },
// mod+W → close tab/panel
Expand Down
1 change: 1 addition & 0 deletions apps/server/src/keybindings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ it.layer(NodeServices.layer)("keybindings", (it) => {
assert.equal(defaultsByCommand.get("thread.jump.1"), "mod+1");
assert.equal(defaultsByCommand.get("thread.jump.9"), "mod+9");
assert.equal(defaultsByCommand.get("modelPicker.toggle"), "mod+shift+m");
assert.equal(defaultsByCommand.get("board.open"), "mod+t");
assert.equal(defaultsByCommand.get("sidebar.toggle"), "mod+b");
assert.equal(defaultsByCommand.get("rightPanel.toggle"), "mod+alt+b");
assert.equal(defaultsByCommand.get("terminal.splitVertical"), "mod+shift+d");
Expand Down
13 changes: 13 additions & 0 deletions apps/web/src/components/CommandPalette.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
LinkIcon,
MessageSquareIcon,
SettingsIcon,
SquareKanbanIcon,
SquarePenIcon,
} from "lucide-react";
import {
Expand Down Expand Up @@ -1230,6 +1231,18 @@ function OpenCommandPaletteDialog(props: {
});
}

actionItems.push({
kind: "action",
value: "action:board",
searchTerms: ["board", "kanban", "overview", "dashboard"],
title: "Open board",
icon: <SquareKanbanIcon className={ITEM_ICON_CLASS} />,
shortcutCommand: "board.open",
run: async () => {
await navigate({ to: "/board" });
},
});

actionItems.push({
kind: "action",
value: "action:settings",
Expand Down
6 changes: 3 additions & 3 deletions apps/web/src/components/ProjectFavicon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ export function ProjectFavicon(input: {
);
}

function ProjectFaviconFallback({
export function ProjectFaviconFallback({
className,
icon: Icon,
icon: Icon = FolderIcon,
}: {
readonly className?: string | undefined;
readonly icon: ComponentType<{ className?: string }>;
readonly icon?: ComponentType<{ className?: string }>;
}) {
return <Icon className={`size-3.5 shrink-0 text-muted-foreground/50 ${className ?? ""}`} />;
}
Expand Down
101 changes: 101 additions & 0 deletions apps/web/src/components/Sidebar.logic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vite-plus/test"
import {
archiveSelectedThreadEntries,
buildMultiSelectThreadContextMenuItems,
buildSidebarV2ThreadContextMenuItems,
createThreadJumpHintVisibilityController,
getSidebarThreadIdsToPrewarm,
getVisibleSidebarThreadIds,
Expand All @@ -17,6 +18,7 @@ import {
resolveSidebarStageBadgeLabel,
resolveThreadRowClassName,
resolveSidebarV2Status,
resolveSidebarV2TopStatus,
resolveThreadStatusPill,
resolveWorkingStartedAt,
formatWorkingDurationLabel,
Expand Down Expand Up @@ -163,6 +165,90 @@ describe("buildMultiSelectThreadContextMenuItems", () => {
});
});

describe("buildSidebarV2ThreadContextMenuItems", () => {
const baseInput = {
branch: null,
supportsSettlement: false,
isSettled: false,
supportsSnooze: false,
isSnoozed: false,
canSnoozeNow: true,
snoozePresets: [],
} as const;

it("offers settlement actions matching the thread's state and server support", () => {
expect(
buildSidebarV2ThreadContextMenuItems({
...baseInput,
supportsSettlement: true,
})[0],
).toEqual({ id: "settle", label: "Settle thread" });
expect(
buildSidebarV2ThreadContextMenuItems({
...baseInput,
supportsSettlement: true,
isSettled: true,
})[0],
).toEqual({ id: "unsettle", label: "Un-settle thread" });
expect(buildSidebarV2ThreadContextMenuItems(baseInput)).toEqual([
{ id: "rename", label: "Rename thread" },
{ id: "mark-unread", label: "Mark unread" },
{ id: "delete", label: "Delete", destructive: true, icon: "trash" },
]);
});

it("leads with a new-thread item for the thread's branch", () => {
expect(
buildSidebarV2ThreadContextMenuItems({
...baseInput,
branch: "feature/login",
supportsSettlement: true,
})[0],
).toEqual({ id: "new-thread-on-branch", label: "New thread on feature/login" });
});

it("offers snooze presets when supported, disabled while the thread blocks on the user", () => {
const presets = [
{
id: "hour",
label: "In 1 hour",
whenLabel: "10:00 AM",
snoozedUntil: "2026-07-24T10:00:00.000Z",
},
] as const;
expect(
buildSidebarV2ThreadContextMenuItems({
...baseInput,
supportsSnooze: true,
snoozePresets: presets,
})[0],
).toEqual({
id: "snooze",
label: "Snooze",
disabled: false,
children: [{ id: "snooze:hour", label: "In 1 hour (10:00 AM)" }],
});
expect(
buildSidebarV2ThreadContextMenuItems({
...baseInput,
supportsSnooze: true,
canSnoozeNow: false,
snoozePresets: presets,
})[0],
).toMatchObject({ id: "snooze", disabled: true });
});

it("offers wake instead of snooze for a snoozed thread", () => {
expect(
buildSidebarV2ThreadContextMenuItems({
...baseInput,
supportsSnooze: true,
isSnoozed: true,
})[0],
).toEqual({ id: "unsnooze", label: "Wake thread" });
});
});

describe("resolveSidebarStageBadgeLabel", () => {
it("returns Nightly for nightly primary server versions", () => {
expect(
Expand Down Expand Up @@ -654,6 +740,21 @@ describe("resolveSidebarV2Status", () => {
});
});

describe("resolveSidebarV2TopStatus", () => {
it("labels ready threads Done only when they carry an unread completion", () => {
expect(resolveSidebarV2TopStatus({ status: "ready", isUnread: true })).toMatchObject({
label: "Done",
icon: "done",
});
expect(resolveSidebarV2TopStatus({ status: "ready", isUnread: false })).toBeNull();
// Unread only matters for ready threads; active statuses keep their label.
expect(resolveSidebarV2TopStatus({ status: "working", isUnread: true })).toMatchObject({
label: "Working",
icon: "working",
});
});
});

describe("sortThreadsForSidebarV2", () => {
const sortable = (input: { id: string; createdAt: string }) => ({
id: input.id,
Expand Down
Loading