Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
f734ba5
feat(mothership): v1.0.0 (#8208)
Sg312 Sep 23, 2026
11cba52
fix(knowledge): skip global readiness checks for ordinary KBs (#8212)
TheodoreSpeaks Sep 23, 2026
e919e4c
fix(mothership): follow-ups for v1.0.0 regressions (#8215)
waleedlatif1 Sep 24, 2026
3c3770a
feat(browser): batch planned page actions and keep snapshot ids after…
waleedlatif1 Sep 24, 2026
c510377
fix(chat): keep organization composer controls within narrow panels (…
waleedlatif1 Sep 24, 2026
b073643
fix(insights): show member profile photos with the canonical avatar (…
waleedlatif1 Sep 24, 2026
b4b2625
Add Lists operations and improve Canvas support in Slack (#8213)
TheodoreSpeaks Sep 24, 2026
58a2ed9
improvement(chat): reduce streaming render work and completion delay …
waleedlatif1 Sep 24, 2026
92d3b38
fix(settings): use one member avatar with profile photos everywhere (…
waleedlatif1 Sep 24, 2026
36603fe
docs(library): update best-gumloop-alternatives-in-2026 (#8223)
icecrasher321 Sep 24, 2026
1702bc1
feat(library): Best Self-Hosted AI Workflow Automation Platforms in 2…
icecrasher321 Sep 24, 2026
2d0353a
improvement(search): polish organization search and source results (#…
waleedlatif1 Sep 24, 2026
d976aff
fix(search): harden live search accuracy, provider queries, and reque…
waleedlatif1 Sep 24, 2026
75fbc72
improvement(chat): restore stable inline tool activity headers and ac…
waleedlatif1 Sep 24, 2026
6377330
improvement(search): title search activity by intent, collapse finish…
waleedlatif1 Sep 24, 2026
2710244
improvement(chat): keep the previous step's label while the next call…
waleedlatif1 Sep 24, 2026
05ed98d
fix(search): add GitHub commit search and accept native-only live que…
waleedlatif1 Sep 24, 2026
124f4ba
fix(search): wait for the source-created handler in the live setup te…
waleedlatif1 Sep 24, 2026
79a25d2
fix(file-parsers): read side-by-side calendar grids one block at a ti…
waleedlatif1 Sep 24, 2026
b7a8087
feat(library): Best AI Agent Evaluation Platforms in 2026: 6 Tools Co…
icecrasher321 Sep 24, 2026
ad66fdf
fix(search): use shared inline tool activity (#8233)
waleedlatif1 Sep 24, 2026
99b1702
fix(slack): accept scalar checkbox values in List responses (#8236)
TheodoreSpeaks Sep 24, 2026
316fea0
fix(chat): restore double Enter and wait for queued handoff settlemen…
Sg312 Sep 24, 2026
d5ef007
feat(library): Best AI Workflow Builders for Technical and Semi-Techn…
icecrasher321 Sep 24, 2026
1fa912f
improvement(logs): refresh the table on demand (#8235)
waleedlatif1 Sep 24, 2026
d9db35e
Fix staging Stop admission and oversized response uploads (#8257)
Sg312 Sep 24, 2026
491740a
Finalize stopped replay only after the owned stream completes (#8259)
Sg312 Sep 24, 2026
2671951
improvement(chat): unify message styling and source previews (#8241)
waleedlatif1 Sep 24, 2026
22fb0eb
fix(slack-search): stream task progress in plan mode (#8219)
TheodoreSpeaks Sep 24, 2026
13fb807
Finish cancelling stopped tools and preserve late-title replay (#8264)
Sg312 Sep 24, 2026
293e883
improvement(search): search several GitHub and GitLab kinds per accou…
waleedlatif1 Sep 24, 2026
5ab33dd
fix(chat): reconnect silently stalled live streams (#8272)
Sg312 Sep 24, 2026
df3b413
improvement(ui): align resource tab titles and actions with sidebar (…
waleedlatif1 Sep 24, 2026
f12677b
fix(navigation): restore organization return from shared workspaces (…
TheodoreSpeaks Sep 24, 2026
addb457
fix(file-search): recover dispatch claims abandoned between commit an…
icecrasher321 Sep 24, 2026
eac44eb
fix(chat): clarify activity spacing and unify overflow fades (#8271)
waleedlatif1 Sep 24, 2026
b28837f
fix(billing): cache enterprise reporting-window usage sums for soft u…
waleedlatif1 Sep 24, 2026
60d0e1c
docs(library): update best-ai-agent-builders-with-mcp-support (#8251)
icecrasher321 Sep 24, 2026
4455a54
fix(chat): align composer controls and source presentation (#8274)
waleedlatif1 Sep 24, 2026
cbffe90
fix(mothership): strip presentation activity from desktop-authorized …
waleedlatif1 Sep 24, 2026
0ede40b
feat(slack): expand workflow APIs and fix custom-app manifests (#8261)
TheodoreSpeaks Sep 24, 2026
aced5f7
fix: address release review findings (#8276)
waleedlatif1 Sep 24, 2026
6da76e4
improvement(search): multiple native queries per account with rank fu…
waleedlatif1 Sep 24, 2026
e6e3a1f
refactor(ui): use native terminal row buttons (#8263)
BillLeoutsakosvl346 Sep 25, 2026
c6b49d0
refactor(resources): share filter panel structure (#8260)
BillLeoutsakosvl346 Sep 25, 2026
7b21069
refactor(auth): share loading skeleton treatments (#8254)
BillLeoutsakosvl346 Sep 25, 2026
63853e3
refactor(emcn): share product page heading recipe (#8253)
BillLeoutsakosvl346 Sep 25, 2026
aee32f1
fix(preview): scope cursor styling per instance (#8245)
BillLeoutsakosvl346 Sep 25, 2026
ab16777
refactor(emcn): remove duplicate Label primary color classes (#8242)
BillLeoutsakosvl346 Sep 25, 2026
d8e7e92
improvement(ui): source collaborator colours from CSS palette (#8210)
BillLeoutsakosvl346 Sep 25, 2026
55b1a5f
improvement(search): guide independent live searches and reads into o…
waleedlatif1 Sep 25, 2026
0be1f38
fix(workspaces): persist visit recency server-side so sidebar order i…
waleedlatif1 Sep 25, 2026
40f4a8e
feat(browser): sharper computer use for the desktop browser agent (#8…
waleedlatif1 Sep 25, 2026
4fd0b06
fix(cli): strip endpoint trailing slashes in linear time, deflake pro…
waleedlatif1 Sep 25, 2026
da76452
fix(executor): stop run-from-block reusing the source run's branch st…
waleedlatif1 Sep 25, 2026
45e20cf
fix(browser): keep new markers out of find and time out a hung name c…
waleedlatif1 Sep 25, 2026
faebb47
improvement(search): name Slack authors, read only when needed, and l…
waleedlatif1 Sep 25, 2026
f6035de
fix(knowledge): deflake projection integration tests by ranking vecto…
waleedlatif1 Sep 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .agents/skills/add-connector/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ argument-hint: <service-name> [api-docs-url]

# Add Connector Skill

## Choose the connector runtime first

For **Sim Search**, use the live provider workflow in [the federated Search developer guide](../../../apps/sim/lib/sim-search/live/README.md#adding-a-live-search-connector). Its browser-safe provider catalog owns provider IDs, API origins, credential aliases, and account modes; its typed runtime registry requires both search and read handlers. `ConnectorMeta` remains the owner of logos and setup fields. Member mode has no admin resource filters. Service mode requires independent live source verification; resource pickers use shared selectors with canonical manual-input pairs, and plain inputs are fine where no picker applies. Do not implement a Search source by adding a crawler, embeddings, or a scheduled ACL build.

The ingestion instructions below apply to **ordinary knowledge-base connectors** and the explicit legacy Search backend (`SIM_SEARCH_LIVE=false`). If a provider supports both, implement and test both runtimes; adding `search: true` to metadata alone does not implement federated search. Preserve indexing documentation and behavior for those KB/legacy callers.

You are an expert at adding knowledge base connectors to Sim. A connector syncs documents from an external source (Confluence, Google Drive, Notion, etc.) into a knowledge base.

## Your Task
Expand Down
6 changes: 6 additions & 0 deletions .agents/skills/validate-connector/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ argument-hint: <service-name> [api-docs-url]

# Validate Connector Skill

## Identify the runtime under review

For **Sim Search**, validate the [live provider registration and access pipeline](../../../apps/sim/lib/sim-search/live/README.md#adding-a-live-search-connector): catalog and metadata parity, both search/read handlers, current member grants, service-source restrictions, safe scoped references, pagination, provenance, and provider failure behavior. Test real localhost setup/search/read with authorized fixtures when available, and distinguish those results from mocked provider tests. Live Search must not enqueue content indexing or background ACL/directory builds; GitLab still computes request-time permissions or uses current CSV grants.

The ingestion-specific checks below apply to ordinary workspace KB connectors and legacy Search selected with `SIM_SEARCH_LIVE=false`. Keep those checks for providers supporting both runtimes; do not require a live-only provider to implement content hashes, ingestion cursors, embeddings, or stored ACL snapshots.

You are an expert auditor for Sim knowledge base connectors. Your job is to thoroughly validate that an existing connector is correct, complete, and follows all conventions.

## Your Task
Expand Down
12 changes: 7 additions & 5 deletions .claude/rules/sim-settings-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,13 @@ and — on activatable rows only — the hover band. Never hand-roll any of it,
`RESOURCE_TILE_FILL` for a glyph, `RESOURCE_TILE_PLAIN` for a brand logo or favicon.


**Member avatars are deliberately two components, not one.** `member-list.tsx`
renders a 14px neutral marker for the dense Teammates/Organization roster, where
the email is the primary content; `components/permissions/member-row.tsx` renders
a 36px `getUserColor`-hashed avatar for member *management* rows that carry a name,
an email, and a role control. Same shape, different job — do not merge them.
**One member avatar.** Every member list, owner cell, and ranking renders emcn
`<Avatar size='xs' name={…} src={…} />` — a 14px photo, or the initial on the
neutral disc. Pass `aria-hidden` only when the member's name is visibly rendered
beside it; an email-only row (`MemberRow`) keeps the avatar labelled because it
carries the name. Never hand-roll an avatar or give a person a `getUserColor`
hash; per-person colors belong to live collaboration (presence, cursors), where
the color matches that person's cursor.

## Header action order

Expand Down
4 changes: 2 additions & 2 deletions .claude/skills/add-settings-page/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ For each page component, confirm the checklist in `.claude/rules/sim-settings-pa
`.claude/rules/sim-settings-pages.md` for the token map and the row
title/subtitle pairing convention):
`git grep -nE "text-\[1[0-8]px\]" -- 'apps/sim/**/settings/' 'apps/sim/ee/'` — should
be 0. Display type above the scale (`text-[40px]` hero headings, the `text-[8px]`
member-avatar initial) is deliberate and out of scope.
be 0. Display type above the scale (`text-[40px]` hero headings) is deliberate
and out of scope.
4. Confirm each page imports `SettingsPanel` and that its `NavigationItem` has an
accurate `description` of consistent length with its peers.
- Editable pages: confirm Save/Discard go through `SaveDiscardActions` and
Expand Down
12 changes: 7 additions & 5 deletions .cursor/rules/sim-settings-pages.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,13 @@ and — on activatable rows only — the hover band. Never hand-roll any of it,
`RESOURCE_TILE_FILL` for a glyph, `RESOURCE_TILE_PLAIN` for a brand logo or favicon.


**Member avatars are deliberately two components, not one.** `member-list.tsx`
renders a 14px neutral marker for the dense Teammates/Organization roster, where
the email is the primary content; `components/permissions/member-row.tsx` renders
a 36px `getUserColor`-hashed avatar for member *management* rows that carry a name,
an email, and a role control. Same shape, different job — do not merge them.
**One member avatar.** Every member list, owner cell, and ranking renders emcn
`<Avatar size='xs' name={…} src={…} />` — a 14px photo, or the initial on the
neutral disc. Pass `aria-hidden` only when the member's name is visibly rendered
beside it; an email-only row (`MemberRow`) keeps the avatar labelled because it
carries the name. Never hand-roll an avatar or give a person a `getUserColor`
hash; per-person colors belong to live collaboration (presence, cursors), where
the color matches that person's cursor.

## Header action order

Expand Down
2 changes: 2 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ If you prefer not to use Docker. **All commands run from the repository root unl

For ad-hoc schema iteration during development you can also use `bun run db:push` from `packages/db`, but `db:migrate` is the canonical command for staging and production. `db:push` reconciles directly to the current schema without running versioned migration guards. For disposable local/dev databases, `bun run db:push --force` accepts Drizzle's data-loss prompts, including column drops.

`db:push` treats added and removed columns, tables, and other schema objects as separate creations and deletions. It never infers a rename. For an intentional rename during local development, run `bun run db:push --interactive-renames` in a terminal and select the old object in Drizzle's chooser. This flag does not approve data loss; `--force` controls that separately. After schema reconciliation succeeds, the wrapper reconciles credential policies and OAuth providers, then backfills search vectors. A failure stops subsequent steps. Staging and production changes still use reviewed versioned migrations with expand/contract deployment steps.

4. **Run the Development Servers:**

```bash
Expand Down
6 changes: 6 additions & 0 deletions .github/actions/docker-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ inputs:
tags:
description: Comma-separated list of tags to push.
required: true
build-args:
description: Newline-separated Docker build arguments.
required: false
default: ''
max-cache-size-mb:
description: >-
Layer cache to retain after this action prunes, in MB. Must stay above one
Expand Down Expand Up @@ -72,6 +76,7 @@ runs:
platforms: ${{ inputs.platforms }}
push: true
tags: ${{ inputs.tags }}
build-args: ${{ inputs.build-args }}
provenance: false
sbom: false

Expand Down Expand Up @@ -177,5 +182,6 @@ runs:
platforms: ${{ inputs.platforms }}
push: true
tags: ${{ inputs.tags }}
build-args: ${{ inputs.build-args }}
provenance: false
sbom: false
45 changes: 26 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
echo "ℹ️ No comparable base commit; skipping desktop prerelease"
exit 0
fi
if git diff --name-only "$BEFORE" HEAD | grep -qE '^(apps/desktop/|packages/desktop-bridge/|packages/browser-protocol/)'; then
if git diff --name-only "$BEFORE" HEAD | grep -qE '^(apps/desktop/|packages/desktop-bridge/|packages/browser-protocol/|\.github/workflows/(ci|desktop-release)\.yml$)'; then
echo "changed=true" >> "$GITHUB_OUTPUT"
echo "✅ Desktop shell code changed"
else
Expand Down Expand Up @@ -221,15 +221,18 @@ jobs:
file: ${{ matrix.dockerfile }}
platforms: linux/amd64
tags: ${{ steps.login-ecr.outputs.registry }}/${{ steps.ecr-repo.outputs.name }}:${{ github.sha }}-dev
build-args: |
SIM_SEARCH_LIVE_DEFAULT=true
MSHIP_PLAN_MODE_DEFAULT=true
max-cache-size-mb: ${{ matrix.cache_mb }}

# Build and upload tasks alongside tests and images. The unpromoted version
# cannot serve new runs; promote-images waits for it and successful migrations.
# Staging/production coordinate task releases with app traffic cutover.
# Dev tasks deploy independently in deploy-trigger-dev.yml.
prepare-trigger:
name: Prepare Trigger.dev
if: >-
github.event_name == 'push' &&
(github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/dev')
(github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging')
runs-on: ${{ (vars.CI_PROVIDER == '' || vars.CI_PROVIDER == 'blacksmith') && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
timeout-minutes: 30
outputs:
Expand Down Expand Up @@ -265,7 +268,6 @@ jobs:
case "$GITHUB_REF" in
refs/heads/main) TRIGGER_ENV=prod; TRIGGER_BRANCH='' ;;
refs/heads/staging) TRIGGER_ENV=staging; TRIGGER_BRANCH='' ;;
refs/heads/dev) TRIGGER_ENV=preview; TRIGGER_BRANCH=dev-sim ;;
*) echo "ERROR: unsupported Trigger release ref: $GITHUB_REF" >&2; exit 1 ;;
esac
echo "environment=$TRIGGER_ENV" >> "$GITHUB_OUTPUT"
Expand Down Expand Up @@ -426,8 +428,9 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
max-cache-size-mb: ${{ matrix.cache_mb }}

# Promote the sha-tagged ECR images once tests, migrations, and the Trigger
# upload pass. Pushing the ECR latest/staging tag is what triggers
# Promote the sha-tagged ECR images once their build and migrations pass.
# Staging/production also require the Trigger upload; dev never waits for it.
# Pushing the ECR latest/staging/dev tag is what triggers
# CodePipeline, so this seconds-long manifest retag is the deploy gate —
# the image builds themselves run in parallel with the tests. A single job
# (not a matrix) so all four sha manifests are verified before any tag
Expand All @@ -438,9 +441,9 @@ jobs:
# Explicit results: see migrate's comment.
if: >-
!cancelled() && github.event_name == 'push' &&
needs.prepare-trigger.result == 'success' &&
(
((github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging') &&
needs.prepare-trigger.result == 'success' &&
needs.migrate.result == 'success' &&
needs.build-amd64.result == 'success') ||
(github.ref == 'refs/heads/dev' &&
Expand Down Expand Up @@ -546,7 +549,7 @@ jobs:
fi
done

# Promote the parked Trigger.dev version after observing the ECS
# Staging/production: promote the parked Trigger.dev version after observing the ECS
# traffic cutover (CodeDeploy AllowTraffic on every target). The image retag
# triggers the ECS pipeline; this job correlates it via the digest + retag epoch
# (rejecting a stale execution reusing the digest) and promotes at cutover.
Expand All @@ -560,14 +563,13 @@ jobs:
if: >-
!cancelled() &&
github.event_name == 'push' &&
(github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/dev') &&
(github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging') &&
needs.promote-images.result == 'success' &&
needs.prepare-trigger.result == 'success' &&
needs.promote-images.outputs.promoted == 'true'
runs-on: ${{ (vars.CI_PROVIDER == '' || vars.CI_PROVIDER == 'blacksmith') && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
# Leave setup/promotion headroom above the cutover poll (dev: 20 min;
# staging/prod: 70 min, including a deploy queued behind a long bake).
timeout-minutes: ${{ github.ref == 'refs/heads/dev' && 40 || 90 }}
# Leave setup/promotion headroom above the 70-minute cutover poll.
timeout-minutes: 90
permissions:
contents: read
id-token: write
Expand Down Expand Up @@ -599,14 +601,13 @@ jobs:
with:
role-to-assume: ${{ github.ref == 'refs/heads/main' && secrets.AWS_ROLE_TO_ASSUME || github.ref == 'refs/heads/dev' && secrets.DEV_AWS_ROLE_TO_ASSUME || secrets.STAGING_AWS_ROLE_TO_ASSUME }}
aws-region: ${{ github.ref == 'refs/heads/main' && secrets.AWS_REGION || github.ref == 'refs/heads/dev' && secrets.DEV_AWS_REGION || secrets.STAGING_AWS_REGION }}
# Match each environment's session budget; both outlast their polls.
role-duration-seconds: ${{ github.ref == 'refs/heads/dev' && 2400 || 5400 }}
role-duration-seconds: 5400

# An unchanged tag may belong to a failed or still-running earlier deploy.
# Verify its latest cutover rather than treating tag equality as success.
- name: Wait for ECS traffic cutover
env:
OVERALL_TIMEOUT: ${{ github.ref == 'refs/heads/dev' && 1200 || 4200 }}
OVERALL_TIMEOUT: 4200
APP_IMAGE_CHANGED: ${{ needs.promote-images.outputs.app_image_changed }}
DIGEST: ${{ needs.promote-images.outputs.app_image_digest }}
PIPELINE: sim-${{ github.ref == 'refs/heads/main' && 'production' || github.ref == 'refs/heads/dev' && 'dev' || 'staging' }}-us-east-1-app-deployment
Expand Down Expand Up @@ -1311,24 +1312,30 @@ jobs:
name: Prune Desktop Prereleases
runs-on: ${{ (vars.CI_PROVIDER == '' || vars.CI_PROVIDER == 'blacksmith') && 'blacksmith-2vcpu-ubuntu-2404' || 'ubuntu-latest' }}
timeout-minutes: 5
needs: [publish-desktop-prerelease]
needs: [create-desktop-prerelease, publish-desktop-prerelease]
permissions:
contents: read
env:
GH_TOKEN: ${{ secrets.DESKTOP_RELEASE_TOKEN }}
GH_REPO: simstudioai/sim-desktop-releases
CURRENT_TAG: ${{ needs.create-desktop-prerelease.outputs.version }}
steps:
- name: Delete stale prereleases
run: |
set -euo pipefail
: "${CURRENT_TAG:?Current publication tag is required before pruning}"
if [ -z "$GH_TOKEN" ]; then
echo "::error::DESKTOP_RELEASE_TOKEN is required to prune desktop prereleases."
exit 1
fi
if [ "$GITHUB_REF" = "refs/heads/dev" ]; then CHANNELS='(dev|alpha)'; else CHANNELS='(staging|beta)'; fi
gh release list --limit 100 --json tagName,isPrerelease,isDraft,createdAt \
--jq "[.[] | select(.isPrerelease and (.isDraft | not) and (.tagName | test(\"-${CHANNELS}\\\\.\")))] | sort_by(.createdAt) | reverse | .[5:] | .[].tagName" |
# createdAt follows the tag's commit: published releases in the release-only
# repository can all share it. Retain by publication time, with deterministic ties.
gh release list --limit 100 --json tagName,isPrerelease,isDraft,publishedAt \
--jq "[.[] | select(.isPrerelease and (.isDraft | not) and (.tagName | test(\"-${CHANNELS}\\\\.\")))] | sort_by(.publishedAt, .tagName) | reverse | .[5:] | .[].tagName" |
while read -r TAG; do
[ -n "$TAG" ] || continue
[ "$TAG" != "$CURRENT_TAG" ] || continue
echo "Deleting stale prerelease $TAG"
gh release delete "$TAG" --cleanup-tag --yes
done
Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/deploy-trigger-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Deploy Dev Tasks

# Independent of app CI: task packaging and deployment must never delay dev images.
on:
push:
branches: [dev]

permissions:
contents: read

# Serialize promotions without cancelling an external deployment in flight.
# Pending pushes coalesce to the newest run while the current run finishes.
concurrency:
group: deploy-trigger-dev
cancel-in-progress: false

jobs:
deploy:
name: Deploy Trigger.dev preview
runs-on: ${{ (vars.CI_PROVIDER == '' || vars.CI_PROVIDER == 'blacksmith') && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Setup Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.4.1

- name: Cache Bun dependencies
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
with:
path: |
~/.bun/install/cache
node_modules
**/node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-

- name: Install dependencies
run: bun install --frozen-lockfile --ignore-scripts

- name: Upload preview version
id: deploy
working-directory: ./apps/sim
env:
TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
TRIGGER_PROJECT_ID: ${{ secrets.TRIGGER_PROJECT_ID }}
run: |
set -euo pipefail
: "${TRIGGER_ACCESS_TOKEN:?TRIGGER_ACCESS_TOKEN must be configured}"
: "${TRIGGER_PROJECT_ID:?TRIGGER_PROJECT_ID must be configured}"
bunx trigger.dev@4.5.16 deploy --env preview --branch dev-sim --skip-promotion

- name: Promote current dev preview
working-directory: ./apps/sim
env:
GH_TOKEN: ${{ github.token }}
TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
TRIGGER_PROJECT_ID: ${{ secrets.TRIGGER_PROJECT_ID }}
VERSION: ${{ steps.deploy.outputs.deploymentVersion }}
run: |
set -euo pipefail
if ! [[ "$VERSION" =~ ^[0-9]{8}\.[0-9]+$ ]]; then
echo "ERROR: Trigger.dev did not report a valid deploymentVersion output" >&2
exit 1
fi
CURRENT_SHA=$(gh api "repos/$GITHUB_REPOSITORY/git/ref/heads/dev" --jq '.object.sha')
if [ "$CURRENT_SHA" != "$GITHUB_SHA" ]; then
echo "::notice::Skipping superseded dev task version $VERSION"
Comment thread
waleedlatif1 marked this conversation as resolved.
exit 0
fi
bunx trigger.dev@4.5.16 promote "$VERSION" --env preview --branch dev-sim
13 changes: 3 additions & 10 deletions .github/workflows/migrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ jobs:
MIGRATION_DATABASE_URL: ${{ inputs.environment == 'production' && secrets.MIGRATION_DATABASE_URL || inputs.environment == 'staging' && secrets.STAGING_MIGRATION_DATABASE_URL || '' }}
ENVIRONMENT: ${{ inputs.environment }}
run: |
set -euo pipefail

if [ -z "$DATABASE_URL" ]; then
echo "ERROR: no database URL secret resolved for environment '${ENVIRONMENT}'" >&2
exit 1
Expand All @@ -73,16 +75,7 @@ jobs:
echo "Dev environment — pushing schema directly (db:push)"
# Dev deliberately forces direct schema reconciliation; staging and
# production use guarded versioned migrations in the other branch.
# drizzle-kit push needs a TTY to resolve ambiguous renames (--force only
# covers data-loss). In CI it throws "Interactive prompts require a TTY
# terminal" but still exits 0, so the job goes green without applying the
# change. tee keeps the output live in the log; we then fail on drizzle's
# own TTY error. A genuine non-zero exit already fails via `set -e`.
bun run db:push --force < /dev/null 2>&1 | tee /tmp/db-push.log
if grep -q "Interactive prompts require a TTY terminal" /tmp/db-push.log; then
echo "ERROR: db:push needs an interactive rename decision; land it as a versioned migration instead of relying on push." >&2
exit 1
fi
SIM_DEV_DB_PUSH=1 bun run db:push --force < /dev/null
else
echo "Applying versioned migrations (db:migrate)"
bun run ./scripts/migrate.ts
Expand Down
Loading
Loading