Skip to content

desktop: finish the UI, and fix what was quietly broken in it - #8

Merged
ralyodio merged 1 commit into
mainfrom
worktree-desktop-ui-polish
Aug 30, 2026
Merged

desktop: finish the UI, and fix what was quietly broken in it#8
ralyodio merged 1 commit into
mainfrom
worktree-desktop-ui-polish

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

The desktop renderer looked unfinished rather than broken. Most of this is polish, but four things in it were genuinely wrong, and they are a large part of why it read that way.

Verified by building the renderer and driving it in a browser with a mocked window.diskpush bridge, screenshotting every state: both themes, the two dialogs, an in-flight transfer, the empty/no-match/error states, and the app's 960x600 minimum window.

Actual defects

DialogFooter hardcoded -mx-4 -mb-4 to cancel DialogContent's p-4. Both dialogs here pass p-0, so the footer hung 16px past the rounded corner as a detached bar. Bleed follows a --dialog-pad var.
DialogContent ended its class list with sm:max-w-sm, beating every max-w-* a caller passed. The mirror preview asked for max-w-2xl and rendered at 384px. Default is unprefixed, so a caller's width wins.
The progress bar styled the Progress root (a flex wrapper) rather than the track, and recoloured [&>div] on finish — the track, not the fill — so a finished transfer turned the whole bar green whatever the percentage said. Both addressed by data-slot.
formatDate used toISOString(), so every mtime in both panes rendered in UTC while the user's clock said something else. Local time.

Finishing touches

  • The Settings gear had no onClick at all. It now opens the two actions already behind the bridge (add a server, import ~/.ssh/config) plus the project link.
  • "Hidden" was a raw <input type="checkbox"> next to shadcn fields, while ui/checkbox.tsx sat unused.
  • Four full-width toolbars per pane before a single file was shown. Path, filter and hidden toggle are one row.
  • The idle transfer band was 74px of "Nothing transferring" — the tallest thing in the window, spent saying nothing was happening. Now a slim strip naming the route and whether deletes are armed.
  • The rail stacked a 64px button on a 50px button with two different corner radii and truncated labels mid-word (to nyc-web…). One width, one radius, and "Sync to" in front of the name so the pair stop reading as a destination picker rather than the buttons that start the transfer.
  • Light theme painted white panes on a white window, so a pane was a hairline around nothing. The ground steps back; panels have depth.
  • Keyboard: arrows, PageUp/Down, Home/End, Enter to open, Backspace for the parent, shift for a range, ctrl/cmd-A.
  • States: skeleton rows while loading; empty, no-match and error each get a real state instead of one line of grey text.
  • The mirror confirm opens focused on Cancel rather than on the trust checkbox, and its delete list no longer reserves 210px for two files.

One removal worth flagging

The renderer loaded a third-party analytics tag. The shell's own CSP (script-src 'self', set in electron/main/index.ts) blocks it outright, so it never reported anything — all it did was make a desktop file transfer tool look like it phones home. Removed; say the word if it was there for a reason I'm not seeing.

Checks

  • pnpm typecheck clean (renderer and electron configs)
  • pnpm test — 243 passed, 22 files
  • pnpm build:renderer clean
  • No horizontal overflow at 1360x860 or at the 960x600 minimum

🤖 Generated with Claude Code

https://claude.ai/code/session_01TA4kaFusnS896fmoeWHiAa

The renderer looked unfinished rather than broken, so this is mostly
polish -- but four things in it were genuinely wrong, and they are the
reason it read that way.

Actual defects:

- DialogFooter hardcoded `-mx-4 -mb-4` to cancel DialogContent's `p-4`.
  Both dialogs here pass `p-0`, so the footer hung 16px past the rounded
  corner as a detached bar. The bleed now follows a `--dialog-pad` var.
- DialogContent ended its class list with `sm:max-w-sm`, which beat every
  `max-w-*` a caller passed: the mirror preview asked for max-w-2xl and
  rendered at 384px, squashing its four-column summary and delete list.
- The progress bar styled the Progress ROOT (a flex wrapper) instead of
  the track, and recoloured `[&>div]` on finish -- the track, not the
  fill -- so a completed transfer turned the whole bar green whatever
  the percentage said. Both are addressed by slot now.
- formatDate used toISOString(), so every mtime in both panes was shown
  in UTC while the user's clock said something else.

Finishing touches:

- The Settings gear had no onClick at all. It now opens the two actions
  that already exist behind the bridge, plus the project link.
- "Hidden" was a raw <input type=checkbox> next to shadcn fields, while
  ui/checkbox.tsx sat unused.
- Each pane spent four full-width toolbars on chrome before showing a
  file; the path, filter and hidden toggle are one row now.
- The idle transfer band was 74px of "Nothing transferring" -- the
  tallest thing in the window, and there to say nothing was happening.
  It is a slim strip that names the route and whether deletes are armed.
- The rail stacked a 64px button on a 50px button with two corner radii
  and truncated its labels mid-word. One width, one radius, and "Sync to"
  in front of the name so the pair stop reading as a destination picker.
- Light theme painted white panes on a white window, so a pane was a
  hairline around nothing. The ground steps back and panels have depth.
- Panes answer to the keyboard: arrows, PageUp/Down, Home/End, Enter to
  open, Backspace for the parent, shift for a range, ctrl/cmd-A.
- Loading is skeleton rows; empty, no-match and error each have a state
  instead of one line of grey text.
- The mirror confirm opens focused on Cancel rather than on the trust
  checkbox, and its delete list no longer reserves 210px for two files.

Also drops the third-party analytics tag from the renderer. The shell's
own CSP (`script-src 'self'`) blocks it outright, so it never reported
anything -- all it did was make a desktop file transfer tool look like
it phones home.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TA4kaFusnS896fmoeWHiAa
@ralyodio
ralyodio merged commit b820f97 into main Aug 30, 2026
4 checks passed
@ralyodio
ralyodio deleted the worktree-desktop-ui-polish branch August 30, 2026 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant