Skip to content

Commit d5ce247

Browse files
authored
v0.7.62: file handling, mothership async runs, heic support, file hardening, general ui improvements
2 parents e1ab24c + 6599b4c commit d5ce247

554 files changed

Lines changed: 27815 additions & 7000 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/add-column-type/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This was not always true: adding `currency` originally took ~40 edits across 32
1515
Do **not** hunt for places to edit. Add your type to the `ColumnType` union first and let `tsc` produce the list:
1616

1717
```bash
18-
cd apps/sim && bunx tsc --noEmit -p tsconfig.json
18+
cd apps/sim && bun run type-check
1919
```
2020

2121
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,
153153

154154
## Final Validation (Required)
155155

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.
157157
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.
158158
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.
159159
4. **`bun run lint:check`, `bun run check:api-validation`, `bun run check:client-boundary`** from the repo root.

.agents/skills/add-enrichment/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export const ENRICHMENT_REGISTRY: EnrichmentRegistry = {
128128

129129
## Step 5: Verify
130130

131-
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.
132132
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.
133133
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.
134134

.agents/skills/ship/SKILL.md

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -65,21 +65,10 @@ When the user runs `/ship`:
6565
echo "❌ block registry audit failed — do not ship"
6666
exit 1
6767
}
68-
rm -f /tmp/ship-audit-results
69-
for s in check:boundaries check:api-validation:strict check:desktop-bridge check:desktop-ipc \
70-
check:utils check:zustand-v5 \
71-
check:react-query check:client-boundary check:bare-icons check:icon-paths \
72-
check:realtime-prune check:tool-registry-boundary check:tool-request-boundary \
73-
tool-metadata:check \
74-
integration-catalog:check skills:check agent-stream-docs:check; do
75-
( 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; then echo "❌ 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; }
8372
```
8473
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.
8574
7. **Stage and commit** the changes with the generated message — including any files Phase A regenerated in step 6

.claude/commands/add-column-type.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This was not always true: adding `currency` originally took ~40 edits across 32
1414
Do **not** hunt for places to edit. Add your type to the `ColumnType` union first and let `tsc` produce the list:
1515

1616
```bash
17-
cd apps/sim && bunx tsc --noEmit -p tsconfig.json
17+
cd apps/sim && bun run type-check
1818
```
1919

2020
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,
152152

153153
## Final Validation (Required)
154154

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.
156156
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.
157157
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.
158158
4. **`bun run lint:check`, `bun run check:api-validation`, `bun run check:client-boundary`** from the repo root.

.claude/commands/add-enrichment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export const ENRICHMENT_REGISTRY: EnrichmentRegistry = {
127127

128128
## Step 5: Verify
129129

130-
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.
131131
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.
132132
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.
133133

.claude/commands/ship.md

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -64,21 +64,10 @@ When the user runs `/ship`:
6464
echo "❌ block registry audit failed — do not ship"
6565
exit 1
6666
}
67-
rm -f /tmp/ship-audit-results
68-
for s in check:boundaries check:api-validation:strict check:desktop-bridge check:desktop-ipc \
69-
check:utils check:zustand-v5 \
70-
check:react-query check:client-boundary check:bare-icons check:icon-paths \
71-
check:realtime-prune check:tool-registry-boundary check:tool-request-boundary \
72-
tool-metadata:check \
73-
integration-catalog:check skills:check agent-stream-docs:check; do
74-
( 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; then echo "❌ 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; }
8271
```
8372
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.
8473
7. **Stage and commit** the changes with the generated message — including any files Phase A regenerated in step 6

.claude/rules/global.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,10 @@ const filtered = filterUndefined(obj)
6565

6666
## Package Manager
6767
Use `bun` and `bunx`, not `npm` and `npx`.
68+
69+
## Type-checking
70+
`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).

.claude/skills/add-settings-page/SKILL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Key paths:
3737
hand-roll a Save button, a `beforeunload`, or an "Unsaved changes" modal —
3838
they're centralized. See the "Save / Discard + unsaved-changes guard" section
3939
in `.claude/rules/sim-settings-pages.md`.
40-
5. **Verify:** `cd apps/sim && bunx tsc --noEmit`; `bunx biome check --write <file>`.
40+
5. **Verify:** `cd apps/sim && bun run type-check`; `bunx biome check --write <file>`.
4141

4242
## Mode B — Audit existing settings pages
4343

@@ -76,7 +76,7 @@ For each page component, confirm the checklist in `.claude/rules/sim-settings-pa
7676
unless they're also being changed for an unrelated, deliberate reason.
7777
7. Remove now-unused imports (`ChipInput`/`Search`) ONLY after grepping that
7878
they are not still used elsewhere in the file (e.g. by a detail view).
79-
8. **Verify the whole sweep:** `tsc --noEmit`, `biome check` on every touched
79+
8. **Verify the whole sweep:** `bun run type-check`, `biome check` on every touched
8080
file, and run the affected pages' tests. Diff each file against the base and
8181
confirm the change is purely structural before shipping.
8282

@@ -105,5 +105,5 @@ contract. Then, per page:
105105
7. Check what the old row rendered *beside* the title (a badge, a timestamp, a
106106
transport label). The row's title truncates as one unit, so anything folded
107107
into it can be ellipsised away — move it to `description` or `badge`.
108-
8. Verify: `tsc --noEmit`, `biome check`, the page's tests, and a diff read of
108+
8. Verify: `bun run type-check`, `biome check`, the page's tests, and a diff read of
109109
every converted block for lost props, conditions, and `key` placement.

.cursor/commands/add-column-type.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This was not always true: adding `currency` originally took ~40 edits across 32
99
Do **not** hunt for places to edit. Add your type to the `ColumnType` union first and let `tsc` produce the list:
1010

1111
```bash
12-
cd apps/sim && bunx tsc --noEmit -p tsconfig.json
12+
cd apps/sim && bun run type-check
1313
```
1414

1515
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,
147147

148148
## Final Validation (Required)
149149

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.
151151
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.
152152
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.
153153
4. **`bun run lint:check`, `bun run check:api-validation`, `bun run check:client-boundary`** from the repo root.

.cursor/commands/add-enrichment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export const ENRICHMENT_REGISTRY: EnrichmentRegistry = {
122122

123123
## Step 5: Verify
124124

125-
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.
126126
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.
127127
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.
128128

0 commit comments

Comments
 (0)