Skip to content

feat(preflight): add wiki-link autocomplete and peek to one-page inputs - #1715

Open
chhoumann wants to merge 1 commit into
masterfrom
cursor/one-page-link-peek-06ec
Open

feat(preflight): add wiki-link autocomplete and peek to one-page inputs#1715
chhoumann wants to merge 1 commit into
masterfrom
cursor/one-page-link-peek-06ec

Conversation

@chhoumann

@chhoumann chhoumann commented Aug 30, 2026

Copy link
Copy Markdown
Owner

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 existing FileSuggester, TagSuggester, and InputPromptPeek onto OnePageInputModal instead of adding a second peek stack.

Scope

  • OnePageInputModal attaches file and tag suggesters to text, textarea, and the unknown-type fallback. Number, slider, date, dropdown, field-suggest, suggester, and file-picker widgets stay on their own controls.
  • Peek is always on for this modal. It hides the whole form. Insert selection writes into the last focused free-text field, or the first free-text field, or no-ops when the form has none.
  • Callers (runOnePagePreflight, quickAddApi.requestInputs) are unchanged.
  • Docs in ControllingPrompts.md, SuggesterSystem.md, and onePageInputs.md now describe the form as having these features.

Tradeoffs

  • Peek cancel closes the form and aborts the run, same as sequential peek. There is no per-field peek.
  • File links use the active note as the source path. Preflight does not yet know the note that will be created.

Blast Radius

Users of one-page input get [[ / # in free-text fields and a Peek button on every form, including requestInputs. 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.ts passed (55 tests).
  • pnpm run test passed (5097 tests).
  • pnpm run build-with-lint passed.
  • This environment has no Obsidian CLI, so the form was not driven in a live vault.

Checklist

Closes #1702

Open in Web Open in Cursor 

Summary by CodeRabbit

  • New Features

    • Added file-link ([[) and tag (#) suggestions to text and textarea fields in one-page forms.
    • Added a Peek at note action for reading or selecting text without closing the form.
    • Added Insert selection to place selected note text into the most recently focused text field.
    • Added keyboard support for opening Peek and controls for submitting or cancelling.
  • Documentation

    • Updated guidance for one-page form suggestions and note-peeking behavior.

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>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 30, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-30T16:51:53.945234Z 54acc22 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4ccdfb81-f6a0-493e-a5c5-9994ec1dea84

📥 Commits

Reviewing files that changed from the base of the PR and between 607f451 and 54acc22.

📒 Files selected for processing (8)
  • docs/src/content/docs/docs/Advanced/onePageInputs.md
  • docs/src/content/docs/docs/ControllingPrompts.md
  • docs/src/content/docs/docs/SuggesterSystem.md
  • src/preflight/OnePageInputModal.audit-preflight-suggesters.test.ts
  • src/preflight/OnePageInputModal.linkSuggesters.test.ts
  • src/preflight/OnePageInputModal.peek.test.ts
  • src/preflight/OnePageInputModal.test.ts
  • src/preflight/OnePageInputModal.ts

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

Changes

One-page input features

Layer / File(s) Summary
Prompt peek integration
src/preflight/OnePageInputModal.ts
One-page inputs now provide Peek at note, Insert selection, custom Submit and Cancel controls, keyboard access, focused-field tracking, and peek lifecycle handling.
Free-text suggester attachment
src/preflight/OnePageInputModal.ts, src/preflight/OnePageInputModal.linkSuggesters.test.ts
Text and textarea fields receive file and tag suggesters. Other field types do not. Suggesters are destroyed when the modal closes.
Feature validation and documentation
src/preflight/OnePageInputModal.peek.test.ts, src/preflight/OnePageInputModal.test.ts, src/preflight/OnePageInputModal.audit-preflight-suggesters.test.ts, docs/src/content/docs/docs/Advanced/onePageInputs.md, docs/src/content/docs/docs/ControllingPrompts.md, docs/src/content/docs/docs/SuggesterSystem.md
Tests cover peek, cancellation, shortcuts, selection insertion, field targeting, and cleanup. Documentation describes peek actions and # and [[ support.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 54acc

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
Loading

Poem

A rabbit taps Peek at note,
The form folds soft and light.
Tags and links hop into fields,
Selection lands just right.
Submit twinkles, suggesters rest,
The carrot patch is bright.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning 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 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: wiki-link autocomplete and Peek at note support for one-page inputs.
Linked Issues check ✅ Passed The implementation satisfies issue #1702 by adding internal-link support and Peek at note to one-page inputs. It also adds related tag autocomplete, focused-field insertion, and lifecycle cleanup.
Out of Scope Changes check ✅ Passed The code, tests, and documentation changes support the stated objectives. No unrelated code changes are identified.
Full details: Docstring Coverage

Explanation

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.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/one-page-link-peek-06ec

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying quickadd with  Cloudflare Pages  Cloudflare Pages

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

View logs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE REQUEST] One-page input for choices features

2 participants