Skip to content

fix(files): preserve image selection after resizing - #7629

Merged
waleedlatif1 merged 1 commit into
stagingfrom
codex/file-editor-resize-selection
Sep 9, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
codex/file-editor-resize-selection

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Preserve image selection when committing a resize so Backspace targets the image, not adjacent text.
  • Update dimensions and selection in one ProseMirror transaction; retain existing collaboration and cancellation safeguards.

Type of Change

  • Bug fix

Testing

  • Reproduced the failure before the fix in the browser and real two-editor Yjs tests.
  • Verified loaded heading, paragraph, and block images: resize, immediate Backspace, undo/redo, peer synchronization, and reload persistence.
  • 1,413 editor tests passed. Lint, type-check, all 46 repository audits including API-boundary validation, block-registry, and docs-manifest checks passed.
  • All eight cleanup passes completed; no new UI, dependency, schema, or protocol changes.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 9, 2026 12:08am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge, with the resize transaction and collaboration safeguards covered by focused tests.

Summary

  • Preserves immediate Backspace behavior after resizing.
  • Retains cancellation, editability, detached-node, and collaboration safeguards.
  • Adds block and inline image coverage for selection, deletion, undo/redo, peer synchronization, and unchanged surrounding text.

@waleedlatif1
waleedlatif1 merged commit 35efcff into staging Sep 9, 2026
33 checks passed
@waleedlatif1
waleedlatif1 deleted the codex/file-editor-resize-selection branch September 9, 2026 00:13
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.

1 participant