Skip to content

fix: rename .talon files that shadow same-named .talon-list files - #2312

Open
wesleyboar wants to merge 2 commits into
talonhub:mainfrom
wesleyboar:fix/talon-list-shadowed-by-talon-file
Open

fix: rename .talon files that shadow same-named .talon-list files#2312
wesleyboar wants to merge 2 commits into
talonhub:mainfrom
wesleyboar:fix/talon-list-shadowed-by-talon-file

Conversation

@wesleyboar

@wesleyboar wesleyboar commented Sep 3, 2026

Copy link
Copy Markdown

Overview

Fixes user.emoji and user.top_level_domain registering with zero entries, which made their commands unmatchable.

Changes

  • renamed each .talon file that shadowed a same-named .talon-list
    • emoji.taloninsert_emoji.talon
    • top_level_domain.taloninsert_top_level_domain.talon

Testing

Top-Level Domains

  1. On main, run:
    echo 'from talon import registry; print(len(dict(registry.lists["user.top_level_domain"][0])))' | ~/.talon/bin/repl
    
  2. Verify it prints 0.
  3. Say "dot com".
  4. Verify nothing is typed.
  5. Check out this branch.
  6. Restart Talon.
  7. Repeat step 1.
  8. Verify it now prints 8.
  9. Say "dot com".
  10. Verify .com is typed.

Emojis

  1. On main, run:
    echo 'from talon import registry; print(len(dict(registry.lists["user.emoji"][0])))' | ~/.talon/bin/repl
    
  2. Verify it prints 0.
  3. Focus Slack or Discord.
  4. Say "emoji angry".
  5. Verify nothing is pasted.
  6. Check out this branch.
  7. Restart Talon.
  8. Repeat step 1.
  9. Verify it now prints 28.
  10. Focus Slack or Discord.
  11. Say "emoji angry".
  12. Verify 😠 is pasted.

Notes

  • Talon skips a .talon-list whose basename matches a .talon file in the same directory, logging DEBUG [ ] instead of DEBUG [+] — no warning or error.
  • These were the only two collisions that AI found among the repo's 96 .talon-list files.

Talon skips a `.talon-list` when a `.talon` file shares its basename in the
same directory, so `user.emoji` and `user.top_level_domain` both registered
with zero entries and their commands could never match.

- `emoji.talon` and `top_level_domain.talon` were the only two collisions in
  the repo; sibling lists (`emoticon`, `kaomoji`) were unaffected
- no command grammar or list content changed

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

@wesleyboar wesleyboar left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Note

tags/emoji/insert_emoji.talon
Verifying this half needs Slack or Discord focus: those are the only two contexts that enable tag: user.emoji, which gates these rules. emoticon and kaomoji were never affected, since their list files have no same-stem .talon shadowing them.

Note

core/top_level_domain/insert_top_level_domain.talon
The insert_ prefix follows the existing core/vocabulary/edit_vocabulary.talon precedent for naming a command file differently from its sibling list files. Renaming the .talon-list instead would fix the shadowing equally well, but would break the convention that a list file is named after the list it defines.

wesleyboar added a commit to wesleyboar/talonvoice-community that referenced this pull request Sep 3, 2026
Talon skips a `.talon-list` when a `.talon` file shares its basename in the
same directory, so `user.emoji` and `user.top_level_domain` both registered
with zero entries and their commands could never match.

Relates-to talonhub#2312

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@chdoc

chdoc commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

I would prefer the more subtle approach of adding a plural s to the .talon file. My rationale would be that the Talon file deals with the concept (e.g. "emojis" or "top level domains") while the {user.emoji} is definitely more natural in the grammar. And I think it is worth keeping the name of the list file identical with the name of the list being defined (where possible).

@AndreasArvidsson AndreasArvidsson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Feedback from the community session. We would prefer if you pluralize the list file name. eg emojis.talon-list. Don't rename the list itself just the file name.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 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-09-05T23:30:44.479619Z 229893e New commits
ℹ️ 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.

@github-actions github-actions Bot added lines/<10 Pull request changes fewer than 10 lines review/updated-after-changes-requested New commits were pushed after changes were requested labels Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lines/<10 Pull request changes fewer than 10 lines review/updated-after-changes-requested New commits were pushed after changes were requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants