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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
# PR builds gate on visual review; mainline auto-accepts.
- name: Publish to Chromatic (non-mainline)
if: github.ref != 'refs/heads/main' && github.repository_owner == 'coder'
uses: chromaui/action@7804f34e4e59c0d9b3c856848f46ad96d7897429 # v17.5.0
uses: chromaui/action@4a45535b6910c0b99226ebcb7648faf88fb1ee2e # v18.0.1
env:
NODE_OPTIONS: "--max_old_space_size=4096"
STORYBOOK: true
Expand All @@ -114,7 +114,7 @@ jobs:
# Auto-accept on mainline to avoid blocking CI after squash merges.
- name: Publish to Chromatic (mainline)
if: github.ref == 'refs/heads/main' && github.repository_owner == 'coder'
uses: chromaui/action@7804f34e4e59c0d9b3c856848f46ad96d7897429 # v17.5.0
uses: chromaui/action@4a45535b6910c0b99226ebcb7648faf88fb1ee2e # v18.0.1
env:
NODE_OPTIONS: "--max_old_space_size=4096"
STORYBOOK: true
Expand Down
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@
"dependencies": {
"@abraham/reflection": "^0.13.0",
"@opentelemetry/api": "^1.9.1",
"@opentelemetry/api-logs": "^0.218.0",
"@opentelemetry/api-logs": "^0.220.0",
"@peculiar/x509": "^2.0.0",
"@repo/shared": "workspace:*",
"axios": "^1.18.1",
Expand All @@ -753,9 +753,9 @@
"zod": "^4.4.3"
},
"devDependencies": {
"@eslint-react/eslint-plugin": "^5.9.2",
"@eslint-react/eslint-plugin": "^5.11.3",
"@eslint/js": "^10.0.1",
"@eslint/markdown": "^8.0.2",
"@eslint/markdown": "^8.0.3",
"@repo/mocks": "workspace:*",
"@rolldown/plugin-babel": "catalog:",
"@storybook/addon-a11y": "catalog:",
Expand All @@ -775,47 +775,47 @@
"@types/vscode": "1.105.0",
"@types/vscode-webview": "catalog:",
"@types/ws": "^8.18.1",
"@typescript-eslint/eslint-plugin": "^8.62.0",
"@typescript-eslint/parser": "^8.62.0",
"@typescript-eslint/eslint-plugin": "^8.63.0",
"@typescript-eslint/parser": "^8.63.0",
"@vitejs/plugin-react": "catalog:",
"@vitest/coverage-v8": "^4.1.9",
"@vitest/coverage-v8": "^4.1.10",
"@vscode/codicons": "catalog:",
"@vscode/test-cli": "^0.0.15",
"@vscode/test-electron": "^3.0.0",
"@vscode/vsce": "^3.9.2",
"babel-plugin-react-compiler": "catalog:",
"bufferutil": "^4.1.0",
"chromatic": "^17.5.0",
"chromatic": "^18.0.1",
"coder": "catalog:",
"concurrently": "^10.0.3",
"cross-env": "^10.1.0",
"dayjs": "^1.11.21",
"electron": "39.8.5",
"esbuild": "^0.28.1",
"eslint": "^10.5.0",
"eslint": "^10.6.0",
"eslint-config-prettier": "^10.1.8",
"eslint-import-resolver-typescript": "^4.4.5",
"eslint-plugin-import-x": "^4.17.0",
"eslint-plugin-import-x": "^4.17.1",
"eslint-plugin-package-json": "^1.5.0",
"eslint-plugin-storybook": "^10.4.6",
"globals": "^17.7.0",
"jsdom": "^29.1.1",
"jsonc-eslint-parser": "^3.1.0",
"memfs": "^4.57.8",
"prettier": "^3.8.4",
"memfs": "^4.63.0",
"prettier": "^3.9.4",
"react": "catalog:",
"react-dom": "catalog:",
"storybook": "^10.4.6",
"typescript": "catalog:",
"typescript-eslint": "^8.62.0",
"typescript-eslint": "^8.63.0",
"utf-8-validate": "^6.0.6",
"vite": "catalog:",
"vitest": "^4.1.9"
"vitest": "^4.1.10"
},
"extensionPack": [
"ms-vscode-remote.remote-ssh"
],
"packageManager": "pnpm@11.6.0+sha512.9a36518224080c6fe5165afdcfe79bfa118c29be703f3f462b1e32efe1e98e47e8750b148e08286250aad4113cc7993ca413c4e2cd447752708c2ee5751bc95f",
"packageManager": "pnpm@11.10.0+sha512.0b7f8b98060031904c017e3a41eb187a16d40eeb829b95c4f8cb03681761fc4ab53dd219115b9b447f4dce1a05a214764461e7d3703392a9f32f9511ce8c86c8",
"engines": {
"vscode": "^1.105.0",
"node": ">= 22"
Expand Down
40 changes: 20 additions & 20 deletions packages/shared/src/ipc/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,50 +80,50 @@ export interface IpcNotification<D = unknown> {

/** Requires a handler for every RequestDef in Api. Compile error if one is missing. */
export type RequestHandlerMap<Api> = {
[K in keyof Api as Api[K] extends { kind: "request" }
? K
: never]: Api[K] extends RequestDef<infer P, infer R>
[
K in keyof Api as Api[K] extends { kind: "request" } ? K : never
]: Api[K] extends RequestDef<infer P, infer R>
? (params: P) => Promise<R>
: never;
};

/** Requires a handler for every CommandDef in Api. Compile error if one is missing. */
export type CommandHandlerMap<Api> = {
[K in keyof Api as Api[K] extends { kind: "command" }
? K
: never]: Api[K] extends CommandDef<infer P>
[
K in keyof Api as Api[K] extends { kind: "command" } ? K : never
]: Api[K] extends CommandDef<infer P>
? (params: P) => void | Promise<void>
: never;
};

/** Requires a subscriber for every NotificationDef in Api. Compile error if one is missing. */
export type NotificationHandlerMap<Api> = {
[K in keyof Api as Api[K] extends { kind: "notification" }
? K
: never]: Api[K] extends NotificationDef<infer D>
? (data: D) => void
: never;
[
K in keyof Api as Api[K] extends { kind: "notification" } ? K : never
]: Api[K] extends NotificationDef<infer D> ? (data: D) => void : never;
};

// --- API hook type ---

/** Derives a fully typed hook interface from an API definition object. */
export type ApiHook<Api> = {
[K in keyof Api as Api[K] extends { kind: "request" }
? K
: never]: Api[K] extends RequestDef<infer P, infer R>
[
K in keyof Api as Api[K] extends { kind: "request" } ? K : never
]: Api[K] extends RequestDef<infer P, infer R>
? (...args: P extends void ? [] : [params: P]) => Promise<R>
: never;
} & {
[K in keyof Api as Api[K] extends { kind: "command" }
? K
: never]: Api[K] extends CommandDef<infer P>
[
K in keyof Api as Api[K] extends { kind: "command" } ? K : never
]: Api[K] extends CommandDef<infer P>
? (...args: P extends void ? [] : [params: P]) => void
: never;
} & {
[K in keyof Api as Api[K] extends { kind: "notification" }
? `on${Capitalize<K & string>}`
: never]: Api[K] extends NotificationDef<infer D>
[
K in keyof Api as Api[K] extends { kind: "notification" }
? `on${Capitalize<K & string>}`
: never
]: Api[K] extends NotificationDef<infer D>
? D extends void
? (cb: () => void) => () => void
: (cb: (data: D) => void) => () => void
Expand Down
3 changes: 1 addition & 2 deletions packages/tasks/src/components/ActionMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ interface ActionMenuAction {
}

export type ActionMenuItem =
| { separator: true }
| ({ separator?: false } & ActionMenuAction);
{ separator: true } | ({ separator?: false } & ActionMenuAction);

interface ActionMenuProps {
items: ActionMenuItem[];
Expand Down
6 changes: 1 addition & 5 deletions packages/tasks/src/utils/taskLoadingState.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
export type TaskLoadingState =
| "pausing"
| "resuming"
| "deleting"
| "downloading"
| null;
"pausing" | "resuming" | "deleting" | "downloading" | null;

const ACTION_LABELS: Record<NonNullable<TaskLoadingState>, string> = {
pausing: "Pausing...",
Expand Down
Loading