Skip to content

Conversation

@kevinkim-ogp
Copy link
Contributor

  • Chore: Bump vulnerable versions
  • Chore: Sanitise null characters in FormSG submissions
  • Chore: Add dropdown to select different model type for AISAY's generalised model
  • Fix: Slack bot display name should be optional
  • Fix: Auto open side drawer when adding a new FormSG connection

kevinkim-ogp and others added 6 commits June 10, 2025 12:33
## Problem
BUG: side drawer does not open when adding a new form
* noted in multiple users' pipes
* sample RUM session:
https://ogp.datadoghq.com/rum/replay/sessions/de402c74-935f-43f5-9de3-df2c71b0f75b?applicationId=3bd09f62-dad8-4107-a907-1242dda9ee4d&seed=796b2f87-33fc-4ab6-bdcb-752b3509b0f2&ts=1748920230148

## Solution
**Bug Fixes**:
- Return the step position after updating the step

## Other changes
- Removed the unnecessary closure of the side drawer in the Step since
it is already handled by the flow step, which shows Add step if the step
only has `appKey` and not a `key` (this is for old pipes where users
selected the app, but not the event)

## How to test?
- [ ] Create a new Pipe and connect a **NEW** form
- Or use an existing form, but delete the webhook url in form admin and
delete the connection from apps
- [ ] Open an existing Pipe, delete the trigger and connect a **NEW**
form
- [ ] Open an existing FormSG step and change the connection
- [ ] Adding a new Step works as expected

## Before & After Screenshots

**BEFORE**:
sample RUM session:
https://ogp.datadoghq.com/rum/replay/sessions/de402c74-935f-43f5-9de3-df2c71b0f75b?applicationId=3bd09f62-dad8-4107-a907-1242dda9ee4d&seed=796b2f87-33fc-4ab6-bdcb-752b3509b0f2&ts=1748920230148

**AFTER**:


https://github.com/user-attachments/assets/55ab81f1-a0f1-4bce-84b2-d03d8d9bee2a
## TL;DR
Adds dropdown to select the type of generalised model to use for AISAY
action.
Context: AISAY added a new model type called 'Vision' to their
generalised model.

AISAY's API doc:
https://app.swaggerhub.com/apis-docs/DAMIENSKTWORK/bgp-aisay_document_extraction_api/1.0.11#/DocumentParserResponse

## Solution
**Improvements**:
- Add dropdown to select generalised model: `Standard` (default) or
`Vision` (new)

## How to test?
- [ ] Existing AISAY actions work as intended without making any changes
  - [ ] Show the model type as `Standard` by default 
- [ ] Existing AISAY action can be updated to use new `Vision` model
- [ ] Create new AISAY action with `Vision` model and runs as intended
- [ ] Create new AISAY action with `Standard` model and runs as intended

## What changed?
* Additional dropdown field called `Model type` with the following
options: `Standard` (default), `Vision` (new)
* Add tests to validate the model type selection
* Add model type to api call as `additional_features`

## Before & After Screenshots

**BEFORE**:
<img width="975" alt="Screenshot 2025-06-06 at 2 49 19 PM"
src="https://github.com/user-attachments/assets/9063c9ef-7770-4e96-af14-7fa6e0f750a8"
/>


**AFTER**:
<img width="968" alt="Screenshot 2025-06-06 at 2 52 50 PM"
src="https://github.com/user-attachments/assets/24103909-31da-4b01-be8f-7f0c49cc4d2e"
/>


https://github.com/user-attachments/assets/b0b0093f-75d6-4457-9552-02ffe80fa348
…1048)

## Problem

Null characters are not sanitised when the form submission is made and
an error is thrown when inserting into our `ExecutionSteps` table DB

## Solution

Replace `\u0000` characters with empty spaces before inserting the data
into our DB

## Tests
- [ ] Check that `\u0000` characters are being sanitised for answer
fields e.g. short answer, long answer
- [ ] Check that `\u0000` characters are being sanitised for 1D
answerArray fields e.g. checkbox, address
- [ ] Check that `\u0000` characters are being sanitised for 2D
answerArray fields e.g. table
### Dependency version changes

#### Dependencies
**SGID Client**
- [x] Check that sgid login still works

**Multer**
- Only CVE fixes in the changelog
- [x] Check that file uploads still work

#### Dev dependencies
**Nodemon**
- [x] Check that `npm run dev` still works

**Vite**
- [x] Check that `npm run build` still works

**Vitest**
- [x] Check that `npm test` still works

**GraphQL Codegen CLI**
- [x] Check that `npm postinstall` still works
@kevinkim-ogp kevinkim-ogp requested a review from a team as a code owner June 11, 2025 06:24
@datadog-opengovsg
Copy link

Datadog Report

Branch report: develop-v2
Commit report: b439397
Test service: plumber

✅ 0 Failed, 827 Passed, 0 Skipped, 2m 44.86s Total Time
➡️ Test Sessions change in coverage: 1 no change

Copy link
Contributor

@m0nggh m0nggh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok tested that it works and updated the env variables also for m365, lgtm!

@pregnantboy pregnantboy merged commit 611637e into production Jun 11, 2025
8 of 11 checks passed
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.

4 participants