Repository navigation
Refactor cursor positioning to reactive action-based architecture - #289
Merged
Merged
Conversation
Implements Issue #281: Replaces imperative $effect blocks with declarative Svelte action for cursor positioning. Architecture Changes: - Created positionCursor Svelte action to encapsulate DOM manipulation - Consolidated FocusManager state into unified cursorPosition type - Updated base-node.svelte to use $derived and action directive - Removed imperative $effect blocks for cursor positioning New Features: - Unified cursor position types: default, absolute, line-column, arrow-navigation, node-type-conversion - New FocusManager API: focusNode(), focusNodeAtPosition(), focusNodeAtLine(), focusNodeFromArrowNav(), focusNodeFromTypeConversion() - Backward compatible legacy API (marked deprecated) - Smart cursor caching to prevent duplicate positioning - requestAnimationFrame for smooth, non-blocking updates Benefits: - More maintainable: single source of truth, declarative data flow - Better performance: RAF prevents blocking, caching prevents duplicates - Cleaner architecture: separation of concerns - Fully tested: 23 new tests, all passing - Type-safe: full TypeScript support Merge Conflict Resolution: - Integrated upstream node-type-conversion feature into unified cursor system - Preserved all functionality from both upstream and refactor - All cursor positioning tests pass (23/23) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Documents the critical step of pulling from remote before starting work to avoid merge conflicts during development. Changes: - Added step 2: "Pull latest changes" (git fetch origin && git pull origin main) - Updated step numbers from 1-8 to 1-9 - Added to "Common mistakes" section with warning about merge conflicts - Updated TodoWrite tool instructions to include pull step - Updated mandatory process checklist to include pull step This documents the lesson learned from Issue #281 where starting work without pulling led to unnecessary merge conflicts mid-implementation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Updates textarea-editor-architecture.md to reflect the refactored cursor positioning implementation from Issue #281. Changes: - Updated architecture diagram to include positionCursor action - Replaced imperative $effect examples with declarative action-based approach - Documented unified CursorPosition type and new FocusManager API - Added comprehensive positionCursor action documentation with code examples - Updated arrow navigation section to show reactive data flow - Documented all architectural benefits of the refactor Key Documentation: - FocusManager: Unified cursorPosition state with type-safe API - positionCursor Action: Encapsulated DOM manipulation with RAF - Reactive Flow: State → $derived → action → DOM - Benefits: Single source of truth, maintainable, scalable This ensures developers understand the new architecture and can maintain the cursor positioning system effectively. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
malibio
added a commit
that referenced
this pull request
Feb 4, 2026
* Refactor cursor positioning to reactive action-based architecture Implements Issue #281: Replaces imperative $effect blocks with declarative Svelte action for cursor positioning. Architecture Changes: - Created positionCursor Svelte action to encapsulate DOM manipulation - Consolidated FocusManager state into unified cursorPosition type - Updated base-node.svelte to use $derived and action directive - Removed imperative $effect blocks for cursor positioning New Features: - Unified cursor position types: default, absolute, line-column, arrow-navigation, node-type-conversion - New FocusManager API: focusNode(), focusNodeAtPosition(), focusNodeAtLine(), focusNodeFromArrowNav(), focusNodeFromTypeConversion() - Backward compatible legacy API (marked deprecated) - Smart cursor caching to prevent duplicate positioning - requestAnimationFrame for smooth, non-blocking updates Benefits: - More maintainable: single source of truth, declarative data flow - Better performance: RAF prevents blocking, caching prevents duplicates - Cleaner architecture: separation of concerns - Fully tested: 23 new tests, all passing - Type-safe: full TypeScript support Merge Conflict Resolution: - Integrated upstream node-type-conversion feature into unified cursor system - Preserved all functionality from both upstream and refactor - All cursor positioning tests pass (23/23) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Update startup sequence to include pulling latest changes Documents the critical step of pulling from remote before starting work to avoid merge conflicts during development. Changes: - Added step 2: "Pull latest changes" (git fetch origin && git pull origin main) - Updated step numbers from 1-8 to 1-9 - Added to "Common mistakes" section with warning about merge conflicts - Updated TodoWrite tool instructions to include pull step - Updated mandatory process checklist to include pull step This documents the lesson learned from Issue #281 where starting work without pulling led to unnecessary merge conflicts mid-implementation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Document reactive action-based cursor positioning architecture Updates textarea-editor-architecture.md to reflect the refactored cursor positioning implementation from Issue #281. Changes: - Updated architecture diagram to include positionCursor action - Replaced imperative $effect examples with declarative action-based approach - Documented unified CursorPosition type and new FocusManager API - Added comprehensive positionCursor action documentation with code examples - Updated arrow navigation section to show reactive data flow - Documented all architectural benefits of the refactor Key Documentation: - FocusManager: Unified cursorPosition state with type-safe API - positionCursor Action: Encapsulated DOM manipulation with RAF - Reactive Flow: State → $derived → action → DOM - Benefits: Single source of truth, maintainable, scalable This ensures developers understand the new architecture and can maintain the cursor positioning system effectively. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
malibio
added a commit
that referenced
this pull request
Feb 5, 2026
* Refactor cursor positioning to reactive action-based architecture Implements Issue #281: Replaces imperative $effect blocks with declarative Svelte action for cursor positioning. Architecture Changes: - Created positionCursor Svelte action to encapsulate DOM manipulation - Consolidated FocusManager state into unified cursorPosition type - Updated base-node.svelte to use $derived and action directive - Removed imperative $effect blocks for cursor positioning New Features: - Unified cursor position types: default, absolute, line-column, arrow-navigation, node-type-conversion - New FocusManager API: focusNode(), focusNodeAtPosition(), focusNodeAtLine(), focusNodeFromArrowNav(), focusNodeFromTypeConversion() - Backward compatible legacy API (marked deprecated) - Smart cursor caching to prevent duplicate positioning - requestAnimationFrame for smooth, non-blocking updates Benefits: - More maintainable: single source of truth, declarative data flow - Better performance: RAF prevents blocking, caching prevents duplicates - Cleaner architecture: separation of concerns - Fully tested: 23 new tests, all passing - Type-safe: full TypeScript support Merge Conflict Resolution: - Integrated upstream node-type-conversion feature into unified cursor system - Preserved all functionality from both upstream and refactor - All cursor positioning tests pass (23/23) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Update startup sequence to include pulling latest changes Documents the critical step of pulling from remote before starting work to avoid merge conflicts during development. Changes: - Added step 2: "Pull latest changes" (git fetch origin && git pull origin main) - Updated step numbers from 1-8 to 1-9 - Added to "Common mistakes" section with warning about merge conflicts - Updated TodoWrite tool instructions to include pull step - Updated mandatory process checklist to include pull step This documents the lesson learned from Issue #281 where starting work without pulling led to unnecessary merge conflicts mid-implementation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Document reactive action-based cursor positioning architecture Updates textarea-editor-architecture.md to reflect the refactored cursor positioning implementation from Issue #281. Changes: - Updated architecture diagram to include positionCursor action - Replaced imperative $effect examples with declarative action-based approach - Documented unified CursorPosition type and new FocusManager API - Added comprehensive positionCursor action documentation with code examples - Updated arrow navigation section to show reactive data flow - Documented all architectural benefits of the refactor Key Documentation: - FocusManager: Unified cursorPosition state with type-safe API - positionCursor Action: Encapsulated DOM manipulation with RAF - Reactive Flow: State → $derived → action → DOM - Benefits: Single source of truth, maintainable, scalable This ensures developers understand the new architecture and can maintain the cursor positioning system effectively. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
malibio
added a commit
that referenced
this pull request
Feb 26, 2026
* Refactor cursor positioning to reactive action-based architecture Implements Issue #281: Replaces imperative $effect blocks with declarative Svelte action for cursor positioning. Architecture Changes: - Created positionCursor Svelte action to encapsulate DOM manipulation - Consolidated FocusManager state into unified cursorPosition type - Updated base-node.svelte to use $derived and action directive - Removed imperative $effect blocks for cursor positioning New Features: - Unified cursor position types: default, absolute, line-column, arrow-navigation, node-type-conversion - New FocusManager API: focusNode(), focusNodeAtPosition(), focusNodeAtLine(), focusNodeFromArrowNav(), focusNodeFromTypeConversion() - Backward compatible legacy API (marked deprecated) - Smart cursor caching to prevent duplicate positioning - requestAnimationFrame for smooth, non-blocking updates Benefits: - More maintainable: single source of truth, declarative data flow - Better performance: RAF prevents blocking, caching prevents duplicates - Cleaner architecture: separation of concerns - Fully tested: 23 new tests, all passing - Type-safe: full TypeScript support Merge Conflict Resolution: - Integrated upstream node-type-conversion feature into unified cursor system - Preserved all functionality from both upstream and refactor - All cursor positioning tests pass (23/23) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Update startup sequence to include pulling latest changes Documents the critical step of pulling from remote before starting work to avoid merge conflicts during development. Changes: - Added step 2: "Pull latest changes" (git fetch origin && git pull origin main) - Updated step numbers from 1-8 to 1-9 - Added to "Common mistakes" section with warning about merge conflicts - Updated TodoWrite tool instructions to include pull step - Updated mandatory process checklist to include pull step This documents the lesson learned from Issue #281 where starting work without pulling led to unnecessary merge conflicts mid-implementation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Document reactive action-based cursor positioning architecture Updates textarea-editor-architecture.md to reflect the refactored cursor positioning implementation from Issue #281. Changes: - Updated architecture diagram to include positionCursor action - Replaced imperative $effect examples with declarative action-based approach - Documented unified CursorPosition type and new FocusManager API - Added comprehensive positionCursor action documentation with code examples - Updated arrow navigation section to show reactive data flow - Documented all architectural benefits of the refactor Key Documentation: - FocusManager: Unified cursorPosition state with type-safe API - positionCursor Action: Encapsulated DOM manipulation with RAF - Reactive Flow: State → $derived → action → DOM - Benefits: Single source of truth, maintainable, scalable This ensures developers understand the new architecture and can maintain the cursor positioning system effectively. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
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.
Closes #281