Skip to content

Beautiful, AI-native markdown IDE and LLM wiki

fix(open-knowledge): point at a plugin's settings after enabling it (PRD-7651) (#3062)

serafin-garciac22a0575e0eb
diff --git a/.changeset/plugin-enable-points-at-settings.md b/.changeset/plugin-enable-points-at-settings.md
new file mode 100644
index 000000000..c2fffd328
--- /dev/null
+++ b/.changeset/plugin-enable-points-at-settings.md
@@ -0,0 +1,12 @@
+---
+'@inkeep/open-knowledge': patch
+---
+
+Turning on a plugin now tells you where to configure it. Enabling a plugin in Settings → Plugins raises a confirmation with an **Open settings** button that jumps straight to that plugin's own page — the page where the plugin actually does something, and which previously you had to know to go looking for in the sidebar.
+
+| Before | After |
+| --- | --- |
+| Enable Frontmatter schemas, nothing visibly happens | "Frontmatter schemas enabled" with a button to its settings |
+| Its settings section appears in the sidebar, possibly scrolled off screen | One click lands you on it |
+
+This applies to every plugin — markdownlint, Frontmatter schemas, and the user-scope Themes plugin — rather than being wired up per plugin. Each plugin's settings page also now carries a **Learn more** link to its documentation, for whoever arrives after the confirmation has gone.
diff --git a/packages/app/package.json b/packages/app/package.json
index d80d11f3e..34a897110 100644
--- a/packages/app/package.json
+++ b/packages/app/package.json
@@ -26,7 +26,7 @@
"measure:fuzz": "bash scripts/measure-fuzz.sh",
"measure:stress": "bash scripts/measure-stress.sh",
"perf:compare": "bash scripts/perf-compare.sh",
- "test:e2e": "playwright test tests/stress/ux-interactions.e2e.ts tests/stress/file-tree-create.e2e.ts tests/stress/file-tree-drag-to-root.e2e.ts tests/stress/file-tree-deselect-to-root.e2e.ts tests/stress/create-then-rename-editable.e2e.ts tests/stress/find-replace.e2e.ts tests/stress/editor-tabs.e2e.ts tests/stress/crdt-stress.e2e.ts tests/stress/slash-command.e2e.ts tests/stress/paste-fidelity.e2e.ts tests/stress/fr-7a-disconnect-source-mode.e2e.ts tests/stress/docs-open.e2e.ts tests/stress/frozen-table-headers.e2e.ts tests/stress/asset-embed.e2e.ts tests/stress/asset-embed-advanced.e2e.ts tests/stress/asset-click-dispatch.e2e.ts tests/stress/handoff.e2e.ts tests/stress/multi-agent-presence.e2e.ts tests/stress/editor-mode-persistence.e2e.ts tests/stress/lint-config-toggle.e2e.ts tests/stress/schema-edit-fields-view.e2e.ts tests/stress/sidebar-search-pill.e2e.ts tests/stress/navigation-history.e2e.ts tests/stress/command-palette-semantic.e2e.ts tests/stress/agent-activity-panel.e2e.ts tests/stress/drop-pipeline-auto-open.e2e.ts tests/stress/command-palette-flicker.e2e.ts tests/stress/cm6-list-hanging-indent.e2e.ts tests/stress/ng7-rapid-nav-coherence.e2e.ts tests/stress/reveal-on-activate.e2e.ts tests/stress/selection-indicator.e2e.ts tests/stress/new-file-cross-doc-bleed.e2e.ts tests/stress/editor-mode-flip-cross-doc-bleed.e2e.ts tests/stress/editor-area-viewport-resize.e2e.ts tests/stress/qa-sidebar-responsive.e2e.ts tests/stress/prd-6955-reassertion-repro.e2e.ts tests/stress/prd-6955-reassertion-wedge.e2e.ts tests/stress/prd-6914-repro.e2e.ts tests/stress/showall-lazy-tree.e2e.ts tests/stress/tabs-component-strip.e2e.ts tests/stress/source-find-scroll.e2e.ts tests/stress/harness-app-warmth.e2e.ts tests/stress/qa-canary-authoring-both-modes.e2e.ts tests/stress/qa-canary-live-typing.e2e.ts tests/stress/keystroke-cadence-danger-space.e2e.ts tests/stress/jsx-unregistered-backspace-delete.e2e.ts tests/stress/jsx-unregistered-ime-concurrent.e2e.ts tests/stress/jsx-backspace-delete.e2e.ts tests/stress/link-authoring-bytes.e2e.ts tests/stress/link-authoring-apex.e2e.ts tests/stress/command-palette-parity.e2e.ts tests/stress/settings-search.e2e.ts tests/stress/chip-popover-positioning.e2e.ts tests/stress/docs-open-scroll-restore.e2e.ts tests/stress/file-tree-decoration-chip-strip-repro.e2e.ts tests/stress/grip-click-nodeselect.e2e.ts tests/stress/jsx-halo-semantics.e2e.ts tests/stress/jsx-image-body-click.e2e.ts tests/stress/jsx-prop-panel-placeholder.e2e.ts tests/stress/jsx-range-encompass-halo.e2e.ts tests/stress/jsx-wildcard-convert.e2e.ts tests/stress/markdown-lint.e2e.ts tests/stress/unified-problems.e2e.ts tests/stress/mid-type-recovery.e2e.ts tests/stress/observer-a-multi-client.e2e.ts tests/stress/outline-toolbar-occlusion.e2e.ts tests/stress/quiet-tree-hidden-doc.e2e.ts tests/stress/raw-mdx-fallback-onblur-upgrade.e2e.ts tests/stress/rename-noext-probe.e2e.ts tests/stress/show-ok-folders.e2e.ts tests/stress/source-polish.e2e.ts tests/stress/warm-skeleton-scroll-restore.e2e.ts tests/stress/props-toggle-scroll-preserve.e2e.ts tests/stress/yjs-no-dual-import.e2e.ts tests/stress/slash-command-auto-open.e2e.ts tests/stress/graph-panel-surfaces.e2e.ts tests/stress/clipboard-relative-url-source-fallback.e2e.ts tests/stress/asset-embed-real-fidelity.e2e.ts tests/stress/prop-upload.e2e.ts tests/stress/rename-content-preservation.e2e.ts tests/stress/rename-consolidation.e2e.ts tests/stress/outline-active-heading.e2e.ts tests/stress/outline-navigation.e2e.ts tests/stress/prd-7627-default-swatch.e2e.ts tests/stress/clipboard-dollar-math-source-fallback.e2e.ts tests/stress/source-mode-undo-keymap.e2e.ts tests/stress/timeline-recovered-restore.e2e.ts tests/stress/blank-line-preservation.e2e.ts tests/stress/landing-helpers.e2e.ts tests/stress/mode-switch-landing.e2e.ts tests/stress/comment-annotation-visibility.e2e.ts",
+ "test:e2e": "playwright test tests/stress/ux-interactions.e2e.ts tests/stress/file-tree-create.e2e.ts tests/stress/file-tree-drag-to-root.e2e.ts tests/stress/file-tree-deselect-to-root.e2e.ts tests/stress/create-then-rename-editable.e2e.ts tests/stress/find-replace.e2e.ts tests/stress/editor-tabs.e2e.ts tests/stress/crdt-stress.e2e.ts tests/stress/slash-command.e2e.ts tests/stress/paste-fidelity.e2e.ts tests/stress/fr-7a-disconnect-source-mode.e2e.ts tests/stress/docs-open.e2e.ts tests/stress/frozen-table-headers.e2e.ts tests/stress/asset-embed.e2e.ts tests/stress/asset-embed-advanced.e2e.ts tests/stress/asset-click-dispatch.e2e.ts tests/stress/handoff.e2e.ts tests/stress/multi-agent-presence.e2e.ts tests/stress/editor-mode-persistence.e2e.ts tests/stress/lint-config-toggle.e2e.ts tests/stress/plugin-enable-notice.e2e.ts tests/stress/schema-edit-fields-view.e2e.ts tests/stress/sidebar-search-pill.e2e.ts tests/stress/navigation-history.e2e.ts tests/stress/command-palette-semantic.e2e.ts tests/stress/agent-activity-panel.e2e.ts tests/stress/drop-pipeline-auto-open.e2e.ts tests/stress/command-palette-flicker.e2e.ts tests/stress/cm6-list-hanging-indent.e2e.ts tests/stress/ng7-rapid-nav-coherence.e2e.ts tests/stress/reveal-on-activate.e2e.ts tests/stress/selection-indicator.e2e.ts tests/stress/new-file-cross-doc-bleed.e2e.ts tests/stress/editor-mode-flip-cross-doc-bleed.e2e.ts tests/stress/editor-area-viewport-resize.e2e.ts tests/stress/qa-sidebar-responsive.e2e.ts tests/stress/prd-6955-reassertion-repro.e2e.ts tests/stress/prd-6955-reassertion-wedge.e2e.ts tests/stress/prd-6914-repro.e2e.ts tests/stress/showall-lazy-tree.e2e.ts tests/stress/tabs-component-strip.e2e.ts tests/stress/source-find-scroll.e2e.ts tests/stress/harness-app-warmth.e2e.ts tests/stress/qa-canary-authoring-both-modes.e2e.ts tests/stress/qa-canary-live-typing.e2e.ts tests/stress/keystroke-cadence-danger-space.e2e.ts tests/stress/jsx-unregistered-backspace-delete.e2e.ts tests/stress/jsx-unregistered-ime-concurrent.e2e.ts tests/stress/jsx-backspace-delete.e2e.ts tests/stress/link-authoring-bytes.e2e.ts tests/stress/link-authoring-apex.e2e.ts tests/stress/command-palette-parity.e2e.ts tests/stress/settings-search.e2e.ts tests/stress/chip-popover-positioning.e2e.ts tests/stress/docs-open-scroll-restore.e2e.ts tests/stress/file-tree-decoration-chip-strip-repro.e2e.ts tests/stress/grip-click-nodeselect.e2e.ts tests/stress/jsx-halo-semantics.e2e.ts tests/stress/jsx-image-body-click.e2e.ts tests/stress/jsx-prop-panel-placeholder.e2e.ts tests/stress/jsx-range-encompass-halo.e2e.ts tests/stress/jsx-wildcard-convert.e2e.ts tests/stress/markdown-lint.e2e.ts tests/stress/unified-problems.e2e.ts tests/stress/mid-type-recovery.e2e.ts tests/stress/observer-a-multi-client.e2e.ts tests/stress/outline-toolbar-occlusion.e2e.ts tests/stress/quiet-tree-hidden-doc.e2e.ts tests/stress/raw-mdx-fallback-onblur-upgrade.e2e.ts tests/stress/rename-noext-probe.e2e.ts tests/stress/show-ok-folders.e2e.ts tests/stress/source-polish.e2e.ts tests/stress/warm-skeleton-scroll-restore.e2e.ts tests/stress/props-toggle-scroll-preserve.e2e.ts tests/stress/yjs-no-dual-import.e2e.ts tests/stress/slash-command-auto-open.e2e.ts tests/stress/graph-panel-surfaces.e2e.ts tests/stress/clipboard-relative-url-source-fallback.e2e.ts tests/stress/asset-embed-real-fidelity.e2e.ts tests/stress/prop-upload.e2e.ts tests/stress/rename-content-preservation.e2e.ts tests/stress/rename-consolidation.e2e.ts tests/stress/outline-active-heading.e2e.ts tests/stress/outline-navigation.e2e.ts tests/stress/prd-7627-default-swatch.e2e.ts tests/stress/clipboard-dollar-math-source-fallback.e2e.ts tests/stress/source-mode-undo-keymap.e2e.ts tests/stress/timeline-recovered-restore.e2e.ts tests/stress/blank-line-preservation.e2e.ts tests/stress/landing-helpers.e2e.ts tests/stress/mode-switch-landing.e2e.ts tests/stress/comment-annotation-visibility.e2e.ts",
"test:e2e:install-browsers": "playwright install chromium webkit firefox",
"test:visual": "playwright test --config playwright.visual.config.ts",
"test:visual:update": "playwright test --config playwright.visual.config.ts --update-snapshots",
diff --git a/packages/app/src/components/settings/FrontmatterPluginSection.dom.test.tsx b/packages/app/src/components/settings/FrontmatterPluginSection.dom.test.tsx
index 416b34dc1..b9e8e549a 100644
--- a/packages/app/src/components/settings/FrontmatterPluginSection.dom.test.tsx
+++ b/packages/app/src/components/settings/FrontmatterPluginSection.dom.test.tsx
@@ -113,6 +113,21 @@ beforeEach(() => {
});
describe('FrontmatterPluginSection — schema browser', () => {
+ test('links its docs page from the panel header', () => {
+ // The standing counterpart to the enable-time toast: the panel itself says
+ // where to read up on schema authoring.
+ render(<FrontmatterPluginSection />);
+ const docs = screen.getByTestId(
+ 'settings-plugin-frontmatter-title-docs-link',
+ ) as HTMLAnchorElement;
+ expect(docs.getAttribute('href')).toBe(
+ 'https://openknowledge.ai/docs/advanced/content-rules/frontmatter',
+ );
+ // The accessible name is built from the panel title — a wrong `title` would
+ // silently say "markdownlint" here, which only this assertion catches.
+ expect(docs.getAttribute('aria-label')).toBe('Learn more about Frontmatter schemas');
+ });
+
test('renders one toggleable row per discovered file', () => {
render(<FrontmatterPluginSection />);
const mapped = screen.getByTestId('frontmatter-schema-row-.ok/schemas/doc.schema.json');
diff --git a/packages/app/src/components/settings/LintingSection.dom.test.tsx b/packages/app/src/components/settings/LintingSection.dom.test.tsx
index cf47a91f9..e1123f5cb 100644
--- a/packages/app/src/components/settings/LintingSection.dom.test.tsx
+++ b/packages/app/src/components/settings/LintingSection.dom.test.tsx
@@ -33,6 +33,7 @@ if (globalWithDomShims.ResizeObserver === undefined) {
}
let mockProjectConfig: Config | null = null;
+let mockUserConfig: Config | null = null;
let mockProjectSynced = true;
let mockProjectBinding: ConfigBinding | null = null;
@@ -44,7 +45,7 @@ vi.doMock('@/lib/config-provider', () => ({
projectLocalBinding: null,
okignoreBinding: null,
okignoreSynced: false,
- userConfig: null,
+ userConfig: mockUserConfig,
projectConfig: mockProjectConfig,
projectSynced: mockProjectSynced,
projectLocalConfig: null,
@@ -88,6 +89,27 @@ vi.doMock('@/editor/lint-config-client', () => ({
},
}));
+// The enable notice is a toast; capture it instead of rendering a Toaster so the
+// action's deep-link target is assertable without sonner's portal + timers.
+interface ToastOptions {
+ id?: string;
+ description?: string;
+ duration?: number;
+ action?: { label: string; onClick: () => void };
+}
+interface CapturedToast extends ToastOptions {
+ message: string;
+}
+const successToasts: CapturedToast[] = [];
+vi.doMock('sonner', () => ({
+ toast: {
+ success: (message: string, options?: ToastOptions) => {
+ successToasts.push({ message, ...options });
+ },
+ error: () => {},
+ },
+}));
+
const { ProjectPluginsManageSection, UserPluginsManageSection, MarkdownlintPluginSection } =
await import('./LintingSection');
@@ -103,25 +125,39 @@ function configWith(linter: SliceOverrides): Config {
} as unknown as Config;
}
-function makeBinding(): { binding: ConfigBinding; calls: unknown[] } {
+function makeBinding(options: { ok?: boolean } = {}): {
+ binding: ConfigBinding;
+ calls: unknown[];
+} {
const calls: unknown[] = [];
+ const ok = options.ok !== false;
const binding = {
current: () => ({}),
patch: (patch: unknown) => {
calls.push(patch);
- return { ok: true, value: { applied: [], effective: {} } };
+ return ok
+ ? { ok: true, value: { applied: [], effective: {} } }
+ : { ok: false, error: { code: 'invalid' } };
},
subscribe: () => () => {},
} as unknown as ConfigBinding;
return { binding, calls };
}
+/** A config where every project plugin reads as OFF, so a click ENABLES it. */
+function configWithNoPluginsEnabled(): Config {
+ return { contentRules: {} } as unknown as Config;
+}
+
beforeEach(() => {
mockProjectConfig = configWith({});
+ mockUserConfig = null;
mockProjectSynced = true;
mockProjectBinding = null;
mockProjectLintData = null;
writeMarkdownlintRuleCalls.length = 0;
+ successToasts.length = 0;
+ window.location.hash = '';
});
afterEach(() => {
@@ -158,6 +194,61 @@ describe('ProjectPluginsManageSection', () => {
});
});
+ test('enabling a plugin offers its settings panel, and the offer deep-links there', async () => {
+ // The gap this closes: enabling happens here, but the plugin is configured
+ // on its own page — which can sit scrolled off screen in the sidebar.
+ mockProjectConfig = configWithNoPluginsEnabled();
+ const { binding } = makeBinding();
+ mockProjectBinding = binding;
+ render(<ProjectPluginsManageSection />);
+
+ await userEvent.click(screen.getByTestId('settings-plugin-toggle-frontmatter'));
+
+ expect(successToasts).toHaveLength(1);
+ expect(successToasts[0]?.message).toBe('Frontmatter schemas enabled');
+ successToasts[0]?.action?.onClick();
+ expect(window.location.hash).toBe('#settings/plugin:frontmatter');
+ });
+
+ test('the notice carries a per-plugin id so repeat toggles replace rather than stack', async () => {
+ // The fixed id is the whole mechanism behind "toggling the same plugin
+ // repeatedly replaces the notice"; without this assertion that claim is
+ // just a docstring. Duration and description are the other two options the
+ // notice depends on and nothing else pinned.
+ mockProjectConfig = configWithNoPluginsEnabled();
+ const { binding } = makeBinding();
+ mockProjectBinding = binding;
+ render(<ProjectPluginsManageSection />);
+
+ await userEvent.click(screen.getByTestId('settings-plugin-toggle-frontmatter'));
+ await userEvent.click(screen.getByTestId('settings-plugin-toggle-markdownlint'));
+
+ expect(successToasts.map((toast) => toast.id)).toEqual([
+ 'plugin-enabled-frontmatter',
+ 'plugin-enabled-markdownlint',
+ ]);
+ expect(successToasts[0]?.description).toBe('Set it up on its own page under Plugins.');
+ expect(successToasts[0]?.duration).toBe(8000);
+ });
+
+ test('disabling a plugin says nothing (nothing new to configure)', async () => {
+ const { binding } = makeBinding();
+ mockProjectBinding = binding;
+ // configWith({}) leaves markdownlint enabled, so this click turns it OFF.
+ render(<ProjectPluginsManageSection />);
+ await userEvent.click(screen.getByTestId('settings-plugin-toggle-markdownlint'));
+ expect(successToasts).toHaveLength(0);
+ });
+
+ test('a rejected write does not claim the plugin was enabled', async () => {
+ mockProjectConfig = configWithNoPluginsEnabled();
+ const { binding } = makeBinding({ ok: false });
+ mockProjectBinding = binding;
+ render(<ProjectPluginsManageSection />);
+ await userEvent.click(screen.getByTestId('settings-plugin-toggle-frontmatter'));
+ expect(successToasts).toHaveLength(0);
+ });
+
test('disables controls until the binding is ready', () => {
mockProjectBinding = null;
mockProjectSynced = false;
@@ -185,6 +276,23 @@ describe('UserPluginsManageSection', () => {
render(<UserPluginsManageSection userBinding={userBinding} />);
await userEvent.click(screen.getByTestId('settings-plugin-toggle-theme'));
expect(userCalls).toContainEqual({ appearance: { colorThemeEnabled: false } });
+ // Turning it OFF is not an invitation to go configure it.
+ expect(successToasts).toHaveLength(0);
+ });
+
+ test('re-enabling Themes offers its panel too (the user-scope plugin is not special-cased)', async () => {
+ const { binding: userBinding } = makeBinding();
+ // Absent-or-false is the only way `colorThemeEnabled` reads as off; the
+ // default is on, so start from an explicit false.
+ mockUserConfig = { appearance: { colorThemeEnabled: false } } as unknown as Config;
+ render(<UserPluginsManageSection userBinding={userBinding} />);
+
+ await userEvent.click(screen.getByTestId('settings-plugin-toggle-theme'));
+
+ expect(successToasts).toHaveLength(1);
+ expect(successToasts[0]?.message).toBe('Themes enabled');
+ successToasts[0]?.action?.onClick();
+ expect(window.location.hash).toBe('#settings/plugin:theme');
});
});
@@ -208,6 +316,26 @@ describe('MarkdownlintPluginSection', () => {
expect(screen.queryByTestId('settings-scope-badge-user')).toBeNull();
});
+ test('links its docs page from the panel header', () => {
+ // The standing counterpart to the enable toast — whoever lands here later
+ // (or after the toast expired) still has a route to the how-to.
+ mockProjectLintData = projectDataWithMarkdownlintRules({ default: true });
+ render(
+ <TooltipProvider>
+ <MarkdownlintPluginSection />
+ </TooltipProvider>,
+ );
+ const docs = screen.getByTestId(
+ 'settings-plugin-markdownlint-title-docs-link',
+ ) as HTMLAnchorElement;
+ expect(docs.getAttribute('href')).toBe(
+ 'https://openknowledge.ai/docs/advanced/content-rules/markdownlint',
+ );
+ // A link list full of bare "Learn more" tells a screen-reader user nothing;
+ // the accessible name names the destination and keeps the visible text.
+ expect(docs.getAttribute('aria-label')).toBe('Learn more about markdownlint');
+ });
+
test('names the project config file in the description when one is present', () => {
// When the project has a committed `.markdownlint.*`, the description
// switches to a different UX context — it names the file and says it
diff --git a/packages/app/src/components/settings/LintingSection.tsx b/packages/app/src/components/settings/LintingSection.tsx
index 2c1943c68..88b392105 100644
--- a/packages/app/src/components/settings/LintingSection.tsx
+++ b/packages/app/src/components/settings/LintingSection.tsx
@@ -44,6 +44,7 @@ import { requestSchemaFieldsView } from '@/lib/schema-fields-view-intent';
import { LINT_PLUGIN_META } from './lint-plugin-meta';
import { MarkdownlintRuleBrowser } from './markdownlint-rule-browser';
import { PluginBetaBadge } from './PluginBetaBadge';
+import { notifyPluginEnabled } from './plugin-enabled-notice';
import { ScopeBadge } from './ScopeBadge';
/** Project-scope content-rules config + a `contentRules`-patch writer. Shared by the sections. */
@@ -141,7 +142,10 @@ export function ProjectPluginsManageSection() {
id={`settings-plugin-toggle-${plugin.id}`}
checked={on}
disabled={!bindingReady}
- onCheckedChange={(next) => write(pluginEnabledPatch(plugin.id, next))}
+ onCheckedChange={(next) => {
+ if (!write(pluginEnabledPatch(plugin.id, next))) return;
+ if (next) notifyPluginEnabled({ pluginId: plugin.id, label: plugin.label });
+ }}
aria-label={on ? t`Disable ${plugin.label}` : t`Enable ${plugin.label}`}
data-testid={`settings-plugin-toggle-${plugin.id}`}
/>
@@ -207,7 +211,13 @@ export function UserPluginsManageSection({ userBinding }: { userBinding: ConfigB
onCheckedChange={(next) => {
if (!userBinding) return;
const result = userBinding.patch({ appearance: { colorThemeEnabled: next } });
- if (!result.ok) toast.error(t`Failed to save theme setting`);
+ if (!result.ok) {
+ toast.error(t`Failed to save theme setting`);
+ return;
+ }
+ // 'theme' is the user-scope plugin's `plugin:theme` sidebar id —
+ // it owns no `contentRules` slice, so it is not in LINT_PLUGIN_META.
+ if (next) notifyPluginEnabled({ pluginId: 'theme', label: t`Themes` });
}}
aria-label={themeEnabled ? t`Disable Themes` : t`Enable Themes`}
data-testid="settings-plugin-toggle-theme"
@@ -224,6 +234,7 @@ function PluginSectionHeader({
title,
scope,
beta,
+ docUrl,
children,
}: {
titleId: string;
@@ -232,8 +243,14 @@ function PluginSectionHeader({
scope?: 'user' | 'project';
/** When set, renders the feature-maturity Beta tag beside the title. */
beta?: boolean;
+ /**
+ * Docs page for the plugin. The standing counterpart to the enable-time
+ * toast: whoever lands here later still gets a route to the how-to.
+ */
+ docUrl?: string;
children: ReactNode;
}) {
+ const { t } = useLingui();
return (
<div className="space-y-1">
<div className="flex items-center gap-2">
@@ -244,10 +261,33 @@ function PluginSectionHeader({
{scope ? <ScopeBadge scope={scope} /> : null}
</div>
<p className="text-sm text-muted-foreground">{children}</p>
+ {docUrl !== undefined ? (
+ <a
+ href={docUrl}
+ target="_blank"
+ rel="noopener noreferrer"
+ onClick={(e) => dispatchExternalLinkClick(e, docUrl)}
+ onAuxClick={(e) => dispatchExternalLinkClick(e, docUrl)}
+ // Names its destination for anyone listing links out of context, where
+ // a bare "Learn more" says nothing. Keeps the visible text as a prefix
+ // so voice control still activates it by what's on screen.
+ aria-label={t`Learn more about ${title}`}
+ className="inline-flex items-center gap-0.5 text-sm text-muted-foreground underline-offset-2 hover:text-foreground hover:underline"
+ data-testid={`${titleId}-docs-link`}
+ >
+ <Trans>Learn more</Trans>
+ <ArrowUpRight aria-hidden className="size-3" />
+ </a>
+ ) : null}
</div>
);
}
+/** Docs page for one plugin — panel headers link it beside their description. */
+function pluginDocUrl(id: LintPluginId): string | undefined {
+ return LINT_PLUGIN_META.find((plugin) => plugin.id === id)?.docUrl;
+}
+
/** markdownlint plugin: the full-catalog rule browser. */
export function MarkdownlintPluginSection({
initialRuleQuery,
@@ -265,6 +305,7 @@ export function MarkdownlintPluginSection({
titleId="settings-plugin-markdownlint-title"
title="markdownlint"
scope="project"
+ docUrl={pluginDocUrl('markdownlint')}
>
<Trans>
Flag common markdown issues in the editor. Powered by{' '}
@@ -584,6 +625,7 @@ export function FrontmatterPluginSection() {
titleId="settings-plugin-frontmatter-title"
title={t`Frontmatter schemas`}
beta
+ docUrl={pluginDocUrl('frontmatter')}
>
<Trans>
Validate document frontmatter against standard JSON Schema files (draft-06, draft-07,
diff --git a/packages/app/src/components/settings/SettingsDialogBody.sections.dom.test.tsx b/packages/app/src/components/settings/SettingsDialogBody.sections.dom.test.tsx
index 89db2b69d..bf039d81b 100644
--- a/packages/app/src/components/settings/SettingsDialogBody.sections.dom.test.tsx
+++ b/packages/app/src/components/settings/SettingsDialogBody.sections.dom.test.tsx
@@ -761,4 +761,19 @@ describe('SettingsDialogBody section runtime dispatch', () => {
expect(screen.getByTestId('settings-install-claude-desktop').textContent).toBe('Reinstall');
expect(screen.getByTestId('install-claude-dialog').getAttribute('data-reinstall')).toBe('true');
});
+ // Drift guard: `plugin:<id>` is constructed independently in three places —
+ // `pluginSettingsSectionId`, the shell's sidebar group, and this dispatcher.
+ // Nothing in the type system ties them, and the enable notice's deep link
+ // silently falls back to Preferences if they diverge. `lint-plugin-meta.test.ts`
+ // is the local precedent for this shape of guard.
+ test('dispatches every lint plugin id built by pluginSettingsSectionId', async () => {
+ const { pluginSettingsSectionId } = await import('@/lib/use-settings-route');
+ const { LINT_PLUGIN_META } = await import('./lint-plugin-meta');
+
+ for (const plugin of LINT_PLUGIN_META) {
+ cleanup();
+ await renderBody({ activeId: pluginSettingsSectionId(plugin.id) });
+ expect(screen.getByTestId(`settings-plugin-${plugin.id}`)).toBeTruthy();
+ }
+ });
});
diff --git a/packages/app/src/components/settings/SettingsDialogShell.dom.test.tsx b/packages/app/src/components/settings/SettingsDialogShell.dom.test.tsx
index 8cda4894b..57fc447ab 100644
--- a/packages/app/src/components/settings/SettingsDialogShell.dom.test.tsx
+++ b/packages/app/src/components/settings/SettingsDialogShell.dom.test.tsx
@@ -21,7 +21,7 @@
*/
import type { ConfigBinding, OkignoreBinding } from '@inkeep/open-knowledge-core';
-import { cleanup, render, screen } from '@testing-library/react';
+import { act, cleanup, render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';
@@ -313,6 +313,54 @@ describe('SettingsDialogShell userBinding gating (Tier-3 mount)', () => {
expect(screen.queryByTestId('settings-body-probe') === null).toBe(true);
});
+ // Regression: the plugin-enable notice fires a deep link while the dialog is
+ // ALREADY open. `initialSection` cannot carry that — an in-dialog hash write
+ // is a replaceState (no `hashchange`), and after a sidebar click moved
+ // `activeId` without touching the hash, the target can equal the current
+ // hash. Both make a hash-only channel a no-op on second use.
+ test('an in-dialog deep link re-activates its section even when the hash already matches', async () => {
+ window.location.hash = '#settings/plugin:markdownlint';
+ render(
+ <SettingsDialogShell
+ open={true}
+ initialSection="plugin:markdownlint"
+ onOpenChange={() => {}}
+ />,
+ );
+ expect(probeProps[probeProps.length - 1]?.activeId).toBe('plugin:markdownlint');
+
+ // Sidebar click moves the panel; the hash deliberately stays put.
+ await userEvent.click(screen.getByTestId('settings-sidebar-item-hotkeys'));
+ expect(probeProps[probeProps.length - 1]?.activeId).toBe('hotkeys');
+ expect(window.location.hash).toBe('#settings/plugin:markdownlint');
+
+ // Same target as the current hash — must still land.
+ const { openPluginSettings } = await import('@/lib/use-settings-route');
+ await act(async () => {
+ openPluginSettings('markdownlint');
+ });
+ expect(probeProps[probeProps.length - 1]?.activeId).toBe('plugin:markdownlint');
+ });
+
+ // Second half of the `plugin:<id>` drift guard (the body dispatcher is pinned
+ // in SettingsDialogBody.sections.dom.test.tsx). The sidebar builds the id
+ // independently of `pluginSettingsSectionId`; if the two drift, the enable
+ // notice's deep link lands on a section the sidebar never highlights.
+ test('builds sidebar ids for enabled plugins that match pluginSettingsSectionId', async () => {
+ const { pluginSettingsSectionId } = await import('@/lib/use-settings-route');
+ mockProjectConfig = {
+ contentRules: { markdownlint: { enabled: true }, frontmatter: { enabled: true } },
+ };
+
+ render(<SettingsDialogShell open={true} onOpenChange={() => {}} />);
+
+ for (const id of ['markdownlint', 'frontmatter']) {
+ expect(
+ screen.getByTestId(`settings-sidebar-item-${pluginSettingsSectionId(id)}`),
+ ).toBeTruthy();
+ }
+ });
+
test('contains body render failures inside the dialog frame', async () => {
mockBodyMode = 'throw';
diff --git a/packages/app/src/components/settings/SettingsDialogShell.tsx b/packages/app/src/components/settings/SettingsDialogShell.tsx
index 0ff5b0dbe..6e7af720b 100644
--- a/packages/app/src/components/settings/SettingsDialogShell.tsx
+++ b/packages/app/src/components/settings/SettingsDialogShell.tsx
@@ -49,6 +49,7 @@ import { useDocumentContext } from '@/editor/DocumentContext';
import { useConfigContext } from '@/lib/config-provider';
import { isFileProtocolPage } from '@/lib/file-protocol-page';
import { useClaudeDesktopIntegration } from '@/lib/handoff/use-claude-desktop-integration';
+import { subscribeToSettingsSection } from '@/lib/use-settings-route';
import { cn } from '@/lib/utils';
import { LINT_PLUGIN_META } from './lint-plugin-meta';
import { buildSettingsSearchIndex, type SettingsSearchEntry } from './settings-search-index';
@@ -112,6 +113,13 @@ export function SettingsDialogShell({
}
}, [open, initialSection]);
+ // Deep links fired while the dialog is ALREADY open (the plugin-enable
+ // notice's "Open settings") arrive here, not via `initialSection` — an
+ // in-dialog hash write is a `replaceState` and fires no `hashchange`, and its
+ // target can equal the current hash after a sidebar click moved `activeId`
+ // without it.
+ useEffect(() => subscribeToSettingsSection(setActiveId), []);
+
// Imperative scroll-to-flash for a field the search navigated to. The target
// renders inside the lazily-loaded body and, for schema sections, only once
// its config binding has synced — so it can appear well after this effect
diff --git a/packages/app/src/components/settings/lint-plugin-meta.ts b/packages/app/src/components/settings/lint-plugin-meta.ts
index 9cc16ea84..cda6fae15 100644
--- a/packages/app/src/components/settings/lint-plugin-meta.ts
+++ b/packages/app/src/components/settings/lint-plugin-meta.ts
@@ -11,9 +11,13 @@ export interface LintPluginMeta {
id: LintPluginId;
/** Sidebar + panel-header label (brand names — intentionally not translated). */
label: string;
+ /** Docs page for the plugin, linked from its settings panel. */
+ docUrl: string;
}
+const DOCS_BASE = 'https://openknowledge.ai/docs/advanced/content-rules';
+
export const LINT_PLUGIN_META: LintPluginMeta[] = [
- { id: 'markdownlint', label: 'markdownlint' },
- { id: 'frontmatter', label: 'Frontmatter schemas' },
+ { id: 'markdownlint', label: 'markdownlint', docUrl: `${DOCS_BASE}/markdownlint` },
+ { id: 'frontmatter', label: 'Frontmatter schemas', docUrl: `${DOCS_BASE}/frontmatter` },
];
diff --git a/packages/app/src/components/settings/plugin-enabled-notice.ts b/packages/app/src/components/settings/plugin-enabled-notice.ts
new file mode 100644
index 000000000..a37898593
--- /dev/null
+++ b/packages/app/src/components/settings/plugin-enabled-notice.ts
@@ -0,0 +1,45 @@
+/**
+ * The "you turned it on — here's where to set it up" notice, shared by every
+ * per-scope Plugins manage page (This project → Plugins, User → Plugins).
+ *
+ * Enabling happens on the manage list, but a plugin is CONFIGURED on its own
+ * panel in the Plugins sidebar group — a separate surface the enable gesture
+ * gives no path to, and one that can sit scrolled off screen. Without this the
+ * plugin appears to turn on and do nothing. The action deep-links to that panel
+ * through the settings hash, so it lands whether the dialog is still open or a
+ * later click reopens it.
+ *
+ * Not a React module on purpose: the toast fires from a `Switch` handler, so it
+ * needs the `@lingui/core/macro` `t` (resolved at call time, inside the
+ * function — never at module scope, which would freeze the boot locale).
+ */
+
+import { t } from '@lingui/core/macro';
+import { toast } from 'sonner';
+import { openPluginSettings } from '@/lib/use-settings-route';
+
+/** How long the notice stays up — longer than the default so it can be read AND clicked. */
+const NOTICE_DURATION_MS = 8000;
+
+export interface PluginEnabledNotice {
+ /** Plugin id, as used by the `plugin:<id>` sidebar section. */
+ pluginId: string;
+ /** Display name, e.g. `Frontmatter schemas`. */
+ label: string;
+}
+
+/**
+ * Announce a just-enabled plugin and offer its settings panel. Toggling the
+ * same plugin repeatedly replaces the notice instead of stacking (fixed id).
+ */
+export function notifyPluginEnabled({ pluginId, label }: PluginEnabledNotice): void {
+ toast.success(t`${label} enabled`, {
+ id: `plugin-enabled-${pluginId}`,
+ description: t`Set it up on its own page under Plugins.`,
+ duration: NOTICE_DURATION_MS,
+ action: {
+ label: t`Open settings`,
+ onClick: () => openPluginSettings(pluginId),
+ },
+ });
+}
diff --git a/packages/app/src/lib/use-settings-route.test.ts b/packages/app/src/lib/use-settings-route.test.ts
index 305fd842c..0be59e7e9 100644
--- a/packages/app/src/lib/use-settings-route.test.ts
+++ b/packages/app/src/lib/use-settings-route.test.ts
@@ -7,6 +7,7 @@ import { describe, expect, test } from 'vitest';
import {
isSettingsHashOpen,
isSettingsShortcut,
+ pluginSettingsSectionId,
SETTINGS_OPEN_HASH,
settingsHashSection,
} from './use-settings-route';
@@ -62,6 +63,15 @@ describe('settingsHashSection', () => {
test('non-settings hash → null', () => {
expect(settingsHashSection('#/some-doc')).toBeNull();
});
+
+ test('round-trips a `plugin:<id>` section (the colon survives the parse)', () => {
+ // Plugin panels are the one sidebar family whose ids are not plain slugs —
+ // the enable toast deep-links to them, so the colon must reach the shell
+ // intact or the jump silently falls back to Preferences.
+ const hash = `#settings/${pluginSettingsSectionId('frontmatter')}`;
+ expect(isSettingsHashOpen(hash)).toBe(true);
+ expect(settingsHashSection(hash)).toBe('plugin:frontmatter');
+ });
});
describe('SETTINGS_OPEN_HASH', () => {
diff --git a/packages/app/src/lib/use-settings-route.ts b/packages/app/src/lib/use-settings-route.ts
index 5e78b5c8a..7cb834ed0 100644
--- a/packages/app/src/lib/use-settings-route.ts
+++ b/packages/app/src/lib/use-settings-route.ts
@@ -44,6 +44,53 @@ function settingsSectionHash(sectionId: string): string {
return `#settings/${sectionId}`;
}
+/**
+ * In-dialog section navigation, dispatched alongside the hash write below.
+ *
+ * The hash alone cannot carry this. Sidebar clicks move the dialog's `activeId`
+ * WITHOUT touching the hash (deliberate — the hash is an entry point, not a
+ * durable route), so the two diverge; a navigation request whose target equals
+ * the current hash then writes nothing, and even an unconditional write of an
+ * identical value fires no `hashchange`. The result is a dead affordance on
+ * second use. This event re-fires regardless of value, the same problem the
+ * shell's `ruleQuery` nonce solves for repeat rule navigation.
+ */
+const SECTION_INTENT_EVENT = 'open-knowledge:settings-section-intent';
+
+/** Subscribe to in-dialog section navigation. Returns an unsubscribe. */
+export function subscribeToSettingsSection(onSection: (sectionId: string) => void): () => void {
+ if (typeof window === 'undefined') return () => {};
+ const handler = (event: Event) => {
+ const { detail } = event as CustomEvent<string>;
+ if (typeof detail === 'string' && detail.length > 0) onSection(detail);
+ };
+ window.addEventListener(SECTION_INTENT_EVENT, handler);
+ return () => window.removeEventListener(SECTION_INTENT_EVENT, handler);
+}
+
+/**
+ * Navigate to a sidebar section, whether Settings is closed or already open.
+ *
+ * Closed: assigning the hash pushes a history entry and opens the dialog there.
+ * Open: `replaceState` keeps the URL truthful WITHOUT pushing — the dialog's
+ * `close()` is a single `history.back()`, so an extra entry would make the
+ * first Escape rewind to `#settings` (dialog stays open, panel snaps back to
+ * Preferences) instead of closing. The event is what actually moves the panel.
+ *
+ * The named wrappers below are the call-site vocabulary; keep new deep links as
+ * wrappers here rather than hand-building the hash at the call site.
+ */
+function openSettingsSection(sectionId: string): void {
+ if (typeof window === 'undefined') return;
+ const target = settingsSectionHash(sectionId);
+ if (isSettingsHashOpen(window.location.hash)) {
+ window.history.replaceState(null, '', target);
+ window.dispatchEvent(new CustomEvent(SECTION_INTENT_EVENT, { detail: sectionId }));
+ return;
+ }
+ if (window.location.hash !== target) window.location.hash = target;
+}
+
/** Sidebar item id for the User → Configure agents section. */
const CONFIGURE_AGENTS_SECTION = 'configure-agents';
@@ -53,9 +100,7 @@ const CONFIGURE_AGENTS_SECTION = 'configure-agents';
* (mirrors `SETTINGS_OPEN_HASH` usage in `SettingsButton`).
*/
export function openAgentSettings(): void {
- if (typeof window === 'undefined') return;
- const target = settingsSectionHash(CONFIGURE_AGENTS_SECTION);
- if (window.location.hash !== target) window.location.hash = target;
+ openSettingsSection(CONFIGURE_AGENTS_SECTION);
}
/** Sidebar item id for the This project → Plugins manage section. */
@@ -67,9 +112,26 @@ const PROJECT_PLUGINS_SECTION = 'plugins-manage';
* single-sourced (mirrors `openAgentSettings`).
*/
export function openProjectPluginsSettings(): void {
- if (typeof window === 'undefined') return;
- const target = settingsSectionHash(PROJECT_PLUGINS_SECTION);
- if (window.location.hash !== target) window.location.hash = target;
+ openSettingsSection(PROJECT_PLUGINS_SECTION);
+}
+
+/**
+ * Sidebar item id for one plugin's own settings panel — the `plugin:<id>` ids
+ * the Plugins group builds and `SettingsDialogBody` dispatches on. Mirrors
+ * those two sites; a rename has to move all three together.
+ */
+export function pluginSettingsSectionId(pluginId: string): string {
+ return `plugin:${pluginId}`;
+}
+
+/**
+ * Open Settings straight to an enabled plugin's own panel — where the
+ * just-enabled plugin is actually configured. The enable gesture happens on a
+ * different page (the per-scope Plugins manage list), so without this the
+ * plugin appears to turn on and do nothing.
+ */
+export function openPluginSettings(pluginId: string): void {
+ openSettingsSection(pluginSettingsSectionId(pluginId));
}
interface SettingsRouteState {
diff --git a/packages/app/src/locales/en/messages.json b/packages/app/src/locales/en/messages.json
index 89dba3cba..91bd2bdd6 100644
--- a/packages/app/src/locales/en/messages.json
+++ b/packages/app/src/locales/en/messages.json
@@ -172,6 +172,7 @@
"2ryd91": ["Failed to rename property"],
"2tgFCe": ["Starting clone"],
"2vIPtm": ["Open link in new tab"],
+ "2wTb8w": ["Set it up on its own page under Plugins."],
"2wxgft": ["Rename"],
"322lyb": ["Highlight tips, warnings, and notes."],
"34qyH5": ["Could not reach server"],
@@ -1164,6 +1165,7 @@
")."
],
"LhWYpm": ["Other OK paths are tracked upstream:"],
+ "Li4U-T": ["Learn more about ", ["title"]],
"LiAw2k": ["What this changes"],
"LlHqdU": ["Initializing project"],
"Llyqvo": ["This usually means one of:"],
@@ -1769,6 +1771,7 @@
"XcGbim": ["Show hidden files"],
"Xet9MX": ["Failed to load backlinks"],
"Xewl6B": ["Your local copy is behind. Pull the latest changes, then open the link again."],
+ "XfA5xx": [["label"], " enabled"],
"XfzqjK": ["template \"", ["name"], "\""],
"Xg-Ntj": ["The token needs the repo and read:user scopes."],
"Xisk4u": ["Edited ", ["editedAgo"]],
@@ -1834,6 +1837,7 @@
"YjhKI5": ["Cloning..."],
"YkvmF4": ["New session"],
"YlDuro": ["Fit height"],
+ "Yp-Hi_": ["Open settings"],
"YsEYYS": [
["behind", "plural", { "one": ["#", " commit behind"], "other": ["#", " commits behind"] }]
],
@@ -3360,6 +3364,7 @@
"ztKII6": ["Failed to add item"],
"zvjCD4": ["Detailed diagnostics"],
"zwBp5t": ["Private"],
+ "zwWKhA": ["Learn more"],
"zyKa-I": ["Star us on GitHub"],
"zz_Wd_": ["Mode"]
}
diff --git a/packages/app/src/locales/en/messages.po b/packages/app/src/locales/en/messages.po
index c76f2c1fd..205dfa3b6 100644
--- a/packages/app/src/locales/en/messages.po
+++ b/packages/app/src/locales/en/messages.po
@@ -489,6 +489,10 @@ msgstr "{keyName} value"
msgid "{label} ({0})"
msgstr "{label} ({0})"
+#: src/components/settings/plugin-enabled-notice.ts
+msgid "{label} enabled"
+msgstr "{label} enabled"
+
#: src/components/ActivityPanelBurstRow.tsx
msgid "{laterEdits, plural, one {Removes # newer edit on this file.} other {Removes # newer edits on this file.}}"
msgstr "{laterEdits, plural, one {Removes # newer edit on this file.} other {Removes # newer edits on this file.}}"
@@ -5252,6 +5256,14 @@ msgstr "Layout"
msgid "Layout options"
msgstr "Layout options"
+#: src/components/settings/LintingSection.tsx
+msgid "Learn more"
+msgstr "Learn more"
+
+#: src/components/settings/LintingSection.tsx
+msgid "Learn more about {title}"
+msgstr "Learn more about {title}"
+
#: src/components/settings/TerminalSection.tsx
msgid "Let agents use OpenKnowledge without asking"
msgstr "Let agents use OpenKnowledge without asking"
@@ -6678,6 +6690,10 @@ msgstr "Open recent project"
msgid "Open session dock"
msgstr "Open session dock"
+#: src/components/settings/plugin-enabled-notice.ts
+msgid "Open settings"
+msgstr "Open settings"
+
#: src/components/ShareBranchSwitchDialog.tsx
#: src/components/ShareReceiveDialog.tsx
msgid "Open shared {targetNoun}"
@@ -8407,6 +8423,10 @@ msgstr "Set git identity"
msgid "Set identity"
msgstr "Set identity"
+#: src/components/settings/plugin-enabled-notice.ts
+msgid "Set it up on its own page under Plugins."
+msgstr "Set it up on its own page under Plugins."
+
#: src/components/settings/SyncSection.tsx
msgid "Set the sync default for users opening this project for the first time. This setting is committed to your repository."
msgstr "Set the sync default for users opening this project for the first time. This setting is committed to your repository."
diff --git a/packages/app/src/locales/pseudo/messages.json b/packages/app/src/locales/pseudo/messages.json
index 65943862b..65abfd0ab 100644
--- a/packages/app/src/locales/pseudo/messages.json
+++ b/packages/app/src/locales/pseudo/messages.json
@@ -172,6 +172,7 @@
"2ryd91": ["Ƒàĩĺēď ţō ŕēńàḿē ƥŕōƥēŕţŷ"],
"2tgFCe": ["Śţàŕţĩńĝ ćĺōńē"],
"2vIPtm": ["Ōƥēń ĺĩńķ ĩń ńēŵ ţàƀ"],
+ "2wTb8w": ["Śēţ ĩţ ũƥ ōń ĩţś ōŵń ƥàĝē ũńďēŕ Ƥĺũĝĩńś."],
"2wxgft": ["Ŕēńàḿē"],
"322lyb": ["Ĥĩĝĥĺĩĝĥţ ţĩƥś, ŵàŕńĩńĝś, àńď ńōţēś."],
"34qyH5": ["Ćōũĺď ńōţ ŕēàćĥ śēŕvēŕ"],
@@ -1164,6 +1165,7 @@
")."
],
"LhWYpm": ["Ōţĥēŕ ŌĶ ƥàţĥś àŕē ţŕàćķēď ũƥśţŕēàḿ:"],
+ "Li4U-T": ["Ĺēàŕń ḿōŕē àƀōũţ ", ["title"]],
"LiAw2k": ["Ŵĥàţ ţĥĩś ćĥàńĝēś"],
"LlHqdU": ["Ĩńĩţĩàĺĩźĩńĝ ƥŕōĴēćţ"],
"Llyqvo": ["Ţĥĩś ũśũàĺĺŷ ḿēàńś ōńē ōƒ:"],
@@ -1769,6 +1771,7 @@
"XcGbim": ["Śĥōŵ ĥĩďďēń ƒĩĺēś"],
"Xet9MX": ["Ƒàĩĺēď ţō ĺōàď ƀàćķĺĩńķś"],
"Xewl6B": ["Ŷōũŕ ĺōćàĺ ćōƥŷ ĩś ƀēĥĩńď. Ƥũĺĺ ţĥē ĺàţēśţ ćĥàńĝēś, ţĥēń ōƥēń ţĥē ĺĩńķ àĝàĩń."],
+ "XfA5xx": [["label"], " ēńàƀĺēď"],
"XfzqjK": ["ţēḿƥĺàţē \"", ["name"], "\""],
"Xg-Ntj": ["Ţĥē ţōķēń ńēēďś ţĥē ŕēƥō àńď ŕēàď:ũśēŕ śćōƥēś."],
"Xisk4u": ["Ēďĩţēď ", ["editedAgo"]],
@@ -1834,6 +1837,7 @@
"YjhKI5": ["Ćĺōńĩńĝ..."],
"YkvmF4": ["Ńēŵ śēśśĩōń"],
"YlDuro": ["Ƒĩţ ĥēĩĝĥţ"],
+ "Yp-Hi_": ["Ōƥēń śēţţĩńĝś"],
"YsEYYS": [
["behind", "plural", { "one": ["#", " ćōḿḿĩţ ƀēĥĩńď"], "other": ["#", " ćōḿḿĩţś ƀēĥĩńď"] }]
],
@@ -3360,6 +3364,7 @@
"ztKII6": ["Ƒàĩĺēď ţō àďď ĩţēḿ"],
"zvjCD4": ["Ďēţàĩĺēď ďĩàĝńōśţĩćś"],
"zwBp5t": ["Ƥŕĩvàţē"],
+ "zwWKhA": ["Ĺēàŕń ḿōŕē"],
"zyKa-I": ["Śţàŕ ũś ōń ĜĩţĤũƀ"],
"zz_Wd_": ["Ḿōďē"]
}
diff --git a/packages/app/src/locales/pseudo/messages.po b/packages/app/src/locales/pseudo/messages.po
index f5f7c4707..6d4d94737 100644
--- a/packages/app/src/locales/pseudo/messages.po
+++ b/packages/app/src/locales/pseudo/messages.po
@@ -489,6 +489,10 @@ msgstr ""
msgid "{label} ({0})"
msgstr ""
+#: src/components/settings/plugin-enabled-notice.ts
+msgid "{label} enabled"
+msgstr ""
+
#: src/components/ActivityPanelBurstRow.tsx
msgid "{laterEdits, plural, one {Removes # newer edit on this file.} other {Removes # newer edits on this file.}}"
msgstr ""
@@ -5248,6 +5252,14 @@ msgstr ""
msgid "Layout options"
msgstr ""
+#: src/components/settings/LintingSection.tsx
+msgid "Learn more"
+msgstr ""
+
+#: src/components/settings/LintingSection.tsx
+msgid "Learn more about {title}"
+msgstr ""
+
#: src/components/settings/TerminalSection.tsx
msgid "Let agents use OpenKnowledge without asking"
msgstr ""
@@ -6674,6 +6686,10 @@ msgstr ""
msgid "Open session dock"
msgstr ""
+#: src/components/settings/plugin-enabled-notice.ts
+msgid "Open settings"
+msgstr ""
+
#: src/components/ShareBranchSwitchDialog.tsx
#: src/components/ShareReceiveDialog.tsx
msgid "Open shared {targetNoun}"
@@ -8403,6 +8419,10 @@ msgstr ""
msgid "Set identity"
msgstr ""
+#: src/components/settings/plugin-enabled-notice.ts
+msgid "Set it up on its own page under Plugins."
+msgstr ""
+
#: src/components/settings/SyncSection.tsx
msgid "Set the sync default for users opening this project for the first time. This setting is committed to your repository."
msgstr ""
diff --git a/packages/app/tests/stress/plugin-enable-notice.e2e.ts b/packages/app/tests/stress/plugin-enable-notice.e2e.ts
new file mode 100644
index 000000000..bff5455fc
--- /dev/null
+++ b/packages/app/tests/stress/plugin-enable-notice.e2e.ts
@@ -0,0 +1,131 @@
+/**
+ * E2E coverage for the "you enabled it — here's where to set it up" notice.
+ *
+ * The jsdom test captures the toast call and invokes its action directly, which
+ * leaves the two real-browser seams that actually decide whether this works
+ * UNKNOWN:
+ * - The Settings dialog is a MODAL Radix layer, which sets
+ * `pointer-events: none` on <body> and dismisses on any outside
+ * interaction. The toast is portaled outside it. Whether its button can be
+ * clicked at all, and whether that click closes the dialog out from under
+ * the navigation, is a real layout + Radix-dismissal question.
+ * - The deep link is a hash write consumed by the shell's `initialSection`
+ * effect. Only a running app proves the WHOLE chain — toggle → CRDT config
+ * write → sidebar item appears → hash → active panel.
+ *
+ * Runnable via `pnpm exec playwright test tests/stress/plugin-enable-notice.e2e.ts`;
+ * wired into the CI `test:e2e` subset (packages/app/package.json).
+ */
+
+import type { Page } from '@playwright/test';
+import { expect, test } from './_helpers';
+
+async function openProjectPluginsPage(page: Page): Promise<void> {
+ // Land on the app FIRST, then push the settings hash, so the dialog's
+ // `history.back()` close returns to the doc view instead of leaving the SPA
+ // (which a `goto('/#settings')` deep link would do — there is no prior
+ // in-session entry to go back to).
+ await page.goto('/');
+ await page.evaluate(() => {
+ window.location.hash = '#settings';
+ });
+ await expect(page.getByTestId('settings-dialog')).toBeVisible({ timeout: 10_000 });
+ await page.getByTestId('settings-sidebar-item-plugins-manage').click();
+ await expect(page.getByTestId('settings-plugins-manage')).toBeVisible({ timeout: 5_000 });
+}
+
+/** Drive the real toggle to `on`, tolerating whatever state a sibling test left. */
+async function setMarkdownlintEnabled(page: Page, on: boolean): Promise<void> {
+ const toggle = page.getByTestId('settings-plugin-toggle-markdownlint');
+ await expect(toggle).toBeVisible({ timeout: 5_000 });
+ if ((await toggle.getAttribute('aria-checked')) !== String(on)) await toggle.click();
+ await expect(toggle).toHaveAttribute('aria-checked', String(on), { timeout: 5_000 });
+}
+
+test.describe('plugin enable → settings notice', () => {
+ // The toggle writes the shared per-worker project config; leave it off so a
+ // sibling stress file on this worker starts from the documented default.
+ test.afterEach(async ({ page }) => {
+ await openProjectPluginsPage(page);
+ await setMarkdownlintEnabled(page, false);
+ });
+
+ test('the enable notice is clickable under the modal dialog and lands on the plugin panel', async ({
+ page,
+ }) => {
+ await openProjectPluginsPage(page);
+ await setMarkdownlintEnabled(page, false);
+
+ await setMarkdownlintEnabled(page, true);
+
+ // The notice names the plugin and offers its settings.
+ const notice = page.locator('[data-sonner-toast]').filter({ hasText: 'markdownlint enabled' });
+ await expect(notice).toBeVisible({ timeout: 5_000 });
+ const openSettings = notice.getByRole('button', { name: 'Open settings' });
+ await expect(openSettings).toBeVisible();
+
+ await openSettings.click();
+
+ // The click reached the button THROUGH the modal layer, did not dismiss the
+ // dialog beneath it, and swapped the body to the plugin's own panel.
+ await expect(page.getByTestId('settings-dialog')).toBeVisible();
+ await expect(page.getByTestId('settings-plugin-markdownlint')).toBeVisible({ timeout: 5_000 });
+ expect(await page.evaluate(() => window.location.hash)).toBe('#settings/plugin:markdownlint');
+ });
+
+ test('the notice still lands the user on the panel after Settings is closed', async ({
+ page,
+ }) => {
+ await openProjectPluginsPage(page);
+ await setMarkdownlintEnabled(page, false);
+
+ await setMarkdownlintEnabled(page, true);
+ const notice = page.locator('[data-sonner-toast]').filter({ hasText: 'markdownlint enabled' });
+ await expect(notice).toBeVisible({ timeout: 5_000 });
+
+ // Dismiss Settings first — the notice outlives the dialog, so its action has
+ // to REOPEN Settings rather than assume it is still mounted.
+ await page.keyboard.press('Escape');
+ await expect(page.getByTestId('settings-dialog')).toHaveCount(0, { timeout: 5_000 });
+
+ await notice.getByRole('button', { name: 'Open settings' }).click();
+
+ await expect(page.getByTestId('settings-dialog')).toBeVisible({ timeout: 5_000 });
+ await expect(page.getByTestId('settings-plugin-markdownlint')).toBeVisible({ timeout: 5_000 });
+ });
+
+ test('each plugin panel links its docs', async ({ page }) => {
+ await openProjectPluginsPage(page);
+ await setMarkdownlintEnabled(page, true);
+
+ await page.getByTestId('settings-sidebar-item-plugin:markdownlint').click();
+ const docs = page.getByTestId('settings-plugin-markdownlint-title-docs-link');
+ await expect(docs).toBeVisible({ timeout: 5_000 });
+ await expect(docs).toHaveAttribute(
+ 'href',
+ 'https://openknowledge.ai/docs/advanced/content-rules/markdownlint',
+ );
+ });
+});
+
+test.describe('plugin enable notice — repeat use while Settings is open', () => {
+ test.afterEach(async ({ page }) => {
+ await openProjectPluginsPage(page);
+ await setMarkdownlintEnabled(page, false);
+ });
+
+ test('one Escape closes Settings after the notice navigated in-dialog', async ({ page }) => {
+ await openProjectPluginsPage(page);
+ await setMarkdownlintEnabled(page, false);
+ await setMarkdownlintEnabled(page, true);
+
+ const notice = page.locator('[data-sonner-toast]').filter({ hasText: 'markdownlint enabled' });
+ await notice.getByRole('button', { name: 'Open settings' }).click();
+ await expect(page.getByTestId('settings-plugin-markdownlint')).toBeVisible({ timeout: 5_000 });
+
+ // In-dialog navigation must not leave a history entry that the single
+ // history.back() close has to absorb.
+ await page.keyboard.press('Escape');
+ await expect(page.getByTestId('settings-dialog')).toHaveCount(0, { timeout: 5_000 });
+ });
+});