Skip to content

feat(files): support heading images and simplify image selection - #7597

Merged
waleedlatif1 merged 2 commits into
stagingfrom
codex/file-editor-heading-images
Sep 8, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
codex/file-editor-heading-images

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Support images in headings and mixed text paragraphs while preserving existing standalone image blocks.
  • Preserve linked-image metadata through clipboard paste/copy, resizing, collaboration, and Markdown round trips.
  • Support dragging images into and out of text containers and normalize invalid Yjs-restored node selections before rendering.
  • Remove the image-specific floating menu and keep the selection outline inside the image edge. Retain direct resizing and existing text/link interactions.
  • Bump the collaborative schema version and reject incompatible joins. Requires a coordinated rollout: drain incompatible services and reload older clients before feature use; the join check alone does not make a mixed-version rolling deployment safe.

Type of Change

  • Bug fix and editor improvement

Testing

  • 1,553 editor/converter tests and all 381 realtime tests passed, including heading, clipboard, streaming-frame, collaboration, drag/undo with native scrolling, and versioned join-readiness coverage.
  • Complete app suite: 45,712 tests passed, 135 skipped; all applicable CI checks passed on the reviewed head.
  • All 26 type-check tasks, all 26 lint-check tasks, all 46 repository audits, artifact generation, block-registry audit, and docs-manifest checks passed.
  • Tested manually with two local browser clients: image selection/resizing, copy/paste, lists, formatting, peer edits, undo, relay interruption/reconnection, and persisted reload.
  • This validates the local same-version harness, not a mixed-version deployment or a full cross-browser matrix.
  • The local full repository run encounters an unrelated modal Escape-key test failure, also reproduced from the pre-PR baseline. The complete app suite and CI passed independently; this is not a claim that the entire local monorepo suite passed.

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 8, 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 8, 2026 6:57pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge after the documented coordinated schema-version rollout.

Summary

  • Adds inline images to headings and mixed-text paragraphs while retaining block images for image-only paragraphs.
  • Preserves linked-image metadata through Markdown, HTML clipboard, resizing, uploads, streaming, and Yjs collaboration.
  • Converts dragged images between block and inline representations according to the destination schema.
  • Normalizes invalid Yjs-restored node selections before rendering.
  • Removes the image-specific floating menu and updates selected-image styling.
  • Versions the collaborative document protocol and rejects incompatible client/server joins.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  MD[Markdown input] --> Parse[Markdown parser]
  Parse --> Decision{Image context}
  Decision -->|Image-only paragraph| Block[Block image]
  Decision -->|Heading or mixed text| Inline[Inline image]
  Block --> Editor[ProseMirror editor]
  Inline --> Editor
  Editor --> Yjs[Yjs collaborative document]
  Yjs --> Version{Schema versions match?}
  Version -->|Yes| Sync[Exchange document state]
  Version -->|No| Reject[Reject join]
  Editor --> Drag{Drag destination}
  Drag -->|Inline content accepts image| Inline
  Drag -->|Block destination| Block
Loading

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@waleedlatif1
waleedlatif1 merged commit 185e24d into staging Sep 8, 2026
35 checks passed
@waleedlatif1
waleedlatif1 deleted the codex/file-editor-heading-images branch September 8, 2026 19:22
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