LEGLINK-840: Enhance Quick Launch and Scenario Page with Search, Grouping, and Filtering - #1792
Conversation
…th some JavaScript to dynamically filter the scenario table
…s I added for the scenario page and the quick launch
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughChangesScenario management and launch
Estimated code review effort: 3 (Moderate) | ~25 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
DotNet/Automation.UI/Controllers/RunsController.cs (1)
153-170: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd focused XUnit tests for custom scenario startup.
Use Moq for
IScenarioStoreandIAutomationRunManager. Verify that a valid scenario starts with persisted scenario values. Verify that a missing scenario redirects withRunStartErrorand does not callStartAsync.As per path instructions, “If/Else ... blocks are introduced or modified — ensure each branch has a corresponding unit test,” and “No network activity ... should appear in unit tests. Recommend using mocks (via Moq).”
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@DotNet/Automation.UI/Controllers/RunsController.cs` around lines 153 - 170, Add focused XUnit tests for the custom-scenario branch in RunsController, using Moq mocks for IScenarioStore and IAutomationRunManager. Verify a found scenario passes its persisted values to StartAsync, and a missing scenario redirects to Index, sets TempData["RunStartError"], and does not invoke StartAsync. Keep the tests isolated from network activity.Source: Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@DotNet/Automation.UI/Views/Runs/Index.cshtml`:
- Around line 827-895: Update the scenario-editor:changed handler to obtain the
complete persisted scenario metadata after a save, since SaveInline provides
only the id. Use the loaded name, description, method, measures, type, and
persisted UpdatedAt to update both the hidden option and visible quick-launch
button, including existing options rather than only new ones. Ensure sorting
uses the persisted UpdatedAt value before refreshing search and selection.
In `@DotNet/Automation.UI/Views/Scenarios/Index.cshtml`:
- Around line 231-234: Update the no-results visibility logic near noResults so
the filter empty state is shown only when rows.length is greater than zero and
visibleCount is zero; keep it hidden when no scenarios exist, while preserving
the existing behavior when matching rows are available.
---
Nitpick comments:
In `@DotNet/Automation.UI/Controllers/RunsController.cs`:
- Around line 153-170: Add focused XUnit tests for the custom-scenario branch in
RunsController, using Moq mocks for IScenarioStore and IAutomationRunManager.
Verify a found scenario passes its persisted values to StartAsync, and a missing
scenario redirects to Index, sets TempData["RunStartError"], and does not invoke
StartAsync. Keep the tests isolated from network activity.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: c3021a9f-9ea9-4eff-84ac-e7df035500f3
📒 Files selected for processing (4)
DotNet/Automation.UI/Controllers/RunsController.csDotNet/Automation.UI/Controllers/ScenariosController.csDotNet/Automation.UI/Views/Runs/Index.cshtmlDotNet/Automation.UI/Views/Scenarios/Index.cshtml
… Launch metadata after each save. Both the hidden option and visible dropdown item are now refreshed with the saved name, description, report method, measures, scenario type, and UpdatedAt value before re-sorting and reapplying the active search/filter state.
…opdown when a new scenario is added.
🛠️ Description of Changes
I added in a search bar for both the scenarios page and quick launch that included sorting for alphabetical or by when the scenarios were last updated.
🧪 Testing Performed
I ran end to end testing to make sure that the search and sorting for the search worked for both the scenarios page and the quick launch
🧑🔬 Unit Testing
N/A
📓 Documentation Updated
N/A
Summary by CodeRabbit
New Features
Bug Fixes