Skip to content

fix(editor): shelf deletion plays item-delete SFX; refresh delete sounds#379

Merged
wass08 merged 2 commits into
mainfrom
fix/shelf-delete-sfx
Jun 7, 2026
Merged

fix(editor): shelf deletion plays item-delete SFX; refresh delete sounds#379
wass08 merged 2 commits into
mainfrom
fix/shelf-delete-sfx

Conversation

@wass08

@wass08 wass08 commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

What

  • Shelf deletion now plays the item-delete SFX instead of structure-delete. Shelves are furniture-like placeable objects, so they should sound like an item being removed, not a structure being demolished.
  • Introduces a shared emitDeleteSFX(nodeType) helper in sfx-bus.ts that maps item-like node types (item, shelf) to sfx:item-delete and everything else to sfx:structure-delete. The three delete sites that previously inlined the type === 'item' branch now route through it:
    • Sledgehammer/delete mode — selection-manager.tsx
    • Floating action menu delete — floating-action-menu.tsx
    • Keyboard Delete/Backspace (single node) — use-keyboard.ts
  • Refreshes the item_delete / structure_delete audio assets and lowers their pan jitter (0.150.05/0.08) for a steadier delete cue.

Why

Adding a new item-like type to the item-delete cue used to mean touching three call sites; the helper makes that a one-line change and fixes the shelf case in all delete paths at once.

Testing

  • tsc --noEmit passes for @pascal-app/editor.
  • Manual: delete a shelf via sledgehammer, action menu, and keyboard → item-delete sound.

🤖 Generated with Claude Code

Shelves are furniture-like placeable objects, so deleting one should use
the lighter item-delete cue instead of the structure-delete one. Add a
shared emitDeleteSFX(nodeType) helper that maps item-like node types
(item, shelf) to item-delete and everything else to structure-delete,
and route the three delete sites (sledgehammer, floating action menu,
keyboard) through it.

Also refresh the item_delete/structure_delete audio assets and reduce
their pan jitter for a steadier delete cue.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mintlify

mintlify Bot commented Jun 7, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
pascal 🔴 Failed Jun 7, 2026, 1:04 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@wass08 wass08 merged commit dd02156 into main Jun 7, 2026
1 of 2 checks passed
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