Beautiful, AI-native markdown IDE and LLM wiki
TypeScript 2nd-brainagent-skillsclaudecodexcompany-braindocsknowledge-knowledge-baseknowledge-managementllmllm-wikillm-wiki-karpathymarkdownmarkdown-editormdmdxnotespkmsecond-brainskills
feat(open-knowledge): open feedback from Cmd+K and the Help menu (#2858)
sarah6bef30424f6b
diff --git a/.changeset/feedback-form-command-and-help-menu.md b/.changeset/feedback-form-command-and-help-menu.mdnew file mode 100644index 000000000..c3fd6002c--- /dev/null+++ b/.changeset/feedback-form-command-and-help-menu.md@@ -0,0 +1,7 @@+---+"@inkeep/open-knowledge": patch+---++The feedback form is now reachable from more than the Resources menu: a "Send feedback" command in the Cmd+K palette, and Help → Send feedback… in the menu bar. All of them open the same form. The Cmd+K command works in the browser too, and the Help-menu entry opens the form in whichever window is focused, including the Project Navigator.++The Help menu's "Report a Bug…" is now "Report a bug…", matching the sentence-case wording already used everywhere else in the app.diff --git a/.changeset/in-app-feedback-form.md b/.changeset/in-app-feedback-form.mdindex d7e10af77..484276779 100644--- a/.changeset/in-app-feedback-form.md+++ b/.changeset/in-app-feedback-form.md@@ -2,4 +2,4 @@"@inkeep/open-knowledge": minor----Add an in-app feedback form. A new "Provide feedback" action in the Resources menu opens a short form to rate OpenKnowledge (good / not great), pick what got in the way, add a message, attach up to three screenshots, and optionally share an email for follow-up. Submissions file a ticket to the OpenKnowledge team's feedback intake.+Add an in-app feedback form. A new "Send feedback" action in the Resources menu opens a short form to rate OpenKnowledge (good / not great), pick what got in the way, add a message, attach up to three screenshots, and optionally share an email for follow-up. Submissions file a ticket to the OpenKnowledge team's feedback intake.diff --git a/docs/content/reference/cli.mdx b/docs/content/reference/cli.mdxindex 4e27f0142..14eb71ff1 100644--- a/docs/content/reference/cli.mdx+++ b/docs/content/reference/cli.mdx@@ -118,7 +118,7 @@ Each project runs its own local server. These commands let you see and stop them| `ok config validate` | Validate the merged config (defaults → user → project) || `ok config migrate` | Remove deprecated keys from `config.yml` (`--dry-run` to preview; `--scope` project, user, or both) || `ok skills manage` | Control whether OpenKnowledge adopts your editor skills into this project (`--on`, `--off`, `--status`; default off) |-| `ok bug-report` | Package a support bundle — recent app logs, the project's server logs and lock diagnostics, and system info — as an auto-redacted zip under `~/.ok/bug-reports/`, revealed in Finder when it's done (`--no-reveal` to skip). Collects the same `standard` set as the desktop app's **Help → Report a Bug…**; `ok diagnose bundle` produces the `full` superset (telemetry spans, live server state) into the project's `.ok/local/diagnostics/` |+| `ok bug-report` | Package a support bundle — recent app logs, the project's server logs and lock diagnostics, and system info — as an auto-redacted zip under `~/.ok/bug-reports/`, revealed in Finder when it's done (`--no-reveal` to skip). Collects the same `standard` set as the desktop app's **Help → Report a bug…**; `ok diagnose bundle` produces the `full` superset (telemetry spans, live server state) into the project's `.ok/local/diagnostics/` |## Global flagsdiff --git a/docs/content/reference/configuration.mdx b/docs/content/reference/configuration.mdxindex 45f9c2818..90ede825c 100644--- a/docs/content/reference/configuration.mdx+++ b/docs/content/reference/configuration.mdx@@ -88,7 +88,7 @@ Most users never set these — the schema settings above cover the common cases.| `OK_SHOWALL_MAX_ENTRIES` | Max entries the sidebar's disk-walk listing returns per level before it stops and marks the list truncated (default `50000`) || `OK_BRIDGE_TOLERANCE_TELEMETRY` | Set to `1` to record each bridge-tolerance-class fire as a JSONL line in `<project>/.ok/local/tolerance-telemetry.jsonl` (opt-in, local-only, off by default; unstable diagnostic for triaging markdown-fidelity incidents). **Records doc paths in cleartext** — independent of `telemetry.localSink`'s `attributeDenylist`, which redacts span/log attributes, not this file. Deliberately outside the `.ok/local/telemetry/` subtree `ok diagnose bundle` harvests, so the unredacted paths never ship in a bug bundle. || `OTEL_SDK_DISABLED` | OpenTelemetry OTLP push gate. Inverted sense: set to `false` to **enable** push (it is off by default). |-| `OK_BUG_REPORT_INTAKE_URL` | Base URL of the bug-report intake the desktop app's **Help → Report a Bug…** upload posts to (e.g. `https://openknowledge.ai`). Must be `https:` — plain `http:` is accepted only for loopback hosts (local testing). Unset (the default), Send makes no network request — it opens a prefilled email draft to [email protected] that you send yourself. |+| `OK_BUG_REPORT_INTAKE_URL` | Base URL of the bug-report intake the desktop app's **Help → Report a bug…** upload posts to (e.g. `https://openknowledge.ai`). Must be `https:` — plain `http:` is accepted only for loopback hosts (local testing). Unset (the default), Send makes no network request — it opens a prefilled email draft to [email protected] that you send yourself. || `OK_FEEDBACK_INTAKE_ORIGIN` | Origin the optional [uninstall feedback](/docs/reference/what-open-knowledge-writes#what-leaves-your-machine) submission posts to (default `https://openknowledge.ai`). Must be `https:` — plain `http:` is accepted only for loopback hosts (local testing). An unusable value drops the submission rather than falling back to the default. || `OK_EMBEDDINGS_API_KEY` | Fallback embeddings provider API key for [semantic search](#semantic-search), used when none is stored on disk. Prefer `ok embeddings set-key` (writes `~/.ok/secrets.yml`) for normal use; the env var is convenient for CI / scripted runs. |diff --git a/docs/content/reference/what-open-knowledge-writes.mdx b/docs/content/reference/what-open-knowledge-writes.mdxindex 458c63ea2..1139bc8ae 100644--- a/docs/content/reference/what-open-knowledge-writes.mdx+++ b/docs/content/reference/what-open-knowledge-writes.mdx@@ -124,7 +124,7 @@ On each launch and project open, the app also runs **repair sweeps**: it rewrite| `~/.ok/skills/<name>/` | Your global-scope authored skills (kept by `ok uninstall` unless `--purge-content`) | No || `~/.ok/stats.jsonl` | Local "open with AI" handoff stats — local-only, no phone-home | No || `~/.ok/mcp-status.json` | First-launch MCP consent record | No |-| `~/.ok/logs/`, `~/.ok/bug-reports/` | Desktop and CLI logs, and bug-report bundles from `ok bug-report` and the app's **Help → Report a Bug…** dialog (`ok diagnose bundle` writes into the project, under `.ok/local/diagnostics/`) | No |+| `~/.ok/logs/`, `~/.ok/bug-reports/` | Desktop and CLI logs, and bug-report bundles from `ok bug-report` and the app's **Help → Report a bug…** dialog (`ok diagnose bundle` writes into the project, under `.ok/local/diagnostics/`) | No || `~/.ok/bin/`, `~/.ok/env.sh` | `PATH` shim (see [Shell and `PATH`](#shell-and-path) above) | No |**Auth tokens** (for GitHub sync, sharing, and cloning) are stored in the macOS **Keychain** under the service name `open-knowledge`. The `~/.ok/auth.yml` file is only a fallback for headless environments where the Keychain isn't reachable; when the Keychain becomes available, the token is migrated into it and the file copy is removed.@@ -239,7 +239,7 @@ Disable all three with `OK_RECLAIM_DISABLE=1`.| `~/.ok/skills/<name>/` | Your global-scope authored skills (kept by `ok uninstall` unless `--purge-content`) | No || `~/.ok/stats.jsonl` | Local "open with AI" handoff stats — local-only, no phone-home | No || `~/.ok/logs/` | CLI logs (`cli.<date>.log`), size- and age-capped | No |-| `~/.ok/bug-reports/` | Bug-report bundles from `ok bug-report` — the desktop app's **Help → Report a Bug…** dialog writes here too (`ok diagnose bundle` writes into the project, under `.ok/local/diagnostics/`) | No |+| `~/.ok/bug-reports/` | Bug-report bundles from `ok bug-report` — the desktop app's **Help → Report a bug…** dialog writes here too (`ok diagnose bundle` writes into the project, under `.ok/local/diagnostics/`) | No |**Auth tokens** (for GitHub sync, sharing, and cloning) are stored in your operating system's secure credential store when one is available — the macOS **Keychain** (service `open-knowledge`), or the platform equivalent (Windows Credential Manager, Linux Secret Service) — falling back to a `0600` `~/.ok/auth.yml` file on headless systems (a Linux server, CI) where none is reachable.@@ -271,7 +271,7 @@ By default, **nothing.** Everything above is written to your own disk. The only| What | When | Where it goes || --- | --- | --- || Diagnostic bundle | Only when you run `ok diagnose bundle` (you can inspect it first) | Wherever you send it |-| In-app bug report | Only when you click **Send** in the desktop app's **Help → Report a Bug…** dialog — it builds a secret-redacted zip you can reveal and inspect first, and nothing is sent without that explicit click. After a crash, the same dialog adds an **off-by-default** "Include crash dump" checkbox: a crash dump is a memory snapshot that can contain document content and can't be redacted, and it is only ever attached when you check that box | By default, Send makes no network request — it opens a prefilled email draft to [email protected] that you send yourself, naming the zip to attach. Only when an operator has configured a bug-report intake endpoint ([`OK_BUG_REPORT_INTAKE_URL`](/docs/reference/configuration#environment-variables)) does Send upload the zip there, falling back to the same email draft if the upload fails |+| In-app bug report | Only when you click **Send** in the desktop app's **Help → Report a bug…** dialog — it builds a secret-redacted zip you can reveal and inspect first, and nothing is sent without that explicit click. After a crash, the same dialog adds an **off-by-default** "Include crash dump" checkbox: a crash dump is a memory snapshot that can contain document content and can't be redacted, and it is only ever attached when you check that box | By default, Send makes no network request — it opens a prefilled email draft to [email protected] that you send yourself, naming the zip to attach. Only when an operator has configured a bug-report intake endpoint ([`OK_BUG_REPORT_INTAKE_URL`](/docs/reference/configuration#environment-variables)) does Send upload the zip there, falling back to the same email draft if the upload fails || Uninstall feedback | Only after an uninstall has already succeeded, and only if you pick a reason, type a note, or give an email address on the optional "Before you go" screen (desktop app) or prompt (`ok uninstall`). Skipping it, `--yes`, `--json`, and any non-interactive run send nothing | `openknowledge.ai/api/feedback` — the reason you picked, your note, your email address if you gave one, plus the app version and platform. It files one ticket for the team; nothing from your notes is included || Semantic search embeddings | Only when you enable [semantic search](/docs/reference/configuration#semantic-search) **and** set a key — off by default | Your configured embeddings provider (OpenAI by default) || GitHub sync / share | When you sync, clone, publish, or share | GitHub |diff --git a/packages/app/src/App.dom.test.tsx b/packages/app/src/App.dom.test.tsxindex ee64c2e84..8a8ec3f41 100644--- a/packages/app/src/App.dom.test.tsx+++ b/packages/app/src/App.dom.test.tsx@@ -160,6 +160,10 @@ vi.doMock('@/components/ReportBugMenuTrigger', () => ({ReportBugMenuTrigger: () => <div data-testid="report-bug-menu-trigger" />,}));+vi.doMock('@/components/FeedbackMenuTrigger', () => ({+ FeedbackMenuTrigger: () => <div data-testid="feedback-menu-trigger" />,+}));+vi.doMock('@/components/ShareBranchSwitchDialog', () => ({ShareBranchSwitchDialog: () => <div data-testid="share-branch-switch-dialog" />,}));diff --git a/packages/app/src/App.tsx b/packages/app/src/App.tsxindex cf76dadaa..1a14d0174 100644--- a/packages/app/src/App.tsx+++ b/packages/app/src/App.tsx@@ -5,6 +5,7 @@ import { ConnectingBanner } from '@/components/ConnectingBanner';import { CreateProjectMenuTrigger } from '@/components/CreateProjectMenuTrigger';import { DesktopAgentMigration } from '@/components/DesktopAgentMigration';import { EditorPane } from '@/components/EditorPane';+import { FeedbackMenuTrigger } from '@/components/FeedbackMenuTrigger';import { FileSidebar } from '@/components/FileSidebar';import { defaultInitialDir } from '@/components/file-tree-utils';import {@@ -517,9 +518,13 @@ function AppBody() {{/* One-time upgrade migration: carry an existing user's installed desktopapps over into the new opt-in Desktop model. Desktop-only. */}{desktopBridge ? <DesktopAgentMigration /> : null}- {/* Help → Report a Bug… opens ReportBugDialog here — same+ {/* Help → Report a bug… opens ReportBugDialog here — samedesktop-only App-root trigger pattern as CreateProjectMenuTrigger. */}{desktopBridge ? <ReportBugMenuTrigger /> : null}+ {/* Help → Send feedback… opens the same FeedbackFormDialog the+ Resources menu and Cmd+K open. Desktop-only for the same reason as+ the sibling above: the menu action never fires in the web host. */}+ {desktopBridge ? <FeedbackMenuTrigger /> : null}{/* First-launch consent dialog — host-agnostic. Self-gates onthe shared `mcpConsentStore` snapshot; renders nothing untilmain fires `ok:mcp-wiring:show`. Mounted identically indiff --git a/packages/app/src/components/AppMenubar.dom.test.tsx b/packages/app/src/components/AppMenubar.dom.test.tsxnew file mode 100644index 000000000..47f22309f--- /dev/null+++ b/packages/app/src/components/AppMenubar.dom.test.tsx@@ -0,0 +1,87 @@+/**+ * DOM test for AppMenubar's Help menu.+ *+ * AppMenubar is the custom-drawn Windows/Linux menu bar; it self-gates on+ * `window.okDesktop` and returns null on darwin, so its Help entries never+ * render during macOS review. These pin the two entries that route to in-app+ * dialogs, asserting the `bridge.menu.dispatch` payload each one sends.+ *+ * Invocation: `pnpm exec vitest run --config vitest.dom.config.ts+ * src/components/AppMenubar.dom.test.tsx` from `packages/app/`.+ */+import * as actualLinguiMacro from '@lingui/react/macro';+import { cleanup, render, screen } from '@testing-library/react';+import userEvent from '@testing-library/user-event';+import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';+import { renderLinguiTemplate } from '@/test-utils/lingui-mock';++vi.doMock('@lingui/react/macro', () => ({+ ...actualLinguiMacro,+ useLingui: () => ({ t: renderLinguiTemplate }),+}));++type DispatchMock = ReturnType<typeof vi.fn>;++function installBridge(platform: string): DispatchMock {+ // `query` resolves null so the snapshot-gated rows stay hidden; the two+ // rows under test are unconditional.+ const dispatch = vi.fn(() => Promise.resolve(null));+ (window as unknown as { okDesktop?: unknown }).okDesktop = {+ platform,+ menu: { dispatch },+ };+ return dispatch;+}++async function openHelpMenu() {+ const { AppMenubar } = await import('./AppMenubar');+ render(<AppMenubar />);+ await userEvent.click(screen.getByRole('menuitem', { name: 'Help' }));+}++describe('AppMenubar Help menu', () => {+ beforeEach(() => {+ vi.clearAllMocks();+ });++ afterEach(() => {+ cleanup();+ (window as unknown as { okDesktop?: unknown }).okDesktop = undefined;+ });++ test('returns null on darwin, where the native menu bar owns Help', async () => {+ installBridge('darwin');+ const { AppMenubar } = await import('./AppMenubar');+ const { container } = render(<AppMenubar />);+ expect(container.firstChild).toBeNull();+ });++ test('Send feedback dispatches the send-feedback menu action', async () => {+ const dispatch = installBridge('win32');+ await openHelpMenu();++ await userEvent.click(screen.getByRole('menuitem', { name: 'Send feedback…' }));++ expect(dispatch).toHaveBeenCalledWith({ kind: 'menu-action', action: 'send-feedback' });+ });++ test('Report a bug dispatches the report-bug menu action', async () => {+ const dispatch = installBridge('win32');+ await openHelpMenu();++ await userEvent.click(screen.getByRole('menuitem', { name: 'Report a bug…' }));++ expect(dispatch).toHaveBeenCalledWith({ kind: 'menu-action', action: 'report-bug' });+ });++ test('Help entries read identically to the native menu, ellipsis included', async () => {+ installBridge('linux');+ await openHelpMenu();++ // Sentence case + the ellipsis on the two entries that open a form rather+ // than acting on click. Drift here means the two Help surfaces disagree.+ expect(screen.getByRole('menuitem', { name: 'Report a bug…' })).not.toBeNull();+ expect(screen.getByRole('menuitem', { name: 'Send feedback…' })).not.toBeNull();+ expect(screen.getByRole('menuitem', { name: 'OpenKnowledge on GitHub' })).not.toBeNull();+ });+});diff --git a/packages/app/src/components/AppMenubar.tsx b/packages/app/src/components/AppMenubar.tsxindex ed4cf702f..b16382320 100644--- a/packages/app/src/components/AppMenubar.tsx+++ b/packages/app/src/components/AppMenubar.tsx@@ -359,7 +359,10 @@ export function AppMenubar() {{t`OpenKnowledge on GitHub`}</MenubarItem><MenubarItem onSelect={() => dispatch({ kind: 'menu-action', action: 'report-bug' })}>- {t`Report a Bug…`}+ {t`Report a bug…`}+ </MenubarItem>+ <MenubarItem onSelect={() => dispatch({ kind: 'menu-action', action: 'send-feedback' })}>+ {t`Send feedback…`}</MenubarItem>{snapshot?.canCheckForUpdates === true && (<>diff --git a/packages/app/src/components/CommandPalette.dom.test.tsx b/packages/app/src/components/CommandPalette.dom.test.tsxindex 819c92c40..db1e83d8f 100644--- a/packages/app/src/components/CommandPalette.dom.test.tsx+++ b/packages/app/src/components/CommandPalette.dom.test.tsx@@ -39,6 +39,7 @@ let seedDialogProps: Array<{ open: boolean }> = [];let newItemDialogProps: Array<{ open: boolean; kind: string; initialDir: string }> = [];let createProjectDialogProps: Array<{ open: boolean; bridge: unknown }> = [];let reportBugDialogProps: Array<{ open: boolean }> = [];+let feedbackDialogProps: Array<{ open: boolean; source?: string }> = [];let commandDialogProps: CommandDialogProps[] = [];let refreshInstallStatesCalls = 0;const refreshInstallStates = () => {@@ -161,6 +162,19 @@ mock.module('@/components/ReportBugDialog', () => ({},}));+mock.module('@/components/FeedbackFormDialog', () => ({+ FeedbackFormDialog: (props: { open: boolean; source?: string }) => {+ feedbackDialogProps.push(props);+ return (+ <div+ data-open={String(props.open)}+ data-source={props.source}+ data-testid="feedback-form-dialog"+ />+ );+ },+}));+mock.module('@/components/PageListContext', () => ({usePageList: () => ({pages: new Set<string>(),@@ -302,6 +316,7 @@ describe('CommandPalette DOM behavior', () => {newItemDialogProps = [];createProjectDialogProps = [];reportBugDialogProps = [];+ feedbackDialogProps = [];commandDialogProps = [];refreshInstallStatesCalls = 0;worktreeModelMock = null;@@ -482,6 +497,31 @@ describe('CommandPalette DOM behavior', () => {expect(reportBugDialogProps.at(-1)?.open).toBe(true);});+ test('send-feedback command renders on both hosts and opens FeedbackFormDialog', async () => {+ // Host-agnostic, unlike report-a-bug: the form POSTs to the hosted intake+ // route, so the row is present with no bridge.+ const web = await renderPalette({ bridge: null });++ await setQuery('feedback');+ const webRow = screen.getByTestId('command-palette-send-feedback');+ expect(webRow.textContent).toContain('Send feedback');++ fireEvent.click(webRow);++ expect(web.onOpenChange).toHaveBeenCalledWith(false);+ await waitFor(() => {+ expect(screen.getByTestId('feedback-form-dialog').getAttribute('data-open')).toBe('true');+ });+ // Attribution: the palette identifies itself so intake can tell which+ // surface the feedback came from.+ expect(feedbackDialogProps.at(-1)?.source).toBe('command_palette');++ cleanup();+ await renderPalette({ bridge: createBridge() });+ await setQuery('suggestion');+ expect(screen.getByTestId('command-palette-send-feedback')).not.toBeNull();+ });+test('starter-pack command is searchable, participates in empty-state aggregation, and opens SeedDialog after closing', async () => {const { onOpenChange } = await renderPalette({ bridge: null });diff --git a/packages/app/src/components/CommandPalette.tsx b/packages/app/src/components/CommandPalette.tsxindex e0f470017..1c268a247 100644--- a/packages/app/src/components/CommandPalette.tsx+++ b/packages/app/src/components/CommandPalette.tsx@@ -55,6 +55,7 @@ import {TAG_QUERY_PREFIX,type TagDocEntry,} from '@/components/command-palette-tag-search';+import { FeedbackFormDialog } from '@/components/FeedbackFormDialog';import { FileEntryIcon } from '@/components/file-entry-icon';import { defaultInitialDir } from '@/components/file-tree-utils';import { NewItemDialog } from '@/components/NewItemDialog';@@ -340,6 +341,7 @@ export function CommandPalette({ bridge = null, open, onOpenChange }: CommandPalconst [seedDialogOpen, setSeedDialogOpen] = useState(false);const [createProjectOpen, setCreateProjectOpen] = useState(false);const [reportBugOpen, setReportBugOpen] = useState(false);+ const [feedbackOpen, setFeedbackOpen] = useState(false);// Tag-mode state. Loaded lazily on first `tag:` keystroke; cached for// the lifetime of the palette session (cleared on close in the open-// toggle effect). Loading flag drives the `tag-list` placeholder UI;@@ -872,6 +874,7 @@ export function CommandPalette({ bridge = null, open, onOpenChange }: CommandPalopenSeedDialog: () => setSeedDialogOpen(true),openCreateProjectDialog: () => setCreateProjectOpen(true),openReportBugDialog: () => setReportBugOpen(true),+ openFeedbackDialog: () => setFeedbackOpen(true),};const visibleFixedCommands = inExclusiveMode? []@@ -1588,6 +1591,13 @@ export function CommandPalette({ bridge = null, open, onOpenChange }: CommandPal{/* Desktop-only — the registry gates the launching "Report a bug" commandon `bridge !== null`, so the dialog only mounts when the bridge exists. */}{bridge ? <ReportBugDialog open={reportBugOpen} onOpenChange={setReportBugOpen} /> : null}+ {/* Host-agnostic — the feedback form POSTs to the hosted intake route, so+ the "Send feedback" command (and this dialog) exist on web too. */}+ <FeedbackFormDialog+ open={feedbackOpen}+ onOpenChange={setFeedbackOpen}+ source="command_palette"+ /></>);}diff --git a/packages/app/src/components/FeedbackMenuTrigger.dom.test.tsx b/packages/app/src/components/FeedbackMenuTrigger.dom.test.tsxnew file mode 100644index 000000000..e43cf4bf0--- /dev/null+++ b/packages/app/src/components/FeedbackMenuTrigger.dom.test.tsx@@ -0,0 +1,98 @@+/**+ * DOM mount test for FeedbackMenuTrigger — the App-root surface that opens+ * FeedbackFormDialog when the `send-feedback` menu action fires+ * (Help → Send feedback…).+ *+ * Pins the user-visible contract: the dialog is closed until the menu action+ * fires, opens on `send-feedback`, and ignores unrelated menu actions. Driven+ * through `emitLocalMenuAction` — the same fan-out a real menu click hits via+ * main → `ok:menu-action` → the bus forwarder. Sibling of+ * ReportBugMenuTrigger.dom.test.tsx.+ *+ * Invocation: `bun run test:dom` from `packages/app/`.+ */+import { afterEach, describe, expect, test } from 'bun:test';+import { act, cleanup, render, screen, waitFor } from '@testing-library/react';+import {+ __resetLocalMenuActionBusForTests,+ emitLocalMenuAction,+} from '@/lib/local-menu-action-bus';+import { FeedbackMenuTrigger } from './FeedbackMenuTrigger';++// Radix UI primitives (shadcn Dialog) reach for DOM globals at mount. Hoisted+// locally per the sibling ReportBugMenuTrigger.dom.test.tsx.+type WindowGlobals = { NodeFilter?: typeof NodeFilter };+type GlobalWithDomShims = typeof globalThis &+ WindowGlobals & { window?: WindowGlobals; ResizeObserver?: unknown };+const globalWithDomShims = globalThis as GlobalWithDomShims;+if (+ globalWithDomShims.NodeFilter === undefined &&+ globalWithDomShims.window?.NodeFilter !== undefined+) {+ globalWithDomShims.NodeFilter = globalWithDomShims.window.NodeFilter;+}+if (globalWithDomShims.ResizeObserver === undefined) {+ class NoopResizeObserver {+ observe() {}+ unobserve() {}+ disconnect() {}+ }+ globalWithDomShims.ResizeObserver = NoopResizeObserver;+}++const ASYNC_TIMEOUT_MS = 2000;++// Wrap the bus emit in act so the resulting setOpen state flush is applied+// before assertions run (mirrors fireEvent's internal act wrapping).+function fireMenuAction(action: Parameters<typeof emitLocalMenuAction>[0]): void {+ act(() => emitLocalMenuAction(action));+}++describe('FeedbackMenuTrigger', () => {+ afterEach(() => {+ cleanup();+ __resetLocalMenuActionBusForTests();+ });++ test('dialog is closed until the send-feedback menu action fires', () => {+ render(<FeedbackMenuTrigger />);+ // Radix Dialog renders nothing when closed — no portal, no dialog role.+ expect(screen.queryByRole('dialog')).toBeNull();+ });++ test('send-feedback menu action opens FeedbackFormDialog', async () => {+ render(<FeedbackMenuTrigger />);++ fireMenuAction('send-feedback');++ await waitFor(+ () => {+ expect(screen.queryByRole('dialog')).not.toBeNull();+ },+ { timeout: ASYNC_TIMEOUT_MS },+ );+ // The dialog title confirms it's the feedback surface.+ expect(screen.getByRole('dialog', { name: 'How do you like OpenKnowledge?' })).not.toBeNull();+ });++ test('unrelated menu actions do not open the dialog', async () => {+ render(<FeedbackMenuTrigger />);++ fireMenuAction('new-doc');+ fireMenuAction('report-bug');++ // Give any erroneous open a chance to render before asserting absence.+ await new Promise((r) => setTimeout(r, 50));+ expect(screen.queryByRole('dialog')).toBeNull();+ });++ test('unsubscribes from the bus on unmount', async () => {+ const { unmount } = render(<FeedbackMenuTrigger />);+ unmount();++ // After unmount the subscription is gone, so a later emit must not reopen.+ fireMenuAction('send-feedback');+ await new Promise((r) => setTimeout(r, 50));+ expect(screen.queryByRole('dialog')).toBeNull();+ });+});diff --git a/packages/app/src/components/FeedbackMenuTrigger.tsx b/packages/app/src/components/FeedbackMenuTrigger.tsxnew file mode 100644index 000000000..320be764f--- /dev/null+++ b/packages/app/src/components/FeedbackMenuTrigger.tsx@@ -0,0 +1,27 @@+/**+ * Mounts `FeedbackFormDialog` and opens it when main fires the+ * `send-feedback` menu action (Help → Send feedback…). App-root mount so+ * the Help-menu entry works regardless of sidebar/editor state — sibling of+ * `ReportBugMenuTrigger`.+ *+ * Desktop-only: App.tsx renders it only when the desktop bridge is present (the+ * menu action never fires in the web host, which reaches the same form through+ * the Resources menu and Cmd+K). The Navigator window subscribes separately in+ * `NavigatorApp`.+ */++import { useEffect, useState } from 'react';+import { FeedbackFormDialog } from '@/components/FeedbackFormDialog';+import { subscribeLocalMenuAction } from '@/lib/local-menu-action-bus';++export function FeedbackMenuTrigger() {+ const [open, setOpen] = useState(false);++ useEffect(() => {+ return subscribeLocalMenuAction((action) => {+ if (action === 'send-feedback') setOpen(true);+ });+ }, []);++ return <FeedbackFormDialog open={open} onOpenChange={setOpen} source="help_menu" />;+}diff --git a/packages/app/src/components/HelpPopover.dom.test.tsx b/packages/app/src/components/HelpPopover.dom.test.tsxindex 85888dd51..8b578d30a 100644--- a/packages/app/src/components/HelpPopover.dom.test.tsx+++ b/packages/app/src/components/HelpPopover.dom.test.tsx@@ -169,17 +169,17 @@ describe('HelpPopover with the desktop bridge present', () => {(window as unknown as { okDesktop?: unknown }).okDesktop = undefined;});- test('adds Report a bug and Provide feedback actions after the Docs link', async () => {+ test('adds Report a bug and Send feedback actions after the Docs link', async () => {await renderOpenHelpPopover();const nav = screen.getByRole('navigation', { name: 'Resources' });const docs = within(nav).getByRole('link', { name: 'Docs' });const reportBug = within(nav).getByRole('button', { name: 'Report a bug' });- const provideFeedback = within(nav).getByRole('button', { name: 'Provide feedback' });+ const sendFeedback = within(nav).getByRole('button', { name: 'Send feedback' });// Both in-app actions follow the Docs link (DOCUMENT_POSITION_FOLLOWING === 4);// report-bug is desktop-only, so it only appears with the bridge present.expect(docs.compareDocumentPosition(reportBug)).toBe(Node.DOCUMENT_POSITION_FOLLOWING);- expect(docs.compareDocumentPosition(provideFeedback)).toBe(Node.DOCUMENT_POSITION_FOLLOWING);+ expect(docs.compareDocumentPosition(sendFeedback)).toBe(Node.DOCUMENT_POSITION_FOLLOWING);});});diff --git a/packages/app/src/components/HelpPopover.tsx b/packages/app/src/components/HelpPopover.tsxindex afaf6bafc..d86dfe279 100644--- a/packages/app/src/components/HelpPopover.tsx+++ b/packages/app/src/components/HelpPopover.tsx@@ -221,7 +221,7 @@ export const HelpPopover: FC = () => {setFeedbackOpen(true);}}>- <Trans>Provide feedback</Trans>+ <Trans>Send feedback</Trans></ActionRow></>)}diff --git a/packages/app/src/components/NavigatorApp.menu-action.dom.test.tsx b/packages/app/src/components/NavigatorApp.menu-action.dom.test.tsxindex 8ccd59780..517f29244 100644--- a/packages/app/src/components/NavigatorApp.menu-action.dom.test.tsx+++ b/packages/app/src/components/NavigatorApp.menu-action.dom.test.tsx@@ -66,7 +66,8 @@ type MenuActionLike =| 'new-doc'| 'toggle-sidebar'| 'close-active-tab-or-window'- | 'report-bug';+ | 'report-bug'+ | 'send-feedback';interface NavigatorBridgeStub {bridge: OkDesktopBridge;@@ -210,6 +211,28 @@ describe('NavigatorApp new-project menu-action subscription', () => {expect(screen.getByText(/No project is open/)).not.toBeNull();});+ test('send-feedback menu action opens the feedback form', async () => {+ // The Help menu fires to whichever window is focused, so the Navigator+ // owns this path whenever it is the focused window — the editor-window+ // FeedbackMenuTrigger never runs here.+ const stub = makeNavigatorBridge();+ render(<NavigatorApp bridge={stub.bridge} />);++ await new Promise((r) => setTimeout(r, 0));+ expect(screen.queryByRole('dialog')).toBeNull();++ stub.fire('send-feedback');++ await waitFor(+ () => {+ expect(+ screen.queryByRole('dialog', { name: 'How do you like OpenKnowledge?' }),+ ).not.toBeNull();+ },+ { timeout: ASYNC_TIMEOUT_MS },+ );+ });+test('close-active-tab-or-window menu action closes the navigator window', async () => {const closeSpy = spyOn(window, 'close').mockImplementation(() => {});const stub = makeNavigatorBridge();diff --git a/packages/app/src/components/NavigatorApp.tsx b/packages/app/src/components/NavigatorApp.tsxindex 9e8d3ff9d..05054c44e 100644--- a/packages/app/src/components/NavigatorApp.tsx+++ b/packages/app/src/components/NavigatorApp.tsx@@ -54,6 +54,7 @@ import { BetaBadge } from './BetaBadge';import { CloneDialog } from './CloneDialog';import { ConsentDialog } from './ConsentDialog';import { CreateProjectDialog } from './CreateProjectDialog';+import { FeedbackFormDialog } from './FeedbackFormDialog';import { GithubIcon } from './icons/github';import { OkIcon } from './icons/ok';import { McpConsentDialog } from './McpConsentDialog';@@ -112,6 +113,7 @@ export function NavigatorApp({ bridge }: { bridge: OkDesktopBridge }) {const [cloneDialogOpen, setCloneDialogOpen] = useState(false);const [createDialogOpen, setCreateDialogOpen] = useState(false);const [reportBugOpen, setReportBugOpen] = useState(false);+ const [feedbackOpen, setFeedbackOpen] = useState(false);// Starter pack chosen on the packs-forward first-run grid, plus the pack// list. Threaded into CreateProjectDialog so it can name the pack as// read-only context in its description and seed the fresh project with it;@@ -217,12 +219,14 @@ export function NavigatorApp({ bridge }: { bridge: OkDesktopBridge }) {// CreateProjectDialog the "Create new project" card opens. The application// menu fires to whichever window is focused, so the Navigator must react to// it too — not just the editor window's App-root trigger. Same story for- // Help → Report a Bug…, which here opens the report dialog scoped- // system-wide (the Navigator has no project).+ // Help → Report a bug…, which here opens the report dialog scoped+ // system-wide (the Navigator has no project), and Help → Send feedback…,+ // which opens the same feedback form the editor window opens.useEffect(() => {return subscribeLocalMenuAction((action) => {if (action === 'new-project') setCreateDialogOpen(true);if (action === 'report-bug') setReportBugOpen(true);+ if (action === 'send-feedback') setFeedbackOpen(true);if (action === 'close-active-tab-or-window') window.close();});}, []);@@ -494,6 +498,8 @@ export function NavigatorApp({ bridge }: { bridge: OkDesktopBridge }) {<ReportBugDialog open={reportBugOpen} onOpenChange={setReportBugOpen} systemWide />+ <FeedbackFormDialog open={feedbackOpen} onOpenChange={setFeedbackOpen} source="help_menu" />+<AuthModalopen={authModalOpen}onOpenChange={(next) => {diff --git a/packages/app/src/components/ReportBugMenuTrigger.dom.test.tsx b/packages/app/src/components/ReportBugMenuTrigger.dom.test.tsxindex 534cc1a01..4a0b2b9ed 100644--- a/packages/app/src/components/ReportBugMenuTrigger.dom.test.tsx+++ b/packages/app/src/components/ReportBugMenuTrigger.dom.test.tsx@@ -1,6 +1,6 @@/*** DOM mount test for ReportBugMenuTrigger — the App-root surface that opens- * ReportBugDialog when the `report-bug` menu action fires (Help → Report a Bug…).+ * ReportBugDialog when the `report-bug` menu action fires (Help → Report a bug…).** Pins the user-visible contract: the dialog is closed until the menu action* fires, opens on `report-bug`, and ignores unrelated menu actions. The triggerdiff --git a/packages/app/src/components/ReportBugMenuTrigger.tsx b/packages/app/src/components/ReportBugMenuTrigger.tsxindex 706e8af33..d1f5728ee 100644--- a/packages/app/src/components/ReportBugMenuTrigger.tsx+++ b/packages/app/src/components/ReportBugMenuTrigger.tsx@@ -1,6 +1,6 @@/*** Mounts `ReportBugDialog` and opens it when main fires the `report-bug`- * menu action (Help → Report a Bug…). App-root mount so the Help-menu entry+ * menu action (Help → Report a bug…). App-root mount so the Help-menu entry* works regardless of sidebar/editor state — mirroring the self-contained* trigger pattern of `CreateProjectMenuTrigger`.*diff --git a/packages/app/src/components/command-palette-commands.ts b/packages/app/src/components/command-palette-commands.tsindex f47b7afcf..157b8dc01 100644--- a/packages/app/src/components/command-palette-commands.ts+++ b/packages/app/src/components/command-palette-commands.ts@@ -22,6 +22,7 @@ import {FoldVertical,GitBranch,LayoutGrid,+ MessageSquare,Network,Package,PanelLeft,@@ -117,6 +118,7 @@ export interface PaletteCommandContext {openSeedDialog(): void;openCreateProjectDialog(): void;openReportBugDialog(): void;+ openFeedbackDialog(): void;}/** Render-order buckets; the palette renders each group under its own heading. */@@ -171,6 +173,7 @@ const PALETTE_COMMAND_LABELS = {settings: msg`Settings`,installClaudeDesktop: msg`Install for Claude Chat & Cowork (Desktop App)`,reportBug: msg`Report a bug`,+ sendFeedback: msg`Send feedback`,newFromTemplate: msg`New from template`,rename: msg`Rename`,duplicate: msg`Duplicate`,@@ -220,6 +223,7 @@ const COMMAND_ICONS: Record<string, ComponentType<{ className?: string }>> = {settings: Settings,'install-claude-desktop': Download,'report-bug': Bug,+ 'send-feedback': MessageSquare,'new-from-template': FilePlus2,rename: Pencil,duplicate: Copy,@@ -309,6 +313,10 @@ const COMMAND_DISPATCH: Record<string, (ctx: PaletteCommandContext) => void> = {ctx.closePalette();ctx.openReportBugDialog();},+ 'send-feedback': (ctx) => {+ ctx.closePalette();+ ctx.openFeedbackDialog();+ },'check-for-updates': (ctx) =>ctx.runAction(async () => {await ctx.bridge?.update.checkNow();diff --git a/packages/app/src/lib/command-menu-parity.test-helper.ts b/packages/app/src/lib/command-menu-parity.test-helper.tsindex 9b1128790..26a2a60f2 100644--- a/packages/app/src/lib/command-menu-parity.test-helper.ts+++ b/packages/app/src/lib/command-menu-parity.test-helper.ts@@ -40,10 +40,12 @@ export const APP_RESERVED_IDS = new Map<string, string>([// new-project → the registry "New project" row (opens CreateProjectDialog)// send-to-ai → the bespoke per-target "Open with AI" group// report-bug → the registry "Report a bug" row (opens ReportBugDialog)+// send-feedback → the registry "Send feedback" row (opens FeedbackFormDialog)export const PRE_EXISTING_PALETTE_IDS = new Set<string>(['new-doc','new-folder','new-project','send-to-ai','report-bug',+ 'send-feedback',]);diff --git a/packages/app/src/lib/command-menu-parity.test.ts b/packages/app/src/lib/command-menu-parity.test.tsindex c27bca64f..3b6f3092c 100644--- a/packages/app/src/lib/command-menu-parity.test.ts+++ b/packages/app/src/lib/command-menu-parity.test.ts@@ -107,7 +107,8 @@ const PALETTE_COMMAND_LABELS = new Set<string>(['New Terminal','Kill Terminal','OpenKnowledge on GitHub',- 'Report a Bug',+ 'Report a bug',+ 'Send feedback',// Present already; not a single registry command but reachable from the palette// as its own surface (Install for Claude, gated behind SHOW_INSTALL_SKILL).'Install for Claude Chat & Cowork (desktop app)',@@ -136,6 +137,7 @@ function makeFullDeps(): MenuDeps {openInstallSkillDialog: noop,openSettings: noop,onReportBug: noop,+ onSendFeedback: noop,onCheckForUpdates: noop,onUninstall: noop,activeTarget: { kind: 'doc', target: 'doc.md' } as MenuDeps['activeTarget'],@@ -378,6 +380,7 @@ describe('command-menu parity ratchet', () => {'components/ProjectSwitcher.tsx','components/CreateProjectMenuTrigger.tsx','components/ReportBugMenuTrigger.tsx',+ 'components/FeedbackMenuTrigger.tsx','components/NavigatorApp.tsx','editor/DocumentContext.tsx',];@@ -453,6 +456,7 @@ describe('command identity registry (Phase 2b)', () => {'settings','install-claude-desktop','report-bug',+ 'send-feedback','check-for-updates','set-up-integrations','toggle-spell-check',diff --git a/packages/app/src/lib/desktop-bridge-types.ts b/packages/app/src/lib/desktop-bridge-types.tsindex 765440faf..a57c1f70e 100644--- a/packages/app/src/lib/desktop-bridge-types.ts+++ b/packages/app/src/lib/desktop-bridge-types.ts@@ -246,10 +246,13 @@ export type OkMenuAction =// create dialog; `switch-worktree` opens the sidebar worktree switcher.| 'new-worktree'| 'switch-worktree'- // Help → Report a Bug… — opens the in-app bug-report dialog. Both window+ // Help → Report a bug… — opens the in-app bug-report dialog. Both window// types subscribe: editor windows report project-scoped, the Navigator// reports system-wide.- | 'report-bug';+ | 'report-bug'+ // Help → Send feedback… — opens the in-app feedback form, the same one+ // the Resources menu and the Cmd+K palette open. Both window types subscribe.+ | 'send-feedback';type OkUnsubscribe = () => void;diff --git a/packages/app/src/lib/ok-menu-actions.ts b/packages/app/src/lib/ok-menu-actions.tsindex 737fe7cf3..3eb590050 100644--- a/packages/app/src/lib/ok-menu-actions.ts+++ b/packages/app/src/lib/ok-menu-actions.ts@@ -44,6 +44,7 @@ export const OK_MENU_ACTIONS = ['new-worktree','switch-worktree','report-bug',+ 'send-feedback',] as const satisfies readonly OkMenuAction[];// Compile-time completeness: any OkMenuAction member missing from the arraydiff --git a/packages/app/src/locales/en/messages.json b/packages/app/src/locales/en/messages.jsonindex e107041d7..71a7c5bf7 100644--- a/packages/app/src/locales/en/messages.json+++ b/packages/app/src/locales/en/messages.json@@ -120,7 +120,6 @@"1njn7W": ["Light"],"1nke1r": ["Open ", ["0"], " on GitHub (opens in a new tab)"],"1t_NnN": ["Reject"],- "1uyUjj": ["Provide feedback"],"2-CeZn": ["Your report is saved on this Mac, so nothing was lost. You can email it to us instead."],@@ -1372,6 +1371,7 @@"RlLl3G": ["Actions for ", ["0"]],"RmBY0A": ["No git remote"],"RnrnTe": ["Already set up — ok is available in your terminal"],+ "RoafuO": ["Send feedback"],"RobAKV": ["Update the destination and optional section anchor."],"Rq1vFD": ["Tree view options"],"RrAIZx": ["What config sharing covers"],@@ -1758,6 +1758,7 @@"_FLBbi": [["sizeText"], " · secrets redacted · crash dump not redacted"],"_IGfXZ": ["OpenKnowledge quit unexpectedly last time."],"_IX_7x": ["Other"],+ "_JOGC0": ["Send feedback…"],"_NX6gG": ["Managing project AI tools is unavailable in this build."],"_PACVa": ["Release notes"],"_PBJRl": ["Add at least one letter or number."],@@ -2006,7 +2007,6 @@"fNr-MX": ["Disable semantic search"],"fR-Kdc": ["(project-level only)"],"fSRzLo": ["Show document panel"],- "fTtfPS": ["Report a Bug…"],"fVcm9t": [["0", "plural", { "one": ["#", " doc"], "other": ["#", " docs"] }]],"fWi7pn": ["Initialize starter pack"],"fWsBTs": ["Something went wrong. Please try again."],@@ -2025,6 +2025,7 @@"fo0VXg": ["Uninstall"],"fqSfXY": ["Replace"],"fru3T7": ["Could not fix ", ["0"], " of ", ["1"], " files."],+ "ft-BOm": ["Report a bug…"],"fuJZKk": ["Search branches"],"fwhX-N": ["Indent or outdent source"],"fwrPh4": ["Please enter a valid email."],diff --git a/packages/app/src/locales/en/messages.po b/packages/app/src/locales/en/messages.poindex 4a178a30c..09d00eb47 100644--- a/packages/app/src/locales/en/messages.po+++ b/packages/app/src/locales/en/messages.po@@ -6697,10 +6697,6 @@ msgstr "Property value"msgid "Protected branch — cannot push"msgstr "Protected branch — cannot push"-#: src/components/HelpPopover.tsx-msgid "Provide feedback"-msgstr "Provide feedback"-#: src/components/TemplateForm.tsxmsgid "provisional"msgstr "provisional"@@ -7076,8 +7072,8 @@ msgid "Report a bug"msgstr "Report a bug"#: src/components/AppMenubar.tsx-msgid "Report a Bug…"-msgstr "Report a Bug…"+msgid "Report a bug…"+msgstr "Report a bug…"#: src/components/ReportBugDialogBody.tsxmsgid "Report reference"@@ -7605,6 +7601,15 @@ msgstr "Semantic search is on, but no API key is set — search falls back to kemsgid "Send"msgstr "Send"+#: src/components/command-palette-commands.ts+#: src/components/HelpPopover.tsx+msgid "Send feedback"+msgstr "Send feedback"++#: src/components/AppMenubar.tsx+msgid "Send feedback…"+msgstr "Send feedback…"+#: src/components/ReportBugDialogBody.tsxmsgid "Send report"msgstr "Send report"diff --git a/packages/app/src/locales/pseudo/messages.json b/packages/app/src/locales/pseudo/messages.jsonindex 60625ecf8..946c9366e 100644--- a/packages/app/src/locales/pseudo/messages.json+++ b/packages/app/src/locales/pseudo/messages.json@@ -120,7 +120,6 @@"1njn7W": ["Ĺĩĝĥţ"],"1nke1r": ["Ōƥēń ", ["0"], " ōń ĜĩţĤũƀ (ōƥēńś ĩń à ńēŵ ţàƀ)"],"1t_NnN": ["ŔēĴēćţ"],- "1uyUjj": ["Ƥŕōvĩďē ƒēēďƀàćķ"],"2-CeZn": ["Ŷōũŕ ŕēƥōŕţ ĩś śàvēď ōń ţĥĩś Ḿàć, śō ńōţĥĩńĝ ŵàś ĺōśţ. Ŷōũ ćàń ēḿàĩĺ ĩţ ţō ũś ĩńśţēàď."],@@ -1372,6 +1371,7 @@"RlLl3G": ["Àćţĩōńś ƒōŕ ", ["0"]],"RmBY0A": ["Ńō ĝĩţ ŕēḿōţē"],"RnrnTe": ["Àĺŕēàďŷ śēţ ũƥ — ōķ ĩś àvàĩĺàƀĺē ĩń ŷōũŕ ţēŕḿĩńàĺ"],+ "RoafuO": ["Śēńď ƒēēďƀàćķ"],"RobAKV": ["Ũƥďàţē ţĥē ďēśţĩńàţĩōń àńď ōƥţĩōńàĺ śēćţĩōń àńćĥōŕ."],"Rq1vFD": ["Ţŕēē vĩēŵ ōƥţĩōńś"],"RrAIZx": ["Ŵĥàţ ćōńƒĩĝ śĥàŕĩńĝ ćōvēŕś"],@@ -1758,6 +1758,7 @@"_FLBbi": [["sizeText"], " · śēćŕēţś ŕēďàćţēď · ćŕàśĥ ďũḿƥ ńōţ ŕēďàćţēď"],"_IGfXZ": ["ŌƥēńĶńōŵĺēďĝē ǫũĩţ ũńēxƥēćţēďĺŷ ĺàśţ ţĩḿē."],"_IX_7x": ["Ōţĥēŕ"],+ "_JOGC0": ["Śēńď ƒēēďƀàćķ…"],"_NX6gG": ["Ḿàńàĝĩńĝ ƥŕōĴēćţ ÀĨ ţōōĺś ĩś ũńàvàĩĺàƀĺē ĩń ţĥĩś ƀũĩĺď."],"_PACVa": ["Ŕēĺēàśē ńōţēś"],"_PBJRl": ["Àďď àţ ĺēàśţ ōńē ĺēţţēŕ ōŕ ńũḿƀēŕ."],@@ -2006,7 +2007,6 @@"fNr-MX": ["Ďĩśàƀĺē śēḿàńţĩć śēàŕćĥ"],"fR-Kdc": ["(ƥŕōĴēćţ-ĺēvēĺ ōńĺŷ)"],"fSRzLo": ["Śĥōŵ ďōćũḿēńţ ƥàńēĺ"],- "fTtfPS": ["Ŕēƥōŕţ à ßũĝ…"],"fVcm9t": [["0", "plural", { "one": ["#", " ďōć"], "other": ["#", " ďōćś"] }]],"fWi7pn": ["Ĩńĩţĩàĺĩźē śţàŕţēŕ ƥàćķ"],"fWsBTs": ["Śōḿēţĥĩńĝ ŵēńţ ŵŕōńĝ. Ƥĺēàśē ţŕŷ àĝàĩń."],@@ -2025,6 +2025,7 @@"fo0VXg": ["Ũńĩńśţàĺĺ"],"fqSfXY": ["Ŕēƥĺàćē"],"fru3T7": ["Ćōũĺď ńōţ ƒĩx ", ["0"], " ōƒ ", ["1"], " ƒĩĺēś."],+ "ft-BOm": ["Ŕēƥōŕţ à ƀũĝ…"],"fuJZKk": ["Śēàŕćĥ ƀŕàńćĥēś"],"fwhX-N": ["Ĩńďēńţ ōŕ ōũţďēńţ śōũŕćē"],"fwrPh4": ["Ƥĺēàśē ēńţēŕ à vàĺĩď ēḿàĩĺ."],diff --git a/packages/app/src/locales/pseudo/messages.po b/packages/app/src/locales/pseudo/messages.poindex 9c3c89b60..451039bc5 100644--- a/packages/app/src/locales/pseudo/messages.po+++ b/packages/app/src/locales/pseudo/messages.po@@ -6693,10 +6693,6 @@ msgstr ""msgid "Protected branch — cannot push"msgstr ""-#: src/components/HelpPopover.tsx-msgid "Provide feedback"-msgstr ""-#: src/components/TemplateForm.tsxmsgid "provisional"msgstr ""@@ -7072,7 +7068,7 @@ msgid "Report a bug"msgstr ""#: src/components/AppMenubar.tsx-msgid "Report a Bug…"+msgid "Report a bug…"msgstr ""#: src/components/ReportBugDialogBody.tsx@@ -7601,6 +7597,15 @@ msgstr ""msgid "Send"msgstr ""+#: src/components/command-palette-commands.ts+#: src/components/HelpPopover.tsx+msgid "Send feedback"+msgstr ""++#: src/components/AppMenubar.tsx+msgid "Send feedback…"+msgstr ""+#: src/components/ReportBugDialogBody.tsxmsgid "Send report"msgstr ""diff --git a/packages/core/src/commands/command-identity.ts b/packages/core/src/commands/command-identity.tsindex cffa5e39a..ba3a1ec86 100644--- a/packages/core/src/commands/command-identity.ts+++ b/packages/core/src/commands/command-identity.ts@@ -156,9 +156,8 @@ export interface CommandMenuPlacement {/*** Literal native-menu label, for the handful of menu strings that are NOT in* the shared `MENU_LABELS` parity contract: menu-only leaves (Uninstall, New- * Terminal Window) and two leaves whose native label predates the app's- * sentence-case convention and stays byte-identical here (Report a Bug,- * Install…(desktop app)). Takes precedence over `menuLabelKey`.+ * Terminal Window) and the install leaf, whose native label renders+ * "…(desktop app)" lowercase. Takes precedence over `menuLabelKey`.*/readonly menuLabelText?: string;}@@ -361,7 +360,19 @@ export const COMMAND_IDENTITIES: readonly CommandIdentity[] = [keywords: ['bug report issue feedback problem'],availability: { host: 'desktop' },palette: { group: 'project', visibility: 'always' },- menu: [{ section: 'help-links', order: 1, ellipsis: true, menuLabelText: 'Report a Bug' }],+ menu: [{ section: 'help-links', order: 1, ellipsis: true }],+ },+ {+ // Sibling of report-bug, but host-agnostic: the feedback form POSTs to the+ // hosted intake route, so it works in the web host too (unlike the bug+ // report, whose bundle create + upload lives behind the Electron bridge).+ id: 'send-feedback',+ menuActionId: 'send-feedback',+ labelKey: 'sendFeedback',+ keywords: ['feedback', 'suggestion', 'idea', 'rate', 'survey', 'contact'],+ availability: {},+ palette: { group: 'project', visibility: 'always' },+ menu: [{ section: 'help-links', order: 2, ellipsis: true }],},// ── File group (palette) / File-item + worktree (menu) ──────────────────────{diff --git a/packages/core/src/constants/menu-labels.ts b/packages/core/src/constants/menu-labels.tsindex 14a9d2f2a..87378fbe4 100644--- a/packages/core/src/constants/menu-labels.ts+++ b/packages/core/src/constants/menu-labels.ts@@ -63,6 +63,8 @@ export const MENU_LABELS = {killTerminal: 'Kill Terminal',checkSpelling: 'Check spelling while typing',openOnGithub: 'OpenKnowledge on GitHub',+ reportBug: 'Report a bug',+ sendFeedback: 'Send feedback',// Additional shared command labels the registry references. Each string is// rendered identically by the palette, so the parity test stays green. The// native menu appends the … ellipsis at its call site where the command opens@@ -89,11 +91,10 @@ export const MENU_LABELS = {docPanelHide: 'Hide document panel',terminalShow: 'Show Terminal',terminalHide: 'Hide Terminal',- // Palette forms for the two commands whose native-menu leaf renders a- // different literal via the placement's `menuLabelText` ("Report a Bug" keeps- // its capital B; the install leaf renders "…(desktop app)" lowercase), so only- // these palette strings participate in the shared-label parity contract.- reportBug: 'Report a bug',+ // Palette form for the install command, whose native-menu leaf renders a+ // different literal via the placement's `menuLabelText` ("…(desktop app)"+ // lowercase), so only this palette string participates in the shared-label+ // parity contract.installClaudeDesktop: 'Install for Claude Chat & Cowork (Desktop App)',} as const satisfies Record<string, string>;diff --git a/packages/core/src/desktop-bridge.ts b/packages/core/src/desktop-bridge.tsindex 633f2ee21..ece704649 100644--- a/packages/core/src/desktop-bridge.ts+++ b/packages/core/src/desktop-bridge.ts@@ -107,10 +107,13 @@ type OkMenuAction =// Both delegate to the renderer's ProjectSwitcher surface.| 'new-worktree'| 'switch-worktree'- // Help → Report a Bug… — opens the in-app bug-report dialog. Both window+ // Help → Report a bug… — opens the in-app bug-report dialog. Both window// types subscribe: editor windows report project-scoped, the Navigator// reports system-wide.- | 'report-bug';+ | 'report-bug'+ // Help → Send feedback… — opens the in-app feedback form, the same one+ // the Resources menu and the Cmd+K palette open. Both window types subscribe.+ | 'send-feedback';/*** Unsubscribe closure returned from `onProjectSwitched` / `onMenuAction`.diff --git a/packages/desktop/src/main/index.ts b/packages/desktop/src/main/index.tsindex ada42ddfe..74545893d 100644--- a/packages/desktop/src/main/index.ts+++ b/packages/desktop/src/main/index.ts@@ -2479,6 +2479,7 @@ async function runApplicationMenuRefresh(): Promise<void> {});},onReportBug: () => sendMenuActionToFocused('report-bug'),+ onSendFeedback: () => sendMenuActionToFocused('send-feedback'),// App-menu / Help-menu "Check for Updates…" entries fire this. Returns// void: the menu doesn't surface in-flight progress; the existing// `update-available` / `update-not-available` electron-updater eventsdiff --git a/packages/desktop/src/main/menu.ts b/packages/desktop/src/main/menu.tsindex e17327384..5d77c84f6 100644--- a/packages/desktop/src/main/menu.ts+++ b/packages/desktop/src/main/menu.ts@@ -117,13 +117,20 @@ export interface MenuDeps {*/openSettings?(): void;/**- * Help → Report a Bug… click handler — fires the `report-bug` menu action+ * Help → Report a bug… click handler — fires the `report-bug` menu action* to the focused renderer, which opens the in-app report dialog (editor* windows and the Navigator both subscribe). Optional for the same reason* as `openInstallSkillDialog` — unit tests build the menu without wiring* it; the item itself always renders.*/onReportBug?(): void;+ /**+ * Help → Send feedback… click handler — fires the `send-feedback` menu+ * action to the focused renderer, which opens the same in-app feedback form+ * the Resources menu and Cmd+K open (editor windows and the Navigator both+ * subscribe). Optional for the same reason as `onReportBug`.+ */+ onSendFeedback?(): void;/*** "Check for updates…" click handler — fires an out-of-cadence* `autoUpdater.checkForUpdates()` via the `ok:update:check-now` IPC.@@ -516,8 +523,9 @@ const MENU_BINDINGS: Record<string, MenuCommandBinding> = {enabled: (d) => d.onCollapseAll !== undefined,},'open-github': { click: (d) => () => d.openExternalUrl(OPEN_KNOWLEDGE_GITHUB_URL) },- // Report a Bug always renders + is enabled; the click no-ops when unwired.+ // Report a bug always renders + is enabled; the click no-ops when unwired.'report-bug': { click: (d) => () => d.onReportBug?.() },+ 'send-feedback': { click: (d) => () => d.onSendFeedback?.() },'install-claude-desktop': {click: (d) => () => d.openInstallSkillDialog?.(),present: () => SHOW_INSTALL_SKILL,diff --git a/packages/desktop/src/shared/bridge-contract.ts b/packages/desktop/src/shared/bridge-contract.tsindex b82fc134a..74302e432 100644--- a/packages/desktop/src/shared/bridge-contract.ts+++ b/packages/desktop/src/shared/bridge-contract.ts@@ -239,10 +239,13 @@ export type OkMenuAction =// create dialog; `switch-worktree` opens the sidebar worktree switcher.| 'new-worktree'| 'switch-worktree'- // Help → Report a Bug… — opens the in-app bug-report dialog. Both window+ // Help → Report a bug… — opens the in-app bug-report dialog. Both window// types subscribe: editor windows report project-scoped, the Navigator// reports system-wide.- | 'report-bug';+ | 'report-bug'+ // Help → Send feedback… — opens the in-app feedback form, the same one+ // the Resources menu and the Cmd+K palette open. Both window types subscribe.+ | 'send-feedback';/** Returned by `onProjectSwitched` / `onMenuAction`. Call to detach the listener. */type OkUnsubscribe = () => void;diff --git a/packages/desktop/tests/integration/m1-smoke.test.ts b/packages/desktop/tests/integration/m1-smoke.test.tsindex 9b80c496e..e8f3d0806 100644--- a/packages/desktop/tests/integration/m1-smoke.test.ts+++ b/packages/desktop/tests/integration/m1-smoke.test.ts@@ -599,10 +599,11 @@ describe('M1 smoke', () => {expect(coreMembers.size).toBeGreaterThan(0);expect(appMembers.size).toBeGreaterThan(0);// 26 + 2 worktree actions (`new-worktree`, `switch-worktree`) for the- // worktree selector (worktree = window) + `report-bug` (Help menu) + 3- // sidebar visibility toggles (`toggle-show-ok-folders`,- // `toggle-show-only-markdown-files`, `toggle-show-skills-section`).- expect(desktopMembers.size).toBe(32);+ // worktree selector (worktree = window) + `report-bug` and+ // `send-feedback` (Help menu) + 3 sidebar visibility toggles+ // (`toggle-show-ok-folders`, `toggle-show-only-markdown-files`,+ // `toggle-show-skills-section`).+ expect(desktopMembers.size).toBe(33);expect(desktopMembers).toEqual(coreMembers);expect(desktopMembers).toEqual(appMembers);// Pin the visibility toggles explicitly: a bare count check wouldn'tdiff --git a/packages/desktop/tests/main/menu.test.ts b/packages/desktop/tests/main/menu.test.tsindex 6ddb7cacd..102dc2c0a 100644--- a/packages/desktop/tests/main/menu.test.ts+++ b/packages/desktop/tests/main/menu.test.ts@@ -386,7 +386,7 @@ describe('buildMenuTemplate', () => {});});- describe('Report a Bug… menu item', () => {+ describe('Report a bug… menu item', () => {test('always renders in the Help menu, even without the dep wired', () => {// Unlike Check for updates… (capability-gated on the updater handle),// the report flow is always available — the item renders with default@@ -395,20 +395,48 @@ describe('buildMenuTemplate', () => {const helpMenu = template.find((t) => t.label === 'Help');const sub = helpMenu?.submenu as MenuItemConstructorOptions[] | undefined;if (!sub) throw new Error('Help submenu missing');- expect(sub.find((i) => i.label === 'Report a Bug…')).toBeDefined();+ expect(sub.find((i) => i.label === 'Report a bug…')).toBeDefined();});test('click dispatches deps.onReportBug()', () => {const onReportBug = mock(() => {});const deps = makeDeps({ onReportBug });const template = buildMenuTemplate(deps);- const item = findByLabel(template, 'Report a Bug…');- if (!item || typeof item.click !== 'function') throw new Error('Report a Bug… click missing');+ const item = findByLabel(template, 'Report a bug…');+ if (!item || typeof item.click !== 'function') throw new Error('Report a bug… click missing');(item.click as () => void)();expect(onReportBug).toHaveBeenCalledTimes(1);});});+ describe('Send feedback… menu item', () => {+ test('always renders in the Help menu, even without the dep wired', () => {+ // Host-agnostic sibling of Report a bug…: the form posts to the hosted+ // intake route, so nothing gates the item and an unwired click no-ops.+ const template = buildMenuTemplate(makeDeps());+ const helpMenu = template.find((t) => t.label === 'Help');+ const sub = helpMenu?.submenu as MenuItemConstructorOptions[] | undefined;+ if (!sub) throw new Error('Help submenu missing');+ expect(sub.find((i) => i.label === 'Send feedback…')).toBeDefined();+ });++ test('click dispatches deps.onSendFeedback()', () => {+ // The parity ratchet asserts the binding EXISTS; only this pins that it+ // calls the right dep — a copy-paste to onReportBug would pass the ratchet.+ const onSendFeedback = mock(() => {});+ const onReportBug = mock(() => {});+ const deps = makeDeps({ onSendFeedback, onReportBug });+ const template = buildMenuTemplate(deps);+ const item = findByLabel(template, 'Send feedback…');+ if (!item || typeof item.click !== 'function') {+ throw new Error('Send feedback… click missing');+ }+ (item.click as () => void)();+ expect(onSendFeedback).toHaveBeenCalledTimes(1);+ expect(onReportBug).not.toHaveBeenCalled();+ });+ });+describe('Uninstall OpenKnowledge… menu item', () => {test('omitted entirely when onUninstall dep is undefined', () => {const template = buildMenuTemplate(makeDeps());diff --git a/packages/desktop/tests/smoke/report-bug.e2e.ts b/packages/desktop/tests/smoke/report-bug.e2e.tsindex 0cab83f4d..d1f312555 100644--- a/packages/desktop/tests/smoke/report-bug.e2e.ts+++ b/packages/desktop/tests/smoke/report-bug.e2e.ts@@ -124,13 +124,13 @@ test.describe('Report-a-bug entry points', () => {await app.evaluate(({ Menu }) => {const appMenu = Menu.getApplicationMenu();for (const top of appMenu?.items ?? []) {- const item = top.submenu?.items.find((candidate) => candidate.label === 'Report a Bug…');+ const item = top.submenu?.items.find((candidate) => candidate.label === 'Report a bug…');if (item) {item.click();return;}}- throw new Error('Report a Bug… menu item not found in any submenu');+ throw new Error('Report a bug… menu item not found in any submenu');});const composeDialog = page.getByRole('dialog', { name: 'Report a bug' });await expect(composeDialog).toBeVisible({ timeout: 10_000 });