Repository navigation
fix(ui): keep the chat-create error until it is dismissed - #6912
Conversation
|
Verdict: Approve with suggestions The "chat was created, but…" error used to fade after 2.5 s. It now stays on screen until it is dismissed, and it sits at the top of the window so it no longer covers the chat box holding the unsent message. The mobile-access button also updates when the window is resized with the drawer open. The fix is small and covered by tests that fail without it, and nothing here blocks the merge.
Real-world evidenceN/A: no evidence bundle was produced for this run. The PR description embeds before/after screenshots from a production build with fixture data. On 🔍 Technical detailsIssues 🟢 Toast sits in the desktop title-bar drag band ( Separately, a 560 px centred toast on a window of about 770–900 px overlaps the Windows overlay controls ( 🟢 Checked, no issue
Strengths
|
Summary
The "chat was created, but..." error now stays visible until you dismiss it, and it no longer covers the chat box. The mobile-access button now follows window resizes through
useMediaQuery.Why
That error can say your message wasn't sent and is waiting in the chat's box, but it faded out after 2.5 seconds, which isn't long enough to read it. It also stayed in the page, invisible and still marked as an alert, until the next chat started.
App.tsxalso readwindow.innerWidthduring render, so nothing told it when the width changed. Usually the sidebar's own update re-renders it, but not when the drawer is already open.Linked issue
Closes #4819
The issue's third defect, download progress polling at 5 s, is already fixed on
mainbycreateStatusPoller, so this PR doesn't touch it.Changes
banner.dismisstext, which already has an Arabic translation..toast-dismissible: no fade-out, clickable, and placed at the top of the window.App.tsxusesuseMediaQuery('(max-width: 768px)')for the mobile-access button.Sidebar.tsxdrops its owninnerWidthread and uses thephonevalue it already had. This one is a cleanup: its test passes with or without the change.App.newTask.test.tsx.Decisions to check
Test plan
Run in a
node:22-slimcontainer:npx tsc --noEmit: passes.npm test, rebased on currentmain: 272 files and 3,164 tests pass.npx vite build: passes.python util/lint.py --all: passes, with the existing mypy warnings. This PR changes no Python, so I didn't runpytest tests/unit/.npm run test:rtl(light project): 7 failures with this PR and 8 without it, and all 7 also fail without it. Neither run reaches 0 in my container, so CI is the better check here.With the source changes reverted, the new tests for the error and the mobile-access button fail:
Evidence
The production build with
visual/fixtures.tsand a refused permission-mode request, at 1200x760 in Chromium. The chat content is fixture data.mainMain, after 1 s: the error covers the chat box
Main, after 6 s: the error has faded
This PR, after 6 s: the error is visible and the chat box is clear
Checklist
Closes #N/Fixes #N/Refs #N).python util/lint.py --all,pytest tests/unit/). Partly:util/lint.pyand the web checks above. No Python changed, so I didn't runpytest.