Skip to content

Make each tool act where it says it does, and nowhere else - #30

Merged
ibrahimweng merged 1 commit into
mainfrom
claude/tool-behaviour
Aug 30, 2026
Merged

Make each tool act where it says it does, and nowhere else#30
ibrahimweng merged 1 commit into
mainfrom
claude/tool-behaviour

Conversation

@ibrahimweng

Copy link
Copy Markdown
Owner

The tools were right about what they do and wrong about where. Measured tool by tool against surface by surface, three things were wrong.

The curve lanes were a hole in the whole tool system

The handler that routes a press to its tool stepped aside for a curve lane, on the reasoning that opening one is about what you can see rather than what you are editing. The curve editor then asks only whether the pen is held, and treats everything else as "add a point and drag it".

So on a layer with its curves open, a drag did this:

tool before after
hand wrote a point into the automation pans
zoom wrote a point zooms
cut wrote a point says there is nothing there to cut
range wrote a point draws a stretch of time
move drew a point ✓ unchanged
pen drew a curve ✓ unchanged

Panning across an open layer silently edited the piece. A tool that quietly edits while doing its own job is worse than one that does nothing.

The picture was outside the tools altogether

It fit the stage and that was the only size it had, so a tool called Hand could not move it — there was nowhere to move it to.

The picture now has a zoom: click to go in around the point you clicked, alt to come out, 100% to 1600%. The hand drags it about. A chip in the corner says how far in you are and takes you back to Fit; it is not there at all at Fit, where it would be saying nothing. The pan is clamped so the picture can never be pulled off its own frame, and it returns to Fit for a new clip or when the picture moves into its floating window — the transform rides on the video element, which is lent to that window rather than copied into it.

Cut, Range and Pen say they are about the timeline rather than doing nothing at all.

The layer column claimed a rename it was not going to do

It works under every tool, the way a track header does in an edit suite, and that stays. What it must not do is claim otherwise: it was showing a text caret over every layer name while the hand or the blade was held.

The keyboard

Arming record took every letter, when only six are claimed twice (T, H, J, K, L, S). C, V, Z and P are not drum pads, so arming meant giving up four tools to a conflict they were never in — reaching for the blade with record on did nothing and said nothing about why. A clash is settled where there is one.

Checking

Fourteen new browser tests in test/browser/tool-scope.spec.ts, each a tool crossed with a place rather than a tool on its own. Every one was checked by putting its fault back into the code and watching it fail; all five injected faults were caught by exactly the tests that name them.

Writing them found two more, both fixed here:

  • the pan was clamped against the stage box rather than the video's, and the stage carries fourteen pixels of padding, so the picture could be dragged that far off an edge
  • zooming back out never quite reached Fit: 2.56 divided by 1.6 twice is 1.0000000000000002 rather than 1, so the picture stayed invisibly magnified and the Fit chip stayed on screen with nothing left to do

data-tool and the alt state moved from the timeline root to the shell, since the stage is not inside the timeline and cannot read an attribute that is. The existing cursor tests confirm nothing regressed.

55 browser tests pass (41 existing + 14 new), 199 unit tests, build clean.

Also updated because they had stopped being true: the Hand and Zoom descriptions in the tool strip, and the help panel, which listed five tools with no Pen and described both as timeline-only.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ux1kydvUkLRoMbHp82ofDi


Generated by Claude Code

The tools were right about what they do and wrong about where.

Measured, tool by tool against surface by surface, three things were
wrong:

The curve lanes were a hole in the whole system. The handler that
routes a press to its tool stepped aside for a curve lane, on the
reasoning that opening one is about what you can see rather than what
you are editing — and the curve editor asks only whether the pen is
held and treats everything else as "add a point and drag it". So
panning across a layer with its curves open wrote a point into the
automation. So did zooming, so did the blade, so did the range tool.
A tool that quietly edits the piece while doing its own job is worse
than one that does nothing.

The picture was outside the tools altogether. It fit the stage and
that was the only size it had, so a tool called Hand could not move
it — there was nowhere to move it to. It has a zoom now: click to go
in around the point, alt to come out, drag with the hand to move it
about, and a chip in the corner saying how far in you are and taking
you back. The pan is clamped so the picture can never be pulled off
its own frame, and Cut, Range and Pen say they are about the timeline
rather than doing nothing.

The layer column claimed a rename it was not going to do. It works
under every tool, the way a track header does, and that is right — but
it was showing a text caret over every name while the hand or the
blade was held.

Also: arming record took every letter, when only six are claimed
twice. C, V, Z and P are not drum pads, so reaching for the blade with
record on did nothing and said nothing about why. A clash is settled
where there is one.

Fourteen browser tests, each a tool crossed with a place. Every one
was checked by putting its fault back and watching it fail; writing
them found two more, both fixed here — the pan was clamped against the
stage box rather than the video's, and the stage carries fourteen
pixels of padding, so the picture could be dragged that far off an
edge; and zooming back out never quite reached Fit, since 2.56 divided
by 1.6 twice is 1.0000000000000002 rather than 1.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ux1kydvUkLRoMbHp82ofDi
@vercel

vercel Bot commented Aug 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
beat-studio Ready Ready Preview Aug 30, 2026 10:51am

@ibrahimweng
ibrahimweng merged commit f031a11 into main Aug 30, 2026
5 checks passed
@ibrahimweng
ibrahimweng deleted the claude/tool-behaviour branch August 30, 2026 11:06
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