Fix View Options popup not responding to clicks

Remove duplicate popup rendering from render_vertical_tabs_panel.
The popup was rendered both inside the panel's stack AND at the
workspace level in a Dismiss overlay, causing event dispatch conflicts
due to shared MouseStateHandle instances between the two identical
popup trees.
This commit is contained in:
Ryan Ward
2026-06-23 15:28:59 -05:00
parent 5ea378a38d
commit 148c97eab1
49 changed files with 1507 additions and 419 deletions
+18 -18
View File
@@ -3,7 +3,7 @@ use std::path::Path;
use galaxy_core::ui::theme::AnsiColorIdentifier;
use settings::{
macros::define_settings_group, RespectUserSyncSetting, SupportedPlatforms, SyncToCloud,
macros::define_settings_group, SupportedPlatforms, SyncToCloud,
};
#[derive(
@@ -62,7 +62,7 @@ settings::macros::implement_setting_for_enum!(
TabCloseButtonPosition,
TabSettings,
SupportedPlatforms::ALL,
SyncToCloud::Globally(RespectUserSyncSetting::Yes),
SyncToCloud::Never,
private: false,
toml_path: "appearance.tabs.tab_close_button_position",
description: "Position of the close button on tabs.",
@@ -99,7 +99,7 @@ settings::macros::implement_setting_for_enum!(
WorkspaceDecorationVisibility,
TabSettings,
SupportedPlatforms::ALL,
SyncToCloud::Globally(RespectUserSyncSetting::Yes),
SyncToCloud::Never,
private: false,
toml_path: "appearance.tabs.workspace_decoration_visibility",
description: "When workspace decorations such as the tab bar are visible.",
@@ -275,7 +275,7 @@ settings::macros::implement_setting_for_enum!(
HeaderToolbarChipSelection,
TabSettings,
SupportedPlatforms::ALL,
SyncToCloud::Globally(RespectUserSyncSetting::Yes),
SyncToCloud::Never,
private: false,
toml_path: "appearance.tabs.header_toolbar_chip_selection",
description: "Configuration for the header toolbar chips in the vertical tab panel header.",
@@ -306,7 +306,7 @@ settings::macros::implement_setting_for_enum!(
VerticalTabsViewMode,
TabSettings,
SupportedPlatforms::ALL,
SyncToCloud::Globally(RespectUserSyncSetting::Yes),
SyncToCloud::Never,
private: false,
toml_path: "appearance.vertical_tabs.view_mode",
description: "Display mode for the vertical tab bar.",
@@ -337,7 +337,7 @@ settings::macros::implement_setting_for_enum!(
VerticalTabsDisplayGranularity,
TabSettings,
SupportedPlatforms::ALL,
SyncToCloud::Globally(RespectUserSyncSetting::Yes),
SyncToCloud::Never,
private: false,
toml_path: "appearance.vertical_tabs.display_granularity",
description: "Granularity of rows displayed in the vertical tabs panel.",
@@ -368,7 +368,7 @@ settings::macros::implement_setting_for_enum!(
VerticalTabsTabItemMode,
TabSettings,
SupportedPlatforms::ALL,
SyncToCloud::Globally(RespectUserSyncSetting::Yes),
SyncToCloud::Never,
private: false,
toml_path: "appearance.vertical_tabs.tab_item_mode",
description: "Tab item display mode in vertical tabs.",
@@ -400,7 +400,7 @@ settings::macros::implement_setting_for_enum!(
VerticalTabsPrimaryInfo,
TabSettings,
SupportedPlatforms::ALL,
SyncToCloud::Globally(RespectUserSyncSetting::Yes),
SyncToCloud::Never,
private: false,
toml_path: "appearance.vertical_tabs.primary_info",
description: "The primary information displayed on vertical tabs.",
@@ -432,7 +432,7 @@ settings::macros::implement_setting_for_enum!(
VerticalTabsCompactSubtitle,
TabSettings,
SupportedPlatforms::ALL,
SyncToCloud::Globally(RespectUserSyncSetting::Yes),
SyncToCloud::Never,
private: false,
toml_path: "appearance.vertical_tabs.compact_subtitle",
description: "Subtitle shown on compact vertical tabs.",
@@ -443,7 +443,7 @@ define_settings_group!(TabSettings, settings: [
type: bool,
default: true,
supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Globally(RespectUserSyncSetting::Yes),
sync_to_cloud: SyncToCloud::Never,
private: false,
toml_path: "appearance.tabs.show_indicators_button",
description: "Whether to show activity indicators on tabs.",
@@ -452,7 +452,7 @@ define_settings_group!(TabSettings, settings: [
type: bool,
default: true,
supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Globally(RespectUserSyncSetting::Yes),
sync_to_cloud: SyncToCloud::Never,
private: false,
toml_path: "code.editor.show_code_review_button",
description: "Whether to show the code review button on tabs.",
@@ -461,7 +461,7 @@ define_settings_group!(TabSettings, settings: [
type: bool,
default: true,
supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Globally(RespectUserSyncSetting::Yes),
sync_to_cloud: SyncToCloud::Never,
private: false,
toml_path: "code.editor.show_code_review_diff_stats",
description: "Whether to show lines added/removed counts on the code review button.",
@@ -470,7 +470,7 @@ define_settings_group!(TabSettings, settings: [
type: bool,
default: false,
supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Globally(RespectUserSyncSetting::Yes),
sync_to_cloud: SyncToCloud::Never,
private: false,
toml_path: "appearance.tabs.preserve_active_tab_color",
description: "Whether to preserve the active tab's color when switching tabs.",
@@ -479,7 +479,7 @@ define_settings_group!(TabSettings, settings: [
type: bool,
default: true,
supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Globally(RespectUserSyncSetting::Yes),
sync_to_cloud: SyncToCloud::Never,
private: false,
toml_path: "appearance.vertical_tabs.enabled",
description: "Whether to display tabs vertically instead of horizontally.",
@@ -488,7 +488,7 @@ define_settings_group!(TabSettings, settings: [
type: bool,
default: false,
supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Globally(RespectUserSyncSetting::Yes),
sync_to_cloud: SyncToCloud::Never,
private: false,
toml_path: "appearance.vertical_tabs.use_latest_prompt_as_title",
description: "Whether vertical tab names for agent conversations use the latest user prompt.",
@@ -502,7 +502,7 @@ define_settings_group!(TabSettings, settings: [
type: bool,
default: true,
supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Globally(RespectUserSyncSetting::Yes),
sync_to_cloud: SyncToCloud::Never,
private: false,
toml_path: "appearance.vertical_tabs.show_pr_link",
description: "Whether to show PR links on vertical tabs.",
@@ -511,7 +511,7 @@ define_settings_group!(TabSettings, settings: [
type: bool,
default: true,
supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Globally(RespectUserSyncSetting::Yes),
sync_to_cloud: SyncToCloud::Never,
private: false,
toml_path: "appearance.vertical_tabs.show_diff_stats",
description: "Whether to show diff stats on vertical tabs.",
@@ -520,7 +520,7 @@ define_settings_group!(TabSettings, settings: [
type: bool,
default: true,
supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Globally(RespectUserSyncSetting::Yes),
sync_to_cloud: SyncToCloud::Never,
private: false,
toml_path: "appearance.vertical_tabs.show_details_on_hover",
description: "Whether to show a details sidecar when hovering over a vertical tab.",
+4 -17
View File
@@ -1448,23 +1448,10 @@ fn render_vertical_tabs_panel(
.with_child(Shrinkable::new(1., scrollable_groups).finish())
.finish();
let panel_with_popup: Box<dyn Element> = if state.show_settings_popup {
let popup = render_settings_popup(state, app);
let mut stack = Stack::new().with_child(panel_content);
stack.add_positioned_overlay_child(
popup,
OffsetPositioning::offset_from_save_position_element(
VERTICAL_TABS_SETTINGS_BUTTON_POSITION_ID,
vec2f(0., 4.),
PositionedElementOffsetBounds::WindowByPosition,
PositionedElementAnchor::BottomLeft,
ChildAnchor::TopLeft,
),
);
stack.finish()
} else {
panel_content
};
// Note: the settings popup is rendered at the workspace level (in a Dismiss overlay)
// rather than here, to ensure proper click-outside-to-dismiss behavior and avoid
// event dispatch conflicts from duplicate popup rendering with shared mouse states.
let panel_with_popup: Box<dyn Element> = panel_content;
let drag_side = match side {
super::PanelPosition::Left => DragBarSide::Right,