Skip to content

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

Open
chhoumann wants to merge 2 commits 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 2 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 opening 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: Pro Plus

Run ID: 29b6fde8-34ef-4cd5-ac53-51cdd3eeded7

📥 Commits

Reviewing files that changed from the base of the PR and between 54acc22 and 84c9b99.

📒 Files selected for processing (6)
  • src/gui/suggesters/suggest.test.ts
  • src/gui/suggesters/suggest.ts
  • src/gui/suggesters/tagSuggester.test.ts
  • src/gui/suggesters/tagSuggester.ts
  • src/preflight/OnePageInputModal.linkSuggesters.test.ts
  • src/preflight/OnePageInputModal.ts

Included review availability: Your plan provides up to 8 included reviews per hour; 5 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 84c9b

One-page forms can now place explicitly selected editor content into values returned to API callers. This is bounded by deliberate user actions, but caller trust and consent expectations should be documented; the change is otherwise mergeable with owner awareness.

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 identifies the two primary changes: wiki-link autocomplete and Peek support for one-page inputs.
Linked Issues check ✅ Passed The pull request satisfies issue #1702 by adding internal-link autocomplete and Peek at note support to OnePageInputModal. The implementation also covers tag completion, selection insertion, and free-…
Out of Scope Changes check ✅ Passed The changes remain within scope. Documentation, accessibility updates, shared suggester fixes, and tests directly support the one-page input autocomplete and Peek features.
Full details: Linked Issues check

Explanation

The pull request satisfies issue #1702 by adding internal-link autocomplete and Peek at note support to OnePageInputModal. The implementation also covers tag completion, selection insertion, and free-text field behavior required for the feature.

  • 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: 84c9b99
Status: ✅  Deploy successful!
Preview URL: https://e209e273.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.

…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>
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