Repository navigation
fix(desktop): one shared height for the remote file rows - #1331
Merged
Merged
Conversation
The remote composer handed Send back as soon as the field had text, while the host answers one prompt at a time and refuses a second with 'This session is still running; wait for it to finish or abort it first'. That refusal lands after the prompt is written down, so the press became an error over a message the reader meant to send. Stop now replaces Send for as long as the run streams, whatever the field holds -- the local composer's rule and the phone's, which both block sending while a reply is in flight -- and Enter meets the same guard inside send(), where the button and the key meet. A draft typed meanwhile stays in the field and goes once the run settles. The screenshot scenario that watches a streamed run now types a follow-up mid-run and asserts the composer offers Stop and no Send; it fails with the previous condition.
A folder row carries neither a size label nor a download control, so the row's height was left to its contents and came out 33px beside file rows of 49px: the panel read as a ragged column. Both kinds now share a 40px floor, and a file row's download button is small enough (size-7) not to set the row's height from outside it — while text scaling can still grow a row rather than being clipped. The demo listing gains a folder, since a listing of files alone could not show the three row kinds the height has to keep in step, and a scenario measures the rows: it caught 33,49 before the fix and reads 40px rows after it.
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 and why
Every row in the remote files panel took its height from its contents, so a folder row (no size label, no download button) sat noticeably shorter than the file rows beside it. Measured with the screenshot harness, the four rows came out at
33, 49, 49, 49px. This PR gives both row kinds one shared height floor so the panel reads as a single table, and keeps the floor on the row rather than on the controls so enlarged text still grows the row instead of clipping it.Commits
min-h-10(40px) on the row, the download icon button dropped tosize-7, and vertical paddingpy-1.5→py-1so the floor governs the height. Adds aremote-files-rowsscreenshot scenario plus a folder in the demo data (the fixture previously held only files, which hid the difference).mainas fix(remote): keep send out of the composer while a run is still going #1330, so it contributes no diff to this PR; it is listed only because it sits in the branch history.Verification
vitestonsrc/features/remote-peer— 772 tests passed, including the newRemoteFilesPanel.test.tsxcases (folder and file rows share one row style; the download button issize-7).tsc --noEmitandeslintclean.remote-files-rowsasserts every row'sgetBoundingClientRect().heightis equal and that the download button does not stretch the row: it failed before the fix withthe rows are not one height: 33,49and reports40px rowsafter it.Notes
RemoteFilesDialog, the dialog form of the file list, has no test of its own. It reuses the same panel component, so the row-height behaviour carries over, but the dialog's own layout is not asserted.Diff vs main
4 files, 67 insertions, 1 deletion (
RemoteFilesPanel.tsx,RemoteFilesPanel.test.tsx,scripts/screenshots/scenarios.json,desktop/shot/mock/data.ts).