Repository navigation
fix(ui): keep the chat-create error clear of the desktop title bar - #6973
Conversation
In the desktop app the error sat in the title bar's drag strip, so pressing on its text moved the window instead of selecting it, and on a narrow Windows window it overlapped the window buttons. It now opts out of the drag region and sits below the title bar.
|
Verdict: Request changes The fix works: in the desktop app, the "chat was created, but…" error now sits just below the title bar, clear of the Windows window buttons, and you can select its text without dragging the window. The browser layout doesn't change. One thing is missing: project policy says a UI bug someone finds by hand gets an automated check in the same change. A near-identical check already exists for the top notice, so adding one for this error is a short copy.
Real-world evidenceN/A: no evidence bundle ran for this PR. The author's own Chromium run (production build, Windows title-bar mode) measured the error's top edge at 56 px under a 48 px title bar, with 🔍 Technical detailsIssues 🟡 No regression check for a bug found by hand ( Checked, no issue
Strengths
|
Adds a visual rule, in Arabic and English, that draws the Windows window controls, triggers the chat-create error and asserts it starts below the 48 px title band and is not a drag region. It fails without the fix (top 16 px).
Summary
In the desktop app, the "chat was created, but…" error can now be selected and copied, and it no longer sits under the Windows window buttons. Before, it sat inside the title bar's drag strip: pressing on its text moved the window, and on a Windows window about 770–900 px wide it overlapped the minimize, maximize and close buttons until dismissed.
Why
The review on #6912 pointed this out. #6912 moved the error to the top of the window so it no longer covers the chat box, but in the desktop app the top 48 px is the invisible drag strip. Its Dismiss button already worked, since buttons are excluded from dragging, but the error itself (
role="alert") wasn't.Linked issue
Refs #4819, which #6912 closed. This is the follow-up from that PR's review.
Changes
.toast-dismissiblesets-webkit-app-region: no-drag, so a press on the error's text selects it instead of dragging the window.:root[data-titlebar], the error moves totop: calc(var(--titlebar-h) + 8px), below the window buttons. In the browser it stays at 16 px.The review's other note, that
toastInrises from below at the top position, is cosmetic and left as is.Test plan
Run in a
node:22-slimcontainer, rebased on currentmain:npx tsc --noEmit: passes.npx vite build: passes.visual/rtl.visual.ts, "the chat-create error sits below the window controls and is not a drag handle": passes inaranden. With this PR's CSS reverted, both fail (Expected: >= 48, Received: 16).npm test: 3,157 of 3,169 pass on a busy machine; the 12 failures were timeouts of 4–66 s while another test suite ran. Each of those 9 files passes when rerun on its own, andChatView.liveStatuspassed 3 of 3 more runs.python util/lint.py --all: passes. This PR changes no Python.Evidence
The production build with
visual/fixtures.tsin Chromium at 1200x760.data-titlebar="overlay"is set as the Windows desktop app sets it, and a refused permission-mode request triggers the error.--titlebar-his 48 px)-webkit-app-regionon the errorno-dragNot tested in the packaged Electron app or in Arabic, so the window buttons themselves aren't in the screenshot. The change sets only a vertical offset and the drag region, which don't depend on text direction.
Checklist
Closes #N/Fixes #N/Refs #N).python util/lint.py --all,pytest tests/unit/). No Python changed, so I ran the web checks above instead ofpytest.