Skip to content

[codex] Fix discussion and suggestion regressions#4945

Merged
felixfeng33 merged 39 commits intomainfrom
codex/simplify-discussion-ui
Apr 29, 2026
Merged

[codex] Fix discussion and suggestion regressions#4945
felixfeng33 merged 39 commits intomainfrom
codex/simplify-discussion-ui

Conversation

@felixfeng33
Copy link
Copy Markdown
Collaborator

@felixfeng33 felixfeng33 commented Apr 6, 2026

  • Auto release

Summary

This PR simplifies discussion UI plumbing and fixes a batch of suggestion regressions across block and inline editing flows.

What changed

  • simplified discussion ownership and click targets by rebuilding the shared annotation index once per editor version instead of relying on mutable path maps inside wrapper components
  • fixed stale block discussion updates after accept/reject and kept block suggestion wrappers from breaking column, media, and code-drawing layouts
  • restored the hidden Slate children mount points for static/media-style nodes so block selection and discussion affordances still have a place to attach
  • moved trailing-block normalization and related normalize-time inserts outside suggestion tracking so table editing no longer produces fake Add: Paragraph suggestions
  • fixed inline remove flows for inline voids, links, and line breaks:
    • inline-void backspace marks only the inline node, keeps the cursor on the left edge, and reuses the same remove suggestion during continued deletes
    • link deletion stays character-scoped, reject clears stale inline metadata, and accept removes empty links through the real link normalizer path
    • block-start backspace creates a line-break remove suggestion so accepting merges paragraphs instead of deleting the previous block
  • taught block discussion summaries to include inline element text for mentions, dates, equations, and links
  • moved link-specific regressions into real app integration coverage under apps/www/src/__tests__/package-integration and documented the new suggestion edge cases in docs/solutions/

Validation

  • pnpm check

@codesandbox
Copy link
Copy Markdown

codesandbox Bot commented Apr 6, 2026

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 6, 2026

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

Project Deployment Actions Updated (UTC)
plate Ready Ready Preview, Comment Apr 26, 2026 0:15am

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 6, 2026

🦋 Changeset detected

Latest commit: 59e0883

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@platejs/ai Patch
@platejs/link Patch
@platejs/suggestion Patch
@platejs/utils Patch
platejs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Keep inline-void deletion atomic, reuse suggestion ids across inline
boundaries, move link coverage to real app integration tests, and patch
the deleteSuggestion test harness so check stays green.
Keep expanded selection delete and replace flows progressing across
mention-shaped inline voids, add regressions for delete and insertText,
and carry the generated next-env route typing update already present in
the worktree.
Checkpoint the current no-package-use-client experiments across app registry
and React surface imports before the next round of build debugging.
@felixfeng33 felixfeng33 marked this pull request as ready for review April 13, 2026 10:34
@felixfeng33 felixfeng33 requested a review from a team April 13, 2026 10:34
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Apr 26, 2026
@zbeyens
Copy link
Copy Markdown
Member

zbeyens commented Apr 27, 2026

@codex review - instead of suggestion-node import in most blocks, would you have a dependency-free @/lib/ import as we do for transforms? and which registry deps are missing?

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 50f4c1c557

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/www/src/registry/ui/date-node.tsx Outdated
Comment thread apps/www/src/registry/ui/equation-node.tsx Outdated
Comment thread apps/www/src/registry/ui/link-node.tsx Outdated
Comment thread apps/www/src/registry/ui/mention-node.tsx Outdated
Move the shared inline suggestion class into a dependency-free registry lib,
inject static inline suggestion data from the base kit, and drop the old
static helper path.
@felixfeng33
Copy link
Copy Markdown
Collaborator Author

@codex review again about registry deps

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Support inline suggestion classes on nodes that carry the injected data
attribute themselves, and lock that shape in with direct-token regression
checks for mention and link.
@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Apr 28, 2026
@felixfeng33 felixfeng33 force-pushed the codex/simplify-discussion-ui branch from 091fc86 to 59e0883 Compare April 29, 2026 03:19
@felixfeng33 felixfeng33 enabled auto-merge April 29, 2026 07:10
@felixfeng33 felixfeng33 disabled auto-merge April 29, 2026 07:10
@felixfeng33 felixfeng33 merged commit 0d99725 into main Apr 29, 2026
4 checks passed
@felixfeng33 felixfeng33 deleted the codex/simplify-discussion-ui branch April 29, 2026 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch Bugfix & documentation PR plugin:comment plugin:suggestion regression size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants