elements, so assert on the
+ // paragraph's combined text content.
+ const text = container.textContent ?? "";
+ expect(text).toContain("Open a file");
+ expect(text).toContain("browse commands");
+ expect(text).toContain("start a chat");
+ expect(text).toContain("launch a terminal");
+
+ // Shortcuts are resolved from the registry for the current test platform.
+ const hints = Array.from(
+ container.querySelectorAll("kbd"),
+ (kbd) => kbd.textContent,
+ );
+ const platform = getDesktopPlatform();
+ expect(hints).toEqual([
+ formatShortcutAction("quick_switcher", platform),
+ formatShortcutAction("command_palette", platform),
+ formatShortcutAction("new_agent", platform),
+ formatShortcutAction("new_terminal", platform),
+ ]);
- expect(
- screen.getByText("Open a file, start a chat or launch a terminal."),
- ).toBeVisible();
expect(
screen.queryByRole("button", { name: "New Note" }),
).not.toBeInTheDocument();
diff --git a/apps/desktop/src/features/editor/WorkspacePaneEmptyState.tsx b/apps/desktop/src/features/editor/WorkspacePaneEmptyState.tsx
index 0b35935d..d638f754 100644
--- a/apps/desktop/src/features/editor/WorkspacePaneEmptyState.tsx
+++ b/apps/desktop/src/features/editor/WorkspacePaneEmptyState.tsx
@@ -1,7 +1,33 @@
+import { formatShortcutAction } from "../../app/shortcuts/format";
+import type { ShortcutActionId } from "../../app/shortcuts/registry";
+import { getDesktopPlatform } from "../../app/utils/platform";
+
interface WorkspacePaneEmptyStateProps {
paneId: string;
}
+// Resolve the binding from the shortcut registry at render time so the hint
+// stays accurate if the user rebinds an action, and so the platform modifier
+// (⌘ vs Ctrl) is correct per OS.
+function ShortcutHint({ action }: { action: ShortcutActionId }) {
+ const label = formatShortcutAction(action, getDesktopPlatform());
+ if (!label) return null;
+ return (
+
+ {label}
+
+ );
+}
+
export function WorkspacePaneEmptyState({
paneId,
}: WorkspacePaneEmptyStateProps) {
@@ -11,10 +37,14 @@ export function WorkspacePaneEmptyState({
data-workspace-empty-pane={paneId}
>
- Open a file, start a chat or launch a terminal.
+ Open a file
+ , browse commands
+ , start a chat
+ , or launch a terminal
+ .
);