Skip to content

Add temporal extension#27980

Open
nikolaykolibarov wants to merge 2 commits into
raycast:mainfrom
nikolaykolibarov:ext/temporal
Open

Add temporal extension#27980
nikolaykolibarov wants to merge 2 commits into
raycast:mainfrom
nikolaykolibarov:ext/temporal

Conversation

@nikolaykolibarov
Copy link
Copy Markdown

Summary

Add Temporal extension for Raycast that allows users to search, view, and manage Temporal workflows directly from Raycast.

Features

  • Search Workflows: Find workflows by ID, type, or status with Temporal's query language
  • Workflow Management: View details, cancel, terminate, signal, query, and reset workflows
  • Dashboard: Monitor workflow counts and status distribution across namespaces
  • Schedule Management: List, pause, trigger, and delete schedules
  • Multi-Cluster Support: Connect to multiple Temporal clusters (local dev, cloud, self-hosted)
  • Search Attributes: View configured search attributes for the namespace

Screenshots

Screenshots are included in the metadata/ folder showing key features.

Technical Notes

  • Uses @temporalio/client SDK for direct gRPC communication
  • Supports both Temporal Cloud (with API keys) and self-hosted clusters
  • Connection management stored locally via Raycast LocalStorage

Checklist

- Search, view, and manage Temporal workflows from Raycast
- Multi-cluster support with connection management
- Dashboard with workflow metrics
- Schedule management
- Fix TypeScript errors for stricter CI type checking
@raycastbot raycastbot added new extension Label for PRs with new extensions platform: macOS labels May 16, 2026
@raycastbot
Copy link
Copy Markdown
Collaborator

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.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 16, 2026

Greptile Summary

This PR adds a new Temporal extension for Raycast that lets users search, view, and manage Temporal workflows directly from the launcher. It is a brand-new extension with no prior code in the repository.

  • Introduces six view commands: Search Workflows, Start Workflow, Dashboard, Schedules, Search Attributes, and Manage Connections, all backed by the @temporalio/client SDK for direct gRPC communication.
  • Implements multi-cluster / multi-namespace support with persistent selection state, a recent-workflows list, and automatic 30-second refresh across all list views.
  • Provides workflow lifecycle actions (cancel, terminate, signal, query, reset) and CLI command generation for every operation.

Confidence Score: 5/5

New extension with no impact on existing code; the only findings are minor quality nits in the event-history rendering path.

All previously flagged issues have been addressed. The remaining findings are limited to the event-history display path and do not affect core workflow management functionality.

extensions/temporal/src/lib/temporal-client.ts — the tsToDate fallback and eventId conversion in the history-fetch path.

Important Files Changed

Filename Overview
extensions/temporal/src/lib/temporal-client.ts Core gRPC client wrapper. Previously-flagged issues with testConnectionForCluster state restoration and namespace mutation are now fixed. Minor issues remain around tsToDate null fallback and eventId precision.
extensions/temporal/src/lib/cli-commands.ts Shell command generators. Previously-flagged lack of shell escaping is now addressed via escapeShellArg. All interpolated values are properly escaped.
extensions/temporal/src/lib/utils.ts Utility functions. Previously-flagged single-field search heuristic is fixed; buildSearchQuery now always searches both WorkflowId and WorkflowType.
extensions/temporal/src/lib/storage.ts LocalStorage helpers for clusters, recent workflows, and selection state. Logic looks correct with appropriate fallbacks and migration handling.
extensions/temporal/src/schedules.tsx Schedules list view. Previously-flagged missing isInitializedRef guard is now present; initialization runs only once on first cluster load.
extensions/temporal/src/start-workflow.tsx Start workflow form. isInitializedRef guard is in place; form validation handles empty workflowType and taskQueue correctly.
extensions/temporal/src/search-workflows.tsx Main workflow search view. isInitializedRef guard is correctly applied; cluster/namespace persistence, recent workflows, and status filtering all look correct.
extensions/temporal/src/dashboard.tsx Workflow count dashboard with time-range filtering. isInitializedRef guard present; parallel countWorkflows calls use proper error isolation with .catch(() => 0).
extensions/temporal/src/lib/types.ts Type definitions and status config. Clean and well-structured.
extensions/temporal/package.json Extension manifest with schema reference, Developer Tools category, macOS platform, and correct dependency set.
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
extensions/temporal/src/lib/temporal-client.ts:665-676
**`tsToDate` returns current time for missing timestamps**

When `ts` is `null` or `undefined`, the function silently returns `new Date()` (the current moment). This value is then stored in `HistoryEvent.eventTime` and displayed in the workflow history UI. Any history event whose protobuf timestamp is absent (e.g., events still pending completion) will show "just now" as their time regardless of when they actually occurred, making the history timeline misleading.

### Issue 2 of 2
extensions/temporal/src/lib/temporal-client.ts:693-695
**`eventId` unsafe `Number()` conversion**

`event.eventId` is a protobuf `int64` value, which the SDK represents as a `Long` object. `Number(longValue)` silently loses precision for values above 2^53 – 1 (~9 quadrillion). While workflow histories with that many events are practically impossible, explicitly calling `.toNumber()` (the same pattern already used for `scheduledEventId` and `workflowTaskFinishEventId` elsewhere in this file) would be more consistent and self-documenting.

Reviews (2): Last reviewed commit: "fix: address Greptile review feedback" | Re-trigger Greptile

Comment thread extensions/temporal/src/lib/utils.ts Outdated
Comment thread extensions/temporal/src/schedules.tsx
Comment thread extensions/temporal/src/lib/temporal-client.ts
Comment thread extensions/temporal/src/lib/cli-commands.ts
- Always search both WorkflowId and WorkflowType for all search terms
- Add isInitializedRef guard to schedules.tsx and start-workflow.tsx
- Fix testConnectionForCluster to properly restore null cluster override
- Add shell argument escaping in cli-commands.ts
- Update printWidth to 120 in .prettierrc
@nikolaykolibarov
Copy link
Copy Markdown
Author

Any updates on the review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new extension Label for PRs with new extensions platform: macOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants