Skip to content

[INTW26] Conflict Dialog#247

Merged
mxc-maggiechen merged 15 commits intostagingfrom
sparsh/INTF26-conflict-dialog
May 7, 2026
Merged

[INTW26] Conflict Dialog#247
mxc-maggiechen merged 15 commits intostagingfrom
sparsh/INTF26-conflict-dialog

Conversation

@OpsEclipse
Copy link
Copy Markdown
Collaborator

@OpsEclipse OpsEclipse commented Feb 8, 2026

Notion ticket link

Implement Report Conflict Feature

Implementation description

  • Added a reusable Dialogue template built on MUI Dialog (components/common/Dialogue.tsx)
  • Implemented the 2-dialog report conflict flow (confirm + success) in the review info stage (components/review/stages/reviewInfoStage.tsx)
  • Added reportReviewConflict GraphQL mutation in graphql/queries.ts
  • Added ReviewPageAPIClient to call the mutation (APIClients/ReviewPageAPIClient.ts)
  • Wired “Yes, report” to execute the mutation and show success/error UI

Steps to test

Setup:

  • Go to pgAdmin and users table to find your account's userId
  • Go to the applicantRecords table to and make one of the reviewerId your userId, note down the applicantRecordId
  1. Navigate to /review?applicantRecordId=<applicantRecordId>
  2. Click Conflict and verify the confirm dialog opens
  3. Click Cancel and verify it closes
  4. Click Yes, report and verify the mutation is called and the success dialog opens (this will only work once backend pr is merged)

What should reviewers focus on?

  • Dialogue template styling vs Figma
  • Modal state transitions (disabled while reporting, success dialog, error copy)
  • GraphQL variable types / reviewerId extraction

@mxc-maggiechen mxc-maggiechen changed the title Sparsh/intf26 conflict dialog [INTW26] Conflict Dialog Feb 10, 2026
Comment thread package.json
Comment thread .nvmrc Outdated
Comment thread APIClients/ReviewPageAPIClient.ts Outdated
Comment thread components/admin/ReviewTable.tsx Outdated
Comment thread components/common/Dialogue.tsx Outdated
Comment thread components/common/Dialogue.tsx
@OpsEclipse OpsEclipse force-pushed the sparsh/INTF26-conflict-dialog branch from 4327539 to a19d944 Compare February 18, 2026 02:28
Comment thread .gitignore
Comment thread utils/makegqlrequest.ts
Comment thread .codex/environments/environment.toml Outdated
Comment thread utils/reviewId.ts Outdated
Comment thread components/common/Dialogue.tsx
Comment thread components/common/Dialogue.tsx
@mxc-maggiechen mxc-maggiechen mentioned this pull request Mar 15, 2026
4 tasks
@mxc-maggiechen mxc-maggiechen force-pushed the sparsh/INTF26-conflict-dialog branch from 3877d7f to cebb283 Compare March 21, 2026 19:53
Comment thread utils/makegqlrequest.ts
@mxc-maggiechen mxc-maggiechen requested a review from SaqAsh March 21, 2026 20:52
@mxc-maggiechen mxc-maggiechen changed the base branch from staging to INTW26-revampscoring March 21, 2026 20:55
@mxc-maggiechen mxc-maggiechen changed the base branch from INTW26-revampscoring to staging March 21, 2026 21:22
@mxc-maggiechen mxc-maggiechen self-requested a review March 21, 2026 21:22
Copy link
Copy Markdown
Collaborator

@SaqAsh SaqAsh left a comment

Choose a reason for hiding this comment

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

Lookin good

Comment thread components/review/stages/ReviewAnswers.tsx Outdated
Comment thread components/review/stages/ReviewSkillStage.tsx Outdated
Comment thread components/admin/ApplicationsTableColumn.tsx Outdated
Comment thread components/admin/ApplicationsTableColumn.tsx Outdated
Comment thread components/admin/ApplicationsTableColumn.tsx Outdated
Comment thread components/admin/ReviewTable.tsx
Comment thread components/admin/ReviewTable.tsx Outdated
Comment thread components/common/Dialogue.tsx Outdated
Comment thread components/review/stages/ReviewInfoStage.tsx Outdated
Comment thread components/review/stages/ReviewInfoStage.tsx Outdated
@OpsEclipse OpsEclipse requested a review from SaqAsh April 2, 2026 15:37
Maggie Chen and others added 6 commits April 4, 2026 18:16
move the conflict pop-up into its own shared component and simplify the related review page code

clean up the review table links and the shared GraphQL helper while keeping the current lockfile updates
Use applicant record IDs across review links, parsing, and submission requests so the review page matches the backend data model. This also keeps the current dialog typing change, login position field, and lockfile updates in the same commit
Revert the auth, GraphQL helper, and review list edits that were not part of the conflict dialog work. This keeps the branch focused on the dialog and applicant record ID wiring it depends on.
@mxc-maggiechen mxc-maggiechen force-pushed the sparsh/INTF26-conflict-dialog branch from 8f50c6f to 1109d38 Compare April 4, 2026 23:21
Copy link
Copy Markdown

@mxc-maggiechen mxc-maggiechen left a comment

Choose a reason for hiding this comment

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

Great work! I think this is good to go now 😄

Comment thread components/common/SplitPageLayout.tsx
@OpsEclipse OpsEclipse force-pushed the sparsh/INTF26-conflict-dialog branch 2 times, most recently from ced2671 to c9b5840 Compare April 8, 2026 00:03
Comment thread components/common/Dialogue.tsx Outdated
Comment thread components/common/Dialogue.tsx Outdated
Comment thread components/common/Dialogue.tsx Outdated
Comment thread components/common/SplitPageLayout.tsx
Comment thread components/common/SplitPageLayout.tsx
Comment thread components/interview/shared/constants.ts
Comment thread components/review/shared/ConflictDialogue.tsx Outdated
Comment thread pages/review/protectedApplication.tsx
Copy link
Copy Markdown

@mxc-maggiechen mxc-maggiechen left a comment

Choose a reason for hiding this comment

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

Steps to test

Comment thread pages/review/protectedApplication.tsx
Copy link
Copy Markdown
Collaborator

@SaqAsh SaqAsh left a comment

Choose a reason for hiding this comment

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

Just a few questions, did review quickly on the train so feel free to point out anything I missed

Comment thread components/review/shared/ConflictDialogue.tsx Outdated
@mxc-maggiechen mxc-maggiechen force-pushed the sparsh/INTF26-conflict-dialog branch from a79f918 to 14a8bea Compare April 15, 2026 00:52
);
};

type Props = ReviewStageProps & { header: ReactNode };
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

noice

Copy link
Copy Markdown
Collaborator

@SaqAsh SaqAsh left a comment

Choose a reason for hiding this comment

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

some mo cleanup

Comment thread components/common/Dialogue.tsx Outdated
Comment thread components/common/Dialogue.tsx Outdated
Comment thread components/common/Dialogue.tsx Outdated
Comment thread components/common/Dialogue.tsx Outdated
Comment thread components/review/shared/ConflictDialogue.tsx Outdated
Comment thread pages/interview/profile/index.tsx Outdated
Comment thread pages/interview/report/index.tsx Outdated
Comment thread pages/review/index.tsx Outdated
Comment thread pages/review/index.tsx Outdated
Comment thread utils/applicantRecordId.ts Outdated
simplify the review dialog and helper code after PR feedback. remove placeholder interview footer actions and tighten the reviewer and applicant ID checks
@mxc-maggiechen mxc-maggiechen requested a review from SaqAsh May 6, 2026 05:17
Comment on lines -13 to -23
export const getReviewId = (
query: Record<string, string | string[] | undefined>,
): number => {
const reviewId =
typeof query["reviewId"] === "string"
? parseInt(query["reviewId"])
: (() => {
throw new Error("reviewId must be a String");
})();
if (Number.isNaN(reviewId))
throw Error("reviewId must be parsable into an int");
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is still kinda janky tbh, idk if there is a good pattern to parse URLs

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think the cleanest way to do something like this is to use a query validator that is typed like zod

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

apart from that tho it's fine

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

oooh i kinda want to look in this and maybe some other native react options when we move to new repo. let's punt this for after migration?

Comment thread graphql/queries.ts
Comment on lines 26 to 35
changeRating: `
mutation changeRating($id: Int!, $ratingToBeChanged: String!, $newValue: Int!) {
mutation changeRating($id: String!, $ratingToBeChanged: String!, $newValue: Int!) {
changeRating(id: $id, ratingToBeChanged: $ratingToBeChanged, newValue: $newValue) {
id
}
}
`,
modifyFinalComments: `
mutation modifyFinalComments($id: Int!, $newComments: String!, $newSkillCategory: String!, $newRecommendedSecondChoice: String!) {
mutation modifyFinalComments($id: String!, $newComments: String!, $newSkillCategory: String!, $newRecommendedSecondChoice: String!) {
modifyFinalComments(id: $id, newComments: $newComments, newSkillCategory: $newSkillCategory, newRecommendedSecondChoice: $newRecommendedSecondChoice) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

these changes are not really relevant tbh, because these endpoints are deprecated, changes are just made to avoid typing errors

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

these changes are not really relevant tbh, because these endpoints are deprecated, changes are just made to avoid typing errors

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you thank you

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you thank you

Comment on lines -13 to -23
export const getReviewId = (
query: Record<string, string | string[] | undefined>,
): number => {
const reviewId =
typeof query["reviewId"] === "string"
? parseInt(query["reviewId"])
: (() => {
throw new Error("reviewId must be a String");
})();
if (Number.isNaN(reviewId))
throw Error("reviewId must be parsable into an int");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think the cleanest way to do something like this is to use a query validator that is typed like zod

Comment on lines -13 to -23
export const getReviewId = (
query: Record<string, string | string[] | undefined>,
): number => {
const reviewId =
typeof query["reviewId"] === "string"
? parseInt(query["reviewId"])
: (() => {
throw new Error("reviewId must be a String");
})();
if (Number.isNaN(reviewId))
throw Error("reviewId must be parsable into an int");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

apart from that tho it's fine

@mxc-maggiechen mxc-maggiechen merged commit 15e5245 into staging May 7, 2026
@mxc-maggiechen mxc-maggiechen deleted the sparsh/INTF26-conflict-dialog branch May 7, 2026 03:24
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