Skip to content

Beautiful, AI-native markdown IDE and LLM wiki

fix(ok): draw every dialog footer button in one typeface (#4068)

sarah5ec84b83a835
diff --git a/.changeset/dialog-footer-button-typography.md b/.changeset/dialog-footer-button-typography.md
new file mode 100644
index 000000000..9e4af08e5
--- /dev/null
+++ b/.changeset/dialog-footer-button-typography.md
@@ -0,0 +1,7 @@
+---
+'@inkeep/open-knowledge': patch
+---
+
+Dialog buttons no longer mix typefaces. About half the dialogs in the app drew their dismiss button in the regular UI face while the confirm button beside it was monospace and uppercase, so a single row of buttons read as two different type systems. Every dialog footer now draws its buttons the same way, whichever button it is.
+
+Nothing moves and no wording changes. The dialogs that already looked right are untouched; the ones that did not now match them.
diff --git a/biome-plugins/README.md b/biome-plugins/README.md
index 95ac11a36..6231e0a48 100644
--- a/biome-plugins/README.md
+++ b/biome-plugins/README.md
@@ -358,7 +358,25 @@ Plugin: [`biome-plugins/no-raw-route-hash-construction.grit`](no-raw-route-hash-
Dialog-footer emphasis hierarchy. A confirmation dialog's footer holds two actions, and the confirm has to outrank the dismiss. `secondary` is the one Button variant that draws no border and whose fill is imperceptible: `bg-secondary` sits within roughly 1.1:1 of the dialog surface in both light and dark, so the button reads as flat text rather than an action. Every other variant either fills with a contrasting color or draws a border, so `secondary` is the only one that can lose that contest with the `outline` Cancel standing beside it. A footer authored that way inverts the hierarchy: the escape action reads as the primary one, and the actual primary CTA reads as de-emphasized text. The rule flags a `DialogFooter` or `AlertDialogFooter` containing `variant="secondary"` and asks for `default` (or `destructive`, when the action is irreversible removal).
-**The typographic treatment comes with the variant.** `default` and `destructive` bake `font-mono uppercase` into their variant strings, and `DialogClose` hardcodes the same pair, so a footer gets its look from the design system rather than from hand-added classes. The two sites this rule was written against had reached for `variant="secondary"` plus a hand-added `className="font-mono uppercase"`, which recovered the footer's typography while leaving the confirm without a perceptible fill. That is what makes the inversion easy to author by accident: the footer still looks like a footer. The canonical shape omits the prop entirely and lets `defaultVariants` supply `default`, matching every other confirm dialog in the tree.
+**The typographic treatment comes from the footer, not the variant.** `DialogFooter` and `AlertDialogFooter` carry `[&_button]:` and `[&_[data-slot=button]]:` pairs of `font-mono uppercase`, so every footer action is drawn in the footer's typeface whatever variant it takes. Nothing needs hand-adding at a call site, and a `className="font-mono uppercase"` on a footer button is redundant rather than load-bearing. `default`, `destructive` and `outline-mono` also bake the pair into their variant strings — that is what dresses them outside a footer, so do not delete it on the strength of this paragraph.
+
+**Why two selectors rather than one.** Neither predicate covers every footer shape on its own, so the rule is their union:
+
+| Footer action | `button` element | `[data-slot=button]` |
+| --- | --- | --- |
+| plain `<Button>` | yes | yes |
+| `<Button asChild>` rendering an `<a>` | no | yes |
+| `AlertDialogCancel` / `AlertDialogAction` | yes | no |
+| `DialogClose asChild` wrapping a `Button` | yes | no |
+
+Radix's `Slot` lets the child's `data-slot` win, so the three wrapper primitives stamp their own slot name and fall out of a slot-only selector; `<Button asChild>` rendering an anchor is not a `<button>` element and falls out of a tag-only one. Keying on both covers all five. Keep the descendant combinator: `ShareBranchSwitchDialog` wraps three footer buttons in a `<div>`, which a child-scoped variant would miss.
+
+Two consequences worth knowing before you fight them:
+
+- **The footer outranks the button.** The compiled rule is `.…\:font-mono button { … }` at specificity `(0,1,1)`; a class on the button itself is `(0,1,0)` and loses, and `tailwind-merge` cannot arbitrate because the two declarations sit on different elements. Opting one footer button out of the treatment therefore needs the important modifier — `font-sans!` / `normal-case!` — not a plain utility.
+- **A footer action that is neither a `<button>` nor a `Button` styles itself.** The bare `<a>` in `InstallInClaudeDesktopDialog`'s footer is the one live instance, and it carries its own `font-mono tracking-wide uppercase`. That is deliberate: the footer dresses the design system's buttons, and a hand-rolled action carries its own treatment. Promoting such a link to `<Button asChild>` brings it under the rule.
+
+Historically the two sites this rule was written against had reached for `variant="secondary"` plus a hand-added `className="font-mono uppercase"`, which recovered the footer's typography while leaving the confirm without a perceptible fill. That is what makes the inversion easy to author by accident: the footer still looks like a footer. The canonical shape omits the prop entirely and lets `defaultVariants` supply `default`, matching every other confirm dialog in the tree.
**Matched as one whole JSX element, not as `<Tag $...>$body</Tag>`.** A footer holds two or more children, and a single `$body` capture binds only an arity-one child list. GritQL regex matches the entire node text, so the leading tag name anchors the match to footers themselves rather than to any ancestor that happens to contain one.
diff --git a/biome-plugins/no-demoted-dialog-confirm.grit b/biome-plugins/no-demoted-dialog-confirm.grit
index edb0b00b2..42e0d7dc3 100644
--- a/biome-plugins/no-demoted-dialog-confirm.grit
+++ b/biome-plugins/no-demoted-dialog-confirm.grit
@@ -15,11 +15,24 @@
// widen the pattern rather than assuming it is already covered.
//
// The confirm belongs on `default` (or `destructive` when the action is
-// irreversible removal). Both bake `font-mono uppercase` into their variant
-// string, so the footer's typographic treatment comes with the variant —
-// there is nothing to hand-add. Canonical shape, matching every other
-// confirm dialog in the codebase, is to omit the prop entirely and let
-// `defaultVariants` supply `default`:
+// irreversible removal). `DialogFooter` and `AlertDialogFooter` impose
+// `font-mono uppercase` on every button they contain, so the row's
+// typographic treatment is the footer's job and there is nothing to
+// hand-add on either button — a `className="font-mono uppercase"` on a
+// footer button is redundant, not load-bearing. `default`, `destructive`
+// and `outline-mono` bake the pair into their variant strings too, which is
+// what dresses them outside a footer. The footer's rule outranks
+// the button's own class (`(0,1,1)` vs `(0,1,0)`, and the two declarations
+// sit on different elements so `tailwind-merge` cannot arbitrate), so
+// opting one button out takes `font-sans!` / `normal-case!` rather than a
+// plain utility. The footer keys on both the `button` element and
+// `[data-slot=button]`, because neither alone covers every shape: the
+// AlertDialog wrappers stamp their own data-slot, and `<Button asChild>`
+// rendering an anchor is not a button element. A footer action that is
+// neither — the bare `<a>` in InstallInClaudeDesktopDialog — styles itself,
+// by design. Canonical shape, matching
+// every other confirm dialog in the codebase, is to omit the prop entirely
+// and let `defaultVariants` supply `default`:
//
// <DialogFooter>
// <Button variant="outline" onClick={close}>Cancel</Button>
@@ -51,6 +64,6 @@ jsx_element() as $footer where {
$footer <: r"(?s).*variant=\"secondary\".*",
register_diagnostic(
span = $footer,
- message = "Demoted confirm in a dialog footer. `secondary` draws no border and its `bg-secondary` fill sits within about 1.1:1 of the dialog surface, so it reads as flat text and loses the emphasis contest with the `outline` dismiss beside it. Drop the variant prop and let the confirm take `default` (or `destructive` for irreversible removal), which also supplies the footer's font-mono uppercase treatment. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-demoted-dialog-confirmgrit"
+ message = "Demoted confirm in a dialog footer. `secondary` draws no border and its `bg-secondary` fill sits within about 1.1:1 of the dialog surface, so it reads as flat text and loses the emphasis contest with the `outline` dismiss beside it. Drop the variant prop and let the confirm take `default` (or `destructive` for irreversible removal); the footer already supplies the row's font-mono uppercase treatment, so there is nothing to hand-add. See https://github.com/inkeep/open-knowledge/blob/main/biome-plugins/README.md#no-demoted-dialog-confirmgrit"
)
}
diff --git a/knip.config.ts b/knip.config.ts
index 68adb81cc..a0ba1bf42 100644
--- a/knip.config.ts
+++ b/knip.config.ts
@@ -127,9 +127,7 @@ export default {
'packages/server': {
entry: ['src/**/*.test.ts', 'src/parse-worker.ts'],
project: 'src/**',
- ignoreDependencies: [
- '@types/shell-quote',
- ],
+ ignoreDependencies: ['@types/shell-quote'],
},
'packages/cli': {
entry: ['src/**/*.test.ts', 'scripts/*.ts', 'tests/**/*.ts', 'src/parse-worker.ts'],
diff --git a/packages/app/src/components/AuthModal.tsx b/packages/app/src/components/AuthModal.tsx
index 29a33b2ae..322f48839 100644
--- a/packages/app/src/components/AuthModal.tsx
+++ b/packages/app/src/components/AuthModal.tsx
@@ -544,7 +544,7 @@ export function AuthModal({
</DialogBody>
<DialogFooter>
- <Button variant="outline" className="font-mono uppercase" onClick={handleCancel}>
+ <Button variant="outline" onClick={handleCancel}>
<Trans>Cancel</Trans>
</Button>
</DialogFooter>
@@ -566,7 +566,7 @@ export function AuthModal({
</DialogBody>
<DialogFooter>
- <Button variant="outline" className="font-mono uppercase" onClick={handleCancel}>
+ <Button variant="outline" onClick={handleCancel}>
<Trans>Cancel</Trans>
</Button>
<Button onClick={handlePatConnect} disabled={!patToken.trim() || patSubmitting}>
@@ -591,7 +591,7 @@ export function AuthModal({
<Button variant="ghost" onClick={() => setStep('pat')}>
<Trans>Use a token instead</Trans>
</Button>
- <Button variant="outline" className="font-mono uppercase" onClick={handleCancel}>
+ <Button variant="outline" onClick={handleCancel}>
<Trans>Cancel</Trans>
</Button>
</DialogFooter>
diff --git a/packages/app/src/components/AutoSyncOnboardingDialog.tsx b/packages/app/src/components/AutoSyncOnboardingDialog.tsx
index 4cb822831..76efec603 100644
--- a/packages/app/src/components/AutoSyncOnboardingDialog.tsx
+++ b/packages/app/src/components/AutoSyncOnboardingDialog.tsx
@@ -64,12 +64,7 @@ export function AutoSyncOnboardingDialog({
</DialogBody>
<DialogFooter>
- <Button
- variant="outline"
- className="uppercase font-mono"
- onClick={() => persistChoice(false)}
- disabled={writer === null}
- >
+ <Button variant="outline" onClick={() => persistChoice(false)} disabled={writer === null}>
<Trans>Keep disabled</Trans>
</Button>
<Button onClick={() => persistChoice(true)} disabled={writer === null}>
diff --git a/packages/app/src/components/CloneDialog.tsx b/packages/app/src/components/CloneDialog.tsx
index 7de021954..9380809c8 100644
--- a/packages/app/src/components/CloneDialog.tsx
+++ b/packages/app/src/components/CloneDialog.tsx
@@ -503,16 +503,12 @@ export function CloneDialog({
<DialogFooter>
{cloning ? (
- <Button variant="outline" className="font-mono uppercase" onClick={handleCancel}>
+ <Button variant="outline" onClick={handleCancel}>
<Trans>Cancel</Trans>
</Button>
) : (
<>
- <Button
- variant="outline"
- className="font-mono uppercase"
- onClick={() => handleClose(false)}
- >
+ <Button variant="outline" onClick={() => handleClose(false)}>
<Trans>Cancel</Trans>
</Button>
<Button
diff --git a/packages/app/src/components/ConsentDialogBody.tsx b/packages/app/src/components/ConsentDialogBody.tsx
index 6836e3d0c..0b10103d0 100644
--- a/packages/app/src/components/ConsentDialogBody.tsx
+++ b/packages/app/src/components/ConsentDialogBody.tsx
@@ -383,7 +383,6 @@ function ConsentDialogForm({ payload, store, toast }: ConsentDialogFormProps) {
<Button
type="button"
variant="outline"
- className="font-mono uppercase"
onClick={() => void onCancel()}
disabled={busy}
data-testid="consent-cancel"
diff --git a/packages/app/src/components/CreateProjectDialog.tsx b/packages/app/src/components/CreateProjectDialog.tsx
index fb2c5b379..54921cc3d 100644
--- a/packages/app/src/components/CreateProjectDialog.tsx
+++ b/packages/app/src/components/CreateProjectDialog.tsx
@@ -866,7 +866,7 @@ export function CreateProjectDialog({
<Button
type="button"
variant="ghost"
- className="me-auto font-mono uppercase"
+ className="me-auto"
onClick={() => goToStep('pick')}
disabled={busy}
data-testid="create-change-pack"
@@ -880,7 +880,6 @@ export function CreateProjectDialog({
<Button
type="button"
variant="outline"
- className="font-mono uppercase"
onClick={() => onOpenChange(false)}
disabled={busy}
data-testid="create-cancel"
diff --git a/packages/app/src/components/ImportSkillForm.tsx b/packages/app/src/components/ImportSkillForm.tsx
index 92e03050d..809eb3a52 100644
--- a/packages/app/src/components/ImportSkillForm.tsx
+++ b/packages/app/src/components/ImportSkillForm.tsx
@@ -392,7 +392,6 @@ export function ImportSkillForm({
<DialogFooter>
<Button
variant="outline"
- className="font-mono uppercase"
onMouseDown={(e) => e.preventDefault()}
onClick={() => onOpenChange(false)}
disabled={busy}
diff --git a/packages/app/src/components/InstallInClaudeDesktopDialog.tsx b/packages/app/src/components/InstallInClaudeDesktopDialog.tsx
index 23eb7c705..2023d873a 100644
--- a/packages/app/src/components/InstallInClaudeDesktopDialog.tsx
+++ b/packages/app/src/components/InstallInClaudeDesktopDialog.tsx
@@ -352,11 +352,7 @@ export function InstallInClaudeDesktopDialog({
)}
{phase.kind === 'idle' && isElectron && (
<>
- <Button
- className="uppercase font-mono"
- variant="outline"
- onClick={() => onOpenChange(false)}
- >
+ <Button variant="outline" onClick={() => onOpenChange(false)}>
<Trans>Cancel</Trans>
</Button>
<Button onClick={handleInstallElectron}>
@@ -366,21 +362,13 @@ export function InstallInClaudeDesktopDialog({
</>
)}
{phase.kind === 'idle' && !isElectron && (
- <Button
- className="uppercase font-mono"
- variant="outline"
- onClick={() => onOpenChange(false)}
- >
+ <Button variant="outline" onClick={() => onOpenChange(false)}>
<Trans>Close</Trans>
</Button>
)}
{phase.kind === 'error' && isElectron && (
<>
- <Button
- className="uppercase font-mono"
- variant="outline"
- onClick={() => onOpenChange(false)}
- >
+ <Button variant="outline" onClick={() => onOpenChange(false)}>
<Trans>Cancel</Trans>
</Button>
<Button onClick={handleInstallElectron}>
diff --git a/packages/app/src/components/McpConsentDialogBody.tsx b/packages/app/src/components/McpConsentDialogBody.tsx
index 7414b114e..d0b232262 100644
--- a/packages/app/src/components/McpConsentDialogBody.tsx
+++ b/packages/app/src/components/McpConsentDialogBody.tsx
@@ -511,7 +511,7 @@ function McpConsentDialogForm({ payload, store, toast }: McpConsentDialogFormPro
<Button
variant="link-muted"
disabled={busy}
- className="-ms-2.5 tracking-wide font-mono uppercase"
+ className="-ms-2.5 tracking-wide"
data-testid="mcp-consent-skip"
onClick={onDismiss}
>
diff --git a/packages/app/src/components/NewItemDialog.tsx b/packages/app/src/components/NewItemDialog.tsx
index bd276ed3d..4affcb72f 100644
--- a/packages/app/src/components/NewItemDialog.tsx
+++ b/packages/app/src/components/NewItemDialog.tsx
@@ -370,12 +370,7 @@ export function NewItemDialog({
</DialogBody>
<DialogFooter>
- <Button
- variant="outline"
- className="font-mono uppercase"
- onClick={() => onOpenChange(false)}
- disabled={busy}
- >
+ <Button variant="outline" onClick={() => onOpenChange(false)} disabled={busy}>
<Trans>Cancel</Trans>
</Button>
<Button onClick={handleCreate} disabled={isSubmitDisabled}>
diff --git a/packages/app/src/components/NewSkillDialog.tsx b/packages/app/src/components/NewSkillDialog.tsx
index 6b1e6726c..17f079a1e 100644
--- a/packages/app/src/components/NewSkillDialog.tsx
+++ b/packages/app/src/components/NewSkillDialog.tsx
@@ -130,12 +130,7 @@ export function NewSkillDialog({
</div>
</DialogBody>
<DialogFooter>
- <Button
- variant="outline"
- className="font-mono uppercase"
- onClick={() => onOpenChange(false)}
- disabled={busy}
- >
+ <Button variant="outline" onClick={() => onOpenChange(false)} disabled={busy}>
<Trans>Cancel</Trans>
</Button>
<Button onClick={submit} disabled={busy || !name.trim()}>
diff --git a/packages/app/src/components/NewTemplateDialog.tsx b/packages/app/src/components/NewTemplateDialog.tsx
index b1c2cc023..281bff44b 100644
--- a/packages/app/src/components/NewTemplateDialog.tsx
+++ b/packages/app/src/components/NewTemplateDialog.tsx
@@ -89,7 +89,6 @@ function Body({
<DialogFooter>
<Button
variant="outline"
- className="font-mono uppercase"
onMouseDown={(e) => e.preventDefault()}
onClick={() => onOpenChange(false)}
disabled={form.isSaving}
diff --git a/packages/app/src/components/PublishToGitHubDialog.tsx b/packages/app/src/components/PublishToGitHubDialog.tsx
index 83ca9c15f..d9cc86aff 100644
--- a/packages/app/src/components/PublishToGitHubDialog.tsx
+++ b/packages/app/src/components/PublishToGitHubDialog.tsx
@@ -470,12 +470,7 @@ export function PublishToGitHubDialog({ open, onOpenChange }: PublishToGitHubDia
</DialogBody>
<DialogFooter>
- <Button
- type="button"
- variant="outline"
- className="font-mono uppercase"
- onClick={handleClose}
- >
+ <Button type="button" variant="outline" onClick={handleClose}>
<Trans>Cancel</Trans>
</Button>
<Button
@@ -602,7 +597,6 @@ function PublishSuccessView({
<Button
type="button"
variant="outline"
- className="font-mono uppercase"
onClick={onClose}
data-testid="publish-success-done"
>
diff --git a/packages/app/src/components/ReportBugDialogBody.tsx b/packages/app/src/components/ReportBugDialogBody.tsx
index 6165d42d6..2c5ac81f0 100644
--- a/packages/app/src/components/ReportBugDialogBody.tsx
+++ b/packages/app/src/components/ReportBugDialogBody.tsx
@@ -461,11 +461,7 @@ function ReportBugDialog({
) : null}
</DialogBody>
<DialogFooter>
- <Button
- variant="ghost"
- className="font-mono uppercase"
- onClick={() => handleOpenChange(false)}
- >
+ <Button variant="ghost" onClick={() => handleOpenChange(false)}>
{crashInvite !== undefined ? <Trans>Not now</Trans> : <Trans>Cancel</Trans>}
</Button>
<Button onClick={() => void handleCreate()} disabled={phase.creating}>
@@ -508,11 +504,7 @@ function ReportBugDialog({
</div>
</DialogBody>
<DialogFooter className="sm:justify-between">
- <Button
- variant="ghost"
- className="font-mono uppercase"
- onClick={() => setPhase(COMPOSE_IDLE)}
- >
+ <Button variant="ghost" onClick={() => setPhase(COMPOSE_IDLE)}>
<Trans>Back</Trans>
</Button>
<Button onClick={() => handleSend(phase.report)}>
diff --git a/packages/app/src/components/SeedDialog.tsx b/packages/app/src/components/SeedDialog.tsx
index 4b1b6b2d4..6be191a79 100644
--- a/packages/app/src/components/SeedDialog.tsx
+++ b/packages/app/src/components/SeedDialog.tsx
@@ -244,16 +244,12 @@ export function SeedDialog({ open, onOpenChange, onSeedApplied, initialPackId }:
<DialogFooter>
{step === 'configure' && !packLocked ? (
- <Button className="me-auto uppercase font-mono" variant="ghost" onClick={handleBack}>
+ <Button className="me-auto" variant="ghost" onClick={handleBack}>
<ArrowLeft aria-hidden="true" className="h-4 w-4" />
<Trans>Back</Trans>
</Button>
) : null}
- <Button
- className="uppercase font-mono"
- variant="outline"
- onClick={() => onOpenChange(false)}
- >
+ <Button variant="outline" onClick={() => onOpenChange(false)}>
{phase.kind === 'already-seeded' || phase.kind === 'error' ? (
<Trans>Close</Trans>
) : (
diff --git a/packages/app/src/components/ShareBranchSwitchDialog.tsx b/packages/app/src/components/ShareBranchSwitchDialog.tsx
index 63f839e97..efa627faf 100644
--- a/packages/app/src/components/ShareBranchSwitchDialog.tsx
+++ b/packages/app/src/components/ShareBranchSwitchDialog.tsx
@@ -800,12 +800,7 @@ export function ShareBranchSwitchDialog({
) : null}
</DialogBody>
<DialogFooter className="sm:justify-between">
- <Button
- variant="ghost"
- className="font-mono uppercase"
- onClick={handleCancel}
- data-testid="share-branch-switch-cancel"
- >
+ <Button variant="ghost" onClick={handleCancel} data-testid="share-branch-switch-cancel">
<Trans>Cancel</Trans>
</Button>
{branchSwitchState.phase === 'branch-in-other-worktree' ? (
@@ -843,7 +838,6 @@ export function ShareBranchSwitchDialog({
{variant?.openCurrentEnabled ? (
<Button
variant="outline"
- className="font-mono uppercase"
onClick={handleOpenCurrent}
disabled={switching || creating}
data-testid="share-branch-switch-open-current"
diff --git a/packages/app/src/components/ShareReceiveDialog.tsx b/packages/app/src/components/ShareReceiveDialog.tsx
index 0172397e8..71de26f35 100644
--- a/packages/app/src/components/ShareReceiveDialog.tsx
+++ b/packages/app/src/components/ShareReceiveDialog.tsx
@@ -692,7 +692,7 @@ function ShareReceiveDialogInner({
)}
</DialogBody>
<DialogFooter>
- <Button variant="outline" className="font-mono uppercase" onClick={() => store.dismiss()}>
+ <Button variant="outline" onClick={() => store.dismiss()}>
<Trans>Cancel</Trans>
</Button>
</DialogFooter>
diff --git a/packages/app/src/components/SkillPluginBundleDialog.tsx b/packages/app/src/components/SkillPluginBundleDialog.tsx
index 633de213b..c03300762 100644
--- a/packages/app/src/components/SkillPluginBundleDialog.tsx
+++ b/packages/app/src/components/SkillPluginBundleDialog.tsx
@@ -407,12 +407,7 @@ function OpenSkillPluginBundleDialog({
</div>
</DialogBody>
<DialogFooter>
- <Button
- variant="outline"
- className="font-mono uppercase"
- disabled={busy}
- onClick={() => onOpenChange(false)}
- >
+ <Button variant="outline" disabled={busy} onClick={() => onOpenChange(false)}>
<Trans>Cancel</Trans>
</Button>
<Button
diff --git a/packages/app/src/components/SkillRenameDialog.tsx b/packages/app/src/components/SkillRenameDialog.tsx
index 41603037e..7b1ff3c0e 100644
--- a/packages/app/src/components/SkillRenameDialog.tsx
+++ b/packages/app/src/components/SkillRenameDialog.tsx
@@ -106,12 +106,7 @@ export function SkillRenameDialog({ skill, existingNames, onOpenChange, onRename
) : null}
</div>
<DialogFooter>
- <Button
- variant="outline"
- className="font-mono uppercase"
- onClick={() => onOpenChange(false)}
- disabled={saving}
- >
+ <Button variant="outline" onClick={() => onOpenChange(false)} disabled={saving}>
<Trans>Cancel</Trans>
</Button>
<Button onClick={() => void submit()} disabled={!canSave}>
diff --git a/packages/app/src/components/TrashFailureModal.dom.test.tsx b/packages/app/src/components/TrashFailureModal.dom.test.tsx
index 6e3643fc8..c72ffaa5d 100644
--- a/packages/app/src/components/TrashFailureModal.dom.test.tsx
+++ b/packages/app/src/components/TrashFailureModal.dom.test.tsx
@@ -4,7 +4,6 @@ import userEvent from '@testing-library/user-event';
import type { ReactNode } from 'react';
import { afterEach, describe, expect, test, vi } from 'vitest';
import { renderLinguiTemplate } from '@/test-utils/lingui-mock';
-import { expectVisualClassTokens } from '@/test-utils/visual-contract';
import type { TrashFailedTarget } from './TrashFailureModal';
vi.doMock('@lingui/core/macro', () => ({
@@ -104,8 +103,10 @@ describe('TrashFailureModal runtime behavior', () => {
expect(cancel.getAttribute('data-variant')).toBe('outline');
expect(retry.getAttribute('data-variant')).toBe('outline');
expect(deletePermanently.getAttribute('data-variant')).toBe('destructive');
- expectVisualClassTokens(cancel.className, ['font-mono']);
- expectVisualClassTokens(retry.className, ['font-mono']);
+ const footer = document.querySelector('[data-slot="alert-dialog-footer"]');
+ for (const action of [cancel, retry, deletePermanently]) {
+ expect(action.closest('[data-slot="alert-dialog-footer"]')).toBe(footer);
+ }
await userEvent.click(cancel);
await userEvent.click(retry);
diff --git a/packages/app/src/components/TrashFailureModal.tsx b/packages/app/src/components/TrashFailureModal.tsx
index e2bea8e3a..1dfdb83e7 100644
--- a/packages/app/src/components/TrashFailureModal.tsx
+++ b/packages/app/src/components/TrashFailureModal.tsx
@@ -121,7 +121,6 @@ export function TrashFailureModal({
{}
<Button
variant="outline"
- className="font-mono uppercase"
onClick={onRetry}
disabled={isSubmitting}
data-testid="trash-failure-modal-retry"
diff --git a/packages/app/src/components/ui/alert-dialog.dom.test.tsx b/packages/app/src/components/ui/alert-dialog.dom.test.tsx
index b3c7373ff..22bc9d86c 100644
--- a/packages/app/src/components/ui/alert-dialog.dom.test.tsx
+++ b/packages/app/src/components/ui/alert-dialog.dom.test.tsx
@@ -323,3 +323,52 @@ describe('AlertDialog surface classes', () => {
]);
});
});
+
+describe('AlertDialog footer typography', () => {
+ test('the footer carries the treatment for every button it contains', () => {
+ renderAlert();
+
+ const footer = document.querySelector('[data-slot="alert-dialog-footer"]');
+
+ expectVisualClassTokens(footer?.getAttribute('class'), [
+ '[&_button]:font-mono',
+ '[&_button]:uppercase',
+ '[&_[data-slot=button]]:font-mono',
+ '[&_[data-slot=button]]:uppercase',
+ ]);
+ });
+
+ test('renders the cancel and confirm choices in order inside the footer', () => {
+ renderAlert({
+ footer: (
+ <>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
+ <AlertDialogAction>Delete</AlertDialogAction>
+ </>
+ ),
+ });
+
+ const footer = document.querySelector('[data-slot="alert-dialog-footer"]');
+ const buttons = [...(footer?.querySelectorAll('button') ?? [])];
+
+ expect(buttons.map((button) => button.textContent)).toEqual(['Cancel', 'Delete']);
+ });
+
+ test('footer choices do not re-declare the treatment the footer already supplies', () => {
+ renderAlert({
+ footer: (
+ <>
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
+ <Button variant="outline">Later</Button>
+ </>
+ ),
+ });
+
+ for (const label of ['Cancel', 'Later']) {
+ expectVisualClassTokensAbsent(screen.getByText(label).getAttribute('class'), [
+ 'font-mono',
+ 'uppercase',
+ ]);
+ }
+ });
+});
diff --git a/packages/app/src/components/ui/alert-dialog.tsx b/packages/app/src/components/ui/alert-dialog.tsx
index 8f8a7e259..c0ccdb408 100644
--- a/packages/app/src/components/ui/alert-dialog.tsx
+++ b/packages/app/src/components/ui/alert-dialog.tsx
@@ -85,6 +85,8 @@ function AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>)
data-slot="alert-dialog-footer"
className={cn(
'-mx-6 -mb-6 flex shrink-0 flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 px-6 py-4 sm:flex-row sm:justify-end',
+ '[&_button]:font-mono [&_button]:uppercase',
+ '[&_[data-slot=button]]:font-mono [&_[data-slot=button]]:uppercase',
className,
)}
{...props}
@@ -132,7 +134,7 @@ function AlertDialogCancel({
<Button variant={variant} size={size} asChild>
<AlertDialogPrimitive.Cancel
data-slot="alert-dialog-cancel"
- className={cn('font-mono uppercase', className)}
+ className={cn(className)}
{...props}
/>
</Button>
diff --git a/packages/app/src/components/ui/dialog.dom.test.tsx b/packages/app/src/components/ui/dialog.dom.test.tsx
index 621f4da0d..1bf96bad0 100644
--- a/packages/app/src/components/ui/dialog.dom.test.tsx
+++ b/packages/app/src/components/ui/dialog.dom.test.tsx
@@ -208,3 +208,84 @@ describe('Dialog window-drag band', () => {
expectVisualClassTokensAbsent(className, ['max-h-[calc(100dvh-6rem)]']);
});
});
+
+describe('Dialog footer typography', () => {
+ afterEach(() => cleanup());
+
+ async function renderFooter(children: ReactNode) {
+ const { Dialog, DialogContent, DialogFooter, DialogTitle } = await import('./dialog');
+
+ render(
+ <Dialog open={true}>
+ <DialogContent showCloseButton={false}>
+ <DialogTitle>Dialog title</DialogTitle>
+ <DialogFooter>{children}</DialogFooter>
+ </DialogContent>
+ </Dialog>,
+ );
+ }
+
+ test('the footer carries the treatment for every button it contains', async () => {
+ const { Button } = await import('./button');
+ await renderFooter(<Button variant="outline">Cancel</Button>);
+
+ expectVisualClassTokens(
+ document.querySelector('[data-slot="dialog-footer"]')?.getAttribute('class'),
+ [
+ '[&_button]:font-mono',
+ '[&_button]:uppercase',
+ '[&_[data-slot=button]]:font-mono',
+ '[&_[data-slot=button]]:uppercase',
+ ],
+ );
+ });
+
+ test('footer choices do not re-declare the treatment the footer already supplies', async () => {
+ const { Button } = await import('./button');
+ await renderFooter(
+ <>
+ <Button variant="outline">Cancel</Button>
+ <Button variant="ghost">Back</Button>
+ </>,
+ );
+
+ for (const label of ['Cancel', 'Back']) {
+ expectVisualClassTokensAbsent(screen.getByText(label).getAttribute('class'), [
+ 'font-mono',
+ 'uppercase',
+ ]);
+ }
+ });
+
+ test('a DialogClose wrapping a button leans on the footer rather than its own classes', async () => {
+ const { DialogClose } = await import('./dialog');
+ const { Button } = await import('./button');
+ await renderFooter(
+ <DialogClose asChild>
+ <Button variant="outline">Dismiss</Button>
+ </DialogClose>,
+ );
+
+ const button = screen.getByText('Dismiss');
+ expect(button.tagName).toBe('BUTTON');
+ expectVisualClassTokensAbsent(button.getAttribute('class'), ['font-mono', 'uppercase']);
+ });
+
+ test('the built-in close affordance leans on the footer rather than its own classes', async () => {
+ const { Dialog, DialogContent, DialogFooter, DialogTitle } = await import('./dialog');
+
+ render(
+ <Dialog open={true}>
+ <DialogContent showCloseButton={false}>
+ <DialogTitle>Dialog title</DialogTitle>
+ <DialogFooter showCloseButton />
+ </DialogContent>
+ </Dialog>,
+ );
+
+ expectVisualClassTokensAbsent(screen.getByText('Close').getAttribute('class'), [
+ 'font-mono',
+ 'uppercase',
+ ]);
+ });
+});
diff --git a/packages/app/src/components/ui/dialog.tsx b/packages/app/src/components/ui/dialog.tsx
index f667c7391..55cdafd78 100644
--- a/packages/app/src/components/ui/dialog.tsx
+++ b/packages/app/src/components/ui/dialog.tsx
@@ -20,9 +20,7 @@ function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.
}
function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {
- return (
- <DialogPrimitive.Close data-slot="dialog-close" className="font-mono uppercase" {...props} />
- );
+ return <DialogPrimitive.Close data-slot="dialog-close" {...props} />;
}
function DialogOverlay({
@@ -122,6 +120,8 @@ function DialogFooter({
data-slot="dialog-footer"
className={cn(
'-mx-6 -mb-6 flex shrink-0 flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 px-6 py-4 sm:flex-row sm:justify-end',
+ '[&_button]:font-mono [&_button]:uppercase',
+ '[&_[data-slot=button]]:font-mono [&_[data-slot=button]]:uppercase',
className,
)}
{...props}
@@ -129,7 +129,7 @@ function DialogFooter({
{children}
{showCloseButton && (
<DialogPrimitive.Close asChild>
- <Button variant="outline" className="font-mono uppercase">
+ <Button variant="outline">
<Trans>Close</Trans>
</Button>
</DialogPrimitive.Close>
diff --git a/packages/app/src/editor/extensions/source-dirty-fold-atomicity.dom.test.tsx b/packages/app/src/editor/extensions/source-dirty-fold-atomicity.dom.test.tsx
index 3a15d1233..9e043d02b 100644
--- a/packages/app/src/editor/extensions/source-dirty-fold-atomicity.dom.test.tsx
+++ b/packages/app/src/editor/extensions/source-dirty-fold-atomicity.dom.test.tsx
@@ -1,4 +1,3 @@
-
import { sharedExtensions as coreExtensions, MarkdownManager } from '@inkeep/open-knowledge-core';
import { type ObserverDispatchKind, setupServerObservers } from '@inkeep/open-knowledge-server';
import { cleanup } from '@testing-library/react';
diff --git a/packages/app/tests/dom/input-rule-atom-ranges.dom.test.tsx b/packages/app/tests/dom/input-rule-atom-ranges.dom.test.tsx
index 65162a22f..f81d64a77 100644
--- a/packages/app/tests/dom/input-rule-atom-ranges.dom.test.tsx
+++ b/packages/app/tests/dom/input-rule-atom-ranges.dom.test.tsx
@@ -1,4 +1,3 @@
-
import { cleanup } from '@testing-library/react';
import { Editor, getSchema } from '@tiptap/core';
import type { MarkType, Node as PMNode } from '@tiptap/pm/model';
diff --git a/packages/app/tests/dom/jsx-interior-input-rule-suppression.dom.test.tsx b/packages/app/tests/dom/jsx-interior-input-rule-suppression.dom.test.tsx
index c5b8ad023..c4c510031 100644
--- a/packages/app/tests/dom/jsx-interior-input-rule-suppression.dom.test.tsx
+++ b/packages/app/tests/dom/jsx-interior-input-rule-suppression.dom.test.tsx
@@ -1,4 +1,3 @@
-
import { cleanup } from '@testing-library/react';
import { Editor, type JSONContent } from '@tiptap/core';
import type { Node as PMNode } from '@tiptap/pm/model';
diff --git a/packages/app/tests/dom/plain-text-clipboard.dom.test.tsx b/packages/app/tests/dom/plain-text-clipboard.dom.test.tsx
index 65b32f4b3..931aaa880 100644
--- a/packages/app/tests/dom/plain-text-clipboard.dom.test.tsx
+++ b/packages/app/tests/dom/plain-text-clipboard.dom.test.tsx
@@ -1,4 +1,3 @@
-
import { cleanup } from '@testing-library/react';
import { Editor } from '@tiptap/core';
import type { Node as PMNode } from '@tiptap/pm/model';
diff --git a/packages/app/tests/dom/serializer-seam-rederive.dom.test.tsx b/packages/app/tests/dom/serializer-seam-rederive.dom.test.tsx
index 2ab40357a..c9744993d 100644
--- a/packages/app/tests/dom/serializer-seam-rederive.dom.test.tsx
+++ b/packages/app/tests/dom/serializer-seam-rederive.dom.test.tsx
@@ -1,4 +1,3 @@
-
import { MarkdownManager, stripFrontmatter } from '@inkeep/open-knowledge-core';
import { cleanup } from '@testing-library/react';
import { Editor, type JSONContent } from '@tiptap/core';
diff --git a/packages/app/tests/dom/task-list-input-rule.dom.test.tsx b/packages/app/tests/dom/task-list-input-rule.dom.test.tsx
index 1db8b25a9..e01856aac 100644
--- a/packages/app/tests/dom/task-list-input-rule.dom.test.tsx
+++ b/packages/app/tests/dom/task-list-input-rule.dom.test.tsx
@@ -1,4 +1,3 @@
-
import { cleanup } from '@testing-library/react';
import type { Editor } from '@tiptap/core';
import type { Node as PMNode } from '@tiptap/pm/model';
diff --git a/packages/app/tests/dom/underline-round-trip.dom.test.tsx b/packages/app/tests/dom/underline-round-trip.dom.test.tsx
index 652d75f43..f0bea3f33 100644
--- a/packages/app/tests/dom/underline-round-trip.dom.test.tsx
+++ b/packages/app/tests/dom/underline-round-trip.dom.test.tsx
@@ -1,4 +1,3 @@
-
import { MarkdownManager, sharedExtensions, stripFrontmatter } from '@inkeep/open-knowledge-core';
import { cleanup } from '@testing-library/react';
import { Editor, getSchema, type JSONContent } from '@tiptap/core';
diff --git a/packages/app/tests/integration/api-error-envelope/create-folder.test.ts b/packages/app/tests/integration/api-error-envelope/create-folder.test.ts
index 079b42e9a..49257d365 100644
--- a/packages/app/tests/integration/api-error-envelope/create-folder.test.ts
+++ b/packages/app/tests/integration/api-error-envelope/create-folder.test.ts
@@ -1,4 +1,3 @@
-
import { CreateFolderSuccessSchema, ProblemDetailsSchema } from '@inkeep/open-knowledge-core';
import { afterAll, beforeAll, describe, expect, test } from 'vitest';
import { HARNESS_BOOT_TIMEOUT_MS } from '../harness-boot-timeout';
diff --git a/packages/app/tests/integration/bug3-source-mode-writeback.test.ts b/packages/app/tests/integration/bug3-source-mode-writeback.test.ts
index a28cc2b18..8a60e5826 100644
--- a/packages/app/tests/integration/bug3-source-mode-writeback.test.ts
+++ b/packages/app/tests/integration/bug3-source-mode-writeback.test.ts
@@ -1,4 +1,3 @@
-
import { readFileSync } from 'node:fs';
import { join } from 'node:path';
import { setTimeout as wait } from 'node:timers/promises';
diff --git a/packages/app/tests/integration/indented-jsx-byte-sacred.test.ts b/packages/app/tests/integration/indented-jsx-byte-sacred.test.ts
index 4fc2c11f9..6fcdc23f2 100644
--- a/packages/app/tests/integration/indented-jsx-byte-sacred.test.ts
+++ b/packages/app/tests/integration/indented-jsx-byte-sacred.test.ts
@@ -1,4 +1,3 @@
-
import { setTimeout as wait } from 'node:timers/promises';
import { normalizeBridge } from '@inkeep/open-knowledge-core';
import { updateYFragment } from '@tiptap/y-tiptap';
diff --git a/packages/app/tests/integration/interior-edit-freshness.test.ts b/packages/app/tests/integration/interior-edit-freshness.test.ts
index 9f2f6feb6..40b5cdfd6 100644
--- a/packages/app/tests/integration/interior-edit-freshness.test.ts
+++ b/packages/app/tests/integration/interior-edit-freshness.test.ts
@@ -1,4 +1,3 @@
-
import { setTimeout as wait } from 'node:timers/promises';
import { updateYFragment, yXmlFragmentToProseMirrorRootNode } from '@tiptap/y-tiptap';
import { afterAll, beforeAll, describe, expect, test } from 'vitest';
diff --git a/packages/app/tests/integration/keystroke-cadence-danger-space.test.ts b/packages/app/tests/integration/keystroke-cadence-danger-space.test.ts
index 2a085742b..93666af70 100644
--- a/packages/app/tests/integration/keystroke-cadence-danger-space.test.ts
+++ b/packages/app/tests/integration/keystroke-cadence-danger-space.test.ts
@@ -1,4 +1,3 @@
-
import { setTimeout as wait } from 'node:timers/promises';
import { updateYFragment, yXmlFragmentToProseMirrorRootNode } from '@tiptap/y-tiptap';
import { afterAll, beforeAll, describe, expect, test } from 'vitest';
diff --git a/packages/app/tests/integration/producer-guard-wiring.test.ts b/packages/app/tests/integration/producer-guard-wiring.test.ts
index 878d5196b..867598d34 100644
--- a/packages/app/tests/integration/producer-guard-wiring.test.ts
+++ b/packages/app/tests/integration/producer-guard-wiring.test.ts
@@ -1,4 +1,3 @@
-
import { setTimeout as wait } from 'node:timers/promises';
import { updateYFragment, yXmlFragmentToProseMirrorRootNode } from '@tiptap/y-tiptap';
import { afterAll, beforeAll, describe, expect, test } from 'vitest';
diff --git a/packages/app/tests/integration/qa-039-reconciliation-counters-http.test.ts b/packages/app/tests/integration/qa-039-reconciliation-counters-http.test.ts
index 4ada3cf26..0970ac12f 100644
--- a/packages/app/tests/integration/qa-039-reconciliation-counters-http.test.ts
+++ b/packages/app/tests/integration/qa-039-reconciliation-counters-http.test.ts
@@ -1,4 +1,3 @@
-
import { randomUUID } from 'node:crypto';
import { afterEach, describe, expect, test } from 'vitest';
import { agentWriteMd, createTestServer, type TestServer } from './test-harness';
diff --git a/packages/app/tests/integration/qa-045-restore-after-gc.test.ts b/packages/app/tests/integration/qa-045-restore-after-gc.test.ts
index cbe2b705f..b632185e1 100644
--- a/packages/app/tests/integration/qa-045-restore-after-gc.test.ts
+++ b/packages/app/tests/integration/qa-045-restore-after-gc.test.ts
@@ -1,4 +1,3 @@
-
import { execFileSync } from 'node:child_process';
import { randomUUID } from 'node:crypto';
import { join } from 'node:path';
diff --git a/packages/app/tests/integration/qa-050-rollback-undo-shipped-path.test.ts b/packages/app/tests/integration/qa-050-rollback-undo-shipped-path.test.ts
index 89bc9b4d9..c530ce4ba 100644
--- a/packages/app/tests/integration/qa-050-rollback-undo-shipped-path.test.ts
+++ b/packages/app/tests/integration/qa-050-rollback-undo-shipped-path.test.ts
@@ -1,4 +1,3 @@
-
import { randomUUID } from 'node:crypto';
import { afterAll, afterEach, beforeAll, describe, expect, test } from 'vitest';
import type * as Y from 'yjs';
diff --git a/packages/app/tests/integration/undo-after-rollback.test.ts b/packages/app/tests/integration/undo-after-rollback.test.ts
index a78aeb0e4..d3767adc9 100644
--- a/packages/app/tests/integration/undo-after-rollback.test.ts
+++ b/packages/app/tests/integration/undo-after-rollback.test.ts
@@ -1,4 +1,3 @@
-
import { ROLLBACK_ORIGIN } from '@inkeep/open-knowledge-server';
import { afterAll, beforeAll, describe, expect, test } from 'vitest';
import * as Y from 'yjs';
diff --git a/packages/app/tests/integration/undo-recycle-reset.test.ts b/packages/app/tests/integration/undo-recycle-reset.test.ts
index 39e64a221..be1a29fbc 100644
--- a/packages/app/tests/integration/undo-recycle-reset.test.ts
+++ b/packages/app/tests/integration/undo-recycle-reset.test.ts
@@ -1,4 +1,3 @@
-
import { writeFileSync } from 'node:fs';
import { join } from 'node:path';
import { setTimeout as wait } from 'node:timers/promises';
diff --git a/packages/app/tests/integration/undo-rederive-survival.test.ts b/packages/app/tests/integration/undo-rederive-survival.test.ts
index 9ddcd0730..7935e35f8 100644
--- a/packages/app/tests/integration/undo-rederive-survival.test.ts
+++ b/packages/app/tests/integration/undo-rederive-survival.test.ts
@@ -1,4 +1,3 @@
-
import { prependFrontmatter } from '@inkeep/open-knowledge-core';
import { Plugin, PluginKey } from '@tiptap/pm/state';
import { updateYFragment, yXmlFragmentToProseMirrorRootNode } from '@tiptap/y-tiptap';
diff --git a/packages/app/tests/stress/okf-generated-index-settings.e2e.ts b/packages/app/tests/stress/okf-generated-index-settings.e2e.ts
index 4447df8a0..76d84fb46 100644
--- a/packages/app/tests/stress/okf-generated-index-settings.e2e.ts
+++ b/packages/app/tests/stress/okf-generated-index-settings.e2e.ts
@@ -123,6 +123,8 @@ test('Escape decline restores focus, confirmation creates indexes, and disabling
const cancelButton = disclosure.getByRole('button', { name: 'Cancel' });
const confirmButton = disclosure.getByRole('button', { name: 'Enable indexes' });
await expect(confirmButton).toHaveCSS('text-transform', 'uppercase');
+ await expect(cancelButton).toHaveCSS('text-transform', 'uppercase');
+ await expect(cancelButton).toHaveCSS('font-family', /JetBrains Mono/);
const dialogBox = await disclosure.boundingBox();
expect(dialogBox).not.toBeNull();
for (const button of [cancelButton, confirmButton]) {
diff --git a/packages/core/src/bridge/compose.ts b/packages/core/src/bridge/compose.ts
index 2a597ec3d..f4cc8a286 100644
--- a/packages/core/src/bridge/compose.ts
+++ b/packages/core/src/bridge/compose.ts
@@ -1,4 +1,3 @@
-
import { prependFrontmatter, stripFrontmatter } from '../extensions/frontmatter.ts';
export type ComposeAdjustment = 'none' | 'body' | 'frontmatter' | 'unresolved';
diff --git a/packages/core/src/bridge/doc-boundary-space.ts b/packages/core/src/bridge/doc-boundary-space.ts
index 01ef76a9f..8fb428b90 100644
--- a/packages/core/src/bridge/doc-boundary-space.ts
+++ b/packages/core/src/bridge/doc-boundary-space.ts
@@ -1,4 +1,3 @@
-
import { FRONTMATTER_RE, stripFrontmatter } from '../extensions/frontmatter.ts';
import { carriedEdgeEmpties, type DocEdgeEmpties } from '../markdown/doc-edge-blank-runs.ts';
diff --git a/packages/core/src/markdown/comment-promoter.ts b/packages/core/src/markdown/comment-promoter.ts
index 20a68d2a1..bfbd5a2e8 100644
--- a/packages/core/src/markdown/comment-promoter.ts
+++ b/packages/core/src/markdown/comment-promoter.ts
@@ -1,4 +1,3 @@
-
import type { Nodes, Paragraph, PhrasingContent, Root, RootContent, Text } from 'mdast';
import { SKIP, visit } from 'unist-util-visit';
import type { VFile } from 'vfile';
diff --git a/packages/core/src/markdown/fixtures/index.ts b/packages/core/src/markdown/fixtures/index.ts
index 6931623c7..00f5771ee 100644
--- a/packages/core/src/markdown/fixtures/index.ts
+++ b/packages/core/src/markdown/fixtures/index.ts
@@ -1,4 +1,3 @@
-
import { readFileSync } from 'node:fs';
import { dirname, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
@@ -9,7 +8,6 @@ function fixturePath(...segments: string[]): string {
return resolve(FIXTURES_DIR, ...segments);
}
-
interface GfmExample {
section: string;
markdown: string;
@@ -19,7 +17,6 @@ export function loadGfmExamples(): GfmExample[] {
return JSON.parse(readFileSync(fixturePath('gfm', 'examples.json'), 'utf8')) as GfmExample[];
}
-
interface MdxCrashEntry {
id: string;
input: string;
@@ -71,7 +68,6 @@ export function loadLargeEmbedFixtures(): LargeEmbedFixture[] {
) as LargeEmbedFixture[];
}
-
export function loadPrd6955Before(): string {
return readFileSync(fixturePath('regression', 'prd-6955-before.md'), 'utf8');
}
@@ -80,7 +76,6 @@ export function loadPrd6955CorruptedTriplicated(): string {
return readFileSync(fixturePath('regression', 'prd-6955-corrupted-triplicated.md'), 'utf8');
}
-
export interface NgPinnedCase {
id: string;
name: string;
@@ -97,7 +92,6 @@ export function loadNgPinnedCases(): NgPinnedCase[] {
) as NgPinnedCase[];
}
-
export function loadLargeRealistic(): string {
return readFileSync(fixturePath('perf', 'large-realistic.md'), 'utf8');
}
diff --git a/packages/core/src/markdown/fixtures/perf/generate.ts b/packages/core/src/markdown/fixtures/perf/generate.ts
index daa3ef82b..8b1eb8519 100644
--- a/packages/core/src/markdown/fixtures/perf/generate.ts
+++ b/packages/core/src/markdown/fixtures/perf/generate.ts
@@ -1,4 +1,3 @@
-
import { writeFileSync } from 'node:fs';
import { dirname, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
@@ -11,7 +10,6 @@ const BASELINE_ONLY_COUNTS = [500, 2500] as const;
const SEED = 0xf1de1117;
-
function mulberry32(seed: number): () => number {
let a = seed >>> 0;
return () => {
@@ -38,7 +36,6 @@ function pickWeighted<T>(rand: () => number, items: readonly [T, number][]): T {
return items[items.length - 1][0];
}
-
const WORDS = [
'lorem',
'ipsum',
@@ -156,7 +153,6 @@ function mdxBlock(rand: () => number): string {
return `<${name}>\n\n${sentence(rand)}\n\n</${name}>`;
}
-
type BlockKind = 'paragraph' | 'heading' | 'list' | 'code' | 'table' | 'mdx';
const MIX: readonly [BlockKind, number][] = [
@@ -195,7 +191,6 @@ function generateDocument(blockCount: number, seed: number): string {
return `${blocks.join('\n\n')}\n`;
}
-
function main(): void {
for (const count of [...BLOCK_COUNTS, ...BASELINE_ONLY_COUNTS]) {
const doc = generateDocument(count, SEED);
diff --git a/packages/core/src/markdown/image-promoter.ts b/packages/core/src/markdown/image-promoter.ts
index 994eb6917..706fa9afb 100644
--- a/packages/core/src/markdown/image-promoter.ts
+++ b/packages/core/src/markdown/image-promoter.ts
@@ -1,4 +1,3 @@
-
import type { Image, Paragraph, Root } from 'mdast';
import type { MdxJsxAttribute, MdxJsxFlowElement } from 'mdast-util-mdx';
import { visit } from 'unist-util-visit';
diff --git a/packages/core/src/markdown/math-promoter.ts b/packages/core/src/markdown/math-promoter.ts
index bd79424c7..a5b511f25 100644
--- a/packages/core/src/markdown/math-promoter.ts
+++ b/packages/core/src/markdown/math-promoter.ts
@@ -1,4 +1,3 @@
-
import type { Code, Root } from 'mdast';
import type { Math as MdastMath } from 'mdast-util-math';
import type { MdxJsxAttribute, MdxJsxFlowElement } from 'mdast-util-mdx';
diff --git a/packages/core/src/markdown/merged-walker.ts b/packages/core/src/markdown/merged-walker.ts
index fa3cfcd86..bfd7e3109 100644
--- a/packages/core/src/markdown/merged-walker.ts
+++ b/packages/core/src/markdown/merged-walker.ts
@@ -1,4 +1,3 @@
-
import type { Nodes, Parent, Root } from 'mdast';
import { SKIP, visit } from 'unist-util-visit';
import type { VFile } from 'vfile';
diff --git a/packages/core/src/markdown/safe-url.ts b/packages/core/src/markdown/safe-url.ts
index 8be632ba4..4d3250d3a 100644
--- a/packages/core/src/markdown/safe-url.ts
+++ b/packages/core/src/markdown/safe-url.ts
@@ -1,4 +1,3 @@
-
export const SAFE_URL_SCHEMES = ['https', 'http', 'mailto', 'tel', 'ftp', 'sms'] as const;
const SCHEME_ALT = SAFE_URL_SCHEMES.map((s) => `${s}:`).join('|');
diff --git a/packages/server/src/checkpoint-retention-tie.test.ts b/packages/server/src/checkpoint-retention-tie.test.ts
index 0a43a2773..8a5d82998 100644
--- a/packages/server/src/checkpoint-retention-tie.test.ts
+++ b/packages/server/src/checkpoint-retention-tie.test.ts
@@ -1,4 +1,3 @@
-
import { execFileSync } from 'node:child_process';
import { mkdirSync, mkdtempSync, rmSync } from 'node:fs';
import { tmpdir } from 'node:os';
diff --git a/packages/server/src/qa-degradation-matrix.test.ts b/packages/server/src/qa-degradation-matrix.test.ts
index 00bb6efe7..84e3e5297 100644
--- a/packages/server/src/qa-degradation-matrix.test.ts
+++ b/packages/server/src/qa-degradation-matrix.test.ts
@@ -1,4 +1,3 @@
-
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';
import type * as Y from 'yjs';
import { createBridgeDeriveLossReporter } from './bridge-loss-detector.ts';
diff --git a/packages/server/src/qa-gc-budget-isolation.test.ts b/packages/server/src/qa-gc-budget-isolation.test.ts
index b65c4693e..a800ca9f3 100644
--- a/packages/server/src/qa-gc-budget-isolation.test.ts
+++ b/packages/server/src/qa-gc-budget-isolation.test.ts
@@ -1,4 +1,3 @@
-
import { mkdirSync, mkdtempSync, rmSync } from 'node:fs';
import { tmpdir } from 'node:os';
import { join, resolve } from 'node:path';
diff --git a/packages/server/src/qa-watcher-intake-lens.test.ts b/packages/server/src/qa-watcher-intake-lens.test.ts
index 4669d1b98..2337e6c3c 100644
--- a/packages/server/src/qa-watcher-intake-lens.test.ts
+++ b/packages/server/src/qa-watcher-intake-lens.test.ts
@@ -1,4 +1,3 @@
-
import { Hocuspocus } from '@hocuspocus/server';
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';
import * as Y from 'yjs';