Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ go.work
go.work.sum

# Claude Code local settings
.serena/cache
.serena
.claude/settings.local.json
.claude/*
!.claude/skills/
Expand Down
1 change: 0 additions & 1 deletion .serena/.gitignore

This file was deleted.

125 changes: 0 additions & 125 deletions .serena/project.yml

This file was deleted.

2 changes: 1 addition & 1 deletion server/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/labstack/echo/v4 v4.13.4
github.com/stretchr/testify v1.10.0
github.com/urfave/cli/v2 v2.3.0
go.temporal.io/api v1.62.2
go.temporal.io/api v1.62.6
golang.org/x/net v0.48.0
golang.org/x/oauth2 v0.34.0
google.golang.org/grpc v1.79.3
Expand Down
4 changes: 2 additions & 2 deletions server/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ go.opentelemetry.io/otel/sdk/metric v1.39.0 h1:cXMVVFVgsIf2YL6QkRF4Urbr/aMInf+2W
go.opentelemetry.io/otel/sdk/metric v1.39.0/go.mod h1:xq9HEVH7qeX69/JnwEfp6fVq5wosJsY1mt4lLfYdVew=
go.opentelemetry.io/otel/trace v1.39.0 h1:2d2vfpEDmCJ5zVYz7ijaJdOF59xLomrvj7bjt6/qCJI=
go.opentelemetry.io/otel/trace v1.39.0/go.mod h1:88w4/PnZSazkGzz/w84VHpQafiU4EtqqlVdxWy+rNOA=
go.temporal.io/api v1.62.2 h1:jFhIzlqNyJsJZTiCRQmTIMv6OTQ5BZ57z8gbgLGMaoo=
go.temporal.io/api v1.62.2/go.mod h1:iaxoP/9OXMJcQkETTECfwYq4cw/bj4nwov8b3ZLVnXM=
go.temporal.io/api v1.62.6 h1:JLH8y9URdY9WbdvwMXfGknlhohoPBrXOc9AbQkPInOc=
go.temporal.io/api v1.62.6/go.mod h1:iaxoP/9OXMJcQkETTECfwYq4cw/bj4nwov8b3ZLVnXM=
golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU=
golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0=
golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU=
Expand Down
7 changes: 6 additions & 1 deletion src/lib/components/event/event-card.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@
? translate('events.category.local-activity')
: spaceBetweenCapitalLetters(event.name),
);
const attributes = $derived(formatAttributes(event));
const attributes = $derived.by(() => {
const attrs = formatAttributes(event);
if (event?.principal?.name) attrs.principalName = event.principal.name;
if (event?.principal?.type) attrs.principalType = event.principal.type;
return attrs;
});
const fields = $derived(Object.entries(attributes));
const payloadFields = $derived(
fields.filter(
Expand Down Expand Up @@ -141,7 +146,7 @@
{/snippet}

{#snippet eventLinks(links: ELink[])}
{#each links as link}

Check warning on line 149 in src/lib/components/event/event-card.svelte

View workflow job for this annotation

GitHub Actions / lint

Each block should have a key
{@render eventLink(link)}
{@render eventNamespaceLink(link)}
{/each}
Expand Down
3 changes: 3 additions & 0 deletions src/lib/models/event-history/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ export const toEvent = (

const completionLinks = completionCallbacks || attachedCompletionCallbacks;
const links = historyEvent?.links || completionLinks || [];
const principal = historyEvent?.principal;

const event = {
...historyEvent,
name: eventType,
Expand All @@ -96,6 +98,7 @@ export const toEvent = (
classification,
category,
links,
principal,
billableActions: 0,
attributes: simplifyAttributes({ type: key, ...attributes }),
};
Expand Down
17 changes: 15 additions & 2 deletions src/lib/types/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ export type EventHistory = Replace<

export type HistoryEvent = Replace<
import('$lib/types').HistoryEvent,
{ eventType: EventType; eventId: string; links?: EventLink[] }
{
eventType: EventType;
eventId: string;
links?: EventLink[];
principal?: Principal;
}
>;

export type GetWorkflowExecutionHistoryResponse = Replace<
Expand Down Expand Up @@ -72,6 +77,12 @@ export type EventWithMetadata = {
historyEvent: HistoryEvent;
} & EventRequestMetadata;

// Remove once TS SDK has support
export type Principal = {
type?: string;
name?: string;
};

export type EventType = import('$lib/utilities/is-event-type').EventType;

export type EventTypeCategory =
Expand All @@ -89,6 +100,7 @@ export interface WorkflowEvent extends HistoryEvent {
name: EventType;
links?: EventLink[];
billableActions?: number;
principal?: Principal;
}

export type WorkflowEvents = WorkflowEvent[];
Expand All @@ -110,7 +122,8 @@ export type CommonEventKey =
| 'category'
| 'workerMayIgnore'
| 'name'
| 'links';
| 'links'
| 'principal';

export type CommonHistoryEvent = Pick<WorkflowEvent, CommonEventKey>;

Expand Down
2 changes: 2 additions & 0 deletions src/lib/utilities/format-event-attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ export type CombinedAttributes = EventAttribute & {
continuedExecutionRunId?: string;
newExecutionRunId?: string;
namespace?: string;
principalName?: string;
principalType?: string;
};

const keysToExpand: Readonly<Set<string>> = new Set([
Expand Down
Loading