Skip to content

fix(tui): handle composed Option-D in model picker - #1141

Merged
TheGreatAxios merged 1 commit into
mainfrom
CL-8635-fix-iterm-option-d-model-picker
Sep 21, 2026
Merged

TheGreatAxios merged 1 commit into
mainfrom
CL-8635-fix-iterm-option-d-model-picker

Conversation

@bwachman

Copy link
Copy Markdown
Contributor

Summary

  • The model picker's Alt+D set-default shortcut now also recognizes the composed glyph some terminals (e.g. iTerm with a US layout) emit for Option+D instead of a modifier-flagged d, mirroring the existing Option+A handling for the add-provider shortcut.
  • Outside the model picker, still types as ordinary filter text.
  • On the "(no matches)" filter sentinel, both the real Alt+D chord and the composed are now consumed as a no-op rather than falling through, so an empty model id can never reach the default-setting callback.

Verification

  • bun run typecheck, bun run build, and bun run test pass (7747 pass, 0 fail)
  • New/updated tests in product-host.test.ts cover composed-∂ set-default, composed-∂ as plain filter text outside the model picker, and the no-matches-sentinel case for both the real chord and the composed glyph

Fixes CL-8635

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA.
Posted by the CLA Assistant Lite bot.

@linear-code

linear-code Bot commented Sep 19, 2026

Copy link
Copy Markdown

CL-8635

@bwachman

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Sep 19, 2026

@TheGreatAxios TheGreatAxios 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.

Approve — the composed Option-D handling is correct and well-scoped.

What I verified:

  • The dispatch chain works end to end: composed ∂ (no modifiers) bypasses the filter only when the set-default hint is showing in the model picker, then flows through the overlay action into the existing set-default handler (55/55 tests in product-host.test.ts pass, including the 3 new/updated cases).
  • No input gets swallowed: outside the picker, ∂ stays ordinary filter text, and bare ASCII d still requires the modifier — typing is unaffected. The single-entry glyph set is complete since ∂ has no uppercase variant.
  • The sentinel change (swallow instead of fall-through on no-matches) fixes real prompt pollution — previously the chord leaked into the prompt. The Alt+D expectation flip is the same fix on the modifier path, consistent.
  • Architecture is right: normalization lives at the overlay-action layer rather than global input (where ∂ is legitimate text elsewhere), mirrors the existing Option-A precedent, and the composition is terminal-generic rather than iTerm-specific.

Two follow-ups, neither blocking:

  • Alt+F (favorite) has the same composed-glyph gap on the sentinel — worth a ticket if anyone hits it there.
  • Each new chord repeats the glyph-allowlist discovery cycle; fine as-is given the scoped-predicate pattern.

@TheGreatAxios
TheGreatAxios merged commit 3c22194 into main Sep 21, 2026
13 of 14 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.

2 participants