Skip to content

feat: Add DeveloperTools class to RelicApp#340

Merged
nielsenko merged 2 commits intoserverpod:mainfrom
nielsenko:feat-dev-tools
Mar 6, 2026
Merged

feat: Add DeveloperTools class to RelicApp#340
nielsenko merged 2 commits intoserverpod:mainfrom
nielsenko:feat-dev-tools

Conversation

@nielsenko
Copy link
Copy Markdown
Collaborator

Description

Add a DeveloperTools class to RelicApp, accessible via app.developerTools. Provides reloadCount and isDevMode getters for hot-reload introspection. A private _Reloadable interface decouples DeveloperTools from RelicApp.

Also fixes hot-reload support for routes added via injectAt.

Related Issues

Pre-Launch Checklist

  • This update focuses on a single feature or bug fix.
  • I have read and followed the Dart Style Guide and formatted the code using dart format.
  • I have referenced at least one issue this PR fixes or is related to.
  • I have updated/added relevant documentation (doc comments with ///), ensuring consistency with existing project documentation.
  • I have added new tests to verify the changes.
  • All existing and new tests pass successfully.
  • I have documented any breaking changes below.

Breaking Changes

  • Includes breaking changes.
  • No breaking changes.

Additional Notes

None.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 5, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 73f8b674-962c-46ed-b405-63d92bfbf7d2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 5, 2026

Codecov Report

❌ Patch coverage is 65.21739% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.28%. Comparing base (69c7cf2) to head (99c2e54).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/relic_core/lib/src/router/relic_app.dart 60.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #340      +/-   ##
==========================================
- Coverage   91.45%   91.28%   -0.18%     
==========================================
  Files          97       97              
  Lines        3816     3832      +16     
  Branches     1943     1953      +10     
==========================================
+ Hits         3490     3498       +8     
- Misses        326      334       +8     
Flag Coverage Δ
relic_core 91.01% <65.21%> (-0.20%) ⬇️
relic_io 93.33% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- Add reloadCount and isDevMode getters via app.developerTools
- Encapsulate hot-reload state in DeveloperTools
- Introduce _Reloadable interface to decouple DeveloperTools from RelicApp
@nielsenko
Copy link
Copy Markdown
Collaborator Author

Disregard the lower coverage. The hot-reload tests are not currently counted in coverage.

@nielsenko nielsenko requested a review from a team March 5, 2026 11:11
@nielsenko nielsenko self-assigned this Mar 5, 2026
Copy link
Copy Markdown
Collaborator

@marcelomendoncasoares marcelomendoncasoares left a comment

Choose a reason for hiding this comment

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

LGTM!

@nielsenko nielsenko merged commit 0cd47b8 into serverpod:main Mar 6, 2026
28 of 30 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.

2 participants