Repository navigation
Update tmux-cheatsheet extension - #26379
Conversation
- feat: add category filter, keybinding detection, and key symbol - feat: add category filter, keybinding detection, and key symbol
|
Thank you for your contribution! 🎉 🔔 @alikhatibak you might want to have a look. You can use this guide to learn how to check out the Pull Request locally in order to test it. 📋 Quick checkout commandsBRANCH="ext/tmux-cheatsheet"
FORK_URL="https://github.com/spencer-michaels/raycast-extensions.git"
EXTENSION_NAME="tmux-cheatsheet"
REPO_NAME="raycast-extensions"
git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run devWe're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days. |
Greptile SummaryThis PR significantly enhances the tmux-cheatsheet extension with category filtering, grouped list view, custom keybinding detection from
Confidence Score: 3/5
Important Files Changed
Last reviewed commit: a49d4b7 |
| const prefixOverride = getPreferenceValues<{ prefix: string }>().prefix; | ||
| const prefix = prefixOverride || detectPrefix() || "C-b"; |
There was a problem hiding this comment.
Synchronous file reads on every re-render
detectPrefix() performs synchronous readFileSync calls on ~/.tmux.conf and XDG config paths. Since it's called directly in the component body (not inside useMemo), it runs on every re-render — e.g., every keystroke in the search bar (after debounce) or dropdown change. This is the same pattern used for detectKeyBindings() which is correctly wrapped in useMemo on line 41.
Consider memoizing the prefix computation:
| const prefixOverride = getPreferenceValues<{ prefix: string }>().prefix; | |
| const prefix = prefixOverride || detectPrefix() || "C-b"; | |
| const prefixOverride = getPreferenceValues<Preferences>().prefix; | |
| const prefix = useMemo(() => prefixOverride || detectPrefix() || "C-b", [prefixOverride]); |
Rule Used: What: Don't manually define Preferences for `get... (source)
| const { push } = useNavigation(); // Navigation hook to push details page | ||
| const [categoryFilter, setCategoryFilter] = useState(ALL_CATEGORIES); | ||
| const { push } = useNavigation(); | ||
| const prefixOverride = getPreferenceValues<{ prefix: string }>().prefix; |
There was a problem hiding this comment.
Use auto-generated Preferences type
getPreferenceValues should use the auto-generated Preferences type from raycast-env.d.ts rather than a manually defined inline type. Manual types can drift out of sync with the actual preference schema in package.json.
| const prefixOverride = getPreferenceValues<{ prefix: string }>().prefix; | |
| const prefixOverride = getPreferenceValues<Preferences>().prefix; |
Rule Used: What: Don't manually define Preferences for `get... (source)
|
This pull request has been automatically marked as stale because it did not have any recent activity. It will be closed if no further activity occurs in the next 7 days to keep our backlog clean 😊 |
alikhatibak
left a comment
There was a problem hiding this comment.
Great feature contributions, functionality greatly improved. Thank you so much @spencer-michaels !!
- Changed type for getPreferenceValues to Preferences for better type safety. - Wrapped prefix assignment in useMemo for performance optimization.
|
Published to the Raycast Store: |
|
🎉 🎉 🎉 We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag. |
- chore: 更新 delink 扩展的版本信息为初始发布版 - docs: 调整 delink 扩展快捷键说明顺序 - Merge branch \'raycast:main\' into main - Update CODEOWNERs (2134dff) - Update hetzner extension (raycast#26705) - Update CODEOWNERs (840e5a9) - Add ram-prices extension (raycast#26564) - Update CODEOWNERs (45fad15) - Add habitica-todos extension (raycast#26446) - Update CODEOWNERs (3e686e1) - Add Bundles extension (raycast#25680) - Update CODEOWNERs (f6261fd) - Update tmux-cheatsheet extension (raycast#26379) - Changelog Alignment (raycast#26824) - Update prism-launcher extension (raycast#26816)
|
Thank you guys! I noticed a misconfiguration in
|
let me check |
- feat[extensions/qq-mail]: 添加QQ邮箱扩展及配置文件 - Merge branch \'raycast:main\' into main - Update CODEOWNERs (9944a1b) - [XKCD Comics] Add viewing history (raycast#26704) - refactor: 增加useCallback并更新tsconfig配置 - Update CODEOWNERs (9b7c8a4) - Add Kafka UI extension (raycast#26259) - Merge branch \'raycast:main\' into main - refactor: 简化 Action.CopyToClipboard 组件调用 (url-parse.tsx) - chore: 移除 delink 扩展中的图标配置项 - chore: 删除图标文件并更新配置引用新图标 - Update CODEOWNERs (756e9da) - Update ascii-art-wallpaper extension (raycast#26707) - Update CODEOWNERs (23ee8a8) - Add paper-agent extension (raycast#26367) - Merge branch \'raycast:main\' into main - chore: 更新 delink 扩展变更日志并移除旧版本记录 - Update CODEOWNERs (768930b) - Add nocal extension (raycast#26482) - Update CODEOWNERs (7c0e492) - Add caaals extension (raycast#26443) - Merge branch \'raycast:main\' into main - docs: 更新 delink 扩展文档及快捷键说明 - Update CODEOWNERs (41a12f0) - Update mirror-displays extension (raycast#26445) - chore: 更新 delink 扩展的版本信息为初始发布版 - docs: 调整 delink 扩展快捷键说明顺序 - Merge branch \'raycast:main\' into main - feat:up - Update CODEOWNERs (2134dff) - Update hetzner extension (raycast#26705) - Update CODEOWNERs (840e5a9) - Add ram-prices extension (raycast#26564) - Update CODEOWNERs (45fad15) - Add habitica-todos extension (raycast#26446) - Update CODEOWNERs (3e686e1) - Add Bundles extension (raycast#25680) - Update CODEOWNERs (f6261fd) - Update tmux-cheatsheet extension (raycast#26379) - Changelog Alignment (raycast#26824) - Update prism-launcher extension (raycast#26816) - Merge branch \'raycast:main\' into main - feat: add metadata folder and language setting - Update picgo extension (raycast#26818) - Update CODEOWNERs (bd7023d) - Add clockodo extension (raycast#26432) - feat: add raycast extension delink - Update CODEOWNERs (868aef4)


Description
Added a handful of features and small UI improvements I found useful for my own work in tmux.
bind/bind-keylines from~/.tmux.confand shows your actual bindings instead of defaultsC-ainstead of the defaultC-b, and the extension now reflects that). Defaults to~/.tmux.confbut can be changed in the settings.C-aas⌃A, arrow keys as↑↓←→,M-xas⌥Xpackage.json("acess" -> "access")Screencast
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare placed outside of themetadatafolder