Skip to content

Fix left border updates for multi-row table selections#4922

Merged
zbeyens merged 4 commits intomainfrom
codex/4798-table-left-border-multirow-selection
Mar 29, 2026
Merged

Fix left border updates for multi-row table selections#4922
zbeyens merged 4 commits intomainfrom
codex/4798-table-left-border-multirow-selection

Conversation

@zbeyens
Copy link
Copy Markdown
Member

@zbeyens zbeyens commented Mar 29, 2026

Check Result
PR #4922
Issue #4798
Confidence 🟢 95%
Phase 🧪 Tests 🌐 Browser
Reproduced 🔴 ⚠️ Could not automate dropdown
Verified 🟢 ⚠️ Could not automate dropdown

🌐 Browser Check

  • Open http://localhost:3000/docs/table.
  • Select right-column cells across two rows.
  • Toggle left border.
  • Confirm both selected rows update, not just top row.
  • Toggle back off. Confirm both rows clear.
issue-4798-longterm-selection

✅ Outcome

  • Fixed at the table-selection seam, not the border-command workaround.
  • Path-targeted writes bypass the multi-cell override unless the target is selected.
  • Adjacent-cell border writes update both selected rows.
  • Includes task handoff rule updates.

⚠️ Caveat

  • Real multi-cell selection verified.
  • Could not automate the border dropdown reliably.

🏗️ Design

  • Chosen seam: table cell selection override in withTableCellSelection.
  • Why not quick patch: border command was one victim; caller workaround would rot.
  • Why not broader change: seam fix solved path-targeted writes without widening public API.

🧪 Verified

  • pnpm --filter @platejs/table test packages/table/src/lib/withTableCellSelection.spec.tsx packages/table/src/react/components/TableCellElement/setSelectedCellsBorder.integration.spec.tsx packages/table/src/react/components/TableCellElement/setSelectedCellsBorder.spec.tsx packages/table/src/lib/queries/getSelectedCellsBorders.spec.tsx
  • pnpm install
  • pnpm turbo build --filter=./packages/table
  • pnpm turbo typecheck --filter=./packages/table
  • pnpm lint:fix
  • pnpm check

@zbeyens zbeyens requested a review from a team March 29, 2026 08:39
@codesandbox
Copy link
Copy Markdown

codesandbox bot commented Mar 29, 2026

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 29, 2026

⚠️ No Changeset found

Latest commit: 2c92ca4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 29, 2026

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

Project Deployment Actions Updated (UTC)
plate Ready Ready Preview, Comment Mar 29, 2026 11:07pm

Request Review

@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Mar 29, 2026
@dosubot dosubot bot added bug Something isn't working patch Bugfix & documentation PR plugin:table Tables labels Mar 29, 2026
@zbeyens zbeyens merged commit 0231b34 into main Mar 29, 2026
1 of 2 checks passed
@zbeyens zbeyens deleted the codex/4798-table-left-border-multirow-selection branch March 29, 2026 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working patch Bugfix & documentation PR plugin:table Tables size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant