Beautiful, AI-native markdown IDE and LLM wiki
TypeScript 2nd-brainagent-skillsclaudecodexcompany-braindocsknowledge-knowledge-baseknowledge-managementllmllm-wikillm-wiki-karpathymarkdownmarkdown-editormdmdxnotespkmsecond-brainskills
fix: fit pack and UI card descriptions to ~2 lines (#2232)
Nick Gomezabd749a3388a
diff --git a/.changeset/fit-card-descriptions.md b/.changeset/fit-card-descriptions.mdnew file mode 100644index 000000000..e1bf19e9d--- /dev/null+++ b/.changeset/fit-card-descriptions.md@@ -0,0 +1,5 @@+---+"@inkeep/open-knowledge": patch+---++Stop starter-pack and other card descriptions from overflowing their cards. The "Codebase wiki" starter pack and the slash-command MirrorSource / Mirror block previews had descriptions long enough to wrap to many lines and stretch their cards; those are now concise. The description text on the starter-pack picker, the slash-command block preview, the Navigator project-launcher cards, and the share-receive dialog is now line-clamped, so any long description truncates cleanly instead of distorting the layout.diff --git a/packages/app/src/components/NavigatorApp.tsx b/packages/app/src/components/NavigatorApp.tsxindex d16257137..40376673c 100644--- a/packages/app/src/components/NavigatorApp.tsx+++ b/packages/app/src/components/NavigatorApp.tsx@@ -356,7 +356,7 @@ function NavigatorCard({ title, description, onClick, dataTestId, Icon }: Naviga{Icon ? <Icon className="size-4 shrink-0 text-muted-foreground" /> : null}<span className="font-medium text-gray-700 dark:text-foreground text-sm">{title}</span></div>- <span className="text-muted-foreground text-xs leading-snug">{description}</span>+ <span className="line-clamp-2 text-muted-foreground text-xs leading-snug">{description}</span></Button>);}diff --git a/packages/app/src/components/PackCardGrid.tsx b/packages/app/src/components/PackCardGrid.tsxindex 912300720..064afc42f 100644--- a/packages/app/src/components/PackCardGrid.tsx+++ b/packages/app/src/components/PackCardGrid.tsx@@ -161,7 +161,9 @@ function PackCard({ pack, onSelect }: PackCardProps) {<h3 className="text-sm font-medium leading-tight">{pack.name}</h3></div>- <p className="text-1sm leading-relaxed text-muted-foreground">{pack.description}</p>+ <p className="line-clamp-2 text-1sm leading-relaxed text-muted-foreground">+ {pack.description}+ </p></div></button>);diff --git a/packages/app/src/components/ShareReceiveDialog.tsx b/packages/app/src/components/ShareReceiveDialog.tsxindex 33ba89ebf..4329f4754 100644--- a/packages/app/src/components/ShareReceiveDialog.tsx+++ b/packages/app/src/components/ShareReceiveDialog.tsx@@ -497,8 +497,6 @@ function ShareReceiveDialogInner({const cloneEnabled = cloneController !== undefined && !cloneRunning;const cloneLabel = cloneRunning ? t`Cloning...` : t`Clone to a new folder`;- const shareOwner = share.owner;- const shareRepo = share.repo;const lookingForUrl = canonicalGitHubRemoteUrl(expected);const signedInLogin = authStatus?.authenticated ? authStatus.login : undefined;const cloneErrorMessage = cloneError?.detail ? formatCloneErrorMessage(cloneError.detail) : '';@@ -605,10 +603,8 @@ function ShareReceiveDialogInner({aria-disabled={cloneController !== undefined && !cloneEnabled}><span className="text-sm font-semibold">{cloneLabel}</span>- <span className="text-1sm text-muted-foreground">- <Trans>- Downloads {shareOwner}/{shareRepo} from GitHub.- </Trans>+ <span className="line-clamp-2 text-1sm text-muted-foreground">+ <Trans>Downloads a fresh copy from GitHub.</Trans></span></button><button@@ -623,7 +619,7 @@ function ShareReceiveDialogInner({<span className="text-sm font-semibold"><Trans>I already have it locally →</Trans></span>- <span className="text-1sm text-muted-foreground">+ <span className="line-clamp-2 text-1sm text-muted-foreground"><Trans>Pick the folder where you've cloned it.</Trans></span></button>diff --git a/packages/app/src/editor/slash-command/SlashCommandMenu.tsx b/packages/app/src/editor/slash-command/SlashCommandMenu.tsxindex 2efb5504b..1a8af7881 100644--- a/packages/app/src/editor/slash-command/SlashCommandMenu.tsx+++ b/packages/app/src/editor/slash-command/SlashCommandMenu.tsx@@ -146,7 +146,7 @@ export function SlashCommandMenu({<div className="mb-2 flex aspect-5/3 items-center justify-center overflow-hidden rounded-md bg-muted/40 p-3 *:max-h-full *:max-w-full [&_img]:size-full [&_img]:rounded-md [&_img]:object-contain">{selectedItem.preview.render()}</div>- <p className="px-1 pb-1 text-xs text-muted-foreground">+ <p className="line-clamp-3 px-1 pb-1 text-xs text-muted-foreground">{selectedItem.preview.description}</p></>diff --git a/packages/app/src/editor/slash-command/component-items.test.ts b/packages/app/src/editor/slash-command/component-items.test.tsindex 25bd0963d..8945dbf69 100644--- a/packages/app/src/editor/slash-command/component-items.test.ts+++ b/packages/app/src/editor/slash-command/component-items.test.ts@@ -65,6 +65,18 @@ describe('getComponentItems (slash menu)', () => {expect(items.some((i) => i.name === `component-${compatName}`)).toBe(false);}});++ test('every component preview description fits the slash aside 3-line budget (<= 120 chars)', () => {+ const MAX_PREVIEW_DESCRIPTION_LENGTH = 120;+ const descriptions = getComponentItems()+ .map((i) => i.preview?.description)+ .filter((d): d is string => typeof d === 'string');+ expect(descriptions.length).toBeGreaterThan(0);+ const tooLong = descriptions+ .filter((d) => d.length > MAX_PREVIEW_DESCRIPTION_LENGTH)+ .map((d) => `${d.length} chars: ${d.slice(0, 50)}`);+ expect(tooLong).toEqual([]);+ });});describe('createChildNode — default props on slash insert', () => {diff --git a/packages/app/src/editor/slash-command/component-items.tsx b/packages/app/src/editor/slash-command/component-items.tsxindex f30125b7c..37307f3ea 100644--- a/packages/app/src/editor/slash-command/component-items.tsx+++ b/packages/app/src/editor/slash-command/component-items.tsx@@ -220,7 +220,7 @@ const PREVIEW_CONFIG: Record<string, PreviewConfig> = {),},Mirror: {- description: msg`Read-only copy of a MirrorSource block from another doc. Edit at the source — every Mirror reflects the change live.`,+ description: msg`Read-only copy of a MirrorSource block from another doc. Edit at the source and it updates live.`,render: () => (<div className="space-y-1.5"><div className="relative rounded-md border border-dashed border-border/40 px-2 py-1.5">@@ -242,7 +242,7 @@ const PREVIEW_CONFIG: Record<string, PreviewConfig> = {),},MirrorSource: {- description: msg`Mark a block as the source of truth. Mirror references elsewhere render this content read-only and update live as you edit here.`,+ description: msg`Mark a block as the source of truth. Mirrors elsewhere update live as you edit it.`,render: () => (<div className="space-y-1.5"><div className="relative rounded-md border border-dashed border-border/50 px-2 py-1.5">diff --git a/packages/app/src/locales/en/messages.json b/packages/app/src/locales/en/messages.jsonindex 07c7e58fc..51758f920 100644--- a/packages/app/src/locales/en/messages.json+++ b/packages/app/src/locales/en/messages.json@@ -10,9 +10,6 @@"-3ois8": ["Hard break"],"-8PP0T": ["Match case"],"-K0AvT": ["Disconnect"],- "-KCZ6n": [- "Mark a block as the source of truth. Mirror references elsewhere render this content read-only and update live as you edit here."- ],"-LHLx7": ["edited template"],"-QCLWk": ["Templates available"],"-Qw-1t": ["GitHub authentication failed. Try signing in again."],@@ -348,9 +345,6 @@"8PmoQF": ["Open the insert menu in an empty or active text position."],"8RtNI0": ["Failed to load documents"],"8S1E33": ["Search recent projects..."],- "8TLE9g": [- "Read-only copy of a MirrorSource block from another doc. Edit at the source — every Mirror reflects the change live."- ],"8XQRON": ["Loading repositories"],"8_brI5": ["Name is required"],"8cS0nH": ["Config sharing unavailable: ", ["0"], "."],@@ -1274,6 +1268,9 @@"_TF8ep": ["Failed to render PDF"],"_VRtd7": ["Couldn't send the selection — please try again."],"_W-elG": ["(inline)"],+ "_WPP7e": [+ "Read-only copy of a MirrorSource block from another doc. Edit at the source and it updates live."+ ],"_XWY2J": ["Terminal disabled"],"_bth6g": ["Claude Code is installed, but OpenKnowledge tools aren't connected to it yet."],"_eguJc": ["Uploading"],@@ -1415,6 +1412,9 @@"el312q": ["Install skills into"],"emgiet": ["Authoritative content; mirrored verbatim everywhere it's referenced."],"eneWvv": ["Draft"],+ "epuNYK": [+ "Mark a block as the source of truth. Mirrors elsewhere update live as you edit it."+ ],"euc6Ns": ["Duplicate"],"evs0iw": ["Tags matching \"", ["tagListQuery"], "\""],"f1XQyZ": ["Move block"],@@ -1437,6 +1437,7 @@"fbsiBw": ["Something went wrong starting the terminal."],"fcgvCA": ["Claude"],"fiMNLl": ["Sync settings not yet loaded — try again in a moment"],+ "fj5YiP": ["Downloads a fresh copy from GitHub."],"fo0VXg": ["Uninstall"],"fqSfXY": ["Replace"],"fwhX-N": ["Indent or outdent source"],@@ -1555,7 +1556,6 @@"jBVUXo": ["Couldn't open the terminal — please try again."],"jEZ6Lf": ["provisional"],"jEdF24": ["Missing page: ", ["linkTitle"], ". Click to create."],- "jGJy-9": ["Downloads ", ["shareOwner"], "/", ["shareRepo"], " from GitHub."],"jKd3AP": ["Could not enable the terminal: ", ["0"]],"jPUPvG": ["Couldn't resolve the conflict for ", ["filePath"], "."],"jRHdCz": ["Failed to load PDF"],diff --git a/packages/app/src/locales/en/messages.po b/packages/app/src/locales/en/messages.poindex f0a213a07..1a2f81351 100644--- a/packages/app/src/locales/en/messages.po+++ b/packages/app/src/locales/en/messages.po@@ -2169,8 +2169,8 @@ msgid "Download started"msgstr "Download started"#: src/components/ShareReceiveDialog.tsx-msgid "Downloads {shareOwner}/{shareRepo} from GitHub."-msgstr "Downloads {shareOwner}/{shareRepo} from GitHub."+msgid "Downloads a fresh copy from GitHub."+msgstr "Downloads a fresh copy from GitHub."#: src/components/SkillEditorActions.tsx#: src/components/SkillStateBadge.tsx@@ -3572,8 +3572,8 @@ msgid "Map the architecture"msgstr "Map the architecture"#: src/editor/slash-command/component-items.tsx-msgid "Mark a block as the source of truth. Mirror references elsewhere render this content read-only and update live as you edit here."-msgstr "Mark a block as the source of truth. Mirror references elsewhere render this content read-only and update live as you edit here."+msgid "Mark a block as the source of truth. Mirrors elsewhere update live as you edit it."+msgstr "Mark a block as the source of truth. Mirrors elsewhere update live as you edit it."#: src/components/EditorModeToggle.tsxmsgid "Markdown"@@ -4837,8 +4837,8 @@ msgid "Read through this codebase and draft a technical spec for the most complemsgstr "Read through this codebase and draft a technical spec for the most complex module: an overview, the architecture, key files, and open questions, all linked from a specs index page."#: src/editor/slash-command/component-items.tsx-msgid "Read-only copy of a MirrorSource block from another doc. Edit at the source — every Mirror reflects the change live."-msgstr "Read-only copy of a MirrorSource block from another doc. Edit at the source — every Mirror reflects the change live."+msgid "Read-only copy of a MirrorSource block from another doc. Edit at the source and it updates live."+msgstr "Read-only copy of a MirrorSource block from another doc. Edit at the source and it updates live."#: src/components/TrashFailureModal.tsxmsgid "Reason: {reason}"diff --git a/packages/app/src/locales/pseudo/messages.json b/packages/app/src/locales/pseudo/messages.jsonindex f3e593925..9539593bb 100644--- a/packages/app/src/locales/pseudo/messages.json+++ b/packages/app/src/locales/pseudo/messages.json@@ -10,9 +10,6 @@"-3ois8": ["Ĥàŕď ƀŕēàķ"],"-8PP0T": ["Ḿàţćĥ ćàśē"],"-K0AvT": ["Ďĩśćōńńēćţ"],- "-KCZ6n": [- "Ḿàŕķ à ƀĺōćķ àś ţĥē śōũŕćē ōƒ ţŕũţĥ. Ḿĩŕŕōŕ ŕēƒēŕēńćēś ēĺśēŵĥēŕē ŕēńďēŕ ţĥĩś ćōńţēńţ ŕēàď-ōńĺŷ àńď ũƥďàţē ĺĩvē àś ŷōũ ēďĩţ ĥēŕē."- ],"-LHLx7": ["ēďĩţēď ţēḿƥĺàţē"],"-QCLWk": ["Ţēḿƥĺàţēś àvàĩĺàƀĺē"],"-Qw-1t": ["ĜĩţĤũƀ àũţĥēńţĩćàţĩōń ƒàĩĺēď. Ţŕŷ śĩĝńĩńĝ ĩń àĝàĩń."],@@ -348,9 +345,6 @@"8PmoQF": ["Ōƥēń ţĥē ĩńśēŕţ ḿēńũ ĩń àń ēḿƥţŷ ōŕ àćţĩvē ţēxţ ƥōśĩţĩōń."],"8RtNI0": ["Ƒàĩĺēď ţō ĺōàď ďōćũḿēńţś"],"8S1E33": ["Śēàŕćĥ ŕēćēńţ ƥŕōĴēćţś..."],- "8TLE9g": [- "Ŕēàď-ōńĺŷ ćōƥŷ ōƒ à ḾĩŕŕōŕŚōũŕćē ƀĺōćķ ƒŕōḿ àńōţĥēŕ ďōć. Ēďĩţ àţ ţĥē śōũŕćē — ēvēŕŷ Ḿĩŕŕōŕ ŕēƒĺēćţś ţĥē ćĥàńĝē ĺĩvē."- ],"8XQRON": ["Ĺōàďĩńĝ ŕēƥōśĩţōŕĩēś"],"8_brI5": ["Ńàḿē ĩś ŕēǫũĩŕēď"],"8cS0nH": ["Ćōńƒĩĝ śĥàŕĩńĝ ũńàvàĩĺàƀĺē: ", ["0"], "."],@@ -1274,6 +1268,9 @@"_TF8ep": ["Ƒàĩĺēď ţō ŕēńďēŕ ƤĎƑ"],"_VRtd7": ["Ćōũĺďń'ţ śēńď ţĥē śēĺēćţĩōń — ƥĺēàśē ţŕŷ àĝàĩń."],"_W-elG": ["(ĩńĺĩńē)"],+ "_WPP7e": [+ "Ŕēàď-ōńĺŷ ćōƥŷ ōƒ à ḾĩŕŕōŕŚōũŕćē ƀĺōćķ ƒŕōḿ àńōţĥēŕ ďōć. Ēďĩţ àţ ţĥē śōũŕćē àńď ĩţ ũƥďàţēś ĺĩvē."+ ],"_XWY2J": ["Ţēŕḿĩńàĺ ďĩśàƀĺēď"],"_bth6g": ["Ćĺàũďē Ćōďē ĩś ĩńśţàĺĺēď, ƀũţ ŌƥēńĶńōŵĺēďĝē ţōōĺś àŕēń'ţ ćōńńēćţēď ţō ĩţ ŷēţ."],"_eguJc": ["Ũƥĺōàďĩńĝ"],@@ -1415,6 +1412,9 @@"el312q": ["Ĩńśţàĺĺ śķĩĺĺś ĩńţō"],"emgiet": ["Àũţĥōŕĩţàţĩvē ćōńţēńţ; ḿĩŕŕōŕēď vēŕƀàţĩḿ ēvēŕŷŵĥēŕē ĩţ'ś ŕēƒēŕēńćēď."],"eneWvv": ["Ďŕàƒţ"],+ "epuNYK": [+ "Ḿàŕķ à ƀĺōćķ àś ţĥē śōũŕćē ōƒ ţŕũţĥ. Ḿĩŕŕōŕś ēĺśēŵĥēŕē ũƥďàţē ĺĩvē àś ŷōũ ēďĩţ ĩţ."+ ],"euc6Ns": ["Ďũƥĺĩćàţē"],"evs0iw": ["Ţàĝś ḿàţćĥĩńĝ \"", ["tagListQuery"], "\""],"f1XQyZ": ["Ḿōvē ƀĺōćķ"],@@ -1437,6 +1437,7 @@"fbsiBw": ["Śōḿēţĥĩńĝ ŵēńţ ŵŕōńĝ śţàŕţĩńĝ ţĥē ţēŕḿĩńàĺ."],"fcgvCA": ["Ćĺàũďē"],"fiMNLl": ["Śŷńć śēţţĩńĝś ńōţ ŷēţ ĺōàďēď — ţŕŷ àĝàĩń ĩń à ḿōḿēńţ"],+ "fj5YiP": ["Ďōŵńĺōàďś à ƒŕēśĥ ćōƥŷ ƒŕōḿ ĜĩţĤũƀ."],"fo0VXg": ["Ũńĩńśţàĺĺ"],"fqSfXY": ["Ŕēƥĺàćē"],"fwhX-N": ["Ĩńďēńţ ōŕ ōũţďēńţ śōũŕćē"],@@ -1555,7 +1556,6 @@"jBVUXo": ["Ćōũĺďń'ţ ōƥēń ţĥē ţēŕḿĩńàĺ — ƥĺēàśē ţŕŷ àĝàĩń."],"jEZ6Lf": ["ƥŕōvĩśĩōńàĺ"],"jEdF24": ["Ḿĩśśĩńĝ ƥàĝē: ", ["linkTitle"], ". Ćĺĩćķ ţō ćŕēàţē."],- "jGJy-9": ["Ďōŵńĺōàďś ", ["shareOwner"], "/", ["shareRepo"], " ƒŕōḿ ĜĩţĤũƀ."],"jKd3AP": ["Ćōũĺď ńōţ ēńàƀĺē ţĥē ţēŕḿĩńàĺ: ", ["0"]],"jPUPvG": ["Ćōũĺďń'ţ ŕēśōĺvē ţĥē ćōńƒĺĩćţ ƒōŕ ", ["filePath"], "."],"jRHdCz": ["Ƒàĩĺēď ţō ĺōàď ƤĎƑ"],diff --git a/packages/app/src/locales/pseudo/messages.po b/packages/app/src/locales/pseudo/messages.poindex 2a4014051..16568788b 100644--- a/packages/app/src/locales/pseudo/messages.po+++ b/packages/app/src/locales/pseudo/messages.po@@ -2164,7 +2164,7 @@ msgid "Download started"msgstr ""#: src/components/ShareReceiveDialog.tsx-msgid "Downloads {shareOwner}/{shareRepo} from GitHub."+msgid "Downloads a fresh copy from GitHub."msgstr ""#: src/components/SkillEditorActions.tsx@@ -3567,7 +3567,7 @@ msgid "Map the architecture"msgstr ""#: src/editor/slash-command/component-items.tsx-msgid "Mark a block as the source of truth. Mirror references elsewhere render this content read-only and update live as you edit here."+msgid "Mark a block as the source of truth. Mirrors elsewhere update live as you edit it."msgstr ""#: src/components/EditorModeToggle.tsx@@ -4832,7 +4832,7 @@ msgid "Read through this codebase and draft a technical spec for the most complemsgstr ""#: src/editor/slash-command/component-items.tsx-msgid "Read-only copy of a MirrorSource block from another doc. Edit at the source — every Mirror reflects the change live."+msgid "Read-only copy of a MirrorSource block from another doc. Edit at the source and it updates live."msgstr ""#: src/components/TrashFailureModal.tsxdiff --git a/packages/server/src/seed/starter.test.ts b/packages/server/src/seed/starter.test.tsindex e46cca8fe..842944d4b 100644--- a/packages/server/src/seed/starter.test.ts+++ b/packages/server/src/seed/starter.test.ts@@ -168,6 +168,14 @@ describe('STARTER_PACKS — all packs structural validation', () => {}});+ const MAX_PACK_DESCRIPTION_LENGTH = 64;+ test(`every pack description fits the picker card's 2-line budget (<= ${MAX_PACK_DESCRIPTION_LENGTH} chars)`, () => {+ const tooLong = Object.values(STARTER_PACKS)+ .filter((pack) => pack.description.length > MAX_PACK_DESCRIPTION_LENGTH)+ .map((pack) => `${pack.id} (${pack.description.length} chars)`);+ expect(tooLong).toEqual([]);+ });+test('every folder starterTemplate + extraTemplates resolves to a body in pack.templates', () => {for (const pack of Object.values(STARTER_PACKS)) {for (const folder of pack.folders) {diff --git a/packages/server/src/seed/starter.ts b/packages/server/src/seed/starter.tsindex ea92b4b6c..675419d7e 100644--- a/packages/server/src/seed/starter.ts+++ b/packages/server/src/seed/starter.ts@@ -1390,7 +1390,7 @@ export const STARTER_PACKS: Readonly<Record<PackId, StarterPack>> = {'codebase-wiki': {id: 'codebase-wiki',name: 'Codebase wiki',- description: 'Architecture, modules, and flows.',+ description: 'A wiki to help navigate your codebase.',defaultSubfolder: undefined,folders: CODEBASE_WIKI_FOLDERS,templates: CODEBASE_WIKI_TEMPLATES,