fix(editor): restore unmerge option + in-editor merge confirmation (#691)#1024
Open
sampjvv wants to merge 1 commit into
Open
fix(editor): restore unmerge option + in-editor merge confirmation (#691)#1024sampjvv wants to merge 1 commit into
sampjvv wants to merge 1 commit into
Conversation
…ditor (#691) Merged cells stopped showing the unmerge button in Source Editing mode: CellList filtered merged cells out in exactly the mode where the provider intentionally keeps them, so the "Cancel merge" button could never render. Remove that filter so merged cells render (greyed out) with the unmerge button again. Also replace the native VS Code merge-confirmation popup — which appeared in the bottom-right corner of the screen and wrongly claimed the action "cannot be undone" — with a small in-editor confirmation modal using reversible wording. confirmCellMerge no longer shows the native dialog (its child-cell guard is preserved), and the now-unused `message` payload field is dropped. Adds regression tests for unmerge-button visibility and the confirmation modal gating the merge. Fixes #691 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Fixes #691 — "merged content no longer shows the option to unmerge" — plus a UX follow-up on the merge confirmation.
1. Unmerge button no longer showed (the reported bug)
In Source Editing (correction) mode the provider intentionally keeps merged cells in the translation units so they can be unmerged, and
CellContentDisplayrenders a Cancel merge button on them. ButCellListwas filtering merged cells out in exactly that mode (filteredTranslationUnits), so the merged cell never reachedCellContentDisplayand the button could never render.The filter contradicted the rest of
CellList, which already styles merged cells (greyed atopacity: 0.5,❌line number). Removing it restores the intended behavior; it's safe because the provider already strips merged cells in every other mode.2. Merge confirmation moved into the editor
Confirming a merge used a native
vscode.window.showWarningMessage, which pops up in the bottom-right corner of the screen — far from the cell — and wrongly said the action "cannot be undone" (merges are reversible via unmerge).It's now a small in-editor modal (the same
Dialogpattern as the existing auth/offline modals) with reversible wording and Cancel / Merge buttons.confirmCellMergeis only posted once the user confirms; the handler no longer shows the native dialog (its child-cell guard is preserved), and the now-unusedmessagepayload field is removed from the type.Changes
webviews/.../CodexCellEditor/CellList.tsx— remove the merged-cell filter.webviews/.../CodexCellEditor/CellContentDisplay.tsx— in-editor merge-confirmation modal.src/providers/codexCellEditorProvider/codexCellEditorMessagehandling.ts— drop the native confirmation fromconfirmCellMerge.types/index.d.ts— remove the unusedmessagefield fromconfirmCellMerge.CellList.mergedCellUnmerge.test.tsx,CellContentDisplay.mergeConfirm.test.tsx.Testing
🤖 Generated with Claude Code