Skip to content

Conversation

@michaelva
Copy link
Contributor

@michaelva michaelva commented Jan 28, 2026

Summary

  • Add history_format query parameters for flexible workflow history retrieval
  • Add has_reported_errors field to WorkflowRun type to track workflows with reported problems (TemporalReportedProblems)
  • Add has_reported_errors filter parameter to ListWorkflowRunsPayload for filtering workflows by error state
  • Implement "Has Reported Errors" filter in UI with Yes/No select options
  • Add boolean conversion in filter handler for proper API parameter handling
  • Revert badge color changes from PR fix: resolve streaming message rendering issues #821 to use semantic color approach
  • Convert timestamp fields from Unix timestamps (seconds) to ISO 8601 strings (with millisecond precision)

Timestamp Format Change

BREAKING CHANGE: All timestamp fields in workflow types now use ISO 8601 strings (with millisecond precision) instead of Unix timestamp numbers (in seconds).

Before: "started_at": 1678886400 (Unix timestamp in seconds)
After: "started_at": "2023-03-15T12:00:00.000Z" (ISO 8601 string with millisecond precision)

Changed Types:

  • WorkflowRun.started_at: number (seconds) → string (ISO 8601 with ms)
  • WorkflowRun.closed_at: number (seconds) → string (ISO 8601 with ms)
  • WorkflowRunEvent.event_time: number | null (seconds) → string | null (ISO 8601 with ms)
  • WorkflowTask.scheduled: number | null (seconds) → string | null (ISO 8601 with ms)
  • WorkflowTask.started: number | null (seconds) → string | null (ISO 8601 with ms)
  • WorkflowTask.completed: number | null (seconds) → string | null (ISO 8601 with ms)
  • WorkflowRunWithDetails.pendingActivities[].lastStartedTime: number (seconds) → string (ISO 8601 with ms)
  • PendingActivity.lastStartedTime: number | null (seconds) → string | null (ISO 8601 with ms)

packages/common/src/store/workflow.ts:

  • Updated all timestamp field types to use string instead of number
  • Added PendingActivity type export for type consistency

Modified Files

  • packages/common/src/store/workflow.ts:
    • Added has_reported_errors field to types
    • Updated timestamp types from number to string for ISO 8601 format
    • Updated PendingActivity.lastStartedTime type
  • packages/client/src/store/WorkflowsApi.ts: Updated API client to handle new field
  • packages/ui/src/core/components/Badge.tsx: Reverted to semantic color text approach
  • packages/ui/src/features/facets/WorkflowExecutionsFacetsNav.tsx: Added "Has Reported Errors" filter

Test Plan

  • Verify timestamp fields return ISO 8601 strings
  • Verify timestamps have millisecond precision
  • Verify filter appears in workflow executions page
  • Test filtering workflows with/without errors
  • Verify badge colors display correctly in light and dark modes
  • Test filter combinations with other filters
  • Verify date displays and calculations work with ISO strings

🤖 Generated with Claude Code

@michaelva michaelva requested a review from a team as a code owner January 28, 2026 02:07
@michaelva michaelva changed the title Add workflow error reporting and filtering feat: add workflow error reporting and filtering Jan 28, 2026
@michaelva michaelva requested a review from Copilot January 28, 2026 03:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds workflow error reporting and filtering capabilities, along with a breaking change to timestamp formats. The main purpose is to enable users to filter workflows based on whether they have reported errors, while also standardizing timestamp representations across the codebase.

Changes:

  • Added has_reported_errors field and filter parameter to enable filtering workflows by error state
  • Converted all timestamp fields from Unix timestamps (seconds) to ISO 8601 strings with millisecond precision (breaking change)
  • Added flexible history format query parameters for workflow history retrieval
  • Reverted badge colors to use semantic color approach

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
packages/ui/src/features/facets/WorkflowExecutionsFacetsNav.tsx Implements "Has Reported Errors" filter UI with Yes/No options and boolean conversion logic
packages/ui/src/core/components/Badge.tsx Reverts badge color styling to semantic text color classes and updates import formatting
packages/common/src/store/workflow.ts Adds has_reported_errors field, converts timestamp types to strings, adds new type definitions for history formats and task types
packages/client/src/store/WorkflowsApi.ts Updates getRunDetails method to support flexible history format options

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

export interface WorkflowRunEvent {
event_id: number;
event_time: number;
event_time: string | null;
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The event_time field type changed from number | null to string | null, but the original type allowed number (non-null timestamps). The new type only allows null or string, which means non-null numeric timestamps are no longer supported. If events can have non-null timestamps, this should be string rather than string | null, or the migration path for existing numeric values needs clarification.

Suggested change
event_time: string | null;
event_time: string | number | null;

Copilot uses AI. Check for mistakes.
michaelva and others added 2 commits January 28, 2026 12:21
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@michaelva michaelva merged commit d60a08b into main Jan 28, 2026
10 checks passed
@michaelva michaelva deleted the fix-workflow-history branch January 28, 2026 09:25
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.

3 participants