fix: app crashes when connection github on external projects [IN-885]#3695
fix: app crashes when connection github on external projects [IN-885]#3695
Conversation
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
2 similar comments
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
joanagmaia
left a comment
There was a problem hiding this comment.
LGTM ✅ Thanks for checking this out!
There was a problem hiding this comment.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| LfService.findSegment(props.grandparentId).then((segment) => { | ||
| subprojects.value = segment.projects.map((p) => p.subprojects).flat().filter((s) => s !== undefined); | ||
| }); | ||
| } |
There was a problem hiding this comment.
Bug: Crash fix incomplete when segmentId is null
The crash fix is incomplete. When props.grandparentId equals the External OSS segment ID but props.segmentId is null (a valid value per the prop type string | null), the condition props.grandparentId === EXTERNAL_OSS_SEGMENT_ID && props.segmentId evaluates to false. This causes the code to fall through to the else branch, which fetches all subprojects for the OSS segment - the exact crash scenario this PR intends to fix. The fix only works when both conditions are truthy.
This pull request optimizes the loading of subprojects in the GitHub settings drawer to prevent performance issues when dealing with open source (OSS) projects that have a very large number of subprojects. Instead of fetching all subprojects for these OSS projects, the code now only fetches the currently selected subproject.
Performance improvements for OSS projects:
fetchSubProjectsfunction ingithub-settings-drawer.vueto detect when the parent segment is an external OSS project and, in that case, only fetch the current subproject instead of all subprojects, preventing crashes due to excessive data loading.Note
For external OSS segments, fetch only the current subproject in
github-settings-drawer.vueto avoid loading thousands of subprojects and crashing.Written by Cursor Bugbot for commit 78cd02a. This will update automatically on new commits. Configure here.