Repository navigation
fix(inline-tasks): keep task links plain in the task modal's single-line inputs (#2744) - #2748
Merged
Merged
Conversation
…ine inputs (#2744) The Create task natural language input and the task title editor are Live Preview editors, so the task link overlay drew the full inline task widget there whenever a Markdown note was active behind the dialog. On the input's single line the status circle sat below the text and the widget left a wide gap after the name. Add a taskLinkOverlayDisabled facet that the overlay checks, and set it on the NLP and title editors. Notes and the details editor are unchanged.
callumalpass
force-pushed
the
fix/2744-nlp-task-link-overlay
branch
from
November 30, 2026 21:35
e165b92 to
0d78b6d
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.
Fixes #2744.
Cause
The Create task dialog's natural language input and the task title field are Obsidian Live Preview editors, so the global task link overlay also runs in them. Those editors have no file of their own, so the overlay resolved links against the active Markdown note behind the dialog. Whenever a note was open there, a
+[[project]]link to a task note became the inline task widget. On the input's single line, the status circle sat below the text and the widget left a wide gap after the name. With a non-Markdown view in front (for example the release notes), no widget appeared, which made the bug depend on what was open.Fix
taskLinkOverlayDisabledCodeMirror facet (src/editor/taskLinkOverlayScope.ts), which the overlay checks before decorating.I chose skipping over the compact in-sentence widget because these fields are text inputs being parsed. Widget controls there (status toggle, menu) would act on a different task from inside the creation dialog.
Verification
Welcome.mdopen behind the dialog. With the fix, the same steps show a plain+Some projectlink on the line, and a task link in a note still draws the widget.tests/unit/editor/TaskLinkOverlay.scope.test.ts; its facet case fails on main.e2e/issues/issue-2744-nlp-task-link-overlay.spec.ts: passes with the fix, fails on main (1 widget in the modal). Includes a control that the note still draws the widget.npm run typecheck,npm run lint, full unit suite (6,731 tests) pass.