-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: Search page alerts #1182
feat: Search page alerts #1182
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
📦 Next.js Bundle Analysis for @weareinreach/appThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- InReach.code-workspace (1 hunks)
- packages/db/prisma/schema.prisma (4 hunks)
Files skipped from review as they are similar to previous changes (2)
- InReach.code-workspace
- packages/db/prisma/schema.prisma
This PR currently has a merge conflict. Please resolve this and then re-add the |
Signed-off-by: Joe Karow <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- apps/app/public/locales/en/common.json (1 hunks)
- packages/db/prisma/data-migrations/2024-06-27_search-page-alert.ts (1 hunks)
- packages/db/prisma/data-migrations/index.ts (1 hunks)
- packages/ui/components/core/LocationBasedAlertBanner/index.tsx (1 hunks)
Files skipped from review due to trivial changes (1)
- packages/db/prisma/data-migrations/index.ts
Files skipped from review as they are similar to previous changes (2)
- apps/app/public/locales/en/common.json
- packages/ui/components/core/LocationBasedAlertBanner/index.tsx
Additional context used
Biome
packages/db/prisma/data-migrations/2024-06-27_search-page-alert.ts
[error] 21-21: The assignment should not be in an expression.
The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.(lint/suspicious/noAssignInExpressions)
Additional comments not posted (3)
packages/db/prisma/data-migrations/2024-06-27_search-page-alert.ts (3)
55-55
: Ensure the job completion record is correctly written to the database.This is a critical step to ensure that the migration is registered as having run successfully. Verify that
jobPostRunner
correctly logs the job completion.Verification successful
Ensure the job completion record is correctly written to the database.
The
jobPostRunner
function includes logic to create a record in the database usingprisma.dataMigration.create({ data: jobDef })
. This ensures that the migration is registered as having run successfully.
- File:
./packages/db/prisma/jobPreRun.ts
- Implementation:
export const jobPostRunner = async (jobDef: JobDef) => { try { await prisma.dataMigration.create({ data: jobDef }) } catch (err) { console.error(err) throw err } }This confirms that the job completion record is correctly written to the database.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the job completion record is correctly written to the database. # Test: Check the database to ensure that the job completion record exists. echo "Check database for job completion record"Length of output: 90
Script:
#!/bin/bash # Locate the implementation of jobPostRunner function and check for database logging logic echo "Searching for jobPostRunner function implementation" job_post_runner_file=$(fd -e ts -e js -x gawk '/function jobPostRunner|const jobPostRunner =/ {print FILENAME}' {} +) echo "Found jobPostRunner implementation in: $job_post_runner_file" echo "Checking for database logging logic in jobPostRunner" grep -E 'insert|update|log|write' "$job_post_runner_file" # Check for related tests or logs echo "Searching for tests related to jobPostRunner" fd -e ts -e js -x grep -l 'jobPostRunner' {}Length of output: 67224
Script:
#!/bin/bash # Extract the full implementation of jobPostRunner function and check for database operations echo "Extracting jobPostRunner function implementation" ast-grep --lang typescript --pattern $'function jobPostRunner($$$) { $$$ }' ./packages/db/prisma/jobPreRun.ts # Inspect related test files for assertions on job completion logging echo "Inspecting related test files" fd -e ts -e js -x grep -A 5 -B 5 'jobPostRunner' {}Length of output: 5796
48-48
: Logging of created alert should be verified for correctness.Ensure that the log function is called correctly and that the
newAlert.id
is properly retrieved and logged.
34-46
: Review the creation ofnewAlert
for potential issues.Ensure that the
id
andtext
fields are correctly generated and connected. The use ofgenerateNestedFreeText
seems appropriate for generating nested text, but verify that thefreeTextId
anditemId
are correctly set up to reference valid entries.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- packages/ui/components/core/LocationBasedAlertBanner/index.stories.tsx (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- packages/ui/components/core/LocationBasedAlertBanner/index.stories.tsx
@coderabbitai resolve |
Actions performedComments resolved. |
Pull Request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue Number: IN-941
What is the new behavior?
Does this introduce a breaking change?
Other information
Screen.Recording.2024-03-22.at.1.45.15.PM.mov
Summary by CodeRabbit
New Features
lightPink
andlightGreen
.Bug Fixes
Documentation
LocationBasedAlertBanner
component.Refactor
SearchBox
component to usesetSearchValue
prop.Chores
react
andreact-dom
topeerDependencyRules
.