fix: remove cursor-driven scroll sync, keep only bidirectional scroll sync#1555
Merged
Conversation
… sync Remove the cursor-driven preview auto-scroll logic (syncPreviewToEditorCursor) to avoid interference with useScrollSync ratio-based scrolling, which caused visual jumping when focusing the editor. Retain the click-preview-element-to- navigate-to-editor feature. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Removes the cursor-driven editor→preview scroll sync, keeping only the bidirectional scroll sync and the click-preview-to-jump-to-editor behavior. This simplifies useCursorSync significantly by deleting the cursor-position-to-preview-scroll logic and the props it required on EditorPanel.
Changes:
- Slim down
useCursorSyncto expose onlyhandlePreviewContentClick, removing preview-scrolling helpers and the skip/debounce machinery. - Drop the related props (
skipCursorDrivenPreviewSync,onCursorActivity) and cursor-activity hook inEditorPanel.vueandCodemirrorEditor.vue. - Update
CLAUDE.mdto require English commit messages.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| CLAUDE.md | Add note that Conventional Commits must be in English. |
| apps/web/src/views/CodemirrorEditor.vue | Simplify useCursorSync usage and remove cleanup/props plumbing. |
| apps/web/src/composables/useCursorSync.ts | Remove preview-scroll helpers, skip flag, debounce timer, and cleanup. |
| apps/web/src/components/editor/EditorPanel.vue | Remove cursor-activity props and update handler. |
vue-tsc is not hoisted to root, so use pnpm --filter to execute it in the correct workspace. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
TUARAN
added a commit
to TUARAN/md
that referenced
this pull request
May 22, 2026
主要并入:主题独立设置、安全依赖升级(semver/glob/ws/tar-fs 等)、 CodeMirror view 6.43.0、Node 引擎要求 22.22.2、type-check 脚本修正。 冲突解决: - 跳过 doocs#1555 光标滚动同步重构:CodemirrorEditor/useCursorSync/EditorPanel 保留本 fork 版本,避免与已重写的工作流编辑器 API 不一致 - PostInfo.vue 保留本 fork 重构版(账号检测逻辑已移入 composable) - 上游 deploy/preview/release CI 工作流保持删除(本 fork 用 Cloudflare 自有流程) - package.json engines 取 node>=22.22.2 并保留 pnpm>=10;Dockerfile 保留 pinned pnpm 10.x - pnpm-workspace overrides 合并保留 ini 与 ip-address Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
No description provided.