Remove ten orphaned Message variants from bds-ui #44
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Ten variants of
Messageincrates/bds-ui/src/app.rshave match arms inupdate()but are never constructed anywhere in the workspace (verified: noMessage::X,Self::X, or aliased construction sites):ClearTabs,PinTab,PostLoaded,MediaLoaded,ScriptLoaded,TemplateLoaded,ShowToast,ProjectCreated,ProjectDeleted,ProjectSwitched. They are dead plumbing left from earlier load/CRUD flows that were since replaced by the direct handler paths (project switching now goes through the engine handlers, entity loads happen synchronously on tab open).AGENTS rule: don't leave unused code in the codebase.
Task
grep -rn "Message::<Name>\|Self::<Name>" crates/), then delete the enum variant and its match arm plus any helper functions or types only reachable from that arm.PostLoaded), delete those too, recursively.cargo test --workspace; fix any test that constructed these variants directly by removing/adjusting the test (a test constructing a dead variant is testing dead code).Definition of done
cargo test --workspacepasses.Implemented in
b10212d. Removed the ten unconstructed Message variants and their unreachable update arms: ClearTabs, PinTab, PostLoaded, MediaLoaded, ScriptLoaded, TemplateLoaded, ShowToast, ProjectCreated, ProjectDeleted, and ProjectSwitched. A recursive reachability review confirmed that tab pinning, project lifecycle operations, editor loading, and toast behavior remain reachable through their live direct paths, so no behavior or Allium/bDS2 semantics changed. Verification passed: exact-symbol search, rustfmt check, cargo check/test for bds-ui, strict workspace clippy, workspace build/test, Allium check/analyse, cargo machete, and cargo outdated.