Skip to content

Commit d898604

Browse files
committed
Merge remote-tracking branch 'origin/main' into cs-6457-implement-search-query-support-in-sqlite-adapter
2 parents 81e3534 + 24de03d commit d898604

Some content is hidden

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

48 files changed

+2130
-1258
lines changed

.github/actions/deploy-ember-preview/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ runs:
4343
-H "Authorization: token $GITHUB_TOKEN" \
4444
-H "Accept: application/vnd.github.v3+json" \
4545
https://api.github.com/repos/$REPOSITORY/statuses/$HEAD_SHA \
46-
-d '{"context":"Preview ${{ inputs.package }} ${{ inputs.environment }}","description":"${{ inputs.environment }} deployment of this branch","target_url":"'"$PREVIEW_HOST"'","state":"success"}'
46+
-d '{"context":"Preview ${{ inputs.package }} ${{ inputs.environment }}","description":"${{ inputs.environment }} ${{ inputs.package }} deployment of this branch","target_url":"'"$PREVIEW_HOST"'","state":"success"}'

.github/workflows/deploy-motion.yml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Deploy boxel-motion with ember
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
environment:
7+
required: true
8+
type: string
9+
10+
permissions:
11+
contents: read
12+
id-token: write
13+
14+
jobs:
15+
deploy:
16+
name: Deploy
17+
runs-on: ubuntu-latest
18+
concurrency: deploy-motion-${{ inputs.environment }}
19+
steps:
20+
- uses: actions/checkout@v3
21+
22+
- name: Init
23+
uses: ./.github/actions/init
24+
25+
- name: Set up env
26+
env:
27+
INPUT_ENVIRONMENT: ${{ inputs.environment }}
28+
run: |
29+
echo "AWS_REGION=us-east-1" >> $GITHUB_ENV
30+
if [ "$INPUT_ENVIRONMENT" = "staging" ]; then
31+
echo "AWS_ROLE_ARN=arn:aws:iam::680542703984:role/boxel-motion" >> $GITHUB_ENV
32+
echo "AWS_S3_BUCKET=cardstack-boxel-motion-staging" >> $GITHUB_ENV
33+
echo "AWS_CLOUDFRONT_DISTRIBUTION=EC1OAKT1JEUGN" >> $GITHUB_ENV
34+
else
35+
echo "unrecognized environment"
36+
exit 1;
37+
fi
38+
- name: Build boxel-motion addon
39+
run: pnpm build
40+
working-directory: packages/boxel-motion/addon
41+
42+
- name: Configure AWS credentials
43+
uses: aws-actions/configure-aws-credentials@v3
44+
with:
45+
role-to-assume: ${{ env.AWS_ROLE_ARN }}
46+
aws-region: us-east-1
47+
48+
- name: Deploy
49+
run: pnpm deploy:boxel-motion ${{ inputs.environment }} --verbose
50+
51+
- name: Send notification to Discord
52+
uses: cardstack/gh-actions/discord-notification-deploy@main
53+
with:
54+
app: "boxel-motion"
55+
status: ${{ job.status }}
56+
environment: ${{ inputs.environment }}
57+
webhook: ${{ secrets.DISCORD_WEBHOOK }}

.github/workflows/deploy-ui.yml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Deploy boxel-ui with ember
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
environment:
7+
required: true
8+
type: string
9+
10+
permissions:
11+
contents: read
12+
id-token: write
13+
14+
jobs:
15+
deploy:
16+
name: Deploy
17+
runs-on: ubuntu-latest
18+
concurrency: deploy-ui-${{ inputs.environment }}-${{ github.head_ref || github.run_id }}
19+
steps:
20+
- uses: actions/checkout@v3
21+
22+
- name: Init
23+
uses: ./.github/actions/init
24+
25+
- name: Set up env
26+
env:
27+
INPUT_ENVIRONMENT: ${{ inputs.environment }}
28+
run: |
29+
echo "AWS_REGION=us-east-1" >> $GITHUB_ENV
30+
if [ "$INPUT_ENVIRONMENT" = "staging" ]; then
31+
echo "AWS_ROLE_ARN=arn:aws:iam::680542703984:role/boxel-ui" >> $GITHUB_ENV
32+
echo "AWS_S3_BUCKET=cardstack-boxel-ui-staging" >> $GITHUB_ENV
33+
echo "AWS_CLOUDFRONT_DISTRIBUTION=E3UUDP4PEB5IDV" >> $GITHUB_ENV
34+
else
35+
echo "unrecognized environment"
36+
exit 1;
37+
fi
38+
- name: Build boxel-ui addon
39+
run: pnpm build
40+
working-directory: packages/boxel-ui/addon
41+
42+
- name: Configure AWS credentials
43+
uses: aws-actions/configure-aws-credentials@v3
44+
with:
45+
role-to-assume: ${{ env.AWS_ROLE_ARN }}
46+
aws-region: us-east-1
47+
48+
- name: Deploy
49+
run: pnpm deploy:boxel-ui ${{ inputs.environment }} --verbose
50+
51+
- name: Send notification to Discord
52+
uses: cardstack/gh-actions/discord-notification-deploy@main
53+
with:
54+
app: "boxel-ui"
55+
status: ${{ job.status }}
56+
environment: ${{ inputs.environment }}
57+
webhook: ${{ secrets.DISCORD_WEBHOOK }}

.github/workflows/manual-deploy.yml

+14
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,20 @@ jobs:
2929
with:
3030
environment: ${{ inputs.environment }}
3131

32+
deploy-motion:
33+
name: Deploy boxel-motion
34+
uses: ./.github/workflows/deploy-motion.yml
35+
secrets: inherit
36+
with:
37+
environment: staging
38+
39+
deploy-ui:
40+
name: Deploy boxel-ui
41+
uses: ./.github/workflows/deploy-ui.yml
42+
secrets: inherit
43+
with:
44+
environment: staging
45+
3246
build-realm-server:
3347
name: Build Docker image
3448
uses: cardstack/gh-actions/.github/workflows/docker-ecr.yml@main

.github/workflows/pr-boxel-motion.yml

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: CI [boxel-motion]
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "packages/boxel-motion/**"
7+
- ".github/workflows/pr-boxel-motion.yml"
8+
- "package.json"
9+
- "pnpm-lock.yaml"
10+
11+
permissions:
12+
contents: read
13+
issues: read
14+
checks: write
15+
pull-requests: write
16+
id-token: write
17+
statuses: write
18+
19+
jobs:
20+
check-if-requires-preview:
21+
name: Check if a preview deploy is required
22+
runs-on: ubuntu-latest
23+
outputs:
24+
boxel-motion-files-changed: ${{ steps.boxel-motion-files-that-changed.outputs.any_changed }}
25+
steps:
26+
- uses: actions/checkout@v3
27+
- name: Get boxel-motion files that changed
28+
id: boxel-motion-files-that-changed
29+
uses: tj-actions/changed-files@v39
30+
with:
31+
files: |
32+
packages/boxel-motion/**
33+
34+
deploy-motion-preview-staging:
35+
name: Deploy a boxel-motion staging preview to S3
36+
runs-on: ubuntu-latest
37+
# github.event.pull_request.head.repo.full_name == github.repository: true if pr is from the original repo, false if it's from a fork
38+
# github.head_ref: the branch that the pull request is from. only appears on pull_request events
39+
if: github.event.pull_request.head.repo.full_name == github.repository && github.head_ref && needs.check-if-requires-preview.outputs.boxel-motion-files-changed == 'true'
40+
needs: check-if-requires-preview
41+
concurrency: deploy-motion-preview-staging-${{ github.head_ref || github.run_id }}
42+
steps:
43+
- uses: actions/checkout@v3
44+
- name: Configure AWS credentials
45+
uses: aws-actions/configure-aws-credentials@v3
46+
with:
47+
role-to-assume: arn:aws:iam::680542703984:role/boxel-motion
48+
aws-region: us-east-1
49+
- name: Deploy boxel-motion preview
50+
uses: ./.github/actions/deploy-ember-preview
51+
env:
52+
S3_PREVIEW_BUCKET_NAME: boxel-motion-preview.stack.cards
53+
AWS_S3_BUCKET: boxel-motion-preview.stack.cards
54+
AWS_REGION: us-east-1
55+
AWS_CLOUDFRONT_DISTRIBUTION: E25VU6BCHNF7AR
56+
with:
57+
package: boxel-motion
58+
environment: staging

.github/workflows/pr-boxel-ui.yml

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: CI [boxel-ui]
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "packages/boxel-ui/**"
7+
- ".github/workflows/pr-boxel-ui.yml"
8+
- "package.json"
9+
- "pnpm-lock.yaml"
10+
11+
permissions:
12+
contents: read
13+
issues: read
14+
checks: write
15+
pull-requests: write
16+
id-token: write
17+
statuses: write
18+
19+
jobs:
20+
check-if-requires-preview:
21+
name: Check if a preview deploy is required
22+
runs-on: ubuntu-latest
23+
outputs:
24+
boxel-ui-files-changed: ${{ steps.boxel-ui-files-that-changed.outputs.any_changed }}
25+
steps:
26+
- uses: actions/checkout@v3
27+
- name: Get boxel-ui files that changed
28+
id: boxel-ui-files-that-changed
29+
uses: tj-actions/changed-files@v39
30+
with:
31+
files: |
32+
packages/boxel-ui/**
33+
34+
deploy-ui-preview-staging:
35+
name: Deploy a boxel-ui staging preview to S3
36+
runs-on: ubuntu-latest
37+
# github.event.pull_request.head.repo.full_name == github.repository: true if pr is from the original repo, false if it's from a fork
38+
# github.head_ref: the branch that the pull request is from. only appears on pull_request events
39+
if: github.event.pull_request.head.repo.full_name == github.repository && github.head_ref && needs.check-if-requires-preview.outputs.boxel-ui-files-changed == 'true'
40+
needs: check-if-requires-preview
41+
concurrency: deploy-ui-preview-staging-${{ github.head_ref || github.run_id }}
42+
steps:
43+
- uses: actions/checkout@v3
44+
- name: Configure AWS credentials
45+
uses: aws-actions/configure-aws-credentials@v3
46+
with:
47+
role-to-assume: arn:aws:iam::680542703984:role/boxel-ui
48+
aws-region: us-east-1
49+
- name: Deploy boxel-ui preview
50+
uses: ./.github/actions/deploy-ember-preview
51+
env:
52+
S3_PREVIEW_BUCKET_NAME: boxel-ui-preview.stack.cards
53+
AWS_S3_BUCKET: boxel-ui-preview.stack.cards
54+
AWS_REGION: us-east-1
55+
AWS_CLOUDFRONT_DISTRIBUTION: E14K8X1FKQ6Y6Z
56+
with:
57+
package: boxel-ui
58+
environment: staging

README.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,11 @@ For a quickstart, see [here](./QUICKSTART.md)
1919

2020
`packages/boxel-ui/addon` is the UI components Ember addon
2121

22-
`packages/boxel-ui/test-app` is the test suite and component explorer for boxel-ui
22+
`packages/boxel-ui/test-app` is the test suite and component explorer for boxel-ui, deployed at [boxel-ui.stack.cards](https://boxel-ui.stack.cards)
2323

24-
`packages/boxel-motion` is the animation primitives ember addon.
24+
`packages/boxel-motion/addon` is the animation primitives ember addon.
2525

26-
`packages/boxel-motion-test-app` is the test suite for boxel-motion
27-
28-
`packages/boxel-motion/test-app` is the demo app for boxel-motion
26+
`packages/boxel-motion/test-app` is the demo app for boxel-motion, deployed at [boxel-motion.stack.cards](https://boxel-motion.stack.cards)
2927

3028
`packages/matrix` is the docker container for running the matrix server: synapse, as well as tests that involve running a matrix client.
3129

docs/indexer-work-plan.mermaid

+24
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,28 @@
11
flowchart
2+
PostgresInfra[Postgres Infra\nCS-6464]
3+
click PostgresInfra "https://linear.app/cardstack/issue/CS-6464" "Open in Linear"
4+
PostgresMigrations[Postgres Migrations Setup\nCS-6460]
5+
click PostgresMigrations "https://linear.app/cardstack/issue/CS-6460" "Open in Linear"
6+
PostgresQueue[Postgres Queue\nCS-6462]
7+
click PostgresQueue "https://linear.app/cardstack/issue/CS-6462" "Open in Linear"
8+
JobQueueFacade[Job Queue API\nCS-6459]
9+
click JobQueueFacade "https://linear.app/cardstack/issue/CS-6459" "Open in Linear"
10+
SQLiteIndexerImplementation[SQLite Indexer\nImplementation\nCS-6626]
11+
click SQLiteIndexerImplementation "https://linear.app/cardstack/issue/CS-6626" "Open in Linear"
12+
PostgresIndexerImplementation[Postgres Indexer\nImplementation\nCS-6627]
13+
click PostgresIndexerImplementation "https://linear.app/cardstack/issue/CS-6627" "Open in Linear"
14+
TestHelperForIndexedCardTablePopulation[Test Helper For\nIndexed Card Table Population\nCS-6637]
15+
click TestHelperForIndexedCardTablePopulation "https://linear.app/cardstack/issue/CS-6637" "Open in Linear"
16+
SQLiteQueryEngineImplementation[SQLite Query Engine Implementation\nCS-6457]
17+
click SQLiteQueryEngineImplementation "https://linear.app/cardstack/issue/CS-6457" "Open in Linear"
18+
PostgresQueryEngineImplementation[Postgres Query Engine\nImplementation\nCS-6614]
19+
click PostgresQueryEngineImplementation "https://linear.app/cardstack/issue/CS-6614" "Open in Linear"
20+
IndexInvalidation[Index Invalidation\nCS-6467]
21+
click IndexInvalidation "https://linear.app/cardstack/issue/CS-6467" "Open in Linear"
22+
UseSQLiteIndexerInHostTests[Use SQLite Indexer\nIn Host Tests\nCS-6638]
23+
click UseSQLiteIndexerInHostTests "https://linear.app/cardstack/issue/CS-6638" "Open in Linear"
24+
UsePostgresIndexerInRealmServer[Use Postgres Indexer\nIn Realm Server\nCS-6639]
25+
click UsePostgresIndexerInRealmServer "https://linear.app/cardstack/issue/CS-6639" "Open in Linear"
226
PostgresInfra-->PostgresMigrations
327
PostgresMigrations-->PostgresQueue
428
JobQueueFacade-->SQLiteIndexerImplementation

package.json

+10-6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
"deploy:boxel-host": "cd packages/boxel-ui/addon && pnpm build && cd ../../host && BASE_REALM_HOSTING_DISABLED=true NODE_OPTIONS='--max_old_space_size=8192' pnpm exec ember deploy",
1111
"deploy:boxel-host:preview-staging": "cd packages/boxel-ui/addon && pnpm build && cd ../../host && BASE_REALM_HOSTING_DISABLED=true NODE_OPTIONS='--max_old_space_size=8192' pnpm exec ember deploy s3-preview-staging --verbose",
1212
"deploy:boxel-host:preview-production": "cd packages/boxel-ui/addon && pnpm build && cd ../../host && BASE_REALM_HOSTING_DISABLED=true NODE_OPTIONS='--max_old_space_size=8192' pnpm exec ember deploy s3-preview-production --verbose",
13+
"deploy:boxel-motion": "cd packages/boxel-motion/addon && pnpm build && cd ../test-app && pnpm exec ember deploy",
14+
"deploy:boxel-motion:preview-staging": "cd packages/boxel-motion/addon && pnpm build && cd ../test-app && pnpm exec ember deploy s3-preview-staging --verbose",
15+
"deploy:boxel-ui": "cd packages/boxel-ui/addon && pnpm build && cd ../test-app && pnpm exec ember deploy",
16+
"deploy:boxel-ui:preview-staging": "cd packages/boxel-ui/addon && pnpm build && cd ../test-app && pnpm exec ember deploy s3-preview-staging --verbose",
1317
"lint": "pnpm run --filter './packages/**' --if-present -r lint",
1418
"lint:fix": "pnpm run --filter './packages/**' --if-present -r lint:fix"
1519
},
@@ -39,12 +43,12 @@
3943
"devDependencies": {
4044
"@actions/core": "^1.2.6",
4145
"@actions/github": "^4.0.0",
42-
"@babel/core": "^7.24.0",
46+
"@babel/core": "^7.24.3",
4347
"@glimmer/component": "^1.1.2",
4448
"@glimmer/tracking": "^1.0.4",
45-
"@glint/core": "^1.2.1",
46-
"@glint/environment-ember-loose": "^1.2.1",
47-
"@glint/environment-ember-template-imports": "^1.2.1",
49+
"@glint/core": "1.3.0",
50+
"@glint/environment-ember-loose": "1.3.0",
51+
"@glint/environment-ember-template-imports": "1.3.0",
4852
"@typescript-eslint/eslint-plugin": "^5.17.0",
4953
"@typescript-eslint/parser": "^5.17.0",
5054
"ember-cli-htmlbars": "^6.3.0",
@@ -65,7 +69,7 @@
6569
"pnpm": "^8"
6670
},
6771
"volta": {
68-
"node": "18.6.0",
69-
"pnpm": "8.10.5"
72+
"node": "20.11.1",
73+
"pnpm": "8.15.5"
7074
}
7175
}

packages/ai-bot/main.ts

+4
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ async function sendOption(
104104
msgtype: 'org.boxel.command',
105105
formatted_body: body,
106106
format: 'org.matrix.custom.html',
107+
isStreamingFinished: true,
107108
data: {
108109
command: {
109110
type: 'patch',
@@ -159,6 +160,9 @@ async function sendError(
159160
room,
160161
'There was an error processing your request, please try again later',
161162
eventToUpdate,
163+
{
164+
isStreamingFinished: true,
165+
},
162166
);
163167
} catch (e) {
164168
// We've had a problem sending the error message back to the user

packages/base/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
"main": "index.js",
55
"license": "MIT",
66
"devDependencies": {
7-
"@babel/core": "^7.24.0",
7+
"@babel/core": "^7.24.3",
88
"@cardstack/boxel-ui": "workspace:*",
99
"@cardstack/runtime-common": "workspace:*",
1010
"@glimmer/component": "^1.1.2",
1111
"@glimmer/tracking": "^1.0.4",
12-
"@glint/template": "^1.2.1",
13-
"@types/flat": "^5.0.2",
12+
"@glint/template": "^1.3.0",
13+
"@types/flat": "^5.0.5",
1414
"@types/lodash": "^4.14.182",
1515
"@types/marked": "^4.3.0",
1616
"ember-cli-htmlbars": "^6.3.0",
17-
"ember-concurrency": "^3.1.0",
17+
"ember-concurrency": "^3.1.1",
1818
"ember-css-url": "^1.0.0",
1919
"ember-modifier": "^3.2.1",
2020
"ethers": "^6.6.2",

0 commit comments

Comments
 (0)