feat(AutoRedirect): set Interval parameter default value to 10m#7818
feat(AutoRedirect): set Interval parameter default value to 10m#7818
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdjusts the AutoRedirect component so the Interval parameter no longer hardcodes a 60-second default at declaration time, instead normalizing it during parameter binding to a 10-minute default when no valid value is provided, and wires this value into the JS initialization as before. Sequence diagram for AutoRedirect parameter normalization and JS initsequenceDiagram
actor BlazorRuntime
participant AutoRedirect
participant JSInterop
BlazorRuntime->>AutoRedirect: set Interval(parameter)
BlazorRuntime->>AutoRedirect: OnParametersSet()
AutoRedirect->>AutoRedirect: if Interval <= 0
AutoRedirect->>AutoRedirect: Interval = 10 * 60 * 1000
BlazorRuntime->>AutoRedirect: InvokeInitAsync()
AutoRedirect->>JSInterop: init(Id, Interop, Interval, Lock) via InvokeVoidAsync
Class diagram for updated AutoRedirect Interval handlingclassDiagram
class BootstrapModuleComponentBase {
<<abstract>>
+InvokeVoidAsync(identifier, id, interop, interval, lockMethodName) Task
}
class AutoRedirect {
+int Interval
+InvokeInitAsync() Task
+OnParametersSet() void
}
BootstrapModuleComponentBase <|-- AutoRedirect
AutoRedirect : Interval <= 0 => Interval = 10 * 60 * 1000
AutoRedirect : InvokeInitAsync() calls InvokeVoidAsync(init, Id, Interop, Interval, Lock)
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The XML doc comment for
Intervalstill states a default of 60000 ms; please update it to reflect the new 10-minute default and the behavior when non-positive values are supplied. - If the intent is to treat
Interval <= 0as an invalid user input that falls back to a default, consider extracting the default value into a named constant/field so it is not duplicated in both code and documentation.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The XML doc comment for `Interval` still states a default of 60000 ms; please update it to reflect the new 10-minute default and the behavior when non-positive values are supplied.
- If the intent is to treat `Interval <= 0` as an invalid user input that falls back to a default, consider extracting the default value into a named constant/field so it is not duplicated in both code and documentation.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7818 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 764 764
Lines 34115 34122 +7
Branches 4697 4698 +1
=========================================
+ Hits 34115 34122 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Updates the AutoRedirect component so its Interval parameter defaults to 10 minutes when not provided, aligning with issue #7816.
Changes:
- Removed the
Intervalproperty initializer. - Added
OnParametersSetlogic to setIntervalto 10 minutes whenInterval <= 0.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Link issues
fixes #7816
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Enhancements: