Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Bug report
description: Report something that isn't working in Open Knowledge
description: Report something that isn't working in OpenKnowledge
title: "[Bug]: "
labels: ["bug"]
body:
Expand Down Expand Up @@ -52,7 +52,7 @@ body:
- type: dropdown
id: install-method
attributes:
label: How did you install Open Knowledge?
label: How did you install OpenKnowledge?
options:
- Desktop app (DMG)
- CLI (npm / npx)
Expand Down
11 changes: 4 additions & 7 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,9 @@

---

### How our PR flow works — please read
### After you open this PR

This repository is **mirrored from an internal monorepo**. After you open this PR:
- A maintainer will review your PR. If you don't hear back within a few business days, a comment to nudge is welcome.
- When your change is accepted, this PR closes automatically — that's how it merges, and your authorship is preserved.

1. A bot mirrors your changes internally for review (it posts a link you won't be able to open — that's expected).
2. Maintainer review and full CI (lint, typecheck, tests) happen internally; results are **not** posted back to this PR.
3. Once the change lands internally and syncs back, **your PR is closed — not merged.** Your authorship is preserved.

If you don't hear back within a few business days, commenting to nudge is welcome. See [CONTRIBUTING.md](../CONTRIBUTING.md) for the full flow.
See [CONTRIBUTING.md](../CONTRIBUTING.md) for details.
1 change: 0 additions & 1 deletion docs/scripts/generate-og-wordmark.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { readFileSync, writeFileSync } from 'node:fs';
import path from 'node:path';


const root = path.resolve(import.meta.dirname, '..');
const svg = readFileSync(path.join(root, 'public', 'ok-wordmark.svg'));
const dataUrl = `data:image/svg+xml;base64,${svg.toString('base64')}`;
Expand Down
1 change: 0 additions & 1 deletion docs/src/app/(home)/sections/eng-specs-graphic.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Code, Sparkles } from 'lucide-react';


const RINGS = [56, 82, 108] as const;
const RING_CENTER = { x: 80, y: 45 };

Expand Down
1 change: 0 additions & 1 deletion docs/src/app/(home)/sections/knowledge-base-graphic.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Sparkles } from 'lucide-react';
import type { CSSProperties } from 'react';


const RINGS = [56, 82, 108] as const;
const RING_CENTER = { x: 80, y: 45 };

Expand Down
3 changes: 1 addition & 2 deletions docs/src/components/copy-prompt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ export function CopyPrompt({ children }: CopyPromptProps) {
await navigator.clipboard.writeText(text);
setCopied(true);
window.setTimeout(() => setCopied(false), 2000);
} catch {
}
} catch {}
};

return (
Expand Down
3 changes: 1 addition & 2 deletions docs/src/components/ok-editor/bubble-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ export function OkBubbleMenu({ editor }: { editor: Editor }) {
popup.style.left = `${x}px`;
popup.style.top = `${y}px`;
})
.catch(() => {
});
.catch(() => {});
});
};

Expand Down
3 changes: 1 addition & 2 deletions docs/src/components/ok-editor/drag-handle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ export const BlockDragHandle = Extension.create({
if (curPos < 0) return;
try {
editor.chain().focus().setNodeSelection(curPos).run();
} catch {
}
} catch {}
});

return [
Expand Down
1 change: 0 additions & 1 deletion docs/src/components/ok-editor/preview-code-block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
} from '@tiptap/react';
import { Trash2 } from 'lucide-react';


const THEME_VARS = PREVIEW_THEME_TOKENS.map((t) => `${t.name}:${t.light}`).join(';');

const CHART_PALETTE = [
Expand Down
1 change: 0 additions & 1 deletion docs/src/components/overview-blocks.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { ArrowRight, Bot, Database, type LucideIcon, NotebookPen } from 'lucide-react';
import type { ReactNode } from 'react';


interface Layer {
k: string;
Icon: LucideIcon;
Expand Down
3 changes: 1 addition & 2 deletions docs/src/components/page-markdown-actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ export function PageMarkdownActions({
await navigator.clipboard.writeText(await res.text());
setCopied(true);
window.setTimeout(() => setCopied(false), 2000);
} catch {
}
} catch {}
};

const prompt = `Read ${markdownUrl} so I can ask questions about it.`;
Expand Down
1 change: 0 additions & 1 deletion docs/src/components/tabs.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { describe, expect, test } from 'bun:test';
import { composeTabId, slugifyTabId } from './tabs.tsx';

Expand Down
1 change: 0 additions & 1 deletion docs/src/components/tabs.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use client';


import {
Tab as FumadocsTab,
Tabs as FumadocsTabs,
Expand Down
1 change: 0 additions & 1 deletion docs/src/lib/deferred-share.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

export const PENDING_SHARE_COOKIE = 'ok_pending_share';

export const PENDING_SHARE_MAX_AGE_SECONDS = 7 * 24 * 60 * 60;
Expand Down
1 change: 0 additions & 1 deletion docs/src/lib/share-splash.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { SITE_NAME } from './site';

const SHARE_URL_VERSION_V1 = 0x01;
Expand Down
1 change: 0 additions & 1 deletion docs/src/lib/track.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { after } from 'next/server';


const POSTHOG_CAPTURE_URL = 'https://us.i.posthog.com/capture/';
const CAPTURE_TIMEOUT_MS = 3_000;

Expand Down
1 change: 0 additions & 1 deletion packages/app/playwright.a11y.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { defineConfig } from '@playwright/test';


const isCI = !!process.env.CI;

export default defineConfig({
Expand Down
1 change: 0 additions & 1 deletion packages/app/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { defineConfig } from '@playwright/test';


const isCI = !!process.env.CI;

export default defineConfig({
Expand Down
1 change: 0 additions & 1 deletion packages/app/playwright.visual.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { defineConfig } from '@playwright/test';


const isCI = !!process.env.CI;

export default defineConfig({
Expand Down
3 changes: 1 addition & 2 deletions packages/app/src/build/app-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ export function resolveAppVersion(): string {
if (typeof pkg.version === 'string' && pkg.version.length > 0) {
return pkg.version;
}
} catch {
}
} catch {}
return '0.0.0-unknown';
}

Expand Down
1 change: 0 additions & 1 deletion packages/app/src/build/electron-mode-class.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { describe, expect, test } from 'bun:test';
import { readFileSync } from 'node:fs';
import { join } from 'node:path';
Expand Down
5 changes: 0 additions & 5 deletions packages/app/src/components/ActivityModeContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { AgentIcon } from './icons/AgentIcon';
import { Button } from './ui/button';
import { Tooltip, TooltipContent, TooltipTrigger } from './ui/tooltip';


async function postAgentUndo(body: {
connectionId: string;
docName: string;
Expand All @@ -32,7 +31,6 @@ async function postAgentUndo(body: {
}
}


function hashFromDocName(docName: string): string {
return `#/${docName
.split('/')
Expand All @@ -45,7 +43,6 @@ function navigateToDoc(docName: string): void {
window.location.hash = hashFromDocName(docName);
}


function LoadingState(): React.JSX.Element {
return (
<div
Expand Down Expand Up @@ -199,7 +196,6 @@ function AgentAvatar({
);
}


interface ActivityModeBodyProps {
data: ReturnType<typeof useActivityPanel>['data'];
status: ReturnType<typeof useActivityPanel>['status'];
Expand Down Expand Up @@ -308,7 +304,6 @@ function ActivityModeBody({
);
}


export function ActivityModeContent({
showBackButton = true,
}: {
Expand Down
1 change: 0 additions & 1 deletion packages/app/src/components/ArrayOfObjectsWidget.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import {
closestCenter,
DndContext,
Expand Down
1 change: 0 additions & 1 deletion packages/app/src/components/AuthModal.dom.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { afterEach, describe, expect, jest, test } from 'bun:test';
import { act, cleanup, render, screen } from '@testing-library/react';
import type { OkLocalOpAuthEvent, OkLocalOpAuthStatusResponse } from '@/lib/desktop-bridge-types';
Expand Down
10 changes: 2 additions & 8 deletions packages/app/src/components/AuthModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ import {
} from './ui/dialog';
import { Input } from './ui/input';


async function copyToClipboard(text: string): Promise<void> {
try {
await navigator.clipboard.writeText(text);
} catch {
}
} catch {}
}

interface AuthSuccessResult {
Expand All @@ -44,7 +42,6 @@ interface AuthModalProps {
queryTransport?: AuthQueryTransport;
}


interface DeviceFlowPanelProps {
onSuccess: (result: AuthSuccessResult) => void;
transport: AuthTransport;
Expand Down Expand Up @@ -205,7 +202,6 @@ function DeviceFlowPanel({ onSuccess, transport }: DeviceFlowPanelProps) {
);
}


interface IdentityBodyProps {
login: string;
name: string;
Expand Down Expand Up @@ -241,7 +237,6 @@ function IdentityBody({ login, name, onNameChange, email, onEmailChange }: Ident
);
}


type AuthStep = 'checking' | 'auth' | 'identity' | 'done';

const IDENTITY_PROBE_TIMEOUT_MS = 10_000;
Expand Down Expand Up @@ -328,8 +323,7 @@ export function AuthModal({
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ name, email }),
}).catch(() => {
});
}).catch(() => {});

const result = { ...(authResult ?? { login: '' }), name, email };
setStep('done');
Expand Down
5 changes: 1 addition & 4 deletions packages/app/src/components/AutoSyncOnboardingDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ export function AutoSyncOnboardingDialog({ open, onResolved }: AutoSyncOnboardin
}

return (
<DialogRoot
open={open}
onOpenChange={() => {}}
>
<DialogRoot open={open} onOpenChange={() => {}}>
<DialogContent className="sm:max-w-lg" showCloseButton={false}>
<DialogHeader>
<AutoSyncEnableDialogIntro />
Expand Down
1 change: 0 additions & 1 deletion packages/app/src/components/BetaBadge.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { Trans, useLingui } from '@lingui/react/macro';
import { useUpdateChannel } from '@/hooks/use-update-channel';
import { Badge } from './ui/badge';
Expand Down
3 changes: 1 addition & 2 deletions packages/app/src/components/BottomComposer.dom.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,7 @@ beforeEach(() => {
toastErrors.length = 0;
try {
window.localStorage.clear();
} catch {
}
} catch {}
});

afterEach(() => {
Expand Down
4 changes: 1 addition & 3 deletions packages/app/src/components/BottomComposer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import {
type TargetData,
TERMINAL_CLI_IDS,
Expand Down Expand Up @@ -186,8 +185,7 @@ export function BottomComposer({
if (overlap <= 0) return;
const scroller = view.dom.closest('.editor-doc-scroll');
if (scroller instanceof HTMLElement) scroller.scrollTop += overlap;
} catch {
}
} catch {}
});
};
const card = cardRef.current;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { afterEach, beforeEach, describe, expect, mock, test } from 'bun:test';
import { act, cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react';
import type { ClaudeReadiness, OkDesktopBridge } from '@/lib/desktop-bridge-types';
Expand Down
1 change: 0 additions & 1 deletion packages/app/src/components/CloneDialog.dom.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { afterEach, beforeEach, describe, expect, test } from 'bun:test';
import { cleanup, render, screen } from '@testing-library/react';
import { getLastKnownSignedIn, setLastKnownSignedIn } from '@/lib/auth-state-cache';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { afterEach, describe, expect, mock, test } from 'bun:test';
import { cleanup, fireEvent, render, screen } from '@testing-library/react';
import type { ReactNode } from 'react';
Expand Down
1 change: 0 additions & 1 deletion packages/app/src/components/ComposerContextChips.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { useLingui } from '@lingui/react/macro';
import { X } from 'lucide-react';
import type { ReactNode } from 'react';
Expand Down
1 change: 0 additions & 1 deletion packages/app/src/components/ConsentDialog.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { lazy, Suspense, useSyncExternalStore } from 'react';
import { consentStore } from '@/lib/consent-store';

Expand Down
4 changes: 1 addition & 3 deletions packages/app/src/components/CopyButton.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { useLingui } from '@lingui/react/macro';
import { Check, Copy } from 'lucide-react';
import { useEffect, useState } from 'react';
Expand Down Expand Up @@ -40,8 +39,7 @@ export function CopyButton({
.then(() => clipboardWrite(copyContent))
.then(
() => setCopyTick((n) => n + 1),
() => {
},
() => {},
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,6 @@ describe('CreateProjectDialog cascade staleness (Tier-3 mount)', () => {
});

test('PRD-6649: 5 s polling skips probeNonce bump while a probe is in-flight (race-prevention gate)', async () => {

const stub = makeStubBridge(FIRST_GIT_RESULT, PARENT);

const setIntervalSpy = spyOn(globalThis, 'setInterval');
Expand Down
4 changes: 1 addition & 3 deletions packages/app/src/components/CreateProjectDialog.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import {
ALL_EDITOR_IDS,
CREATE_NEW_PROJECT_FAILURE_REASONS,
Expand Down Expand Up @@ -309,8 +308,7 @@ export function CreateProjectDialog({ open, onOpenChange, bridge }: CreateProjec
if (banner === null) return;
if (firedBanners.current.has(banner)) return;
firedBanners.current.add(banner);
bridge.project.recordCreateNewBannerShown(banner).catch(() => {
});
bridge.project.recordCreateNewBannerShown(banner).catch(() => {});
}, [open, cascade, bridge]);

const rawName = name;
Expand Down
1 change: 0 additions & 1 deletion packages/app/src/components/CreateProjectMenuTrigger.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { useEffect, useState } from 'react';
import { CreateProjectDialog } from '@/components/CreateProjectDialog';
import type { OkDesktopBridge } from '@/lib/desktop-bridge-types';
Expand Down
4 changes: 1 addition & 3 deletions packages/app/src/components/DeleteConfirmationDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ export function DeleteConfirmationDialog({
<DialogContent>
<DialogHeader>
<DialogTitle>{customTitle ?? t`Delete ${itemName}`}</DialogTitle>
<DialogDescription
className="whitespace-pre-wrap"
>
<DialogDescription className="whitespace-pre-wrap">
{customDescription ??
t`Are you sure you want to delete ${itemName}? This action cannot be undone.`}
</DialogDescription>
Expand Down
Loading