Skip to content

RE1-T46 Trying to fix Sentry issue#299

Merged
ucswift merged 1 commit intomasterfrom
develop
Mar 13, 2026
Merged

RE1-T46 Trying to fix Sentry issue#299
ucswift merged 1 commit intomasterfrom
develop

Conversation

@ucswift
Copy link
Member

@ucswift ucswift commented Mar 13, 2026

Summary by CodeRabbit

  • Chores
    • Updated error tracking service configuration to use a locally bundled version instead of external CDN, and refreshed the initialization integration API.

@request-info
Copy link

request-info bot commented Mar 13, 2026

Thanks for opening this, but we'd appreciate a little more information. Could you update it with more details?

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 13, 2026

📝 Walkthrough

Walkthrough

This pull request migrates Sentry error tracking from external CDN sources to a locally bundled version and updates the Sentry integration API to use the new breadcrumbs pattern. The local bundle is configured for deployment via libman.

Changes

Cohort / File(s) Summary
Sentry Local Bundle Configuration
Web/Resgrid.Web/libman.json
Adds filesystem library entry to copy Sentry bundle files (bundle.min.js and bundle.min.js.map) from vendor/sentry/ to wwwroot/lib/sentry/.
Sentry Initialization Update
Web/Resgrid.Web/Areas/User/Views/Shared/_UserLayout.cshtml
Replaces external Sentry CDN script with local bundle path. Updates Sentry API call from new Sentry.Integrations.Breadcrumbs() to Sentry.breadcrumbsIntegration(). Removes external SDK loader script reference.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is vague and non-descriptive. It uses the phrase 'Trying to fix' which is uncertain language and doesn't clearly convey what the actual change accomplishes. Revise the title to be more specific and definitive, such as 'Replace external Sentry CDN with local bundle and update integration API' to clearly describe the actual changes made.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch develop
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
Web/Resgrid.Web/Areas/User/Views/Shared/_UserLayout.cshtml (1)

37-37: Add cache-busting to the new local Sentry script include.

Line 37 introduces a static local asset; adding asp-append-version="true" avoids stale SDK cache after upgrades.

Proposed tweak
-        <script src="~/lib/sentry/bundle.min.js"></script>
+        <script src="~/lib/sentry/bundle.min.js" asp-append-version="true"></script>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Web/Resgrid.Web/Areas/User/Views/Shared/_UserLayout.cshtml` at line 37, The
new local Sentry script include in _UserLayout.cshtml is a static asset that
needs cache-busting; update the <script> tag that references
"~/lib/sentry/bundle.min.js" to include the asp-append-version="true" attribute
so the framework appends a version query string and avoids serving stale SDK
files after upgrades.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Web/Resgrid.Web/libman.json`:
- Around line 319-325: The libman.json entry referencing the filesystem provider
"vendor/sentry/" is pointing to a non-existent source and will cause libman
restore to fail during the PrepublishScript invoked by Resgrid.Web.csproj; fix
this by either adding the missing vendor/sentry files into the repository at
vendor/sentry/, removing the sentry entry from libman.json, or changing the
provider to a valid package source (e.g., "provider": "unpkg" or switching to
npm) and updating the "library" and "files" fields accordingly so libman restore
can succeed.

---

Nitpick comments:
In `@Web/Resgrid.Web/Areas/User/Views/Shared/_UserLayout.cshtml`:
- Line 37: The new local Sentry script include in _UserLayout.cshtml is a static
asset that needs cache-busting; update the <script> tag that references
"~/lib/sentry/bundle.min.js" to include the asp-append-version="true" attribute
so the framework appends a version query string and avoids serving stale SDK
files after upgrades.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: be5a0b8b-4009-4420-9182-4dfdc7e2e754

📥 Commits

Reviewing files that changed from the base of the PR and between 2dcedec and cb0ee61.

⛔ Files ignored due to path filters (2)
  • Web/Resgrid.Web/vendor/sentry/bundle.min.js is excluded by !**/*.min.js
  • Web/Resgrid.Web/vendor/sentry/bundle.min.js.map is excluded by !**/*.map, !**/*.min.js.map
📒 Files selected for processing (2)
  • Web/Resgrid.Web/Areas/User/Views/Shared/_UserLayout.cshtml
  • Web/Resgrid.Web/libman.json

Comment on lines +319 to +325
"provider": "filesystem",
"library": "vendor/sentry/",
"destination": "wwwroot/lib/sentry/",
"files": [
"bundle.min.js",
"bundle.min.js.map"
]
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Verify filesystem-provider source files exist"
fd -p '^vendor/sentry/bundle\.min\.js$'
fd -p '^vendor/sentry/bundle\.min\.js\.map$'

echo "Verify publish step runs libman restore"
fd -p 'Resgrid.Web.csproj' -x rg -n 'PrepublishScript|libman restore'

Repository: Resgrid/Core

Length of output: 256


Missing vendor/sentry files will cause libman restore to fail during publish.

The vendor/sentry/ directory referenced in this libman.json entry does not exist in the repository. Since PrepublishScript in Resgrid.Web.csproj correctly invokes libman restore before publish, this configuration will fail when the build pipeline attempts to copy non-existent files.

Either add the vendor/sentry source files to the repository, remove this libman.json entry, or switch to a package manager source (e.g., npm, NuGet) instead of the filesystem provider.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Web/Resgrid.Web/libman.json` around lines 319 - 325, The libman.json entry
referencing the filesystem provider "vendor/sentry/" is pointing to a
non-existent source and will cause libman restore to fail during the
PrepublishScript invoked by Resgrid.Web.csproj; fix this by either adding the
missing vendor/sentry files into the repository at vendor/sentry/, removing the
sentry entry from libman.json, or changing the provider to a valid package
source (e.g., "provider": "unpkg" or switching to npm) and updating the
"library" and "files" fields accordingly so libman restore can succeed.

@ucswift
Copy link
Member Author

ucswift commented Mar 13, 2026

Approve

Copy link

@github-actions github-actions 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 approved.

@ucswift ucswift merged commit f4ef7f2 into master Mar 13, 2026
18 checks passed
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