feat(environment): refactor environment editor into workspace tab view#7
Merged
Conversation
- Refactor `TabState` to use tagged `TabContent` enum (`Request` vs `Environment`) - Create dedicated `EnvironmentView` tab matching `RequestView` key-value table UI - Simplify sidebar `EnvironmentPanel` to full-height list navigator - Add unified 1-line environment header bar with color indicator, scope label, and search input with icon - Implement empty state rendering for empty environments and search filter misses
There was a problem hiding this comment.
Pull request overview
This PR refactors the UI so environment editing moves out of the sidebar into a dedicated workspace tab (EnvironmentView), while evolving the workspace tab model to support multiple tab content types (request vs environment) with custom icons.
Changes:
- Introduces
TabContent(request/environment) and updates tab rendering to support non-request workspace tabs withTabIcon. - Adds a new
EnvironmentViewworkspace tab implementing a key/value variables table with search, secret masking, and bulk actions. - Simplifies
EnvironmentPanelto a navigator-only sidebar that opens the selected environment in the workspace.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/views/mod.rs | Registers the new environment_view module. |
| src/views/main_view.rs | Refactors tab state to TabContent, adds environment-tab open/switch logic, and updates workspace rendering for new tab types. |
| src/views/environment_view.rs | Adds the new environment editor view (table UI, filtering, secret toggles, delete/clear actions). |
| src/entities/environment.rs | Adds clear_variables to support bulk deletion from EnvironmentView. |
| src/components/tab_bar.rs | Generalizes tab icon rendering via TabIcon and updates tab UI accordingly. |
| src/components/environment_panel.rs | Removes inline variable editor and routes environment selection to open an environment workspace tab. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary of Changes
This PR declutters the Environment sidebar panel by extracting the environment variable editor into a dedicated workspace tab (
EnvironmentView), and refactors the tab state architecture to easily support future custom tab types🚀 Key Improvements
Extensible Tab Architecture (
TabState):TabStateto use a taggedTabContentenum (TabContent::RequestandTabContent::Environment).TabIcon) toTabBarfor custom tab types.Sidebar Decluttering (
EnvironmentPanel):Key-Value Variable Table (
EnvironmentView):EnvironmentViewcomponent matching the clean key-value table design ofHeaderEditor/ParamsEditor.Unified 1-Line Header Bar:
40px).Workspace base,Global, etc.), active badge toggle, integrated search box with search icon, color picker swatch, and an actions menu.