Skip to content

fix: app crashes when connection github on external projects [IN-885]#3695

Merged
mbani01 merged 6 commits intomainfrom
chore/debug_gh_org_issue
Dec 12, 2025
Merged

fix: app crashes when connection github on external projects [IN-885]#3695
mbani01 merged 6 commits intomainfrom
chore/debug_gh_org_issue

Conversation

@mbani01
Copy link
Copy Markdown
Contributor

@mbani01 mbani01 commented Dec 12, 2025

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:

  • Updated the fetchSubProjects function in github-settings-drawer.vue to 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.vue to avoid loading thousands of subprojects and crashing.

Written by Cursor Bugbot for commit 78cd02a. This will update automatically on new commits. Configure here.

@mbani01 mbani01 self-assigned this Dec 12, 2025
@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

2 similar comments
@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@mbani01 mbani01 requested a review from joanagmaia December 12, 2025 14:40
@mbani01 mbani01 changed the title fix: app crashe when connection github on external projects fix: app crashe when connection github on external projects [IN-885] Dec 12, 2025
@mbani01 mbani01 changed the title fix: app crashe when connection github on external projects [IN-885] fix: app crashes when connection github on external projects [IN-885] Dec 12, 2025
Copy link
Copy Markdown
Contributor

@joanagmaia joanagmaia left a comment

Choose a reason for hiding this comment

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

LGTM ✅ Thanks for checking this out!

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

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);
});
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

@mbani01 mbani01 merged commit 9ffe6bd into main Dec 12, 2025
20 checks passed
@mbani01 mbani01 deleted the chore/debug_gh_org_issue branch December 12, 2025 14:56
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.

2 participants