You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(web): Esc while resizing a spreadsheet column or row cancels without closing the sheet - #41790
Pressing Esc while dragging a spreadsheet column or row border cancels the resize, but it also closes the whole Files sheet (or the attachment preview dialog). The grid's Escape handler called preventDefault() but let the key bubble to the sheet's document-level dismiss listener, which does not check defaultPrevented. The pointer capture taken for the drag was also never released.
The handler now stops the Escape there and releases the pointer capture. Like #41749, a held Escape's repeated keydowns no longer close the sheet either. A fresh Esc after the resize ends still closes it.
Testing
Setup: Linux, Chromium (T3 Browser panel), light theme, 900×700 viewport so the Files panel opens as a sheet, fresh isolated dev data (vp run dev --no-seed) with a synthetic budget.xlsx on each commit.
Steps: Open Files → open budget.xlsx → press on the right edge of the column A header and drag right → press Esc
Esc cancels the resize and the Files sheet stays open
On head, a second Esc closes the sheet.
An AI agent (Claude Opus 5.5, T3 Code) ran:
vp test run apps/web/src/components/files/office/sheet-resize.browser.test.ts: the new test fails on base (the sheet closes on the first Esc) and the file passes 6/6 on head.
vp run check:changed: pass.
Not shown: the drag is sent as pointer events inside the page, because the Browser panel cannot hold the mouse button while pressing a key; Esc is a real key press.
…out closing the sheet
Escape cancelled the resize but let the key bubble to the Files sheet or
attachment dialog, which closed it. The key now stops there, the pointer
capture is released, and a held Escape no longer closes the sheet on repeat.
Reviewing files that changed from the base of the PR and between 27975fb and 2df2bab.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
Escape during spreadsheet row or column resizing now stops propagation and releases pointer capture before clearing resize state. A browser test checks that Escape does not close an open right panel during resize cancellation.
Changes: Spreadsheet resize Escape handling
Layer / File(s)
Summary
Handle Escape during resize apps/web/src/components/files/office/Spreadsheet.tsx, apps/web/src/components/files/office/sheet-resize.browser.test.ts
The spreadsheet stops Escape events from propagating and releases pointer capture when a resize is active. The browser test checks that Escape and repeated Escape keydowns leave the right panel open during resize cancellation. A later Escape closes the panel.
Pressing Esc while resizing a spreadsheet row or column should now cancel only the resize and leave the Files sheet open. The change is narrow and has test coverage, so merge risk is minimal.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: pressing Esc during a spreadsheet column or row resize now cancels the resize without closing the sheet. It follows the conventional commit format and matches the PR o…
Description check
The description covers the problem (Esc closes the Files sheet during a resize), the change (stop propagation, release pointer capture, handle repeated keydowns), and verification (new browser test fa…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: pressing Esc during a spreadsheet column or row resize now cancels the resize without closing the sheet. It follows the conventional commit format and matches the PR objectives and the Spreadsheet.tsx and test changes.
Full details: Description check
Explanation
The description covers the problem (Esc closes the Files sheet during a resize), the change (stop propagation, release pointer capture, handle repeated keydowns), and verification (new browser test fails on base and passes 6/6 on head, check:changed passes, before/after screenshots, and a note on what was not checked). The Scope section does not link an issue. It cites #41749 as related and says the PR is fixing a bug, but it does not explain why no issue is needed. The title is also 90 characters, which is longer than the template example.
Resolution
Optional: add a link to the issue that reports the bug, or state why no issue is needed, in the Scope section. The description otherwise meets the template.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.
Evidence captured in Chromium at 900×700, light theme, with identical synthetic XLSX data and isolated fresh databases. Open Files → sample.xlsx; drag column A 50px right or row 1 30px down; send Escape and repeated Escape while holding the mouse button. Base closes the sheet in both cases. Head cancels both resizes, preserves the original boundaries, releases pointer capture before mouse-up, and keeps the sheet open through repeated Escape. A fresh Escape closes it.
Scenario driver and fixture. Base reopens the sheet between cases because Escape closes it. Head additionally verifies that a fresh Escape closes the preview. Both sides ran the same driver; the head completed separately after combined comparison processes were terminated.
Not shown:
The XLSX attachment-preview dialog variant was not exercised; this proof covers the Files sheet.
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
size:XS0-9 changed lines (additions + deletions).vouch:unvouchedAuthor is not yet trusted in the VOUCHED list.
2 participants
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.
Pressing Esc while dragging a spreadsheet column or row border cancels the resize, but it also closes the whole Files sheet (or the attachment preview dialog). The grid's Escape handler called
preventDefault()but let the key bubble to the sheet's document-level dismiss listener, which does not checkdefaultPrevented. The pointer capture taken for the drag was also never released.The handler now stops the Escape there and releases the pointer capture. Like #41749, a held Escape's repeated keydowns no longer close the sheet either. A fresh Esc after the resize ends still closes it.
Testing
Setup: Linux, Chromium (T3 Browser panel), light theme, 900×700 viewport so the Files panel opens as a sheet, fresh isolated dev data (
vp run dev --no-seed) with a syntheticbudget.xlsxon each commit.Steps: Open Files → open
budget.xlsx→ press on the right edge of the column A header and drag right → press EscOn head, a second Esc closes the sheet.
An AI agent (Claude Opus 5.5, T3 Code) ran:
vp test run apps/web/src/components/files/office/sheet-resize.browser.test.ts: the new test fails on base (the sheet closes on the first Esc) and the file passes 6/6 on head.vp run check:changed: pass.Not shown: the drag is sent as pointer events inside the page, because the Browser panel cannot hold the mouse button while pressing a key; Esc is a real key press.
Generated with Claude Opus 5.5 in T3 Code Nightly