Skip to content

refactor: remove SidebarPanel enum + panel-ID lookup table (#408, #409) - #414

Merged
JDonaghy merged 1 commit into
developfrom
issue-408-409-sidebar-panel-cleanup
May 16, 2026
Merged

refactor: remove SidebarPanel enum + panel-ID lookup table (#408, #409)#414
JDonaghy merged 1 commit into
developfrom
issue-408-409-sidebar-panel-cleanup

Conversation

@JDonaghy

Copy link
Copy Markdown
Owner

Summary

Removes: SidebarPanel enum (73 references), activity_id_to_panel(), to_panel_id(), from_panel_id(). Net -55 lines.

Closes #408
Closes #409

Test plan

  • cargo test --no-default-features --lib — 1963 passed
  • cargo clippy -- -D warnings — clean
  • GTK smoke: activity bar clicks, extension panels, toggle, Settings, Search

🤖 Generated with Claude Code

Replace the SidebarPanel enum with plain String panel IDs throughout the
GTK backend. #[watch] expressions use string comparisons against sidebar
constants (PANEL_EXPLORER, etc.). Extension panels use "ext:" prefix.

sync_sidebar_widgets() now uses lookup-table arrays for panel box
visibility and DA focus grab instead of per-variant match arms. Adding a
new panel requires one entry in each array, not a new enum variant +
match arms in 4 places.

Removes: SidebarPanel enum, activity_id_to_panel(), to_panel_id(),
from_panel_id(). Msg::SwitchPanel now carries a String panel ID.

Closes #408
Closes #409

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@JDonaghy
JDonaghy force-pushed the issue-408-409-sidebar-panel-cleanup branch from 5321282 to f9cbf06 Compare May 16, 2026 15:48
@JDonaghy
JDonaghy merged commit 439f456 into develop May 16, 2026
JDonaghy added a commit that referenced this pull request May 16, 2026
…419)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant