Skip to content

Hmt 103 check in time confirmation was really long and sometimes buggy #206

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

justin-phxm
Copy link
Contributor

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 27 out of 29 changed files in this pull request and generated 1 comment.

Files not reviewed (2)
  • amplify/auth/PostConfirmation/amplify_outputs.json: Language not supported
  • amplify/function/BusinessLogic/_amplify_model/amplify_outputs.json: Language not supported
Comments suppressed due to low confidence (2)

src/app/register/team/(pending)/new/page.tsx:29

  • The comment indicates that the addCallerToTeam flag is set to false due to an issue in the lambda function. Consider addressing the underlying lambda bug or documenting the workaround more clearly.
addCallerToTeam: false, // broken in lambda function.

src/components/Dashboard/DevPostLinkUpload.tsx:63

  • [nitpick] Consider adding an aria-label to the submit button to improve accessibility.
<button type="submit" className="border-1 rounded-full border-red-500 ">

Comment on lines 85 to 87
teamId = generateTeamId();
({ error: teamIdTaken } = await tryCatch(getTeamFromId(teamId)));
} // possibility of infite loop at 36^4 teams
Copy link
Preview

Copilot AI Apr 9, 2025

Choose a reason for hiding this comment

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

Consider adding a maximum iteration limit in the team ID generation loop to prevent a potential infinite loop in edge cases.

Suggested change
teamId = generateTeamId();
({ error: teamIdTaken } = await tryCatch(getTeamFromId(teamId)));
} // possibility of infite loop at 36^4 teams
if (iterationCount >= MAX_ITERATIONS) {
throw new Error(
JSON.stringify({
body: { value: `Unable to generate unique team ID after ${MAX_ITERATIONS} attempts` },
statusCode: 500,
headers: { "Content-Type": "application/json" },
}),
);
}
teamId = generateTeamId();
({ error: teamIdTaken } = await tryCatch(getTeamFromId(teamId)));
iterationCount++;
}

Copilot uses AI. Check for mistakes.

@justin-phxm justin-phxm force-pushed the HMT-103-check-in-time-confirmation-was-really-long-and-sometimes-buggy branch 5 times, most recently from 4ea1c4b to 49baa6c Compare April 9, 2025 05:21
@justin-phxm justin-phxm force-pushed the HMT-103-check-in-time-confirmation-was-really-long-and-sometimes-buggy branch from 49baa6c to 3bcd414 Compare May 23, 2025 01:07
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.

1 participant