feat(editor): add [[WikiLink]] autocomplete, i18n foundation for UI strings#1127
Merged
Conversation
…trings - Adds wikiLinkCompletionSource that triggers on [[ and inserts [[Title]] - Splits buildCompletionOptions into buildMarkdownLinkOptions / buildWikiLinkOptions to avoid duplication - Registers both sources in MarkdownCodeEditor's override array - Creates src/locales/en/editor.json as first UI-string namespace (i18n foundation) - Updates WikiLinkDisambiguationDialog to use i18next.t() instead of hardcoded strings - Adds unit tests for hasSuppressedExternalPrefix, buildMarkdownLinkOptions, buildWikiLinkOptions - Adds e2e tests: autocomplete triggers, filtering, insertion, preview rendering
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds WikiLink ([[...]]) autocomplete support to the Markdown editor and lays initial groundwork for UI string internationalization by moving the WikiLink disambiguation dialog copy into i18next resources.
Changes:
- Add an
editori18n namespace (English) and wire it into the i18next resource bundle. - Add a new CodeMirror completion source for
[[WikiLink]]and enable it alongside existing markdown-link completion. - Add unit tests for completion option builders and Playwright E2E coverage for WikiLink autocomplete behavior.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| ui/leafwiki-ui/src/locales/en/editor.json | Adds English strings for the WikiLink disambiguation dialog. |
| ui/leafwiki-ui/src/lib/i18n.ts | Registers the new editor namespace with i18next resources. |
| ui/leafwiki-ui/src/features/wikilinks/WikiLinkDisambiguationDialog.tsx | Switches dialog title/description to i18n-backed strings. |
| ui/leafwiki-ui/src/features/editor/MarkdownCodeEditor.tsx | Enables the new WikiLink completion source in editor autocompletion overrides. |
| ui/leafwiki-ui/src/features/editor/internalLinkCompletion.ts | Implements WikiLink range detection and completion options; exports helpers for testing. |
| ui/leafwiki-ui/src/features/editor/internalLinkCompletion.test.ts | Adds unit tests for suppressed-prefix logic and completion option mapping. |
| e2e/tests/wikilinks.spec.ts | Adds E2E tests for WikiLink autocomplete, insertion, and preview rendering. |
| e2e/pages/EditPage.ts | Adds page-object helpers for autocomplete dropdown interaction and editor content retrieval. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Replace partial closing wiki-link brackets during completion so selecting a match cannot leave an extra trailing bracket. Clarify the mailto suppression test and let the wikilinks E2E helper preserve intentionally empty content updates.
Replace three unnecessary template literals with single-quoted strings so the wikilinks E2E spec passes the repository quote rule in CI.
perber
force-pushed
the
worktree-feat+wikilink-autocomplete
branch
from
June 4, 2026 17:02
388e269 to
23ebe43
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.