Skip to content

Autocomplete +projects and @contexts in the new task entry - #184

Open
mbrettschneider wants to merge 2 commits into
JMoerman:masterfrom
mbrettschneider:tag-autocompletion
Open

mbrettschneider wants to merge 2 commits into
JMoerman:masterfrom
mbrettschneider:tag-autocompletion

Conversation

@mbrettschneider

@mbrettschneider mbrettschneider commented Nov 13, 2026 •

Copy link
Copy Markdown

Typing + or @ in the "Add new task" entry now suggests the projects or contexts already used in the list:

  • + lists all projects, @ all contexts
  • typing on narrows the list: +pro shows +project-dr and +Prowler (case-insensitive)
  • the part all matches share is filled in inline and selected, so typing on replaces it; Tab or Right accepts it (and takes the tag's spelling, +pro → +Prowler)
  • picking an entry from the list replaces the word being typed and adds a space
  • Backspace removes the inline suggestion instead of bringing it back
  • Up/Down select a tag, Enter or Tab insert it, Escape closes the list; without a selection Enter still adds the task

Suggestions are shown in a non-modal popover above the entry rather than through Gtk.EntryCompletion. Its popup is a separate window placed with screen coordinates, which on Wayland can open far away from the entry (seen with several monitors).

The tag list is rebuilt lazily from the current list's tasks whenever they change.

Limitations: only the last word is completed (editing a tag in the middle of the text gets no suggestions), and suggestions come from open tasks only, not from the done list.

Closes #168. Partially addresses #177 (priority and due-date pickers are not included, happy to add them in a follow-up if you'd like that).

🤖 Generated with Claude Code

mbrettschneider and others added 2 commits November 13, 2026 07:07
Typing + or @ in the "Add new task" entry shows the projects or contexts
used in the list; typing on narrows the list (case-insensitive). The
part all matches share is filled in inline and accepted with Tab or
Right.

Closes JMoerman#168, partially addresses JMoerman#177.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gtk.EntryCompletion's popup is a separate window placed with screen
coordinates, so on Wayland it can open far away from the entry (seen with
several monitors). A non-modal popover is part of the main window and
points at the word being completed.

Up/Down select a tag, Enter or Tab insert it, Escape closes the list.
Without a selected tag, Enter still adds the task.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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]

1 participant