Skip to content

Conversation

archessmn
Copy link
Member

This should fix the console spam of slack struggling to stay connected and also only require one slackApp to be made per instance running.

@jenkins-ystv
Copy link

jenkins-ystv bot commented Oct 23, 2024

Deployed a preview of this PR to https://pr-191-internal.dev.ystv.co.uk

Also add invariant checks to ensure multiple apps aren't created
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 6 out of 16 changed files in this pull request and generated no suggestions.

Files not reviewed (10)
  • package.json: Language not supported
  • features/calendar/check_with_tech.ts: Evaluated as low risk
  • server/index.ts: Evaluated as low risk
  • features/userFeedback/index.ts: Evaluated as low risk
  • features/calendar/check_with_tech_actions.ts: Evaluated as low risk
  • app/(authenticated)/calendar/[eventID]/actions.ts: Evaluated as low risk
  • app/(authenticated)/calendar/[eventID]/signUpSheetActions.ts: Evaluated as low risk
  • lib/auth/slack/index.ts: Evaluated as low risk
  • components/slack/SlackUserInfo.tsx: Evaluated as low risk
  • components/slack/SlackChannelsProvider.tsx: Evaluated as low risk
Comments skipped due to low confidence (1)

lib/slack/slackApiConnection.ts:27

  • The error message should indicate that a global app does not exist, as the function is supposed to create one if it doesn't. Suggested message: "createSlackApp was called but a global app does not exist".
invariant((globalThis as unknown as { slackApp: App | undefined }).slackApp, "createSlackApp was called but a global app already exists");

@archessmn archessmn merged commit 538fc46 into main Jul 23, 2025
3 checks passed
@archessmn archessmn deleted the mia/global-slack-app branch July 23, 2025 16:29
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