From 631d751887e457957400e77680d406f768119816 Mon Sep 17 00:00:00 2001 From: William Jordan-Cooley Date: Wed, 19 Jun 2024 15:33:52 -0400 Subject: [PATCH 1/3] documentation in choreo record --- lib/pangea/models/choreo_record.dart | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/lib/pangea/models/choreo_record.dart b/lib/pangea/models/choreo_record.dart index 3422a76a2..413f00716 100644 --- a/lib/pangea/models/choreo_record.dart +++ b/lib/pangea/models/choreo_record.dart @@ -247,22 +247,27 @@ class ChoreoRecord { choreoSteps.isNotEmpty ? choreoSteps.last.text : ""; } -/// new step are saved +/// A new ChoreoRecordStep is saved in the following cases: /// 1) before every system-provided text is accepted, if final text is different /// from last step /// 2) on the acceptance of system-provided text /// 3) on message send, if final text is different from last step +/// 4) on the acceptance of an it step +/// 5) on the start of it /// -/// user edit -/// "hey ther" +/// Example 1: +/// the user types "hey ther" +/// IGC suggests "there" /// user accepts "there" correction -/// "hey there" -/// step made for user edits and step made for system suggestion -/// user goes through IT, chooses "hola" -/// "hola" -/// step saved -/// adds "amigo" -/// step saved +/// text is now "hey there" +/// A step is made for the original input 'hey there' and a step is made for system suggestion +/// +/// Example 2: +/// user write "hi friend" +/// a step is made for the original input 'hi friend' +/// the user selects IT and a step is made +/// the user chooses "hola" and a step is saved +/// adds "amigo" and a step saved class ChoreoRecordStep { /// text after changes have been made String text; From 17c95baacbfc550e26dc2eea11eb4327b5bf6c71 Mon Sep 17 00:00:00 2001 From: Brord van Wierst Date: Thu, 20 Jun 2024 00:28:07 +0200 Subject: [PATCH 2/3] Sentry using dart --- .github/workflows/main_deploy.yaml | 43 +++++++----------------------- pubspec.yaml | 1 + scripts/upload-sentry.sh | 23 ---------------- sentry.properties | 6 +++++ 4 files changed, 17 insertions(+), 56 deletions(-) delete mode 100755 scripts/upload-sentry.sh create mode 100644 sentry.properties diff --git a/.github/workflows/main_deploy.yaml b/.github/workflows/main_deploy.yaml index bb3bdf93d..03f80fedf 100644 --- a/.github/workflows/main_deploy.yaml +++ b/.github/workflows/main_deploy.yaml @@ -28,55 +28,32 @@ jobs: run: ./scripts/prepare-web.sh - name: Build Release Web run: ./scripts/build-web.sh + - name: Upload files uses: actions/upload-artifact@v3 with: name: web path: build/web - deploy_web: - runs-on: ubuntu-latest - needs: build_web - environment: staging - steps: - - name: Download web - uses: actions/download-artifact@v3 - with: - name: web - path: build/web - - name: Update Website files - run: | - mv build/web public - touch public/.env - echo "$WEB_APP_ENV" >> public/.env - cp public/.env public/assets/.env - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 - with: - personal_token: ${{ secrets.PAGES_DEPLOY_TOKEN }} - publish_dir: ./public - publish_branch: gh-pages - cname: app.staging.pangea.chat - update_sentry: runs-on: ubuntu-latest needs: build_web environment: staging env: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - SENTRY_BASE_TOKEN: ${{ secrets.SENTRY_BASE_TOKEN }} - SENTRY_ORG: ${{ secrets.SENTRY_ORG }} - SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} - CI_COMMIT_SHA: ${{ github.sha }} + SENTRY_RELEASE: ${{ github.sha }} + SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }} + SENTRY_ORG: ${{ vars.SENTRY_ORG }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 + - run: cat .github/workflows/versions.env >> $GITHUB_ENV + - uses: subosito/flutter-action@v2 + with: + flutter-version: ${{ env.FLUTTER_VERSION }} - name: Download web uses: actions/download-artifact@v3 with: name: web path: build/web - - name: Install sentry CLI - run: | - curl -sL https://sentry.io/get-cli/ | bash - name: Update sentry - run: ./scripts/upload-sentry.sh + run: flutter packages pub run sentry_dart_plugin diff --git a/pubspec.yaml b/pubspec.yaml index 0c3b2faac..da58c6ac8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -136,6 +136,7 @@ dev_dependencies: sdk: flutter license_checker: ^1.6.0 msix: ^3.6.2 + sentry_dart_plugin: ^1.0.0 translations_cleaner: ^0.0.5 flutter_native_splash: diff --git a/scripts/upload-sentry.sh b/scripts/upload-sentry.sh deleted file mode 100755 index 13f6f47d3..000000000 --- a/scripts/upload-sentry.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -ve - -# Build a release version of the app for a platform and upload symbols -export OUTPUT_FOLDER_WEB=./build/web/ -export SENTRY_RELEASE=$CI_COMMIT_SHA -export SENTRY_PROJECT="${SENTRY_PROJECT:-client}" -export SENTRY_ORG="${SENTRY_ORG:-pangea-chat}" - -echo "[run] Uploading sourcemaps for $SENTRY_RELEASE" -echo "[run] $SENTRY_PROJECT @ $SENTRY_ORG / $OUTPUT_FOLDER_WEB" -sentry-cli releases new $SENTRY_RELEASE --org $SENTRY_ORG -sentry-cli releases set-commits $CI_COMMIT_SHA --auto -sentry-cli releases files $SENTRY_RELEASE upload-sourcemaps . \ - --ext dart \ - --rewrite - -(cd $OUTPUT_FOLDER_WEB -sentry-cli releases files $SENTRY_RELEASE upload-sourcemaps . \ - --ext map \ - --ext js \ - --rewrite) - -sentry-cli releases finalize $SENTRY_RELEASE diff --git a/sentry.properties b/sentry.properties new file mode 100644 index 000000000..876598ba5 --- /dev/null +++ b/sentry.properties @@ -0,0 +1,6 @@ +upload_debug_symbols=true +upload_source_maps=true +upload_sources=true +wait_for_processing=false +log_level=info +commits=auto From 5b923ca0555d2ac9179f7764ffe70ff414facd2e Mon Sep 17 00:00:00 2001 From: Brord van Wierst Date: Thu, 20 Jun 2024 00:28:59 +0200 Subject: [PATCH 3/3] added back deploy web --- .github/workflows/main_deploy.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/main_deploy.yaml b/.github/workflows/main_deploy.yaml index 03f80fedf..4dade8221 100644 --- a/.github/workflows/main_deploy.yaml +++ b/.github/workflows/main_deploy.yaml @@ -35,6 +35,30 @@ jobs: name: web path: build/web + deploy_web: + runs-on: ubuntu-latest + needs: build_web + environment: staging + steps: + - name: Download web + uses: actions/download-artifact@v3 + with: + name: web + path: build/web + - name: Update Website files + run: | + mv build/web public + touch public/.env + echo "$WEB_APP_ENV" >> public/.env + cp public/.env public/assets/.env + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + personal_token: ${{ secrets.PAGES_DEPLOY_TOKEN }} + publish_dir: ./public + publish_branch: gh-pages + cname: app.staging.pangea.chat + update_sentry: runs-on: ubuntu-latest needs: build_web