You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .agents/skills/add-column-type/SKILL.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ This was not always true: adding `currency` originally took ~40 edits across 32
15
15
Do **not** hunt for places to edit. Add your type to the `ColumnType` union first and let `tsc` produce the list:
16
16
17
17
```bash
18
-
cd apps/sim &&bunx tsc --noEmit -p tsconfig.json
18
+
cd apps/sim &&bun run type-check
19
19
```
20
20
21
21
You will get two errors, naming `column-types/registry.ts` and `column-types/registry.server.ts`. Register in both.
@@ -153,7 +153,7 @@ Registering the *type* is compiler-enforced. Registering its *metadata* is not,
153
153
154
154
## Final Validation (Required)
155
155
156
-
1.**`cd apps/sim && bunx tsc --noEmit -p tsconfig.json`** — must be clean. If any file *outside*`column-types/` errors, that file has a hardcoded type list; fix it to read the registry.
156
+
1.**`cd apps/sim && bun run type-check`** — must be clean. If any file *outside*`column-types/` errors, that file has a hardcoded type list; fix it to read the registry.
157
157
2.**Grep for leaks** — `grep -rnE "(===|!==) '{id}'|case '{id}':" apps/sim --include='*.ts' --include='*.tsx' | grep -v column-types/`. (All three forms: a plain `!==` and a `case` are how half of `currency`'s real branches are written.) Hits are expected; judge each. A hit is fine when it mounts a specific React component or encodes a genuinely one-off behavior (`json`'s mono textarea, `date`'s timezone-aware parsing). A hit is a **leak** when it restates something the registry could answer — an icon, a label, a colour, an operator set, a cast, a coercion. Leaks get a registry field, not a new branch.
158
158
3.**Run the suite** — `bunx vitest run lib/table 'app/workspace/[workspaceId]/tables' lib/api app/api/table app/api/v1 lib/copilot/tools/server/table`. Existing tests must pass **unchanged**; needing to edit one means you changed behavior for the other types.
159
159
4.**`bun run lint:check`, `bun run check:api-validation`, `bun run check:client-boundary`** from the repo root.
1.`bunx tsc --noEmit` (from `apps/sim`, `NODE_OPTIONS=--max-old-space-size=8192`) and `bunx biome check` on the changed files.
131
+
1.`bun run type-check` (from `apps/sim`) and `bunx biome check` on the changed files.
132
132
2. In a table → **+ New column → Enrichments** → pick the new enrichment, map its inputs to columns, name the output column(s), Save. Confirm it appears in the catalog with its icon/description.
133
133
3. With hosted keys (or a workspace BYOK key) configured for each provider's service, run a row and confirm the cell fills; the dev-server log shows `Enrichment hit { provider }`. A row whose providers all miss completes blank; a row where every provider errored shows an error cell.
( bun run "$s">"/tmp/ship-audit-${s//:/-}.log"2>&1;echo"$?$s">>/tmp/ship-audit-results ) &
76
-
done
77
-
wait
78
-
# any non-zero line is a failing audit — read its /tmp/ship-audit-<name>.log and fix before shipping.
79
-
# `exit 1` on failure preserves the original sequential checks' semantics (their non-zero exit is
80
-
# what an agent gates on); never use `grep … && echo ❌ || echo ✅` here — it always exits 0.
81
-
if grep -vE '^0 ' /tmp/ship-audit-results;thenecho"❌ audit(s) failed — do not ship";exit 1;fi
82
-
echo"✅ all audits passed"
68
+
# Runs every audit CI runs, concurrently, and replays the output of any that fail.
69
+
# Do not hand-list the audits here: the list is derived in scripts/run-audits.ts, and the
70
+
# copy that used to live in this file had already drifted five audits behind package.json.
71
+
bun run check:audits || { echo"❌ audit(s) failed — do not ship";exit 1; }
83
72
```
84
73
If Phase A regenerated a file, its matching `:check` in Phase B now passes trivially — that parity is the point. Do not ship with any generator or audit failing; fix the cause (never silence it) and re-run. `check:migrations` and `type-check` are covered by steps 5 and CI respectively and are not repeated here.
85
74
7.**Stage and commit** the changes with the generated message — including any files Phase A regenerated in step 6
Copy file name to clipboardExpand all lines: .claude/commands/add-column-type.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ This was not always true: adding `currency` originally took ~40 edits across 32
14
14
Do **not** hunt for places to edit. Add your type to the `ColumnType` union first and let `tsc` produce the list:
15
15
16
16
```bash
17
-
cd apps/sim &&bunx tsc --noEmit -p tsconfig.json
17
+
cd apps/sim &&bun run type-check
18
18
```
19
19
20
20
You will get two errors, naming `column-types/registry.ts` and `column-types/registry.server.ts`. Register in both.
@@ -152,7 +152,7 @@ Registering the *type* is compiler-enforced. Registering its *metadata* is not,
152
152
153
153
## Final Validation (Required)
154
154
155
-
1.**`cd apps/sim && bunx tsc --noEmit -p tsconfig.json`** — must be clean. If any file *outside*`column-types/` errors, that file has a hardcoded type list; fix it to read the registry.
155
+
1.**`cd apps/sim && bun run type-check`** — must be clean. If any file *outside*`column-types/` errors, that file has a hardcoded type list; fix it to read the registry.
156
156
2.**Grep for leaks** — `grep -rnE "(===|!==) '{id}'|case '{id}':" apps/sim --include='*.ts' --include='*.tsx' | grep -v column-types/`. (All three forms: a plain `!==` and a `case` are how half of `currency`'s real branches are written.) Hits are expected; judge each. A hit is fine when it mounts a specific React component or encodes a genuinely one-off behavior (`json`'s mono textarea, `date`'s timezone-aware parsing). A hit is a **leak** when it restates something the registry could answer — an icon, a label, a colour, an operator set, a cast, a coercion. Leaks get a registry field, not a new branch.
157
157
3.**Run the suite** — `bunx vitest run lib/table 'app/workspace/[workspaceId]/tables' lib/api app/api/table app/api/v1 lib/copilot/tools/server/table`. Existing tests must pass **unchanged**; needing to edit one means you changed behavior for the other types.
158
158
4.**`bun run lint:check`, `bun run check:api-validation`, `bun run check:client-boundary`** from the repo root.
1.`bunx tsc --noEmit` (from `apps/sim`, `NODE_OPTIONS=--max-old-space-size=8192`) and `bunx biome check` on the changed files.
130
+
1.`bun run type-check` (from `apps/sim`) and `bunx biome check` on the changed files.
131
131
2. In a table → **+ New column → Enrichments** → pick the new enrichment, map its inputs to columns, name the output column(s), Save. Confirm it appears in the catalog with its icon/description.
132
132
3. With hosted keys (or a workspace BYOK key) configured for each provider's service, run a row and confirm the cell fills; the dev-server log shows `Enrichment hit { provider }`. A row whose providers all miss completes blank; a row where every provider errored shows an error cell.
( bun run "$s">"/tmp/ship-audit-${s//:/-}.log"2>&1;echo"$?$s">>/tmp/ship-audit-results ) &
75
-
done
76
-
wait
77
-
# any non-zero line is a failing audit — read its /tmp/ship-audit-<name>.log and fix before shipping.
78
-
# `exit 1` on failure preserves the original sequential checks' semantics (their non-zero exit is
79
-
# what an agent gates on); never use `grep … && echo ❌ || echo ✅` here — it always exits 0.
80
-
if grep -vE '^0 ' /tmp/ship-audit-results;thenecho"❌ audit(s) failed — do not ship";exit 1;fi
81
-
echo"✅ all audits passed"
67
+
# Runs every audit CI runs, concurrently, and replays the output of any that fail.
68
+
# Do not hand-list the audits here: the list is derived in scripts/run-audits.ts, and the
69
+
# copy that used to live in this file had already drifted five audits behind package.json.
70
+
bun run check:audits || { echo"❌ audit(s) failed — do not ship";exit 1; }
82
71
```
83
72
If Phase A regenerated a file, its matching `:check` in Phase B now passes trivially — that parity is the point. Do not ship with any generator or audit failing; fix the cause (never silence it) and re-run. `check:migrations` and `type-check` are covered by steps 5 and CI respectively and are not repeated here.
84
73
7.**Stage and commit** the changes with the generated message — including any files Phase A regenerated in step 6
`tsc` must resolve to the native (Go) TypeScript 7 compiler. Do not remove the `@typescript/native` alias from the root `devDependencies` — nothing imports it, and deleting it looks harmless.
71
+
72
+
`apps/sim` needs `@typescript/typescript6` for its runtime TypeScript API, and that package depends on `@typescript/old` — an alias of `typescript@6` — which declares its own `tsc` bin. Package managers pick bin winners by lexical sort rather than dependency depth, so `@typescript/old` beats `typescript` and `node_modules/.bin/tsc` silently becomes the JavaScript TypeScript 6 compiler: identical diagnostics, ~10x slower (83s vs 8s on `apps/sim`). The `@typescript/native` alias exists only to sort ahead of `@typescript/old`.
73
+
74
+
`bun run check:native-typecheck` fails the build if a bare `tsc` stops reporting 7.x — which is also what a newly added package that sorts ahead of `@typescript/native` and ships a `tsc` bin would look like. See [microsoft/typescript-go#4567](https://github.com/microsoft/typescript-go/issues/4567).
Copy file name to clipboardExpand all lines: .cursor/commands/add-column-type.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ This was not always true: adding `currency` originally took ~40 edits across 32
9
9
Do **not** hunt for places to edit. Add your type to the `ColumnType` union first and let `tsc` produce the list:
10
10
11
11
```bash
12
-
cd apps/sim &&bunx tsc --noEmit -p tsconfig.json
12
+
cd apps/sim &&bun run type-check
13
13
```
14
14
15
15
You will get two errors, naming `column-types/registry.ts` and `column-types/registry.server.ts`. Register in both.
@@ -147,7 +147,7 @@ Registering the *type* is compiler-enforced. Registering its *metadata* is not,
147
147
148
148
## Final Validation (Required)
149
149
150
-
1.**`cd apps/sim && bunx tsc --noEmit -p tsconfig.json`** — must be clean. If any file *outside*`column-types/` errors, that file has a hardcoded type list; fix it to read the registry.
150
+
1.**`cd apps/sim && bun run type-check`** — must be clean. If any file *outside*`column-types/` errors, that file has a hardcoded type list; fix it to read the registry.
151
151
2.**Grep for leaks** — `grep -rnE "(===|!==) '{id}'|case '{id}':" apps/sim --include='*.ts' --include='*.tsx' | grep -v column-types/`. (All three forms: a plain `!==` and a `case` are how half of `currency`'s real branches are written.) Hits are expected; judge each. A hit is fine when it mounts a specific React component or encodes a genuinely one-off behavior (`json`'s mono textarea, `date`'s timezone-aware parsing). A hit is a **leak** when it restates something the registry could answer — an icon, a label, a colour, an operator set, a cast, a coercion. Leaks get a registry field, not a new branch.
152
152
3.**Run the suite** — `bunx vitest run lib/table 'app/workspace/[workspaceId]/tables' lib/api app/api/table app/api/v1 lib/copilot/tools/server/table`. Existing tests must pass **unchanged**; needing to edit one means you changed behavior for the other types.
153
153
4.**`bun run lint:check`, `bun run check:api-validation`, `bun run check:client-boundary`** from the repo root.
1.`bunx tsc --noEmit` (from `apps/sim`, `NODE_OPTIONS=--max-old-space-size=8192`) and `bunx biome check` on the changed files.
125
+
1.`bun run type-check` (from `apps/sim`) and `bunx biome check` on the changed files.
126
126
2. In a table → **+ New column → Enrichments** → pick the new enrichment, map its inputs to columns, name the output column(s), Save. Confirm it appears in the catalog with its icon/description.
127
127
3. With hosted keys (or a workspace BYOK key) configured for each provider's service, run a row and confirm the cell fills; the dev-server log shows `Enrichment hit { provider }`. A row whose providers all miss completes blank; a row where every provider errored shows an error cell.
0 commit comments