Fix/Inexistent tab for active route#1955
Merged
255kb merged 4 commits intomockoon:mainfrom Nov 25, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where deleting a route causes the application to display a tab that doesn't exist for the newly active route type. The fix ensures that when switching to a different route type (e.g., from HTTP to CRUD or WebSocket), the active tab is automatically reset to a valid tab (RESPONSE) if the current tab is not supported by the new route type.
Key changes:
- Added logic to reset active tab when deleting a route and switching to a different route type
- Extended
responseTabForcedNavigationto handle WebSocket routes - Added comprehensive automated tests for CRUD and WebSocket route scenarios
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/app/test/specs/routes-create-delete.spec.ts | Restructured tests and added two new test suites to verify tab reset behavior when deleting HTTP routes and switching to CRUD or WebSocket routes |
| packages/app/test/libs/routes.ts | Added assertActiveRouteTab helper method to verify the active tab in tests |
| packages/app/src/renderer/app/stores/reducer.ts | Updated REMOVE_ROUTE action to call responseTabForcedNavigation and properly reset the active tab when switching routes |
| packages/app/src/renderer/app/stores/reducer-utils.ts | Extended responseTabForcedNavigation function to handle WebSocket routes and updated documentation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
255kb
previously approved these changes
Nov 25, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Technical implementation details
Fix the tab that'll appear when a route deletion happens and the route to be switched to does not have the tab.
Checklist
Closes #1893