Skip to content

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

Merged
chhoumann merged 3 commits into
masterfrom
cursor/one-page-link-peek-06ec
Sep 1, 2026
Merged

feat(preflight): add wiki-link autocomplete and peek to one-page inputs#1715
chhoumann merged 3 commits 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.

Review follow-up (84c9b990)

Addresses the three P2s from the end-to-end review:

  • Tag completion after a closed wiki-link. TagSuggester now ignores # only inside an unclosed [[.
  • Combobox semantics on TextInputSuggest: role=combobox, stable aria-controls, aria-activedescendant on keyboard selection. One-page free-text fields get aria-labelledby from the field label.
  • Tag index refresh once per form. Only the first free-text TagSuggester rebuilds the shared index.

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

  • Focused regression tests for the three P2s passed (tagSuggester, suggest, OnePageInputModal.linkSuggesters).
  • pnpm run test passed (5102 tests, 37 skipped).
  • pnpm run build-with-lint passed.
  • Live Obsidian 1.13.7 demo in quickadd-demo-vault: one-page form file suggestions after [[, tag suggestions after a closed [[Target Note]], Peek hide + insert selection into body.

one_page_wikilink_tag_peek_demo.mp4

Wiki-link file suggestions after typing [[
Tag suggestions after a closed wiki-link
Peek waiting with insert-selection chip
Form after wiki-link, tag, and peek insert

Checklist

Closes #1702

To show artifacts inline, enable in settings.

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 Peek at note 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 Peek and controls for submitting or cancelling.
    • Improved accessibility for suggestion lists and active options.
  • Bug Fixes

    • Improved tag suggestions around wiki links and reduced unnecessary index refreshes.
  • 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: Team

Run ID: 89044a82-199e-4b98-8060-8ec0d25870d4

📥 Commits

Reviewing files that changed from the base of the PR and between 84c9b99 and 19d547e.

📒 Files selected for processing (1)
  • src/preflight/OnePageInputModal.test.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 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, textarea, and fallback text inputs receive file and tag suggesters. Other field types do not. Suggesters are destroyed when the modal closes.
Accessible suggestion controls
src/gui/suggesters/suggest.ts, src/gui/suggesters/suggest.test.ts
Suggestion inputs use combobox and listbox ARIA relationships with unique option identifiers and active-option updates.
Tag suggester behavior
src/gui/suggesters/tagSuggester.ts, src/gui/suggesters/tagSuggester.test.ts
Tag suggestions remain available after completed wikilinks, stay suppressed inside unclosed wikilinks, and can skip redundant index refreshes.
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, accessibility, and cleanup. Documentation describes peek actions and # and [[ support.

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

Merge Risk: 🔵 Low · up to 19d54

One-page input forms now always provide note peek and selection insertion, including callers that previously had no equivalent opt-in. The action remains explicitly user initiated and does not automatically disclose note content, so the PR is mergeable with owner awareness of the broadened local capability and whether an opt-out is needed.

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 5 functions across 9 files. 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 primary changes: wiki-link autocomplete and Peek at note support for one-page inputs.
Linked Issues check ✅ Passed The pull request satisfies issue #1702 by adding internal-link and tag autocomplete plus Peek at note support to OnePageInputModal, matching normal prompt behavior.
Out of Scope Changes check ✅ Passed The changes remain within scope. Suggester accessibility updates, tag-index handling, tests, and documentation directly support the requested autocomplete and Peek at note functionality.
  • 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

cloudflare-workers-and-pages Bot commented Aug 30, 2026

Copy link
Copy Markdown

Deploying quickadd with  Cloudflare Pages  Cloudflare Pages

Latest commit: 19d547e
Status: ✅  Deploy successful!
Preview URL: https://3cac8f04.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".

Comment thread src/preflight/OnePageInputModal.ts Outdated
Comment thread src/preflight/OnePageInputModal.ts
Comment thread src/preflight/OnePageInputModal.ts Outdated
@chhoumann

Copy link
Copy Markdown
Owner Author

End-to-end review: changes needed

Reviewed head 54acc22f6845e034eaef725c2f786d5dd4c2174c. The existing repeated tag-index rebuild thread is valid. Real Obsidian 1.13.7 testing also confirmed two missing issues:

Build, lint, Svelte checks, focused tests, coverage, and hosted checks passed. The isolated Obsidian suite passed 49/50; the sole date-case timeout is unchanged from the base. I would not merge until the three P2 findings are addressed.

cursoragent and others added 2 commits August 31, 2026 14:32
…x a11y

Tag completion treated any earlier [[ as inside a wiki-link, so
See [[Note]] then #tag never opened. The shared TextInputSuggest
now exposes a real combobox, and one-page forms refresh the tag
index once instead of once per free-text field.

Co-authored-by: Christian Bager Bach Houmann <christian@bagerbach.com>
@chhoumann

Copy link
Copy Markdown
Owner Author

Independent shipping verdict: PASS+NOTES

I independently reviewed origin/master...origin/cursor/one-page-link-peek-06ec at 19d547ed (base 9f582547) and did not write this code. The three claimed behaviors are present. OnePageInputModal attaches FileSuggester ([[ file/heading/block) and TagSuggester (#) to text, textarea, and unknown-type fallbacks. Peek hides the form via qa-prompt-peek-hidden and inserts the editor selection into the last focused free-text field. pnpm run test passed here (5189 passed, 37 skipped), including tagSuggester.test.ts, suggest.test.ts, OnePageInputModal.linkSuggesters.test.ts, and OnePageInputModal.peek.test.ts. Live Obsidian was not driven in this environment. obsidian-e2e start refused because it could not determine the running app version, DISPLAY is empty, and leftover ~/.config/obsidian singleton files are stale. The author's 1.13.7 demo on the PR is supporting evidence only. All three owner P2s hold at 19d547ed. Tag complete after a closed wiki-link is isTagInsideUnclosedWikilink. Combobox a11y is role=combobox, stable aria-controls, aria-activedescendant, and one-page aria-labelledby. Tag index refresh is refreshIndex: true only on the first free-text field.

@chhoumann
chhoumann merged commit 513112f into master Sep 1, 2026
13 checks passed
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