Skip to content

Desktop on Mac: move the window from the whole top strip, over the page too - #2146

Merged
davidmckayv merged 2 commits into
mainfrom
fix/desktop-drag-whole-top-bar
Nov 24, 2026
Merged

davidmckayv merged 2 commits into
mainfrom
fix/desktop-drag-whole-top-bar

Conversation

@davidmckayv

Copy link
Copy Markdown
Contributor

What was wrong

In OpenBot Desktop on a Mac the window moved only when you dragged the top of the sidebar. Dragging the top strip over the page beside it (the bars over the page, such as "apps still need reconnecting", the page's own top bar, or the window's tint above them) did nothing.

What changed

The window now moves from its whole top strip, across both the sidebar and the page, in the app, Admin and Settings:

  • Over the page, the strip runs down to the sidebar's top row. If bars show over the page, it also runs past them to the bottom of the page's first row. Over the sidebar, it runs down to the sidebar's top row.
  • Buttons, links and fields in the strip, such as a bar's Reconnect and Dismiss, stay clickable.
  • A double-click on an empty part of the strip zooms the window, as it already did on the sidebar.
  • It works with the sidebar shown, folded down to the icons, or hidden, and in the narrowest window.
  • Nothing changes below the strip, and nothing changes visually.

Each page draws a different top bar, so the strip is defined as a height rather than by a mark on each page's bar. When a press lands in the strip on something that isn't a control, the desktop's page script gives that element Tauri's drag mark for that one press. Tauri's own drag script then moves or zooms the window, and the mark is taken off when the press ends.

The script runs on macOS only. Windows has its own title bar and is unchanged. The setup window already has a real title bar.

Tests

app/tests/sidebar-window-buttons.test.tsx runs the real shells, sidebars and the bars over the page in Chromium and WebKit (the engine the Mac window uses), and runs the desktop's own script on them. It presses every few pixels across the whole top strip in each shell: sidebar shown, folded and hidden, with the bars over the page, and in the narrowest window. No press may land in a spot that neither moves the window nor reaches a control. Each control in the strip must still be a control, and a press below the strip must behave as it did before. A second test clicks the bars' Dismiss and Reconnect with the script running and checks that they still work.

Red on main: 11 strip cases fail. Green on this branch: 26 pass.

@davidmckayv
davidmckayv force-pushed the fix/desktop-drag-whole-top-bar branch 7 times, most recently from 38e2f28 to 0fa4853 Compare November 24, 2026 22:24
…ge too

On a Mac the window moved only from the top of the sidebar. A press on the
top strip over the page beside it (the bars over the page, the page's own
top bar, the window's tint above them) did nothing.

The desktop's page script now treats the window's top strip as a handle
across its whole width in the app, Admin and Settings. Over the page it
reaches down to the sidebar's top row, and past any bars over the page to
the bottom of the page's first row; over the sidebar, to its top row. A
press there that lands on no control is lent Tauri's drag mark for that
press, so Tauri's own script moves the window and zooms it on a
double-click; buttons, links and fields in the strip stay controls. Below
the strip nothing changes, and Windows, which has its own title bar, is
untouched.

The sidebar window test now presses across the whole strip in every shell,
with the sidebar shown, folded and hidden, with the bars over the page
shown, and in the narrowest window, in Chromium and WebKit, and checks that
the bars' Dismiss and Reconnect still work.
@davidmckayv
davidmckayv force-pushed the fix/desktop-drag-whole-top-bar branch from 0fa4853 to c319022 Compare November 24, 2026 22:56
@davidmckayv
davidmckayv merged commit 8e5bf1d into main Nov 24, 2026
39 checks passed
@davidmckayv
davidmckayv deleted the fix/desktop-drag-whole-top-bar branch November 24, 2026 23:27
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