address review comments from #8019#9549
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
No issues found across 6 files
Architecture diagram
sequenceDiagram
participant UI as Cell Component
participant Clipboard as useCellClipboard()
participant PendingCut as pending-cut-service
participant NClipboard as navigator.clipboard
Note over UI,NClipboard: Cell Copy/Cut Flow
UI->>Clipboard: copyCells() or cutCells()
alt copyCells
Clipboard->>Clipboard: toPlainText(cells)
Clipboard->>Clipboard: build ClipboardCellData
Clipboard->>NClipboard: write([clipboardItem])
NClipboard-->>Clipboard: success
Clipboard->>PendingCut: clear()
else cutCells
Clipboard->>Clipboard: toPlainText(cells)
Clipboard->>Clipboard: build ClipboardCellData
Clipboard->>NClipboard: write([clipboardItem])
NClipboard-->>Clipboard: success
Clipboard->>PendingCut: markForCut({cellIds})
PendingCut-->>Clipboard: updated state (cellIds set)
end
Note over UI,PendingCut: Clipboard writes include marimo MIME type + text/plain
alt clipboard write fails
Clipboard->>Clipboard: construct plainText string
Clipboard->>NClipboard: copyToClipboard(plainText)
NClipboard-->>Clipboard: fallback success/failure
opt cut fallback
Clipboard->>PendingCut: markForCut({cellIds}) (even on fallback)
end
end
Note over UI,PendingCut: Pending cut state only tracks cellIds (no clipboardData)
UI->>PendingCut: useIsPendingCut(cellId)
PendingCut-->>UI: boolean (true if cellId in pending set)
UI->>PendingCut: useHasPendingCut()
PendingCut-->>UI: boolean (true if any pending cuts)
Contributor
There was a problem hiding this comment.
Pull request overview
Follow-up to #8019 addressing leftover review feedback: removes the unused clipboardData field from the pending-cut state, refactors the clipboard helpers in clipboard.ts, simplifies the pending-cut cell styling, and updates tests to use the cellId branded helper.
Changes:
- Remove
clipboardDatafromPendingCutStateand adjustmarkForCutcallers/tests accordingly. - Refactor
clipboard.tsto introduceClipboardCellInput, atoPlainTexthelper, and a singlewriteCellsToClipboard(cells)entry point. - Tone down the
.pending-cutCSS (gray background + opacity, drop dashed amber border) and switch tests to thecellId(...)branded helper.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/css/app/Cell.css | Replace amber/dashed cut styling with gray-2 background and 0.55 opacity on inner areas. |
| frontend/src/core/cells/pending-cut-service.ts | Drop clipboardData from state and the markForCut action. |
| frontend/src/core/cells/tests/pending-cut-service.test.tsx | Remove mockClipboardData; use cellId(...) helper for branded IDs. |
| frontend/src/core/cells/tests/cells.test.ts | Replace "x" as CellId casts with cellId("x") helper calls. |
| frontend/src/components/editor/navigation/clipboard.ts | Inline buildClipboardPayload into writeCellsToClipboard; add ClipboardCellInput and toPlainText. |
| frontend/src/components/editor/navigation/tests/clipboard.test.ts | Drop clipboardData: null from the mocked usePendingCutState. |
mscolnick
approved these changes
May 14, 2026
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.
📝 Summary
Follow-up to #8019, which merged before a few unresolved review threads were addressed. This PR addresses the actionable items.
Closes #
📋 Pre-Review Checklist
✅ Merge Checklist
Made with Cursor