feat(preflight): add wiki-link autocomplete and peek to one-page inputs - #1715
feat(preflight): add wiki-link autocomplete and peek to one-page inputs#1715chhoumann wants to merge 1 commit into
Conversation
One-page text and textarea fields now complete [[ and # the same way sequential prompts do. Peek at note hides the whole form and inserts an editor selection into the last focused free-text field. Closes #1702 Co-authored-by: Christian Bager Bach Houmann <christian@bagerbach.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughChangesOne-page input features
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The PR adds autocomplete and Peek behavior to one-page free-text inputs while reusing existing local interaction patterns and leaving caller behavior unchanged. No actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant User
participant OnePageInputModal
participant InputPromptPeek
participant ObsidianEditor
User->>OnePageInputModal: Select Peek at note or press shortcut
OnePageInputModal->>InputPromptPeek: Open peek session
InputPromptPeek->>ObsidianEditor: Read or select note text
User->>InputPromptPeek: Insert selection
InputPromptPeek->>OnePageInputModal: Restore modal and insert text
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 5 files. (3 skipped: 3 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying quickadd with
|
| Latest commit: |
54acc22
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://68d53d3e.quickadd.pages.dev |
| Branch Preview URL: | https://cursor-one-page-link-peek-06.quickadd.pages.dev |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 54acc22f68
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| id, | ||
| el, | ||
| fileSuggester: new FileSuggester(this.app, el), | ||
| tagSuggester: new TagSuggester(this.app, el), |
There was a problem hiding this comment.
Refresh the tag index only once per form
When a one-page form contains multiple text or textarea fields, each new TagSuggester synchronously calls TagIndex.refresh(), which reads and sorts every vault tag and rebuilds the Fuse index. Consequently, opening a form with N free-text fields repeats the full vault-wide rebuild N times, causing noticeable modal-opening latency in large vaults; refresh the shared index once for the form rather than once per field.
Useful? React with 👍 / 👎.
Why
Issue #1702 asks the one-page form to match sequential text prompts for two things:
[[/#autocomplete, and Peek at note. Both were documented as missing. This ports the existingFileSuggester,TagSuggester, andInputPromptPeekontoOnePageInputModalinstead of adding a second peek stack.Scope
OnePageInputModalattaches file and tag suggesters totext,textarea, and the unknown-type fallback. Number, slider, date, dropdown, field-suggest, suggester, and file-picker widgets stay on their own controls.runOnePagePreflight,quickAddApi.requestInputs) are unchanged.ControllingPrompts.md,SuggesterSystem.md, andonePageInputs.mdnow describe the form as having these features.Tradeoffs
Blast Radius
Users of one-page input get
[[/#in free-text fields and a Peek button on every form, includingrequestInputs. Settings and builder prompts are untouched. No migration. No settings change.Verification
pnpm exec vitest run --config vitest.config.mts src/preflight/OnePageInputModal.test.ts src/preflight/OnePageInputModal.linkSuggesters.test.ts src/preflight/OnePageInputModal.peek.test.ts src/preflight/OnePageInputModal.audit-preflight-suggesters.test.ts src/gui/GenericInputPrompt/GenericInputPrompt.peek.test.tspassed (55 tests).pnpm run testpassed (5097 tests).pnpm run build-with-lintpassed.Checklist
Closes #1702
Summary by CodeRabbit
New Features
[[) and tag (#) suggestions to text and textarea fields in one-page forms.Documentation