-
Notifications
You must be signed in to change notification settings - Fork 0
feat(trail): cursor trail with policy-based visibility filtering #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
josstei
wants to merge
22
commits into
main
Choose a base branch
from
feature/cursor-trail
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
- Default trail color is now "auto" (reads from Cursor highlight group) - Intensity curve starts at 1.0 with gentler (1-t)^1.2 decay - Add resolve_color() to highlights module for runtime color resolution - Update validation to accept "auto" as valid trail color
- Linear intensity curve (1-t) for uniform color steps between segments - Increase default segments from 6 to 8 for smoother gradient
Introduces a policy abstraction layer between motion execution and trail rendering to filter trail visibility based on movement distance and motion type.
Three built-in policies for filtering trail visibility: - always: unconditionally enables trail - never: unconditionally disables trail - distance: enables trail only when movement exceeds configurable thresholds
…its signature - Policy registry with resolution chain: user override > motion > category > always - Config defaults: cursor uses distance policy, scroll uses always - Validation for policy, distance thresholds, and overrides - All builtin motions assigned trail_policy (distance for hjkl/gj/gk, always for rest) - invoke_start now passes result to traits, motion_id attached to context
Trail trait now evaluates policies at animation start via on_start. Policies are registered during setup (always, never, distance). Trail rendering is gated by context.trail_active flag.
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 Changed
Trail Core (renderer, highlights)
Policy System
always- unconditionally shows trailnever- unconditionally hides traildistance- shows trail only when movement exceeds configurable line/column thresholdsresolve()implementing the full resolution chainMotion Integration
trail_policy:distancefor hjkl/gj/gk,alwaysfor everything elseinvoke_startnow passesresultto traits for policy evaluationmotion_idattached to context for policy resolutionConfig Defaults
Test Plan