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
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ updates:
- "@storybook/*"
- "@tanstack/*"
- "storybook"
- "typescript"
storybook:
patterns:
- "@chromatic-com/storybook"
Expand Down
1,546 changes: 973 additions & 573 deletions package-lock.json

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"devDependencies": {
"@chromatic-com/storybook": "^5.2.1",
"@eslint/css": "^1.3.0",
"@eslint/css": "^1.4.0",
"@eslint/js": "^10.0.1",
"@faker-js/faker": "^10.5.0",
"@storybook/addon-docs": "^10.5.4",
Expand All @@ -39,37 +39,37 @@
"@storybook/addon-themes": "^10.5.4",
"@storybook/react-vite": "^10.5.4",
"@tailwindcss/forms": "^0.5.11",
"@tailwindcss/vite": "^4.3.1",
"@tailwindcss/vite": "^4.3.3",
"@tanstack/eslint-plugin-query": "^5.101.4",
"@tanstack/react-query-devtools": "^5.101.4",
"@tanstack/react-router-devtools": "^1.167.0",
"@tanstack/router-vite-plugin": "^1.167.23",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/jest-dom": "^7.0.0",
"@testing-library/react": "^16.3.2",
"@types/eslint__js": "^9.14.0",
"@types/node": "^26.0.1",
"@types/node": "^26.1.1",
"@types/react": "^19.2.17",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react-swc": "^4.3.1",
"concurrently": "^10.0.3",
"eslint": "^10.5.0",
"@vitejs/plugin-react-swc": "^4.3.2",
"concurrently": "^10.0.4",
"eslint": "^10.8.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-perfectionist": "^5.9.1",
"eslint-plugin-perfectionist": "^5.10.0",
"eslint-plugin-react-hooks": "^7.1.1",
"eslint-plugin-react-refresh": "^0.5.3",
"eslint-plugin-storybook": "^10.4.6",
"eslint-plugin-storybook": "^10.5.4",
"fishery": "^2.4.0",
"globals": "^17.7.0",
"jsdom": "^29.1.1",
"prettier": "^3.8.4",
"prettier-plugin-tailwindcss": "^0.8.0",
"prettier": "^3.9.6",
"prettier-plugin-tailwindcss": "^0.8.1",
"storybook": "^10.5.4",
"tailwind-csstree": "0.3.3",
"tailwindcss": "^4.1.8",
"typescript": "^6.0.3",
"typescript-eslint": "^8.62.0",
"vite": "^8.1.0",
"vitest": "^4.1.9"
"typescript-eslint": "^8.65.0",
"vite": "^8.1.5",
"vitest": "^4.1.10"
},
"overrides": {
"@babel/runtime": "^7.26.10",
Expand Down
21 changes: 8 additions & 13 deletions src/components/JobAttempts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ import { DurationCompact } from "./DurationCompact";
import RelativeTimeFormatter from "./RelativeTimeFormatter";

type AttemptEntry =
| AttemptErrorEntry
| AttemptLogEntry
| AttemptMachineEntry
| AttemptStateEntry;
AttemptErrorEntry | AttemptLogEntry | AttemptMachineEntry | AttemptStateEntry;

type AttemptEntryBase = {
attempt: number;
Expand Down Expand Up @@ -76,15 +73,13 @@ export default function JobAttempts({ job }: JobAttemptProps) {
// Group all entries by attempt number
const attemptInfos = useMemo(() => {
// Create all entries first
const errorEntries = job.errors.map(
(error): AttemptErrorEntry => ({
attempt: error.attempt,
error: error.error,
timestamp: error.at,
trace: error.trace,
type: "error",
}),
);
const errorEntries = job.errors.map((error): AttemptErrorEntry => ({
attempt: error.attempt,
error: error.error,
timestamp: error.at,
trace: error.trace,
type: "error",
}));

const logEntries = Object.entries(job.logs).map(
([attemptStr, log]): AttemptLogEntry => ({
Expand Down
11 changes: 6 additions & 5 deletions src/services/features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ import { API } from "@utils/api";
import { SnakeToCamelCase } from "./types";

export type Features = {
[Key in keyof Omit<
FeaturesFromAPI,
"extensions"
> as SnakeToCamelCase<Key>]: FeaturesFromAPI[Key];
[
Key in keyof Omit<FeaturesFromAPI, "extensions"> as SnakeToCamelCase<Key>
]: FeaturesFromAPI[Key];
} & KnownExtensions;

type FeaturesFromAPI = {
Expand All @@ -26,7 +25,9 @@ const KNOWN_EXTENSIONS = [
type KnownExtensionKey = (typeof KNOWN_EXTENSIONS)[number];

type KnownExtensions = {
[Key in keyof KnownExtensionsFromAPI as SnakeToCamelCase<Key>]: KnownExtensionsFromAPI[Key];
[
Key in keyof KnownExtensionsFromAPI as SnakeToCamelCase<Key>
]: KnownExtensionsFromAPI[Key];
};

// Generate types from the single source of truth
Expand Down
12 changes: 4 additions & 8 deletions src/services/jobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ export type AttemptError = {

export type Job = {
[Key in keyof Omit<JobFromAPI, "args"> as SnakeToCamelCase<Key>]: Key extends
| StringEndingWithUnderscoreAt
| undefined
StringEndingWithUnderscoreAt | undefined
? Date
: JobFromAPI[Key] extends AttemptErrorFromAPI[]
? AttemptError[]
Expand All @@ -45,12 +44,9 @@ export type JobLogs = {
};

export type JobMinimal = {
[Key in keyof Omit<
JobMinimalFromAPI,
"args"
> as SnakeToCamelCase<Key>]: Key extends
| StringEndingWithUnderscoreAt
| undefined
[
Key in keyof Omit<JobMinimalFromAPI, "args"> as SnakeToCamelCase<Key>
]: Key extends StringEndingWithUnderscoreAt | undefined
? Date
: JobMinimalFromAPI[Key];
} & {
Expand Down
3 changes: 1 addition & 2 deletions src/services/periodicJobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import { SnakeToCamelCase, StringEndingWithUnderscoreAt } from "./types";

export type PeriodicJob = {
[Key in keyof PeriodicJobFromAPI as SnakeToCamelCase<Key>]: Key extends
| StringEndingWithUnderscoreAt
| undefined
StringEndingWithUnderscoreAt | undefined
? Date
: PeriodicJobFromAPI[Key];
};
Expand Down
3 changes: 1 addition & 2 deletions src/services/producers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import { SnakeToCamelCase, StringEndingWithUnderscoreAt } from "./types";

export type Producer = {
[Key in keyof ProducerFromAPI as SnakeToCamelCase<Key>]: Key extends
| StringEndingWithUnderscoreAt
| undefined
StringEndingWithUnderscoreAt | undefined
? Date | undefined
: ProducerFromAPI[Key];
};
Expand Down
3 changes: 1 addition & 2 deletions src/services/queues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ export interface PartitionConfig {

export type Queue = {
[Key in keyof QueueFromAPI as SnakeToCamelCase<Key>]: Key extends
| StringEndingWithUnderscoreAt
| undefined
StringEndingWithUnderscoreAt | undefined
? Date
: QueueFromAPI[Key];
};
Expand Down
13 changes: 3 additions & 10 deletions src/services/workflows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,10 @@ export type WorkflowTaskWaitInputs = {
};

export type WorkflowTaskWaitPhase =
| "not_started"
| "resolved"
| "unknown"
| "waiting";
"not_started" | "resolved" | "unknown" | "waiting";

export type WorkflowTaskWaitReason =
| "dependencies_and_wait"
| "dependencies"
| "none"
| "wait";
"dependencies_and_wait" | "dependencies" | "none" | "wait";

export type WorkflowTaskWaitSignalInput = {
key: string;
Expand Down Expand Up @@ -781,8 +775,7 @@ export type ListWorkflowsKey = [

export type WorkflowListItem = {
[Key in keyof WorkflowListItemFromAPI as SnakeToCamelCase<Key>]: Key extends
| StringEndingWithUnderscoreAt
| undefined
StringEndingWithUnderscoreAt | undefined
? Date
: WorkflowListItemFromAPI[Key];
};
Expand Down
Loading