feat(next): integrate Intercom provider lifecycle in app layout#2162
Open
feat(next): integrate Intercom provider lifecycle in app layout#2162
Conversation
…ve boot options, and logout shutdown
bdb3437 to
5d05bad
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces an Intercom integration for the SvelteKit “(app)” shell so support chat can be launched from within the new ClientApp UI, and normalizes a few Tailwind sizing utilities in usage pages.
Changes:
- Add an Intercom provider/initializer wrapper in the authenticated app layout and expose an
openChatcallback to downstream UI. - Add an Intercom feature module (
$features/intercom) to build boot options and expose the Intercom context. - Replace a few arbitrary Tailwind sizes (
h-[200px],h-[250px],min-w-[230px]) with equivalent spacing-based classes.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Exceptionless.Web/ClientApp/src/routes/(app)/project/[projectId]/usage/+page.svelte | Normalize skeleton/chart/tooltip sizing classes. |
| src/Exceptionless.Web/ClientApp/src/routes/(app)/project/[projectId]/configure/+page.svelte | Wire “contact support” action to Intercom context when available. |
| src/Exceptionless.Web/ClientApp/src/routes/(app)/organization/[organizationId]/usage/+page.svelte | Normalize skeleton/chart/tooltip sizing classes. |
| src/Exceptionless.Web/ClientApp/src/routes/(app)/+layout.svelte | Add IntercomProvider + initializer and pass openChat into the app shell/notifications. |
| src/Exceptionless.Web/ClientApp/src/lib/features/intercom/keys.ts | Define a shared context key for Intercom. |
| src/Exceptionless.Web/ClientApp/src/lib/features/intercom/intercom-initializer.svelte | New wrapper component to manage Intercom update cadence, routing updates, and shutdown on logout. |
| src/Exceptionless.Web/ClientApp/src/lib/features/intercom/index.ts | Public exports for the intercom feature module. |
| src/Exceptionless.Web/ClientApp/src/lib/features/intercom/context.svelte.ts | Add getIntercom() and a helper to build boot options from current user/org. |
| src/Exceptionless.Web/ClientApp/src/lib/features/auth/api.svelte.ts | Remove an extraneous stray diff artifact line. |
| src/Exceptionless.Web/ClientApp/package.json | Add svelte-intercom dependency. |
| src/Exceptionless.Web/ClientApp/package-lock.json | Lockfile updates for svelte-intercom and transitive dependency version bumps. |
Files not reviewed (1)
- src/Exceptionless.Web/ClientApp/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+14
to
+18
| if (!user || !user.hash) { | ||
| return undefined; | ||
| } | ||
|
|
||
| // Extract timestamp from MongoDB ObjectId (first 8 hex chars = unix timestamp) |
Comment on lines
+23
to
+26
| company: organization | ||
| ? { | ||
| createdAt: orgCreatedAt?.toString(), | ||
| id: organization.id, |
…ippet - Consolidate redundant intercom.update() calls into single effect tracking route and visibility - Extract getIntercom() into separate snippet to avoid context scoping issues - Both changes prevent duplicate updates and ensure context is properly available
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Root Cause (if bug fix)
What I Changed and Why
Tech Debt Assessment
Test Plan