Land the press-rebound fix that raced the #1248 merge - #1249
Conversation
Review findings, both real: - The per-key guard collapsed press and hold levels with max() before checking magnitude, so a plain tap's negative rebound level (hold absent, max(negative, 0) == 0) bailed out on exactly the frames the above-rest lift was written for. Gate on the signed components and clamp only the derived interaction level. Added a scene-level regression test for the rebound frame. - The capsApplying authored echo pose assigned translation after the press travel, overwriting it; the travel now applies on top of the authored offset. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Reviewed the diff — both fixes look correct and the added test targets the right behavior.
Minor/non-blocking nits:
No actionable correctness/reliability/security issues found. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 600ad846f6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // the rebound a plain tap has pressLevel slightly negative and no | ||
| // hold level, and max(negative, 0) would discard exactly the | ||
| // frames the above-rest lift exists for. | ||
| guard abs(pressLevel) > 0.001 || abs(holdLevel) > 0.001 else { |
There was a problem hiding this comment.
Avoid retaining pressed opacity during the negative rebound
When a tapped key's authored opacity is below 0.98 (including most standard and dimmed keys), allowing its negative pressLevel through this guard also executes responsiveKey.opacity = max(responsiveKey.opacity, 0.98). The rebound frame therefore has zero interaction level and pressure but remains visibly highlighted until it abruptly returns to its base opacity when the transition settles, contrary to the intended no-residual-press-styling behavior. Apply the signed level only to the translation rebound, or gate the opacity boost on a positive press/hold level.
Useful? React with 👍 / 👎.
Summary
#1248 was merged three minutes before its final review-fix commit was pushed, so master carries the press-physics pass with two known defects this commit fixes:
Cherry-pick of 8efc9a1 from the merged branch, unchanged.
Review gate
remote review gate selected— GitHubclaude-reviewis the enforced reviewer.Testing
🤖 Generated with Claude Code