Skip to content

Beautiful, AI-native markdown IDE and LLM wiki

fix(open-knowledge): keep new-tab header when terminal is open (#2071)

serafin-garciaf5bdedd55636
diff --git a/.changeset/new-tab-terminal-header-consistency.md b/.changeset/new-tab-terminal-header-consistency.md
new file mode 100644
index 000000000..725ebf378
--- /dev/null
+++ b/.changeset/new-tab-terminal-header-consistency.md
@@ -0,0 +1,5 @@
+---
+"@inkeep/open-knowledge-app": patch
+---
+
+Make the new-tab empty state consistent when the docked terminal is open. Opening a terminal from an empty tab used to collapse the whole create surface to just the mascot peering down at the terminal. It now keeps the same left-aligned header as the normal empty state — the blob beside the "Create something great." headline and its subtitle (or the onboarding copy for a brand-new project) — while still omitting the composer and starter-pack list so they don't crowd the terminal below.
diff --git a/packages/app/src/components/EmptyEditorState.tsx b/packages/app/src/components/EmptyEditorState.tsx
index 245589461..c8fdb03ce 100644
--- a/packages/app/src/components/EmptyEditorState.tsx
+++ b/packages/app/src/components/EmptyEditorState.tsx
@@ -5,8 +5,8 @@ import { CopyablePromptList } from '@/components/empty-state/CopyablePromptList'
import { CreatePromptComposer } from '@/components/empty-state/CreatePromptComposer';
import { CreateView } from '@/components/empty-state/CreateView';
import { EmptyStateHeader } from '@/components/empty-state/EmptyStateHeader';
+import { getEmptyStateCopy } from '@/components/empty-state/empty-state-copy';
import { filterVisibleEntries } from '@/components/file-tree-utils';
-import { OkBlob } from '@/components/OkBlob';
import { PackCardGrid } from '@/components/PackCardGrid';
import { SeedDialog } from '@/components/SeedDialog';
import { useIsEmbedded } from '@/hooks/use-is-embedded';
@@ -85,8 +85,10 @@ export function EmptyEditorState({ terminalVisible = false }: { terminalVisible?
if (terminalVisible) {
return (
- <div className="flex min-h-0 flex-1 flex-col items-center justify-end px-6 pb-8 pt-10">
- <OkBlob size={64} gaze="down" />
+ <div className="flex min-h-0 flex-1 flex-col items-center justify-end px-6 sm:px-12 md:px-16 pb-8 pt-10">
+ {messageReady ? (
+ <TerminalEmptyHeader isOnboarding={isOnboarding} celebrateSignal={celebrateSignal} />
+ ) : null}
</div>
);
}
@@ -129,6 +131,23 @@ export function countEntries(
).length;
}
+function TerminalEmptyHeader({
+ isOnboarding,
+ celebrateSignal,
+}: {
+ isOnboarding: boolean;
+ celebrateSignal: number;
+}) {
+ const { t } = useLingui();
+ const isEmbedded = useIsEmbedded();
+ const { title, subtitle } = getEmptyStateCopy({ isOnboarding, isEmbedded });
+ return (
+ <div className="w-full max-w-5xl">
+ <EmptyStateHeader title={t(title)} subtitle={t(subtitle)} celebrateSignal={celebrateSignal} />
+ </div>
+ );
+}
+
function OnboardingView({
celebrateSignal,
onPackSelect,
@@ -138,17 +157,10 @@ function OnboardingView({
}) {
const { t } = useLingui();
const isEmbedded = useIsEmbedded();
+ const { title, subtitle } = getEmptyStateCopy({ isOnboarding: true, isEmbedded });
return (
<div className="flex w-full flex-col gap-10 py-12 max-w-5xl my-auto">
- <EmptyStateHeader
- title={t`What would you like to create?`}
- subtitle={
- isEmbedded
- ? t`Copy a prompt and paste it into your agent to set up your project.`
- : t`Describe what you're working on and the agent sets it up for you.`
- }
- celebrateSignal={celebrateSignal}
- />
+ <EmptyStateHeader title={t(title)} subtitle={t(subtitle)} celebrateSignal={celebrateSignal} />
{/* AI surface up top — the primary path. Non-embedded: compose a brief and
hand off to a coding agent. Embedded (OK inside Cursor/Codex/Claude):
show the same starter prompts as copy-to-paste rows, since the launch
diff --git a/packages/app/src/components/OkBlob.tsx b/packages/app/src/components/OkBlob.tsx
index 0aed1ce8f..a8663d13d 100644
--- a/packages/app/src/components/OkBlob.tsx
+++ b/packages/app/src/components/OkBlob.tsx
@@ -15,10 +15,6 @@ interface OkBlobProps {
trackMouse?: boolean;
variant?: 'default' | 'sleeping';
celebrateSignal?: number;
- /** Fixed gaze direction. `'down'` holds a "peering down" pose (head tilts
- * forward, eyes drop) instead of tracking the cursor — used when the mascot
- * sits above the docked terminal on the empty state. */
- gaze?: 'cursor' | 'down';
}
const MAX_EYE_OFFSET = 1.8;
@@ -88,7 +84,6 @@ export function OkBlob({
trackMouse = true,
variant = 'default',
celebrateSignal = 0,
- gaze = 'cursor',
}: OkBlobProps) {
const wrapperRef = useRef<HTMLSpanElement>(null);
const svgRef = useRef<SVGSVGElement>(null);
@@ -137,7 +132,6 @@ export function OkBlob({
useEffect(() => {
if (!trackMouse || isSleeping) return;
- const gazeDown = gaze === 'down';
const mq = window.matchMedia('(prefers-reduced-motion: reduce)');
if (mq.matches) return;
@@ -183,24 +177,16 @@ export function OkBlob({
const dy = mouseY - centerY;
const dist = Math.hypot(dx, dy);
- let targetRotX: number;
- let targetRotY: number;
+ const normX = Math.max(-1, Math.min(1, dx / HEAD_DIST_SCALE));
+ const normY = Math.max(-1, Math.min(1, dy / HEAD_DIST_SCALE));
+ const targetRotX = -normY * MAX_HEAD_ROTATION;
+ const targetRotY = normX * MAX_HEAD_ROTATION;
let targetEyeX = 0;
let targetEyeY = 0;
- if (gazeDown) {
- targetRotY = 0;
- targetRotX = -MAX_HEAD_ROTATION * 0.8;
- targetEyeY = MAX_EYE_OFFSET;
- } else {
- const normX = Math.max(-1, Math.min(1, dx / HEAD_DIST_SCALE));
- const normY = Math.max(-1, Math.min(1, dy / HEAD_DIST_SCALE));
- targetRotY = normX * MAX_HEAD_ROTATION;
- targetRotX = -normY * MAX_HEAD_ROTATION;
- if (dist >= 1) {
- const scale = Math.min(dist / EYE_DIST_SCALE, 1) * MAX_EYE_OFFSET;
- targetEyeX = (dx / dist) * scale;
- targetEyeY = (dy / dist) * scale;
- }
+ if (dist >= 1) {
+ const scale = Math.min(dist / EYE_DIST_SCALE, 1) * MAX_EYE_OFFSET;
+ targetEyeX = (dx / dist) * scale;
+ targetEyeY = (dy / dist) * scale;
}
const settled =
@@ -239,7 +225,7 @@ export function OkBlob({
eyeOffsetRef.current = { x: 0, y: 0 };
eyesGroupRef.current?.removeAttribute('transform');
};
- }, [trackMouse, isSleeping, gaze]);
+ }, [trackMouse, isSleeping]);
useLayoutEffect(() => {
const g = eyesGroupRef.current;
diff --git a/packages/app/src/components/empty-state/CreateView.tsx b/packages/app/src/components/empty-state/CreateView.tsx
index c05c8f8a3..3ec308cac 100644
--- a/packages/app/src/components/empty-state/CreateView.tsx
+++ b/packages/app/src/components/empty-state/CreateView.tsx
@@ -4,6 +4,7 @@ import { ArrowRightIcon, Plus } from 'lucide-react';
import { CopyablePromptList } from '@/components/empty-state/CopyablePromptList';
import { CreatePromptComposer } from '@/components/empty-state/CreatePromptComposer';
import { EmptyStateHeader } from '@/components/empty-state/EmptyStateHeader';
+import { getEmptyStateCopy } from '@/components/empty-state/empty-state-copy';
import { Badge } from '@/components/ui/badge';
import { Button } from '@/components/ui/button';
import { useAllTemplates } from '@/hooks/use-folder-config';
@@ -18,6 +19,7 @@ interface CreateViewProps {
export function CreateView({ celebrateSignal, onAddStarterPack }: CreateViewProps) {
const { t } = useLingui();
const isEmbedded = useIsEmbedded();
+ const { title, subtitle } = getEmptyStateCopy({ isOnboarding: false, isEmbedded });
const templatesState = useAllTemplates();
const initialDir = '';
@@ -27,15 +29,7 @@ export function CreateView({ celebrateSignal, onAddStarterPack }: CreateViewProp
return (
<div className="flex w-full flex-col gap-8 py-12 max-w-5xl my-auto">
- <EmptyStateHeader
- title={t`Create something great.`}
- subtitle={
- isEmbedded
- ? t`Copy a prompt for your agent, start a blank file, or scaffold from a template.`
- : t`Describe what you want to build, start a blank file, or scaffold from a template.`
- }
- celebrateSignal={celebrateSignal}
- />
+ <EmptyStateHeader title={t(title)} subtitle={t(subtitle)} celebrateSignal={celebrateSignal} />
{/* AI surface up top — the primary path. Non-embedded: compose a brief and
hand off to a coding agent. Embedded (OK inside Cursor/Codex/Claude):
diff --git a/packages/app/src/components/empty-state/empty-state-copy.ts b/packages/app/src/components/empty-state/empty-state-copy.ts
new file mode 100644
index 000000000..f16bd9d04
--- /dev/null
+++ b/packages/app/src/components/empty-state/empty-state-copy.ts
@@ -0,0 +1,25 @@
+import type { MessageDescriptor } from '@lingui/core';
+import { msg } from '@lingui/core/macro';
+
+export function getEmptyStateCopy({
+ isOnboarding,
+ isEmbedded,
+}: {
+ isOnboarding: boolean;
+ isEmbedded: boolean;
+}): { title: MessageDescriptor; subtitle: MessageDescriptor } {
+ if (isOnboarding) {
+ return {
+ title: msg`What would you like to create?`,
+ subtitle: isEmbedded
+ ? msg`Copy a prompt and paste it into your agent to set up your project.`
+ : msg`Describe what you're working on and the agent sets it up for you.`,
+ };
+ }
+ return {
+ title: msg`Create something great.`,
+ subtitle: isEmbedded
+ ? msg`Copy a prompt for your agent, start a blank file, or scaffold from a template.`
+ : msg`Describe what you want to build, start a blank file, or scaffold from a template.`,
+ };
+}
diff --git a/packages/app/src/locales/en/messages.po b/packages/app/src/locales/en/messages.po
index 8b2f4a861..61b11204a 100644
--- a/packages/app/src/locales/en/messages.po
+++ b/packages/app/src/locales/en/messages.po
@@ -1358,11 +1358,11 @@ msgstr "Copy"
msgid "Copy {0} prompt"
msgstr "Copy {0} prompt"
-#: src/components/EmptyEditorState.tsx
+#: src/components/empty-state/empty-state-copy.ts
msgid "Copy a prompt and paste it into your agent to set up your project."
msgstr "Copy a prompt and paste it into your agent to set up your project."
-#: src/components/empty-state/CreateView.tsx
+#: src/components/empty-state/empty-state-copy.ts
msgid "Copy a prompt for your agent, start a blank file, or scaffold from a template."
msgstr "Copy a prompt for your agent, start a blank file, or scaffold from a template."
@@ -1680,7 +1680,7 @@ msgstr "Create new tag #{tagValue}"
msgid "Create page"
msgstr "Create page"
-#: src/components/empty-state/CreateView.tsx
+#: src/components/empty-state/empty-state-copy.ts
msgid "Create something great."
msgstr "Create something great."
@@ -1815,11 +1815,11 @@ msgstr "Deleting"
msgid "Describe the project you want to create"
msgstr "Describe the project you want to create"
-#: src/components/empty-state/CreateView.tsx
+#: src/components/empty-state/empty-state-copy.ts
msgid "Describe what you want to build, start a blank file, or scaffold from a template."
msgstr "Describe what you want to build, start a blank file, or scaffold from a template."
-#: src/components/EmptyEditorState.tsx
+#: src/components/empty-state/empty-state-copy.ts
msgid "Describe what you're working on and the agent sets it up for you."
msgstr "Describe what you're working on and the agent sets it up for you."
@@ -6233,7 +6233,7 @@ msgstr "What is this knowledge base for?"
msgid "What should the AI do? (optional)"
msgstr "What should the AI do? (optional)"
-#: src/components/EmptyEditorState.tsx
+#: src/components/empty-state/empty-state-copy.ts
msgid "What would you like to create?"
msgstr "What would you like to create?"
diff --git a/packages/app/src/locales/pseudo/messages.po b/packages/app/src/locales/pseudo/messages.po
index b36561316..bae0d5dfe 100644
--- a/packages/app/src/locales/pseudo/messages.po
+++ b/packages/app/src/locales/pseudo/messages.po
@@ -1353,11 +1353,11 @@ msgstr ""
msgid "Copy {0} prompt"
msgstr ""
-#: src/components/EmptyEditorState.tsx
+#: src/components/empty-state/empty-state-copy.ts
msgid "Copy a prompt and paste it into your agent to set up your project."
msgstr ""
-#: src/components/empty-state/CreateView.tsx
+#: src/components/empty-state/empty-state-copy.ts
msgid "Copy a prompt for your agent, start a blank file, or scaffold from a template."
msgstr ""
@@ -1675,7 +1675,7 @@ msgstr ""
msgid "Create page"
msgstr ""
-#: src/components/empty-state/CreateView.tsx
+#: src/components/empty-state/empty-state-copy.ts
msgid "Create something great."
msgstr ""
@@ -1810,11 +1810,11 @@ msgstr ""
msgid "Describe the project you want to create"
msgstr ""
-#: src/components/empty-state/CreateView.tsx
+#: src/components/empty-state/empty-state-copy.ts
msgid "Describe what you want to build, start a blank file, or scaffold from a template."
msgstr ""
-#: src/components/EmptyEditorState.tsx
+#: src/components/empty-state/empty-state-copy.ts
msgid "Describe what you're working on and the agent sets it up for you."
msgstr ""
@@ -6228,7 +6228,7 @@ msgstr ""
msgid "What should the AI do? (optional)"
msgstr ""
-#: src/components/EmptyEditorState.tsx
+#: src/components/empty-state/empty-state-copy.ts
msgid "What would you like to create?"
msgstr ""