Repository navigation
Add Kafka UI extension - #26259
Add Kafka UI extension#26259
Conversation
New extension for managing and monitoring Apache Kafka clusters through the Kafbat UI (formerly Provectus Kafka UI) REST API. Commands: - Search Consumer Groups: browse consumer groups with lag inspection per topic and partition - Search Topics: browse Kafka topics grouped by prefix with partition and replication details - Manage Kafka Environments: add, edit, or remove Kafka UI environment connections Features: - Multi-environment support with custom colors - Color-coded lag severity (OK / Warning / Critical) with configurable thresholds - Deep search toggle for topic prefix filtering - Direct links to open items in Kafka UI browser Made-with: Cursor
|
Congratulations on your new Raycast extension! 🚀 We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days. Once the PR is approved and merged, the extension will be available on our Store. |
- Remove unused catch variable (pagedErr) - Apply Prettier formatting to api.ts and search-consumer-groups.tsx Made-with: Cursor
- Search Consumer Groups => Kafka Search Consumer Groups - Search Topics => Kafka Search Topics - Manage Kafka Environments => Kafka Configuration Manager Made-with: Cursor
Greptile SummaryThis PR adds a new Kafka UI extension that connects to self-hosted Kafbat UI instances, providing three commands: browsing consumer groups with per-topic/partition lag inspection, browsing topics with prefix-based grouping and replication details, and managing multi-environment configurations stored in Raycast's The overall implementation is clean and well-structured — shared utilities have been correctly extracted into Key findings:
Confidence Score: 4/5Safe to merge after fixing the unguarded One P1 issue: extensions/kafka-ui/src/storage.ts — missing try-catch around JSON.parse Important Files Changed
Prompt To Fix All With AIThis is a comment left during a code review.
Path: extensions/kafka-ui/src/storage.ts
Line: 8-9
Comment:
**Unguarded `JSON.parse` will crash the extension on corrupted storage**
`JSON.parse(raw)` will throw a `SyntaxError` if the stored value is ever malformed (e.g., after a partial write during a crash or if an older schema is stored). Because `getEnvironments` is called unconditionally from every command on startup, this would make the entire extension unusable until the user clears storage manually.
```suggestion
try {
return JSON.parse(raw) as StoredEnvironment[];
} catch {
console.error("[kafka-ui] Failed to parse environments from storage, resetting:", raw);
return [];
}
```
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: extensions/kafka-ui/src/lag-utils.ts
Line: 74-80
Comment:
**`getPreferenceValues()` called on every list item render**
`getLagThresholds()` invokes `getPreferenceValues<Preferences>()` each time it runs, and since `determineLagStatus()` calls `getLagThresholds()`, preferences are re-read for every single list item in both `search-consumer-groups.tsx` and `search-topics.tsx`. Consider reading thresholds once at the component level and passing them down, or memoising the result:
```typescript
export function getLagThresholds(): { warning: number; critical: number } {
const prefs = getPreferenceValues<Preferences>();
const warning = parseInt(prefs.lagThresholdWarning, 10);
const critical = parseInt(prefs.lagThresholdCritical, 10);
return {
warning: isNaN(warning) ? 1000 : warning,
critical: isNaN(critical) ? 10000 : critical,
};
}
```
This also removes the four redundant `parseInt` calls (each threshold is parsed twice).
How can I resolve this? If you propose a fix, please make it concise.Reviews (5): Last reviewed commit: "Address review feedback: add metadata sc..." | Re-trigger Greptile |
- Add .prettierrc with printWidth: 120, singleQuote: false - Remove manually defined Preferences interface, use auto-generated type from raycast-env.d.ts - Extract shared utility functions (getLagThresholds, determineLagStatus, lagStatusIcon, statusColor, formatLag) into src/lag-utils.ts - Apply Prettier formatting with correct config Made-with: Cursor
|
Addressed the review feedback in commit 5c2190d:
All CI checks are now passing. |
0xdhrv
left a comment
There was a problem hiding this comment.
Thanks for your contribution
We already have an extension in the Store that deals with this. Could we consider enhancing the existing extension below instead of creating another one?
- https://www.raycast.com/fonimus/kafka by @fonimus
If there are unique features or workflows you’re aiming to add, we’d love to hear them and see if they can be integrated into this to avoid duplication and improve discoverability.
This would help avoid duplication and keep related functionality consolidated in one place.
As mentioned in our extension guidelines here
|
Thanks for the review. @0xdhrv I'd like to keep this as a separate extension. The existing
These are different protocols, different config models, different target audiences, and different data sources. Merging them would mean maintaining two entirely separate API layers and config systems inside one extension, which would create confusion for users of both. This is similar to how the Raycast Store has separate extensions for services that share a domain but have different interfaces (e.g., different database clients for different database management tools). Beyond the architectural difference,
Happy to clarify further or adjust naming/description to make the distinction clear in the Store (e.g., "Kafka UI" vs "Kafka"). |
- Updated README and CHANGELOG for clarity - Improved error handling in API calls with user feedback - Refactored command titles for better discoverability - Introduced color management for environments - Added .gitignore for better project hygiene
0xdhrv
left a comment
There was a problem hiding this comment.
Hey @NirRosh 👋
Can you please add metadata screenshots to the extension?
Also, look into any greptile suggestions
I'm looking forward to testing this extension again 🔥
Feel free to contact me here or at Slack if you have any questions.
I converted this PR into a draft until it's ready for the review, please press the button Ready for review when it's ready and we'll have a look 😊
…arsing Made-with: Cursor
|
Hi @0xdhrv, addressed the review feedback in commit efe236b:
Ready for another look. |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
- Added a check for empty storage to return an empty array. - Improves robustness of the getEnvironments function.
|
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. |
- 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)
Summary
Details
This extension connects to self-hosted or managed Kafka UI instances and provides:
Environment data is stored per-user in Raycast's LocalStorage, so each team member configures their own connections independently.
Test Plan
npm run buildpasses without errorsnpm run lintpasses without errors