You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #25781 ("Move folders with unread chats to the top"), merged as 6d61070. These came out of its review and did not block the merge. Lines are as of current main.
1. it and pt say folders cannot be dragged at all
website/src/i18n/locales/it.json and pt.json, key pages.chatSidebar.folder_order_unread_first_note:
it: "Le cartelle non si possono trascinare mentre questa opzione è attiva; disattivala per riordinarle"
pt: "Não é possível arrastar pastas enquanto isto estiver ativo; desative para reordená-las"
The English source is "Folders cannot be dragged into place while this is on". Dragging a folder into another folder still works with the option on, so these two tell users something false. de, es, fr, ru and ja already say "into place". Fix: translate these two again from the English source.
2. The toggle reads as a fourth Folder order choice
website/src/pages/chat-sidebar/SearchDock.tsx: the menuitemcheckbox comes right after </DropdownMenuRadioGroup> with no separator. It has the same indent and the same check glyph as Custom / By name / By date, so on screen it looks like a fourth radio option. A screen reader does hear a different role, so this is visual. Fix: a DropdownMenuSeparator before it, or a distinct leading icon.
3. The note under the toggle is not tied to it
Same file: the note is a plain div after the item (data-testid="folder-order-unread-first-note"). A screen reader moving through the menu items skips it, so it never hears why folder drag stopped working. Fix: give the note an id and point aria-describedby at it from the item.
4. The hover state re-renders the sidebar with the option off
website/src/pages/ChatSidebar.tsx:1060: onPointerEnter / onPointerLeave call setListHovered on every enter and leave, whatever foldersUnreadFirst is. With the option off the drawn output is the same, so this is render cost only. Fix: set it only while the option is on.
5. The held snapshot is written to a ref during render
website/src/pages/ChatSidebar.tsx:463: frozenUnreadRef.current = liveUnreadLatest runs in the render body. It works today, but a render React throws away can still move the snapshot. Fix: write it in an effect, or keep the snapshot in state.
Done when
it and pt notes say "into place", like the other locales
the toggle is visually set apart from the radio group
the note is announced with the toggle (aria-describedby)
setListHovered runs only while the option is on, with a test
no ref write in the render body for the held snapshot, and the existing hold tests still pass
[operator: bolichen97] Reproduced on Linux (Ubuntu 24.04, x86_64) against main at 7505181, in a real dashboard driven by Chromium and in the sidebar tests:
In the sort menu, "Move folders with unread chats to the top" sits right under the Folder order choices with no separator, and its note is not the toggle's accessible description (the accessibility tree gives it none).
The Italian and Portuguese notes say folders cannot be dragged at all.
With the option off, ten pointer enter/leave cycles over the sessions list cost 47 extra React commits.
The fix is ready and passed the same checks on that machine: a separator above the toggle, the note named as its description, the two notes reworded, and 4 extra commits for the same ten cycles with the option off. The pull request follows shortly.
[operator: bolichen97] Pull request opened: #40507. It was reproduced and smoke-tested on Linux (Ubuntu 24.04, x86_64) in a real dashboard: on main the toggle has no separator and no accessible description and the Italian and Portuguese notes are wrong; on the PR head the separator, the description and the reworded notes are there, and hovering the sessions list with the option off costs 4 extra React commits per ten cycles instead of 47. Screenshots are in the pull request.
Activity
bolichen97 commentedon Nov 17, 2026
[operator: bolichen97] Picking this up since it has been quiet for a while; @iamwhatever shout here if you are still on it.
bolichen97 commentedon Nov 21, 2026
[operator: bolichen97] Reproduced on Linux (Ubuntu 24.04, x86_64) against main at 7505181, in a real dashboard driven by Chromium and in the sidebar tests:
The fix is ready and passed the same checks on that machine: a separator above the toggle, the note named as its description, the two notes reworded, and 4 extra commits for the same ten cycles with the option off. The pull request follows shortly.
bolichen97 commentedon Nov 22, 2026
[operator: bolichen97] Pull request opened: #40507. It was reproduced and smoke-tested on Linux (Ubuntu 24.04, x86_64) in a real dashboard: on main the toggle has no separator and no accessible description and the Italian and Portuguese notes are wrong; on the PR head the separator, the description and the reworded notes are there, and hovering the sessions list with the option off costs 4 extra React commits per ten cycles instead of 47. Screenshots are in the pull request.
fix(sidebar): set the unread-first toggle apart, skip idle hover renders