Skip to content

fix: remove cursor-driven scroll sync, keep only bidirectional scroll sync#1555

Merged
yanglbme merged 3 commits into
mainfrom
fix/remove-cursor-scroll-sync
May 19, 2026
Merged

fix: remove cursor-driven scroll sync, keep only bidirectional scroll sync#1555
yanglbme merged 3 commits into
mainfrom
fix/remove-cursor-scroll-sync

Conversation

@yanglbme
Copy link
Copy Markdown
Member

No description provided.

yanglbme and others added 2 commits May 19, 2026 20:07
… 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>
Copilot AI review requested due to automatic review settings May 19, 2026 12:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 useCursorSync to expose only handlePreviewContentClick, removing preview-scrolling helpers and the skip/debounce machinery.
  • Drop the related props (skipCursorDrivenPreviewSync, onCursorActivity) and cursor-activity hook in EditorPanel.vue and CodemirrorEditor.vue.
  • Update CLAUDE.md to 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>
@yanglbme yanglbme merged commit 6f7f84f into main May 19, 2026
1 of 2 checks passed
@yanglbme yanglbme deleted the fix/remove-cursor-scroll-sync branch May 19, 2026 12:31
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants