Skip to content

Keep the saved case of a snippet typed in its shortcut case - #526

Merged
bartekplus merged 1 commit into
masterfrom
claude/xenodochial-elbakyan-ac7a05
Oct 30, 2026
Merged

bartekplus merged 1 commit into
masterfrom
claude/xenodochial-elbakyan-ac7a05

Conversation

@bartekplus

Copy link
Copy Markdown
Owner

Problem

When you type the default snippet shortcut FF, the suggestion shows the expansion in capitals: "CHECK OUT FLUENTTYPER, A PHENOMENAL ...". The background applies the all-caps rule for an all-caps token to every prediction, snippet expansions included. The handler also stores shortcuts in lowercase, so it cannot see that FF is the saved case of the shortcut.

Found while working on #524.

Change

  • PresageHandler now keeps the shortcuts in their saved case.
  • In finalizePrediction, the all-caps rule does not change a snippet expansion when the saved shortcut starts with the typed all-caps token. This applies to an exact shortcut (FF for FF) and to a prefix (FF for FFX).
  • Rule agreed with the maintainer:
    • FF for the shortcut FF gives the expansion in its saved case.
    • BRB for the shortcut brb still gives "BE RIGHT BACK".
    • The first-letter rule does not change, so sentence-start capitals still apply (asap gives "As soon as possible").

Tests

  • New test.each in tests/PresageHandler.snippets.test.ts. The FF and FFX cases fail before the fix.
  • bun run check, bun run test, bun run test:e2e, bun run check:e2e:coverage pass.

🤖 Generated with Claude Code

Typing the default shortcut "FF" gave an all-caps expansion. The all-caps
token rule changed snippet expansions too. Now a snippet expansion keeps
its saved case when the saved shortcut starts with the typed all-caps
token. Typing "BRB" for the shortcut "brb" still gives an all-caps
expansion. The first-letter rule does not change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

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 ⚠️ Failed 2026-10-30T08:10:51.144451Z
We couldn’t complete this review. Comment @codex review to try again.
28edbe0 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@bartekplus
bartekplus merged commit b236d4c into master Oct 30, 2026
13 checks passed
@bartekplus
bartekplus deleted the claude/xenodochial-elbakyan-ac7a05 branch October 30, 2026 08:19
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.

1 participant