Skip to content

Beautiful, AI-native markdown IDE and LLM wiki

feat(open-knowledge): terminal dock + empty-state UI polish (#2019)

sarah2db9ba4d7072
diff --git a/.changeset/terminal-and-empty-state-ui-polish.md b/.changeset/terminal-and-empty-state-ui-polish.md
new file mode 100644
index 000000000..70d138d1a
--- /dev/null
+++ b/.changeset/terminal-and-empty-state-ui-polish.md
@@ -0,0 +1,10 @@
+---
+"@inkeep/open-knowledge": patch
+---
+
+UI polish across the terminal dock and the empty-state onboarding:
+
+- Terminal tabs: the new-terminal (+) button now has a "New terminal" tooltip, and each tab's close (×) button reveals on hover or keyboard focus while staying persistently visible on the active tab.
+- Terminal canvas gains a small left/right gutter, and the exit notice is restyled (muted message, outlined "Restart terminal" action, transparent in dark mode).
+- Empty-state onboarding replaces the trailing "or create a new file" link with a dashed "blank file" escape-hatch card in the starter-pack grid, and the starter-pack picker dialog is a touch wider.
+- Small-icon buttons (`size="icon-xs"`) now render their glyphs at 14px, so the tab close/new icons match the rest of the icon-button set.
diff --git a/packages/app/src/components/EmptyEditorState.tsx b/packages/app/src/components/EmptyEditorState.tsx
index 7e6a2777e..245589461 100644
--- a/packages/app/src/components/EmptyEditorState.tsx
+++ b/packages/app/src/components/EmptyEditorState.tsx
@@ -1,6 +1,5 @@
import { DocumentListSuccessSchema } from '@inkeep/open-knowledge-core';
-import { Trans, useLingui } from '@lingui/react/macro';
-import { ArrowRightIcon } from 'lucide-react';
+import { useLingui } from '@lingui/react/macro';
import { useEffect, useRef, useState } from 'react';
import { CopyablePromptList } from '@/components/empty-state/CopyablePromptList';
import { CreatePromptComposer } from '@/components/empty-state/CreatePromptComposer';
@@ -10,7 +9,6 @@ import { filterVisibleEntries } from '@/components/file-tree-utils';
import { OkBlob } from '@/components/OkBlob';
import { PackCardGrid } from '@/components/PackCardGrid';
import { SeedDialog } from '@/components/SeedDialog';
-import { Button } from '@/components/ui/button';
import { useIsEmbedded } from '@/hooks/use-is-embedded';
import { emitCreateTopLevelFile } from '@/lib/create-file-events';
import type { OkPackId } from '@/lib/desktop-bridge-types';
@@ -165,21 +163,14 @@ function OnboardingView({
above keep the parent's wider `gap-10` breathing room. */}
<div className="flex w-full flex-col gap-4">
<TemplateDivider label={isEmbedded ? t`Use a starter pack` : t`Or use a starter pack`} />
- <PackCardGrid onPackSelect={onPackSelect} />
- {/* Escape hatch for users who don't want a scaffolded layout — fires
- the same window-level event the sidebar toolbar uses, so the new
- file lands with the standard inline-rename flow (sidebar handles
- focus + navigation). */}
- <Button
- variant="link"
- className="text-muted-foreground font-normal justify-end"
- size="sm"
- onClick={() => emitCreateTopLevelFile()}
- >
- <Trans>
- or create a new file <ArrowRightIcon aria-hidden="true" className="size-3" />
- </Trans>
- </Button>
+ {/* The trailing "Blank file" card is the escape hatch for users who
+ don't want a scaffolded layout — it fires the same window-level
+ event the sidebar toolbar uses, so the new file lands with the
+ standard inline-rename flow (sidebar handles focus + navigation). */}
+ <PackCardGrid
+ onPackSelect={onPackSelect}
+ onCreateBlankFile={() => emitCreateTopLevelFile()}
+ />
</div>
</div>
);
diff --git a/packages/app/src/components/PackCardGrid.dom.test.tsx b/packages/app/src/components/PackCardGrid.dom.test.tsx
index c307eca5f..24c85b5b3 100644
--- a/packages/app/src/components/PackCardGrid.dom.test.tsx
+++ b/packages/app/src/components/PackCardGrid.dom.test.tsx
@@ -92,6 +92,26 @@ describe('PackCardGrid runtime behavior', () => {
expect(selected).toEqual(['knowledge-base']);
});
+ test('omits the blank-file card when onCreateBlankFile is not provided', async () => {
+ await renderPackCardGrid({ packs: allPacks });
+
+ expect(screen.getAllByRole('button')).toHaveLength(allPacks.length);
+ expect(screen.queryByText(/create a new file/)).toBeNull();
+ });
+
+ test('renders a trailing blank-file card and fires the callback on click', async () => {
+ const onCreateBlankFile = mock(() => {});
+ await renderPackCardGrid({ packs: allPacks, onCreateBlankFile });
+
+ const buttons = screen.getAllByRole('button');
+ expect(buttons).toHaveLength(allPacks.length + 1);
+ const blankCard = buttons.at(-1);
+ expect(blankCard?.textContent).toContain('create a new file');
+
+ await userEvent.click(blankCard as HTMLElement);
+ expect(onCreateBlankFile).toHaveBeenCalledTimes(1);
+ });
+
test('renders the loading skeleton when caller-owned packs are still null', async () => {
await renderPackCardGrid({ packs: null });
diff --git a/packages/app/src/components/PackCardGrid.tsx b/packages/app/src/components/PackCardGrid.tsx
index 12aca33fc..326c85b35 100644
--- a/packages/app/src/components/PackCardGrid.tsx
+++ b/packages/app/src/components/PackCardGrid.tsx
@@ -1,6 +1,7 @@
// biome-ignore-all lint/plugin/no-raw-html-interactive-element: pre-rule backlog — file uses raw <button>/<input>/<textarea> awaiting shadcn migration; tracked at https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-raw-html-interactive-elementgrit
import { Trans, useLingui } from '@lingui/react/macro';
import {
+ ArrowRight,
Compass,
FileCheck,
GitBranch,
@@ -31,11 +32,17 @@ function iconForPack(id: string): React.ComponentType<{ className?: string }> {
interface PackCardGridProps {
onPackSelect: (packId: OkPackId) => void;
+ onCreateBlankFile?: () => void;
className?: string;
packs?: OkSeedPackInfo[] | null;
}
-export function PackCardGrid({ onPackSelect, className, packs: externalPacks }: PackCardGridProps) {
+export function PackCardGrid({
+ onPackSelect,
+ onCreateBlankFile,
+ className,
+ packs: externalPacks,
+}: PackCardGridProps) {
const { t } = useLingui();
const [internalPacks, setInternalPacks] = useState<OkSeedPackInfo[] | null>(null);
const [error, setError] = useState<string | null>(null);
@@ -110,10 +117,27 @@ export function PackCardGrid({ onPackSelect, className, packs: externalPacks }:
{packs.map((pack) => (
<PackCard key={pack.id} pack={pack} onSelect={() => onPackSelect(pack.id)} />
))}
+ {onCreateBlankFile ? <BlankFileCard onSelect={onCreateBlankFile} /> : null}
</div>
);
}
+function BlankFileCard({ onSelect }: { onSelect: () => void }) {
+ return (
+ <button
+ type="button"
+ onClick={onSelect}
+ className="group flex h-full min-h-22 flex-col items-center justify-center gap-2 rounded-2xl border border-dashed border-border/60 bg-card p-5 text-center text-sm transition-[border-color,box-shadow,transform] hover:border-border hover:shadow-sm focus-visible:border-ring focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px text-muted-foreground"
+ >
+ <span className="flex items-center gap-1.5">
+ <Trans>
+ or create a new file <ArrowRight aria-hidden="true" className="size-3.5" />
+ </Trans>
+ </span>
+ </button>
+ );
+}
+
interface PackCardProps {
pack: OkSeedPackInfo;
onSelect: () => void;
diff --git a/packages/app/src/components/SeedDialog.tsx b/packages/app/src/components/SeedDialog.tsx
index 464668e4c..74cc5b758 100644
--- a/packages/app/src/components/SeedDialog.tsx
+++ b/packages/app/src/components/SeedDialog.tsx
@@ -211,7 +211,7 @@ export function SeedDialog({ open, onOpenChange, onSeedApplied, initialPackId }:
return (
<DialogRoot open={open} onOpenChange={onOpenChange}>
- <DialogContent className="sm:max-w-3xl" data-ok-layer-spawned="">
+ <DialogContent className="sm:max-w-4xl" data-ok-layer-spawned="">
<DialogHeader>
<DialogTitle>{title}</DialogTitle>
<DialogDescription>{description}</DialogDescription>
diff --git a/packages/app/src/components/TerminalDock.dom.test.tsx b/packages/app/src/components/TerminalDock.dom.test.tsx
index 2e58b55ed..738af859d 100644
--- a/packages/app/src/components/TerminalDock.dom.test.tsx
+++ b/packages/app/src/components/TerminalDock.dom.test.tsx
@@ -2,6 +2,7 @@ import { afterEach, beforeEach, describe, expect, mock, test } from 'bun:test';
import { act, cleanup, render, screen, waitFor, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { useEffect, useRef } from 'react';
+import { TooltipProvider } from '@/components/ui/tooltip';
import type { OkDesktopBridge } from '@/lib/desktop-bridge-types';
const TERMINAL_PANEL_ID = 'terminal-dock-panel';
@@ -125,9 +126,16 @@ function renderDock(visible: boolean, launch?: { prompt: string; nonce: number }
const onVisibleChange = mock((_v: boolean) => {});
const { bridge, create, kill, viewMenuPushes, dispatchMenuAction } = makeBridge();
const ui = (v: boolean, l?: { prompt: string; nonce: number } | null) => (
- <TerminalDock bridge={bridge} visible={v} onVisibleChange={onVisibleChange} launch={l ?? null}>
- <div data-testid="editor-child" />
- </TerminalDock>
+ <TooltipProvider>
+ <TerminalDock
+ bridge={bridge}
+ visible={v}
+ onVisibleChange={onVisibleChange}
+ launch={l ?? null}
+ >
+ <div data-testid="editor-child" />
+ </TerminalDock>
+ </TooltipProvider>
);
const utils = render(ui(visible, launch));
return {
@@ -207,7 +215,7 @@ describe('TerminalDock multi-session', () => {
expect(screen.getAllByTestId('terminal-session')).toHaveLength(1);
const firstActive = activePanelId();
- await user.click(screen.getByRole('button', { name: 'New Terminal' }));
+ await user.click(screen.getByRole('button', { name: 'New terminal' }));
expect(screen.getAllByTestId('terminal-session')).toHaveLength(2);
expect(activePanelId()).not.toBe(firstActive);
@@ -217,8 +225,8 @@ describe('TerminalDock multi-session', () => {
test('all sessions stay mounted with exactly one active', async () => {
const user = userEvent.setup();
renderDock(true);
- await user.click(screen.getByRole('button', { name: 'New Terminal' }));
- await user.click(screen.getByRole('button', { name: 'New Terminal' }));
+ await user.click(screen.getByRole('button', { name: 'New terminal' }));
+ await user.click(screen.getByRole('button', { name: 'New terminal' }));
expect(screen.getAllByTestId('terminal-session')).toHaveLength(3);
const tabpanels = screen.getAllByRole('tabpanel', { hidden: true });
@@ -231,7 +239,7 @@ describe('TerminalDock multi-session', () => {
test('switching tabs changes the active session without unmounting the others', async () => {
const user = userEvent.setup();
renderDock(true);
- await user.click(screen.getByRole('button', { name: 'New Terminal' }));
+ await user.click(screen.getByRole('button', { name: 'New terminal' }));
const secondActive = activePanelId();
await user.click(screen.getByRole('tab', { name: 'Terminal 1' }));
@@ -243,7 +251,7 @@ describe('TerminalDock multi-session', () => {
test('typing target stays scoped: the active panel is the only one shown', async () => {
const user = userEvent.setup();
renderDock(true);
- await user.click(screen.getByRole('button', { name: 'New Terminal' }));
+ await user.click(screen.getByRole('button', { name: 'New terminal' }));
expect(sessionPanels()).toHaveLength(2);
const activeCount = document.querySelectorAll(
@@ -255,7 +263,7 @@ describe('TerminalDock multi-session', () => {
test('selecting a tab moves focus to that session', async () => {
const user = userEvent.setup();
renderDock(true);
- await user.click(screen.getByRole('button', { name: 'New Terminal' }));
+ await user.click(screen.getByRole('button', { name: 'New terminal' }));
const second = activePanelId();
await user.click(screen.getByRole('tab', { name: 'Terminal 1' }));
@@ -271,7 +279,7 @@ describe('TerminalDock multi-session', () => {
test('closing a non-active tab removes only it and leaves the active one running', async () => {
const user = userEvent.setup();
renderDock(true);
- await user.click(screen.getByRole('button', { name: 'New Terminal' }));
+ await user.click(screen.getByRole('button', { name: 'New terminal' }));
const activeBefore = activePanelId();
await user.click(screen.getByRole('button', { name: 'Close Terminal 1' }));
@@ -283,7 +291,7 @@ describe('TerminalDock multi-session', () => {
test("closing a tab reaps only that session's PTY and leaves the others alive", async () => {
const user = userEvent.setup();
const view = renderDock(true);
- await user.click(screen.getByRole('button', { name: 'New Terminal' }));
+ await user.click(screen.getByRole('button', { name: 'New terminal' }));
await waitFor(() => expect(view.create).toHaveBeenCalledTimes(2));
expect(view.kill).not.toHaveBeenCalled();
@@ -297,8 +305,8 @@ describe('TerminalDock multi-session', () => {
test('closing the active tab activates its left neighbor', async () => {
const user = userEvent.setup();
renderDock(true);
- await user.click(screen.getByRole('button', { name: 'New Terminal' }));
- await user.click(screen.getByRole('button', { name: 'New Terminal' }));
+ await user.click(screen.getByRole('button', { name: 'New terminal' }));
+ await user.click(screen.getByRole('button', { name: 'New terminal' }));
await user.click(screen.getByRole('tab', { name: 'Terminal 2' }));
const middle = activePanelId();
@@ -315,7 +323,7 @@ describe('TerminalDock multi-session', () => {
test('closing the active leftmost tab activates its right neighbor', async () => {
const user = userEvent.setup();
renderDock(true);
- await user.click(screen.getByRole('button', { name: 'New Terminal' }));
+ await user.click(screen.getByRole('button', { name: 'New terminal' }));
await user.click(screen.getByRole('tab', { name: 'Terminal 1' }));
const closedId = activePanelId();
const rightNeighborId =
@@ -332,8 +340,8 @@ describe('TerminalDock multi-session', () => {
test('closing the active tab moves focus into the surviving neighbor', async () => {
const user = userEvent.setup();
renderDock(true);
- await user.click(screen.getByRole('button', { name: 'New Terminal' }));
- await user.click(screen.getByRole('button', { name: 'New Terminal' }));
+ await user.click(screen.getByRole('button', { name: 'New terminal' }));
+ await user.click(screen.getByRole('button', { name: 'New terminal' }));
await user.click(screen.getByRole('tab', { name: 'Terminal 2' }));
await user.click(screen.getByRole('button', { name: 'Close Terminal 2' }));
@@ -360,8 +368,8 @@ describe('TerminalDock multi-session', () => {
test('hiding the dock preserves every session and keeps the last-active tab on reopen', async () => {
const user = userEvent.setup();
const view = renderDock(true);
- await user.click(screen.getByRole('button', { name: 'New Terminal' }));
- await user.click(screen.getByRole('button', { name: 'New Terminal' }));
+ await user.click(screen.getByRole('button', { name: 'New terminal' }));
+ await user.click(screen.getByRole('button', { name: 'New terminal' }));
await user.click(screen.getByRole('tab', { name: 'Terminal 2' }));
const activeBeforeHide = activePanelId();
expect(screen.getAllByTestId('terminal-session')).toHaveLength(3);
@@ -445,7 +453,7 @@ describe('TerminalDock multi-session', () => {
test('the Terminal menu "Kill Terminal" action closes the active tab', async () => {
const user = userEvent.setup();
const view = renderDock(true);
- await user.click(screen.getByRole('button', { name: 'New Terminal' }));
+ await user.click(screen.getByRole('button', { name: 'New terminal' }));
expect(screen.getAllByTestId('terminal-session')).toHaveLength(2);
act(() => view.dispatchMenuAction('kill-terminal'));
@@ -456,8 +464,8 @@ describe('TerminalDock multi-session', () => {
test('Cmd+number jumps to the matching tab while the terminal is focused', async () => {
const user = userEvent.setup();
renderDock(true);
- await user.click(screen.getByRole('button', { name: 'New Terminal' }));
- await user.click(screen.getByRole('button', { name: 'New Terminal' }));
+ await user.click(screen.getByRole('button', { name: 'New terminal' }));
+ await user.click(screen.getByRole('button', { name: 'New terminal' }));
const panels = sessionPanels();
const thirdSink = panels[2]?.querySelector<HTMLElement>('.xterm-helper-textarea');
act(() => thirdSink?.focus());
@@ -483,7 +491,7 @@ describe('TerminalDock multi-session', () => {
test('Cmd+number for a tab that does not exist is left for the shell', async () => {
const user = userEvent.setup();
renderDock(true);
- await user.click(screen.getByRole('button', { name: 'New Terminal' }));
+ await user.click(screen.getByRole('button', { name: 'New terminal' }));
const panels = sessionPanels();
act(() => panels[1]?.querySelector<HTMLElement>('.xterm-helper-textarea')?.focus());
const before = activePanelId();
@@ -505,7 +513,7 @@ describe('TerminalDock multi-session', () => {
test('Cmd+number is ignored when focus is outside the terminal dock', async () => {
const user = userEvent.setup();
renderDock(true);
- await user.click(screen.getByRole('button', { name: 'New Terminal' }));
+ await user.click(screen.getByRole('button', { name: 'New terminal' }));
await user.click(screen.getByRole('tab', { name: 'Terminal 1' }));
const before = activePanelId();
@@ -527,7 +535,7 @@ describe('TerminalDock multi-session', () => {
test('a non-chord keystroke is not intercepted so it reaches the active shell', async () => {
const user = userEvent.setup();
renderDock(true);
- await user.click(screen.getByRole('button', { name: 'New Terminal' }));
+ await user.click(screen.getByRole('button', { name: 'New terminal' }));
const before = activePanelId();
act(() => sessionPanels()[0]?.querySelector<HTMLElement>('.xterm-helper-textarea')?.focus());
@@ -566,7 +574,7 @@ describe('TerminalDock multi-session', () => {
test('wires each tab to its panel via accessible tablist/tabpanel relationships', async () => {
const user = userEvent.setup();
renderDock(true);
- await user.click(screen.getByRole('button', { name: 'New Terminal' }));
+ await user.click(screen.getByRole('button', { name: 'New terminal' }));
const tablist = screen.getByRole('tablist', { name: 'Terminal sessions' });
const tabs = within(tablist).getAllByRole('tab');
diff --git a/packages/app/src/components/TerminalExitNotice.tsx b/packages/app/src/components/TerminalExitNotice.tsx
index 796475290..0079482f3 100644
--- a/packages/app/src/components/TerminalExitNotice.tsx
+++ b/packages/app/src/components/TerminalExitNotice.tsx
@@ -29,10 +29,10 @@ export function TerminalExitNotice({ info, onRestart }: TerminalExitNoticeProps)
return (
<div
role="alert"
- className="absolute inset-0 z-20 flex flex-col items-center justify-center gap-3 bg-background/90 p-6 text-center text-foreground"
+ className="absolute inset-0 z-20 flex flex-col items-center justify-center gap-3 bg-background/90 dark:bg-transparent p-6 text-center"
>
- <p className="max-w-sm text-sm">{message}</p>
- <Button size="sm" variant="secondary" onClick={onRestart}>
+ <p className="max-w-sm text-sm text-muted-foreground">{message}</p>
+ <Button size="sm" variant="outline" className="uppercase font-mono" onClick={onRestart}>
{t`Restart terminal`}
</Button>
</div>
diff --git a/packages/app/src/components/TerminalPanel.tsx b/packages/app/src/components/TerminalPanel.tsx
index a21202fd7..ac8196c03 100644
--- a/packages/app/src/components/TerminalPanel.tsx
+++ b/packages/app/src/components/TerminalPanel.tsx
@@ -269,7 +269,7 @@ function TerminalSession({
onDismiss={() => setReadiness(null)}
/>
) : null}
- <div ref={containerRef} data-terminal-status={status} className="min-h-0 flex-1" />
+ <div ref={containerRef} data-terminal-status={status} className="min-h-0 flex-1 px-1.5" />
{status === 'exited' && exitInfo ? (
<TerminalExitNotice info={exitInfo} onRestart={onRestart} />
) : null}
diff --git a/packages/app/src/components/TerminalTabStrip.dom.test.tsx b/packages/app/src/components/TerminalTabStrip.dom.test.tsx
index f1cc4cead..68631846b 100644
--- a/packages/app/src/components/TerminalTabStrip.dom.test.tsx
+++ b/packages/app/src/components/TerminalTabStrip.dom.test.tsx
@@ -1,6 +1,7 @@
import { afterEach, describe, expect, mock, test } from 'bun:test';
import { act, cleanup, render, screen, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+import { TooltipProvider } from '@/components/ui/tooltip';
import { type TerminalTabDescriptor, TerminalTabStrip } from './TerminalTabStrip';
const SESSIONS: readonly TerminalTabDescriptor[] = [
@@ -18,14 +19,16 @@ function renderStrip(props?: {
const onNew = mock(() => {});
const onClose = mock((_id: string) => {});
render(
- <TerminalTabStrip
- sessions={props?.sessions ?? SESSIONS}
- activeSessionId={props?.activeSessionId ?? 's1'}
- onSelect={onSelect}
- onTabActivate={onTabActivate}
- onNew={onNew}
- onClose={onClose}
- />,
+ <TooltipProvider>
+ <TerminalTabStrip
+ sessions={props?.sessions ?? SESSIONS}
+ activeSessionId={props?.activeSessionId ?? 's1'}
+ onSelect={onSelect}
+ onTabActivate={onTabActivate}
+ onNew={onNew}
+ onClose={onClose}
+ />
+ </TooltipProvider>,
);
return { onSelect, onTabActivate, onNew, onClose };
}
@@ -99,7 +102,7 @@ describe('TerminalTabStrip', () => {
const user = userEvent.setup();
const { onNew, onSelect } = renderStrip();
- await user.click(screen.getByRole('button', { name: 'New Terminal' }));
+ await user.click(screen.getByRole('button', { name: 'New terminal' }));
expect(onNew).toHaveBeenCalledTimes(1);
expect(onSelect).not.toHaveBeenCalled();
@@ -119,7 +122,7 @@ describe('TerminalTabStrip', () => {
test('every icon-only control exposes an accessible name', () => {
renderStrip();
- expect(screen.getByRole('button', { name: 'New Terminal' })).toBeDefined();
+ expect(screen.getByRole('button', { name: 'New terminal' })).toBeDefined();
for (const label of ['Terminal 1', 'Terminal 2', 'Terminal 3']) {
expect(screen.getByRole('button', { name: `Close ${label}` })).toBeDefined();
}
diff --git a/packages/app/src/components/TerminalTabStrip.tsx b/packages/app/src/components/TerminalTabStrip.tsx
index 36da633b0..f7b87efb7 100644
--- a/packages/app/src/components/TerminalTabStrip.tsx
+++ b/packages/app/src/components/TerminalTabStrip.tsx
@@ -1,8 +1,9 @@
-import { useLingui } from '@lingui/react/macro';
+import { Trans, useLingui } from '@lingui/react/macro';
import { PlusIcon, XIcon } from 'lucide-react';
import type { ReactNode } from 'react';
import { Button } from '@/components/ui/button';
import { Tabs, TabsList, TabsTrigger } from '@/components/ui/tabs';
+import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
import { cn } from '@/lib/utils';
export interface TerminalTabDescriptor {
@@ -42,7 +43,7 @@ export function TerminalTabStrip({
<TabsList
variant="line"
aria-label={t`Terminal sessions`}
- className="flex h-auto min-w-0 flex-1 items-center justify-start gap-0.5 overflow-x-auto bg-transparent p-0 [scrollbar-width:none]"
+ className="flex h-auto min-w-0 flex-1 items-center justify-start gap-0.5 overflow-x-auto bg-transparent p-0 [scrollbar-width:none] scroll-fade-mask-x"
>
{sessions.map((session) => {
const isActive = session.id === activeSessionId;
@@ -50,7 +51,7 @@ export function TerminalTabStrip({
<div
key={session.id}
className={cn(
- 'flex shrink-0 items-center rounded-md pr-0.5 transition-colors',
+ 'group flex shrink-0 items-center rounded-md pr-0.5 transition-colors',
isActive ? 'bg-muted' : 'hover:bg-muted/50',
)}
>
@@ -67,7 +68,10 @@ export function TerminalTabStrip({
size="icon-xs"
aria-label={t`Close ${session.label}`}
tabIndex={isActive ? 0 : -1}
- className="text-muted-foreground hover:text-foreground"
+ className={cn(
+ 'text-muted-foreground opacity-0 transition-opacity hover:text-foreground group-hover:opacity-100 group-focus-within:opacity-100',
+ isActive && 'opacity-100',
+ )}
onClick={(event) => {
event.stopPropagation();
onClose(session.id);
@@ -79,16 +83,23 @@ export function TerminalTabStrip({
);
})}
</TabsList>
- <Button
- type="button"
- variant="ghost"
- size="icon-xs"
- aria-label={t`New Terminal`}
- className="shrink-0 text-muted-foreground hover:text-foreground"
- onClick={onNew}
- >
- <PlusIcon aria-hidden="true" />
- </Button>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Button
+ type="button"
+ variant="ghost"
+ size="icon-xs"
+ aria-label={t`New terminal`}
+ className="shrink-0 text-muted-foreground hover:text-foreground"
+ onClick={onNew}
+ >
+ <PlusIcon aria-hidden="true" />
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent side="bottom" sideOffset={8}>
+ <Trans>New terminal</Trans>
+ </TooltipContent>
+ </Tooltip>
</div>
{children}
</Tabs>
diff --git a/packages/app/src/components/ui/button.tsx b/packages/app/src/components/ui/button.tsx
index ab80780c9..7426f37f5 100644
--- a/packages/app/src/components/ui/button.tsx
+++ b/packages/app/src/components/ui/button.tsx
@@ -29,7 +29,7 @@ const buttonVariants = cva(
lg: 'h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2',
icon: 'size-8',
'icon-xs':
- "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
+ "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3.5",
'icon-sm':
'size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg',
'icon-lg': 'size-9',
diff --git a/packages/app/src/locales/en/messages.json b/packages/app/src/locales/en/messages.json
index efecfd76b..e303b22e1 100644
--- a/packages/app/src/locales/en/messages.json
+++ b/packages/app/src/locales/en/messages.json
@@ -383,6 +383,7 @@
"AAlr5Y": [
"No collab server for this worktree — run <0>ok start</0> here, or reopen the project."
],
+ "AB4qw9": ["New terminal"],
"AE7BY3": ["The terminal session ended."],
"ALhMYW": ["Terminal"],
"AMyJts": [
@@ -1097,7 +1098,6 @@
"). Other files and writers are unaffected."
],
"ZBt4rI": ["Instruction for the AI"],
- "ZBxvV3": ["New Terminal"],
"ZLQol-": ["You can turn this on later in <0>Settings → Sync</0>."],
"ZNK2Tq": ["root"],
"ZQLDTl": ["created folder"],
diff --git a/packages/app/src/locales/en/messages.po b/packages/app/src/locales/en/messages.po
index 4967704a1..f0b6ca975 100644
--- a/packages/app/src/locales/en/messages.po
+++ b/packages/app/src/locales/en/messages.po
@@ -3543,8 +3543,8 @@ msgid "New template"
msgstr "New template"
#: src/components/TerminalTabStrip.tsx
-msgid "New Terminal"
-msgstr "New Terminal"
+msgid "New terminal"
+msgstr "New terminal"
#: src/editor/find-replace/FindReplaceBar.tsx
msgid "Next match"
@@ -4104,7 +4104,7 @@ msgid "Opens in a new tab"
msgstr "Opens in a new tab"
#: src/components/empty-state/CreateView.tsx
-#: src/components/EmptyEditorState.tsx
+#: src/components/PackCardGrid.tsx
msgid "or create a new file <0/>"
msgstr "or create a new file <0/>"
diff --git a/packages/app/src/locales/pseudo/messages.json b/packages/app/src/locales/pseudo/messages.json
index 1ccb6bc83..ca0170788 100644
--- a/packages/app/src/locales/pseudo/messages.json
+++ b/packages/app/src/locales/pseudo/messages.json
@@ -383,6 +383,7 @@
"AAlr5Y": [
"Ńō ćōĺĺàƀ śēŕvēŕ ƒōŕ ţĥĩś ŵōŕķţŕēē — ŕũń <0>ōķ śţàŕţ</0> ĥēŕē, ōŕ ŕēōƥēń ţĥē ƥŕōĴēćţ."
],
+ "AB4qw9": ["Ńēŵ ţēŕḿĩńàĺ"],
"AE7BY3": ["Ţĥē ţēŕḿĩńàĺ śēśśĩōń ēńďēď."],
"ALhMYW": ["Ţēŕḿĩńàĺ"],
"AMyJts": [
@@ -1097,7 +1098,6 @@
"). Ōţĥēŕ ƒĩĺēś àńď ŵŕĩţēŕś àŕē ũńàƒƒēćţēď."
],
"ZBt4rI": ["Ĩńśţŕũćţĩōń ƒōŕ ţĥē ÀĨ"],
- "ZBxvV3": ["Ńēŵ Ţēŕḿĩńàĺ"],
"ZLQol-": ["Ŷōũ ćàń ţũŕń ţĥĩś ōń ĺàţēŕ ĩń <0>Śēţţĩńĝś → Śŷńć</0>."],
"ZNK2Tq": ["ŕōōţ"],
"ZQLDTl": ["ćŕēàţēď ƒōĺďēŕ"],
diff --git a/packages/app/src/locales/pseudo/messages.po b/packages/app/src/locales/pseudo/messages.po
index 461b678cc..9bdcdaa3c 100644
--- a/packages/app/src/locales/pseudo/messages.po
+++ b/packages/app/src/locales/pseudo/messages.po
@@ -3538,7 +3538,7 @@ msgid "New template"
msgstr ""
#: src/components/TerminalTabStrip.tsx
-msgid "New Terminal"
+msgid "New terminal"
msgstr ""
#: src/editor/find-replace/FindReplaceBar.tsx
@@ -4099,7 +4099,7 @@ msgid "Opens in a new tab"
msgstr ""
#: src/components/empty-state/CreateView.tsx
-#: src/components/EmptyEditorState.tsx
+#: src/components/PackCardGrid.tsx
msgid "or create a new file <0/>"
msgstr ""