feat: drag and fling characters to reposition them#9
Open
akdenizemirhan wants to merge 2 commits intoryanstephen:mainfrom
Open
feat: drag and fling characters to reposition them#9akdenizemirhan wants to merge 2 commits intoryanstephen:mainfrom
akdenizemirhan wants to merge 2 commits intoryanstephen:mainfrom
Conversation
Streaming text from Claude's responses was not being saved to the session history. When the popover closed and reopened, only user messages appeared - assistant responses were lost. The root cause: Claude CLI returns streaming text via "assistant" type messages, but the "result" type message has an empty "result" field. The history was only populated from the "result" field, so responses were never saved. Fix: accumulate streaming text during the assistant response and save it to history when the turn completes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Characters sometimes block UI elements underneath. This adds the ability to grab and drag them out of the way. - Click and drag to move a character (5px threshold prevents accidental drags) - Short click still opens the chat popover as before - Fling a character and it slides on ice with friction, bouncing off screen edges - Character resumes walking from the new position after 2 seconds Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Owner
|
This is fun, but a little glitchy in practice. Will consider if we can polish positioning and drag behavior, thanks. |
itsnothuy
added a commit
to itsnothuy/lil-agents
that referenced
this pull request
Apr 15, 2026
- Add drag-to-reposition with fling physics (PR ryanstephen#9 reimplemented cleanly) - 5px threshold, exponential velocity smoothing, dock-bound bounce - Feature flag: WalkerCharacter.dragEnabled - Fix character motion freeze (UserDefaults optional chain bug) - Fix walkEndPixel not recomputed after separation clamp - Fix Sparkle gentle reminders (userDriverDelegate) - Fix makeKeyWindow warning (KeyableWindow) - Fix CGWindowListCreateImage deprecation isolation - Fix 3 compiler warnings (CodexSession, OpenClawSession, TerminalView) - Add documentation: animation docs, bug post-mortems, feature review
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.
Summary
What's new
Technical details
CharacterContentView: AddedmouseDown/mouseDragged/mouseUpwith drag state tracking and velocity samplingWalkerCharacter: AddedisBeingDraggedflag that pauses the walk animation loop during drag, ice-slide physics inupdate(), andsyncPositionFromWindow()to correctly update walk state after repositioningTest plan
🤖 Generated with Claude Code