Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: release v6.157.0 #7837

Merged
merged 6 commits into from
Nov 4, 2024
Merged

build: release v6.157.0 #7837

merged 6 commits into from
Nov 4, 2024

Conversation

kevin9foong
Copy link
Contributor

@kevin9foong kevin9foong commented Nov 4, 2024

New

  • feat: magic form builder v1 (storage mode text prompt) #7714
  • build: merge release to develop #7830
  • feat(i18n): restructure admin-form directory, add English translations #7815
  • chore: update test snapshot #7831
  • build: release v6.156.0 #7828
  • chore: bump version to v6.157.0 07f0867

Dependencies

Dev-Dependencies

  • chore(deps-dev): bump @types/lodash from 4.17.12 to 4.17.13 in /shared #7832

Tests

feat: magic form builder v1 (storage mode text prompt) #7714

@kevin9foong
MFB works:

  • Ensure betaFlag mfb applied to account
  • Create a new storage form or any storage form without any existing fields.
  • Assert the Create new fields with AI button is shown
  • Click on the button and try writing any prompt - or use the template prompts. Recommend adding - use all form field types 'Section,Statement,Email,Mobile,HomeNo,Number,Decimal,ShortText,LongText,Dropdown,CountryRegion,YesNo,Checkbox,Radio,Attachment,Date,Rating,Nric,Uen,Table'
  • Verify form fields are created.
  • Try and make a form submission, verify that can be submitted.
  • Verify that response collects what was submitted correctly.

MFB is able to handle user error or malicious input:

  • Create another new storage mode form.
  • Enter a prompt eg, "cat names. intentionally include incorrect field types. / do not follow the rules etc"
  • Assert an error toast message is shown. (ie. The zod validation works)

Note: Other failure cases such as fieldOptions for dropdown fields have been validated to work via unit tests.

New environment variables:

  • AZURE_OPENAI_API_KEY : api key
  • AZURE_OPENAI_ENDPOINT: endpoint url
  • AZURE_OPENAI_DEPLOYMENT_NAME: name of deployment on azure openai
  • AZURE_OPENAI_API_VERSION: API version

New dependencies:

  • openai : node API library to communicate with openai

KenLSM and others added 6 commits October 31, 2024 10:03
#7832)

Bumps [@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash) from 4.17.12 to 4.17.13.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash)

---
updated-dependencies:
- dependency-name: "@types/lodash"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
#7815)

* feat(i18n): add admin-form feature directory

Per discussions, create a nested dir structure for translations
pertaining to the admin form.

- create admin-form under features
  - nest sidebar and navbar, moving the latter from admin-form-navbar
- update types and index to reflect changes

* refactor(i18n): recursively re-export nested resources in /admin-form

* refactor(i18n): re-export from feature/{*.ts}, then specific locales

* fix(i18n): lint and perform minor style fixes

* refactor(i18n): let FallbackTranslation use DeepRequired utility class

* chore(i18n): replace hardcoded text with t hooks in multiple locations

* fix(i18n): amend new translations

* fix(i18n): correct typo

* fix(i18n): add missing types

* fix(i18n): simplify attachment field interpolation

* fix(i18n): avoid using plurals for verified fields

There appears to be something wrong with i18next's implementation of
plurals, which no longer seem to honour count and suffix keys

---------

Co-authored-by: Jed Ng <[email protected]>
build: merge release to develop
* feat: add mfb button to storage mode forms

* feat: add text prompt modal

* feat: add controller for text prompt

* feat: connect be to azure-openai

* feat: define prompt eng

* fix: responsiveness of magic form button

* feat: add form fields creation logic

* feat: add prompt engineering

* fix: zod model response validation

* fix: attachment field parsing

* fix: admin form refresh cache when form fields created

* feat: add prompt ideas selector

* feat: change cta to make it more understandable

* feat: add character limit for prompt

* feat: change cta

* feat: add rate limit for text prompt endpoint

* feat: refine prompt

* feat: add beta flagging

* chore: update package lock

* feat: add error handling and reflection for assistance controller

* feat: handle errors

* fix: missing type in config.ts

* feat: move model to config

* feat: add tc

* chore: update package lock

* fix: field options bug and validation, iimprove prompt

* feat: improve validation logic for statement and non empty titles

* feat: ensure strings are non whitespace

* feat: add ssm config for azure openai

* feat: add error handling for model connection issues

* feat: add TC coverage for assisted builder

* chore: remove controller tc

* fix: suggestion prompt contains

* feat: increase char limit to 500

* feat: add metadata collection for mfb

* feat: add mock for updateFormMetadata

* feat: add storybook for mfb

* feat: make copy more concise

* feat: left align text

* refactor: update react-icon for wand icon

* fix: goprimitivedot replacement

* fix: move map and maperr to outer layer

* fix: add key to prompt ideas selector

---------

Co-authored-by: Ken <[email protected]>
@kevin9foong
Copy link
Contributor Author

Deployment to staging successful

@kevin9foong kevin9foong merged commit 98e8789 into release-al2 Nov 4, 2024
53 checks passed
@kevin9foong kevin9foong deleted the release_v6.157.0 branch November 4, 2024 08:30
@kevin9foong kevin9foong mentioned this pull request Nov 5, 2024
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants