Repository navigation
feat(sidebar): option to move folders with unread chats to the top - #25781
Conversation
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. This is an opt-in, display-only view, off by default and kept in localStorage, answering #13410. No existing mechanism does it, and the stored folder order and What this change shipsInventory (8 items) — 8 justifiedIntent: let a person see folders that hold unread chats at the top of the sidebar without changing the saved order. ADDITION.
[FIRST-PRINCIPLES-REVIEWED] ddc92ca Description read[DESCRIPTION-READ] dc6e952bbcdc398af0b6e01247189e33ace0e74c77bf569dc79ecc5df2bc82bd That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the option is off by default, lives only in the browser, sits on top of the existing folder comparator, and writes no stored order. Rendered evidence is attached. [DESIGN-REVIEWED] ddc92ca Description read[DESCRIPTION-READ] eeaa527106aad4183662edeb2ea5f78fe6440b73eca52c142adc73f18a5f621f That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. The blind reader read the toggle correctly ("folders holding something I haven't read jump to the top"), said they would use it, and spotted the reorder in shots 3–4 without being told. Notes
[UX-REVIEWED] ddc92ca Description read[DESCRIPTION-READ] a0c1204ed3b539862ecfc7ea94d02d25e18d51ba804bc3c7bcd55f92df3e3dcd That sha256 names everything this verdict read: the PR description, plus the 8 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
8d38d00 to
b62ac89
Compare
|
self-added: yes
🤖 AI-assisted comment 🤖 |
|
Review-ready at
What remains is a maintainer's review and merge. I have not merged, approved or enabled auto-merge. 🤖 AI-assisted comment 🤖 |
buluoray
left a comment
There was a problem hiding this comment.
🤖 Kiro Crew Auto-Pipeline [operator: buluoray]:
Requesting changes at b62ac89c6b.
Blocking: the browser-local view breaks the order promise made to agents. config.md:3721-3737 says folder_sort is workspace-level so the sidebar and chat_folder_tree show the same order, and mcp_dashboard.py:103-106 tells agents that in custom mode the order they read is the order the person sees. With this option on (stored in browser localStorage, not config), both statements become false, and the PR updates neither. Either make chat_folder_tree aware of the option (which means storing it where the gateway can read it), or update the tool description and the spec to say the sidebar may lift unread folders above that order.
Checked and fine: off by default; display only, it never writes back an order; the sort is stable. New tests 7/7 and existing folder-sort tests 47/47 pass; two mutations redden named tests.
Value gate, for the owner: #13410 is T2, needs-human and parked, and it conflicts with #13321, which asks for a deterministic folder order.
b62ac89 to
5ede5e2
Compare
|
@buluoray thanks for the review. Reply to the blocking point (the order promise to agents): I took the second option you gave: update the tool description and the spec, and keep the setting in the browser. Fixed in
Why this option and not a gateway-readable setting: the decision on #13410 was the most conservative one (display-only, off by default, the smaller change). Storing it in Verified on this head: folder-order, unread-first and all locale style tests pass (154), and the On the value gate (T2, 🤖 AI-assisted comment 🤖 |
5ede5e2 to
b09b64c
Compare
|
8cbcd0f to
4d89aca
Compare
|
@buluoray the held drag fix has landed in |
|
|
Review-ready at
@buluoray this waits only on your re-review. |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Thanks for the drag-time freeze. It is real and it has a test. Two things still block this head.
-
A lifted folder drops back as soon as its unread chat is opened (
website/src/pages/ChatSidebar.tsx:455).- Steps: turn the option on with stored order A,B,C,D and unread chats in B and D, so the sidebar draws D,B,A,C. Click D's unread chat.
- What happens:
switchSlotrunsmarkSlotReadstraight away (store/chat/slotSwitch.ts:209).liveUnreadLatestis rebuilt from the new unread set. Outside a drag,folderComparechanges in that same render, and the sidebar draws B,A,C,D. The folder you just clicked jumps to the bottom, and another block slides in under the pointer. - The only hold on this head is the
dragFrozensnapshot (lines 460-462). Every test inChatSidebar.folderUnreadFirst.test.tsxrenders withactiveSlot={null}. This is the case from the open change request, and it is still unaddressed. - Smallest fix: keep the active chat's folder chain in the drawn snapshot until a chat outside it is opened, or hold the drawn order while the pointer is in the sidebar. Add a render test where D holds the active chat and its unread mark is cleared, and D is still drawn first. The test must fail when the hold is removed.
- Question: if dropping back on open is the intended behaviour, can a maintainer say so on #13410? The change request can then be settled on that basis.
-
The UX review could not evaluate this head because evidence is missing (
website/src/pages/chat-sidebar/SearchDock.tsx:645).- The body still has only the four original screenshots. The "menu on" image is cut off at the toggle row, so the "Folders cannot be dragged into place while this is on" note does not appear in any of them. There is no recording.
- Folder rows that are already on screen move when the toggle flips and when a chat turns unread. That needs a recording.
- Smallest fix: from this head, attach (a) a screenshot of the open menu with the toggle on and the whole note visible, (b) a still or short clip of a sibling folder drag with the toggle on, and (c) a short recording of the folders reordering when the toggle flips and when a chat turns unread.
Optional:
- With the option on, dropping a folder among its siblings does nothing, and nothing on screen says why. The only explanation is the note inside the closed menu. You could show a status line at the drop instead of suppressing the reorder hint.
- The body's Tests section lists 5 cases. The file now has 8, including the picker test and the mid-drag test. Please refresh the list, the count, and the mutant results.
- #13410 is still labelled parked and needs-human. A maintainer should post on the issue whether this option is wanted, and how it should behave when a chat is opened. That also settles item 1.
|
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Thanks for the native board-card freeze. It works and has its own test. One thing still blocks this head.
- The UX review still cannot evaluate this head because evidence is missing (
website/src/pages/chat-sidebar/SearchDock.tsx:645).- Trigger: a reviewer checks the note under the ticked toggle ("Folders cannot be dragged into place while this is on"), and checks that folder rows on screen re-sort when the toggle flips or a chat turns unread.
- Outcome: no evidence covers either. The body still has only the four original screenshots. The "menu on" image is cut off at the toggle row, so the note is in none of them, and there is no recording. The UX review on 6ed4ad3 is a BLOCK for this reason, and this repo's review rules treat a verdict that missing evidence prevents as a BLOCK.
- Smallest fix, no code change needed: from this head, attach (a) a screenshot of the open menu with the toggle on and the whole note visible, and (b) a short recording of the folders reordering when the toggle flips and when a chat turns unread while it is on. Then let the UX review run again.
Follow-up on my earlier review at 4d89aca:
- Item 1 (a lifted folder drops back as soon as its unread chat is opened): still stands. This head adds no hold for the active chat's folder, and every case in
ChatSidebar.folderUnreadFirst.test.tsxstill renders withactiveSlot={null}. The behaviour matches the PR's own wording, so this is a product question. Can a maintainer say on #13410 whether dropping back on open is intended? If it is not, keep the active chat's folder chain in the drawn snapshot and add a render test that fails without that hold. - Item 2 (missing screenshot and recording): still stands. It is item 1 above.
Optional:
- The de, es, fr and ru translations of the note say folders cannot be dragged at all. A folder can still be dragged to move it into another folder. Please re-translate from the current English source.
- The body's Tests list and mutant counts describe an older head. The file now has more cases, including the picker, dnd-kit freeze and native freeze tests, and the body does not mention the drag-time unread snapshot.
- #22596 adds a second toggle in the same Folder order block, stored as a workspace setting. The two PRs will conflict, and the menu would mix a per-browser toggle with a workspace one.
|
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Thanks for the hover freeze. It holds the order under a mouse or pen pointer, and each freeze source has its own test that goes red without it. One thing still blocks this head.
- The UX review still cannot evaluate this head because evidence is missing (
website/src/pages/chat-sidebar/SearchDock.tsx:645).- Trigger: a reviewer checks the note under the ticked toggle ("Folders cannot be dragged into place while this is on"). They also check that folder rows re-sort on screen when the toggle flips, and when a chat turns unread and the pointer then leaves the list.
- Outcome: no evidence covers either check. The body still has only the four original screenshots. The "menu on" image is cut off at the toggle row, so none of them shows the note, and there is no recording. The UX review on 1387f80 says "cannot evaluate". It shows as PASS only because its BLOCK had no Trigger and Outcome lines. This repo's review rules say a verdict that missing evidence prevents is a BLOCK, not a pass. The new hover, drag and board-card freezes have no rendered evidence at all.
- Smallest fix, no code change needed: from this head, attach (a) a screenshot of the open menu with the toggle on, tall enough to show the whole note, and (b) a short recording of the folders re-sorting when the toggle flips, and of a folder moving up after a chat turns unread and the pointer leaves the list. Then let the UX review run again.
Follow-up on my earlier reviews at 4d89aca and 6ed4ad3:
- A lifted folder drops back when its unread chat is opened: partly fixed. With a mouse or pen, the hover freeze now holds the order while the pointer is over the list. On a touch tap, pointerleave fires before click, so the freeze is already off when
switchSlotmarks the chat read (ChatSidebar.tsx:1017,SessionRow.tsx:1493). The same happens with a keyboard open while the pointer is outside the list. Whether that is acceptable is still a product question for a maintainer on #13410. I am not blocking on it here. - Missing screenshot and recording: still stands. It is item 1 above.
Optional:
- The body's "What changed" section does not mention the hover and drag freeze. The Tests list and mutant counts also describe an older head; the test file now has 10 cases.
docs/feature-map/README.md:107still says "a person and an agent see the same tree".config.md,mcp.mdand thechat_folder_treedescription now say the sidebar may lift unread folders, so that sentence could say the same.listHoveredis set on every pointer enter and leave, even with the option off, which re-renders the sidebar for nothing. Setting it only whilefoldersUnreadFirstis on would avoid that.
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
This head is a rebase of 1387f80 with no code change, so the one blocking item from my last review still stands.
- The UX review still cannot evaluate this head because evidence is missing (
website/src/pages/chat-sidebar/SearchDock.tsx:645).- Trigger: a reviewer checks the note under the ticked toggle ("Folders cannot be dragged into place while this is on"). They also check that folder rows re-sort on screen when the toggle flips, and when a chat turns unread and the pointer then leaves the list.
- Outcome: no evidence covers either check. The body still has only the four original screenshots. The "menu on" image is cut off at the toggle row, so the note is in none of them, and there is no recording. The UX review on d4d09a8 says "cannot evaluate". It shows PASS only because its BLOCK had no Trigger and Outcome lines. This repo's review rules say a verdict that missing evidence prevents is a BLOCK, not a pass.
- Smallest fix, no code change needed: from this head, attach (a) a screenshot of the open menu with the toggle on, tall enough to show the whole note, and (b) a short recording of the folders re-sorting when the toggle flips, and of a folder moving up after a chat turns unread and the pointer leaves the list. Then let the UX review run again.
Follow-up on my earlier reviews at 4d89aca, 6ed4ad3 and 1387f80:
- Missing screenshot and recording: still stands. It is item 1 above.
- A lifted folder drops back when its chat is opened by a touch tap or the keyboard: unchanged. This is still a product question for a maintainer on #13410, and I am not blocking on it here.
The code review found no correctness or security defect on this head. The failing Backend Tests shard 6 test checks dashboard server files that this PR does not touch, and it fails the same way on main. Analyze (python) failed on a rate limit.
Optional:
docs/feature-map/README.md:107still says "a person and an agent see the same tree". The new clause also sits right before "Search Folders lists in the same order", which now reads as the unread-first order. The PR's own Not a goal says the Command Bar keeps the stored order.- The de, es, fr, ru and ja copies of the note say folders cannot be dragged at all. Dragging a folder into another folder still works. The English "cannot be dragged into place" is accurate.
- No test flips the toggle while the pointer is over the list, which is the normal case because the menu sits inside the list region. Removing the null-check clause at
ChatSidebar.tsx:468leaves all 10 tests green.
Code change approver recommendation: A person should decideWhy: the decider estimates a 10% chance that this change introduces a defect, within the 12% limit for approving on its own, but it changes 514 lines, more than the 400 it may approve on its own. Opt-in, browser-local view that draws folders with unread chats first. Verified against the code: the comparator only wraps the mode order and never writes folder An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit |
|
Status on head 707f84d: UX, design and first-principles lanes PASS with the attached screenshot and GIF. Two reds are not from this PR:
|
|
Review-ready on head 93bad8a (rebased onto main b677e0d, which carries the #36315 fix). All 97 checks pass and PR Readiness passes. The UX, Design and First Principles lanes PASS. The UX lane read the attached screenshot (toggle on, with the full note) and the GIF of folders re-sorting. GPT and Opus are fresh on this head. There are 0 unresolved threads. The reds earlier on this head were the GitHub installation rate limit; each lane was rerun once after the reset. @KiroCrewCaptain your blocking item was the missing UX evidence. It is now attached. @buluoray could you take another look? Both CHANGES_REQUESTED reviews are the only gate left. |
|
This PR needs a maintainer before it can merge. The code review on this head found no blocking defect, but three things are still open:
Follow-up on my earlier review at d4d09a8:
What the review checked on this head:
Well done: the view wraps the mode comparator, so turning it off gives back the stored order exactly, and a test proves no folder or folder mode is written. Optional:
|
buluoray
left a comment
There was a problem hiding this comment.
Approve on ddc92ca. This PR adds an opt-in toggle, "Move folders with unread chats to the top", to the sort-and-filter menu under Folder order. It is off by default and kept in this browser only. When it is on, folders that hold an unread chat are drawn first, newest unread first; every other folder keeps the stored order. Nothing writes a folder's stored position or the folder mode, so turning it off gives back the old order exactly. The blocking point from my last review is fixed for a mouse or pen: while the pointer is over the list, or a drag runs, the drawn order is held, so the folder you just opened no longer jumps away. Each hold has its own test, and removing any one of them turns that test red. The maintainer has decided to take this now and to treat the remaining case as a known limitation: a folder can still drop back when its chat is opened by a touch tap, or from the keyboard while the pointer is outside the list. That case and the small follow-ups (the Italian and Portuguese drag notes, a test for the stored order in the filter menu's folder list, one menu picking a subfolder in drawn order, and the history spec's list of storage keys) are tracked in #36879. I found no correctness or security defect. This supersedes my change request at 9f5b138. Decisive lines: website/src/pages/ChatSidebar.tsx:455-467, website/src/pages/ChatSidebar.tsx:1059, website/src/pages/chat-sidebar/filters.tsx:244, issue #13410 (labels needs-human, parked, tier:T2)
Problem / Motivation
Goal: Let a person choose to see sidebar folders that hold unread chats at the top, without ever changing their saved folder order.
With many folders, a folder that just got an unread reply can sit far down the list. Today the only way to find it is to scroll or turn on the Unread filter, which hides everything else.
Why it matters
People who file chats into many folders miss replies in folders below the fold. An opt-in "unread first" view brings those folders up while leaving the manual order (and #13321's deterministic order) untouched for everyone else.
Not a goal
chat_folder_treeMCP tool, the folder pickers and the Command Bar keep listing indashboard.folder_sortorder. A shared server setting (the route PR feat(dashboard): setting to hide the unread dot on session cards #25757 took) was the larger option and was not picked.What changed (motivation → approach → change)
Decision (★A, the most conservative option), also posted on the issue: one toggle, off by default, display only.
mc-sidebar-folders-unread-firstin localStorage), like the other sidebar view choices in that menu.parent_idloop cannot hang the walk.pages/chat-sidebar/unreadFolderFloat.ts), used for the tree and board folder rows inChatSidebar.tsx. It writes no folderorderand nodashboard.folder_sort. The new-chat folder picker and ⌘K Search Folders keep the stored order.chat_folder_treecannot read a browser setting, so its description (src/kiro_crew/mcp_dashboard.py) says the sidebar may draw unread folders above the listed order. The config spec,docs/architecture/mcp.mdand the feature map say the same.website/src/i18ncatalog (en.manual.json, translations, regenerateden-XA.json).Backwards compatibility
Compatible: the option is new and off by default, so the sidebar draws exactly as before until someone turns it on.
Removes nothing: no key, field, route or behaviour is removed; reordering is only paused while the new opt-in view is on.
Tests
website/src/test/ChatSidebar.folderUnreadFirst.test.tsx(11 cases):patchConfigare never written;parent_idloop ends.ChatSidebar.ownerComposition.test.tspins the hook order, including whereuseNativeSessionDragnow runs.Mutant proof (manual, frontend), each turns its own test red: the mode comparator in place of the unread one; removing
&& !foldersUnreadFirstfrom the reorder gate; dropping each freeze source (dnd-kit drag, native board-card drag, list hover); dropping the on/off clause of the freeze, which leaves "flipping the toggle while the pointer is over the list" red.Proof: not provable -- frontend test (prove.py runs Python only)
Also green:
ChatSidebar.ownerComposition.test.ts,tsc -p tsconfig.app.json, eslint on the touched files,npm run i18n:check.Manual verification
Ran the built SPA in Playwright behind the repo's loopback static server, with
/api/**answered from fixtures and the dashboard websocket held by the script. Four folders in stored order Alpha, Bravo, Charlie, Delta; Delta holds an unread chat. Every step below was asserted on the drawn folder order:Screenshots / video
The menu with the toggle on and its whole note:
The flow above, one frame per step (1.8 s each):
Earlier stills: setting off and on, and the menu
Related Issues
Closes #13410
Related: #13321 (deterministic folder order; untouched while this option is off).
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.