fix(ui): op-picker modal — tools weren't clickable (form never opened)#35
Merged
Conversation
…are clickable The "New operation" dialog's `.modal-backdrop-button` is `position:absolute; inset:0` (a full-bleed close-on-click target), but `.modal` was unpositioned. A positioned sibling paints above a static one regardless of DOM order, so the transparent backdrop button overlaid every click in the dialog: selecting any tool hit the backdrop's onClose and dismissed the modal instead of opening the tool's form. No form ever mounted — the picker was effectively unusable (the `.modal` stopPropagation was dead code because clicks never reached it). Give `.modal` `position:relative` + `z-index:1` so it stacks above the backdrop button; clicks on the tool buttons now register (the form opens) while clicking the visible backdrop outside the modal still closes it. Verified in a real browser — this is a CSS hit-testing bug jsdom can't model, and the repo has no browser-test harness, so a unit test would pass despite the bug: "+ New op" → Trim now mounts the form, and filling it + Run produces a trim op.
|
🎉 This PR is included in version 0.2.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
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.
The bug
In
clip ui, opening + New op and clicking any tool (Trim, Split, …) dismissed the dialog without opening the tool's form — so no form-based op could be created from the browser. Found while dogfooding v0.2.0.Root cause
The "New operation" dialog (
ToolPickerModal.tsx) renders a full-bleed close button as a sibling of the modal content:A positioned element paints above a static sibling regardless of DOM order, so the transparent backdrop button overlaid the entire modal and intercepted every click →
onClose. The tool buttons never received the click, soonPicknever fired andApp.tsxnever setactiveToolto render the form. (Thee.stopPropagation()on.modalwas dead code — clicks never reached it.)Fix
Give
.modalposition: relative; z-index: 1so it stacks above the backdrop button. Tool clicks now register (the form mounts); clicking the visible backdrop outside the modal still closes it. One-rule CSS change.Verification
This is a CSS hit-testing bug — jsdom can't model it (a unit test clicking the button element directly would fire
onClickand pass despite the bug), and the repo has no browser-test harness, so no meaningful unit test exists for it. Verified in a real browser via the extension instead:+ New op→ Trim mounts the form (Input / Start / End / Run); filling it (clip +00:00:00–2) and clicking Run produced atrimop and a new TRIM output (op count 3 → 4).Merging cuts a v0.2.1 patch (
fix→ patch) on push tomain.🤖 Generated with Claude Code