Skip to content

feat: add a setting that hides empty session folders in the sidebar - #31417

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
fix/16046-hide-empty-folders
Nov 17, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
fix/16046-hide-empty-folders

Conversation

@bolichen97

@bolichen97 bolichen97 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Let a person hide the session folders that hold no sessions from the dashboard sidebar, through a setting that is off by default.

Empty folders stay in the sidebar and push the folders that hold work further down. Closing or cleaning up sessions makes it worse: the sessions go, the folders stay. Today the only ways out are to delete the folders (Clean up empty folders, which also drops their settings), to shrink each one to a single row (Compact Empty Folders), or to use Hide when empty one folder at a time, and only on a folder that has an archived session.

Why it matters

Someone who keeps one folder per project or topic scans past a long tail of empty folders to reach the few with sessions in them. Hiding them keeps the list short without losing the folders or their settings, and the folder is back the moment a session lands in it.

Not a goal

  • Changing the default. The setting is off, so nothing changes for anyone who does not turn it on.
  • Hiding empty folder headers in board columns, which stay there on purpose as drop targets.
  • Changing Compact Empty Folders, Hide when empty or Clean up empty folders.
  • Syncing the setting between browsers. It lives in the browser's chat settings, like its neighbours.

What changed (motivation → approach → change)

A new toggle, Settings → Chat → Sessions → Hide Empty Folders, off by default, keeps empty folders from pushing the ones that hold sessions down the list. With it on, the List view:

When The sidebar list
a folder's subtree holds no open session leaves the folder out
a session is created in it or moved into it draws it again
a session is being dragged draws every folder, the empty ones as a single row, so each is still a drop target
a folder was just created scrolls to it, flashes it and keeps it shown for this visit

The approach reuses the hide the sidebar already has instead of adding a second one. Hide when empty is decided by folderIsHidden in utils/folderVisibility.ts, against the set of folders whose subtree holds an open session. The setting is a second reason for that same rule, so a folder with a session in it is never hidden, a folder reveal (the Command Bar's Search Folders, a folder chip in chat) still overrides it, and the Move to folder menus still list every folder.

The value is stored as hideEmptyFolders in the browser's mc-chat-config (pages/chat/ChatSettings.tsx) and read as false unless it is a real boolean; the toggle is in pages/settings/ChatPanel.tsx. useBoardColumns (chat-sidebar/board.ts) reads it next to hideEmptyFolderBody, so flipping it reshapes an open sidebar at once, and hands it on as off while the board is shown, whose columns draw every folder either way. pages/ChatSidebar.tsx hands it to useFolderVisibility (chat-sidebar/folders.ts) switched off while a session drag is in flight, which is why the activeDrag state now sits above that call; chat-sidebar/folderBlocks.tsx draws the folders that drag brings back without a body, so the list moves one row per folder under the pointer instead of two. It still moves: a session dropped where it was picked up can land in a folder that slid under it, and the undo bar every drag-move shows puts it back. The create modal (chat-sidebar/folderModal.tsx, reading it through chat-sidebar/scope.ts) already revealed a new subfolder; it now reveals every new folder while the setting is on, because a new folder is empty and would otherwise vanish as it is made. While the setting is on, a reveal (chat-sidebar/reveal.ts) adds to the folders it keeps shown for the visit instead of replacing them, so creating a second folder does not take the first one away; with it off, a reveal replaces the last one, as it does today.

The label and its hint ship in all 12 languages (i18n/locales/*.json, en-XA.json regenerated). The generated settingsRegistry.gen.ts, settings-registry.generated.json and ui-index.generated.json are regenerated, and the feature map row for session folders names the toggle.

Builds on #17747 by @chenmingwei23.

Backwards compatibility

Compatible: hideEmptyFolders is a new optional key in the browser's own chat settings; it defaults to false and anything that is not a boolean reads as false, so every sidebar renders as it does today until someone turns it on.

Removes nothing: no folder, session, setting, key or function is removed. With the opt-in on, an empty folder is only left out of the list: it is still stored, still offered by every Move to folder menu and folder search, and drawn again as soon as a session is in it or one is dragged.

Tests

  • website/src/test/ChatSidebar.hideEmptyFolders.test.tsx (new) renders the real sidebar with the setting on and pins each row of the table: an empty folder is not drawn and is drawn once a session moves in; every folder is drawn while a session is dragged, the empty one without a body (the real drag handlers, with the DndContext stubbed the way ChatSidebar.dragFreezeOrder.test.tsx does), and it goes again after the drop; two folders created one after the other through the real create modal both stay on screen; on the board, a failed create in an empty folder shows its error once; with the setting off an empty folder is drawn with its body, and revealing a second folder hidden by Hide when empty hides the first one again, as it does today. Each assertion was checked to fail with its production change reverted.
  • website/src/test/folderVisibility.test.ts: the existing folderIsHidden cases pass the now-required hideEmpty argument as false.
  • website/src/test/ChatSettings.test.tsx: hideEmptyFolders defaults off, a stored "yes" reads as off, a stored true reads as on.
  • Determinism: both files ran 20 times at --maxWorkers=1, each run in a shuffled order with a printed seed (--sequence.shuffle --sequence.seed=<n>), all green.
  • Related specs: scripts/run_scoped_tests.py on a Linux host (Ubuntu 24.04) ran the 739 frontend test files the diff selects (all 17,490 tests pass) and its 1,330 backend test files (64,959 pass). Two backend tests fail there, and fail the same way on a clean main checkout on that host: the Continue with GitHub case of test/test_find_ui_auto.py (test_find_ui_auto: the Continue with GitHub golden fails wherever the generator runs #32670) and test/test_host_git_repo_exec_neutralization.py::TestCliUpdate::test_up_to_date_diff_runs_no_textconv_planted_during_the_fetch.

Manual verification

Against an isolated gateway on loopback running this change at a7d3608fb9 (backend and built frontend), seeded with the rich fixture plus seven folders: two empty ones, Ideas and Old project, and five that hold two sessions each, so the list is taller than the sidebar. Driven by headless Playwright in light and dark, every state asserted before its frame was taken:

  • setting off: Demos, Ideas and Old project are all drawn;
  • setting on: Ideas and Old project are left out, the folders with sessions stay;
  • setting on, a folder created through the New ▾ → New folder modal: the sidebar scrolls down to it, flashes it, and it is still drawn, empty, after the flash ends, while Ideas and Old project stay hidden;
  • setting on, a session picked up and dragged: Ideas and Old project are back as one-row drop targets; cancelling the drag hides them again and moves nothing;
  • Settings → Chat → Sessions shows Hide Empty Folders under Compact Empty Folders.

The same checks against an isolated gateway on a Linux host (Ubuntu 24.04, headless Chromium) running this change on main at c8f6d621d6: without it there is no Hide Empty Folders row and an empty folder is drawn; with the change the row is under Compact Empty Folders and off, turning it on leaves the empty folder out while the folder with a session stays, turning it off brings it back, and with it on a folder made through New ▾ → New folder stays drawn although it is empty.

Screenshots / video

Sidebar, setting off (today's sidebar): the two empty folders are drawn.

setting off, light

setting off, dark

Sidebar, setting on: only the folders that hold sessions are drawn.

setting on, light

setting on, dark

Setting on, a folder just created with New ▾ → New folder: the sidebar has scrolled down to Q4 planning and flashes it.

new folder flashed, light

new folder flashed, dark

The same folder a few seconds later: the flash is over and the empty folder stays on screen for this visit.

new folder kept, light

new folder kept, dark

Setting on, while a session is dragged: the empty folders are back as one-row drop targets.

dragging, light

dragging, dark

The toggle in Settings → Chat → Sessions:

settings toggle, light

settings toggle, dark

Related Issues

Closes #16046

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.

@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 6, 2026 12:43
@bolichen97
bolichen97 requested a review from Zedmor November 6, 2026 12:43
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 45442c8ef7899a7188b1debe6b2fb5bf27deb299 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the opt-in setting reuses the existing folderIsHidden rule, adds a browser-local key that defaults off, and comes with rendered evidence.

Notes

  • With the setting on, folders revealed in a visit now add up and are never cleared until the component unmounts (setRevealForcedVisible(prev => (hideEmptyFolders ? new Set([...prev, ...chain]) : chain))). After a long session of reveals and folder searches, the empty folders you looked at stay shown. That is a reversible annoyance. If you want to bound it, add only the folders created during the visit, not every reveal.

[DESIGN-REVIEWED] 45442c8

Description read

[DESCRIPTION-READ] b5da4a790349478c0a737019db87aea058ed219ec10c2e3e63003722a6faa968

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 45442c8ef7899a7188b1debe6b2fb5bf27deb299 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks. The toggle is off by default, it reuses the existing folderIsHidden hide instead of adding a second one, and every rider only acts while the setting is on.

What this change ships

Inventory (7 items) — 7 justified

Intent: let a person keep empty session folders out of the sidebar list without deleting them or their settings. This is an ADDITION.

  1. New Settings → Chat → Sessions → Hide Empty Folders toggle, off by default — justified
  2. With it on, List view leaves out folders whose subtree holds no open session, and draws them again when a session lands — justified
  3. With it on, dragging a session brings every folder back as a drop target — justified
  4. Folders a drag brings back draw as one row instead of two — justified
  5. With it on, a newly created top-level folder is revealed, scrolled to and flashed — justified
  6. With it on, folder reveals add up for the visit instead of replacing the last one — justified
  7. New browser-local mc-chat-config key hideEmptyFolders; anything that is not a real boolean reads as off — justified

[FIRST-PRINCIPLES-REVIEWED] 45442c8

Description read

[DESCRIPTION-READ] 7ce911d712bb44f58407c5bd7a42c557416ef5b40a357d57424122305d4bc72f

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of 45442c8ef7899a7188b1debe6b2fb5bf27deb299 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing blocks. The blind reader read "Hide Empty Folders" correctly, was sure of it and would use it. The screenshots show it off, on, during a drag and after a folder is created.

Notes

  • The blind reader couldn't tell "Hide Empty Folders" from "Compact Empty Folders" or say which wins when both are on. Start the new hint with how they combine, e.g. "Leaves folders with no open sessions out of List view. Overrides Compact Empty Folders, except while you drag a session." Drop the "until a session is created or moved into them" clause, since the label already implies it.
  • In shots 5–8, the newly created "Q4 planning" folder stays visible with the setting on. The reader asked "no idea why it is outlined" and thought it "broke the rule". Consider a one-time inline line under a just-created folder while the setting is on, e.g. "Empty folders are hidden. This one stays until you leave."

[UX-REVIEWED] 45442c8

Description read

[DESCRIPTION-READ] fe49e3dbb0aa2aa9f8e34b44752ecab680e08ff25aa247ab87c8df8324cfe6ff

That sha256 names everything this verdict read: the PR description, plus the 15 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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 45442c8ef7899a7188b1debe6b2fb5bf27deb299 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 45442c8

Verdict parsed from the review's SHA-scoped output markers for commit 45442c8ef7899a7188b1debe6b2fb5bf27deb299.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 45442c8ef7899a7188b1debe6b2fb5bf27deb299 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 45442c8ef7899a7188b1debe6b2fb5bf27deb299 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 45442c8

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 45442c8ef7899a7188b1debe6b2fb5bf27deb299 false-positive: <reason, 20 to 500 characters>

@bolichen97
bolichen97 enabled auto-merge (squash) November 6, 2026 13:13
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: checking Automated validation is still running labels Nov 6, 2026
buluoray
buluoray previously approved these changes Nov 6, 2026

@buluoray buluoray left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Kiro Crew Auto-Pipeline [operator: buluoray]:

APPROVE

What it does for users: a new toggle, Settings → Chat → Sessions → "Hide Empty Folders", off by default. With it on, the List view leaves out every folder whose subtree holds no open session. A folder comes back once a session is in it. While a session is dragged, every folder comes back as a one-row drop target. A newly created folder stays shown for the visit.

Checks:

  • Default off equals main. DEFAULTS sets hideEmptyFolders false, and loadChatConfig reads anything but a real boolean as false (ChatSettings.tsx). With false, folderIsHidden reduces to the old rule, !!hidden && !active (utils/folderVisibility.ts). The empty-body change in folderBlocks.tsx and the new-folder reveal in folderModal.tsx are both gated on the setting. Board columns are untouched, because the board lane deliberately does not read isFolderHidden.
  • A hidden empty folder stays reachable for drag-drop. useFolderVisibility gets hideEmptyFolders && activeDrag?.type !== 'session' (ChatSidebar.tsx). To pass that, the activeDrag state moved above the call. Move to folder menus and the Command Bar folder search still list every folder, and a folder reveal overrides the hide.
  • A hidden empty folder stays reachable for creation. A folder made in the create modal is revealed whenever the setting is on (folderModal.tsx). The reveal now adds to the set of folders kept shown for the visit instead of replacing it (reveal.ts), so a second create does not hide the first.
  • The UI copy is one sentence, present in all 12 locales, and true.

Evidence:

  • ChatSidebar.hideEmptyFolders.test.tsx, folderVisibility.test.ts and ChatSettings.test.tsx: 58 passed.
  • Mutation: I removed the drag exception, so empty folders stayed hidden during a session drag. That reddened "draws every folder while a session is dragged".
  • CI on this head: 84 success and 9 skipped check-runs, no failures. PR Readiness is success. The Design, First Principles, UX and Opus lanes pass. GPT 6.1 raised one blocking finding, which adjudication downgraded (see follow-up 1). git merge-tree against main exits 0.
  • The screenshots (setting off, setting on, mid-drag, the toggle) match the code.

Source-only: the Playwright run in the description. I did not rerun it.

Non-blocking follow-ups:

  1. The GPT 6.1 finding is real but limited to the opt-in. Starting a session drag draws the empty folders, which shifts the rows. A session released where it was picked up can then land in a folder that slid under the pointer. The undo bar reverses it, and the description says so plainly. A way to reveal drop targets without moving existing rows would close it.
  2. Only session drags bring empty folders back. A folder drag, used to nest a folder, does not, so an empty hidden folder cannot be a nesting target by drag. The ⋮ Move folder to menu still works.
  3. The reveal.ts change also applies with the setting off. For folders marked "Hide when empty", earlier reveals in a visit now accumulate instead of being replaced. This is harmless (those folders stay shown a little longer), but the description does not mention it.

@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in docs/feature-map/README.md, src/kiro_crew/docs/ui-index.generated.json, src/kiro_crew/docs/settings-registry.generated.json, website/src/components/commandPalette/settingsRegistry.gen.ts, website/src/pages/ChatSidebar.tsx, website/src/pages/chat-sidebar/folderBlocks.tsx, website/src/pages/chat-sidebar/scope.ts and the 13 website/src/i18n/locales catalogs since this head went green (07ab5da -> 594344f); CI re-running.

The branch conflicted with main. The feature-map Session folders row now keeps main's new "Close sessions and delete…" text alongside this PR's Hide Empty Folders text. The find_ui index was regenerated, and the settings registry regenerates byte-identical. The change itself is the same as the reviewed commit.

[operator: bolichen97]

@github-actions github-actions Bot added readiness: checking Automated validation is still running merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: action required A blocking check or review needs attention and removed readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Nov 7, 2026
@bolichen97
bolichen97 force-pushed the fix/16046-hide-empty-folders branch from 9c531fa to 4d8e578 Compare November 7, 2026 06:18
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in docs/feature-map/README.md, src/kiro_crew/docs/ui-index.generated.json, src/kiro_crew/docs/settings-registry.generated.json, website/src/components/commandPalette/settingsRegistry.gen.ts, website/src/pages/ChatSidebar.tsx, website/src/pages/chat-sidebar/board.ts, website/src/pages/chat-sidebar/folderBlocks.tsx, website/src/pages/chat-sidebar/scope.ts, website/src/pages/chat/ChatSettings.tsx, website/src/pages/settings/ChatPanel.tsx and the 13 website/src/i18n/locales catalogs since this head went green (594344f -> 8544127); CI re-running.

The branch conflicted with main: #31407 added the sibling "Include Subfolder Contents in Folder Counts" setting in the same places (the chat config type, its defaults and coercion, useBoardColumns, the sidebar scope, the Settings toggles, the locale catalogs and the feature-map Session folders row). Both settings are kept side by side: Hide Empty Folders stays right after Compact Empty Folders in Settings, and the feature-map row carries both texts. The find_ui index was regenerated, and the settings registry regenerates byte-identical. The change itself is the same as the reviewed commit.

[operator: bolichen97]

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Nov 7, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased to clear a merge conflict in src/kiro_crew/docs/ui-index.generated.json (a6106fc -> 9310d4b, onto 296017c); CI re-running. Only the generated index changed; the rest of the diff is byte-identical to af4ce42, which passed local Opus review. The local gate passed on 9310d4b.

[operator: bolichen97]

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Nov 8, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

/ai-review override gpt 9310d4b owner-decision: maintainer ruling: keep the drag behaviour. The setting is opt-in and off by default, and a misplaced drop can be undone by dragging the session back, as the posted disposition explains.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

AI-review override not recorded: class owner-decision needs a link to the owner's decision comment (https://github.com/<owner>/<repo>/pull/<n>#issuecomment-<id>) in the reason. Use /ai-review override <fable|gpt|design|ux|first-principles|scope|all> <current-sha> <class>[ #N]: <reason, 20 to 500 characters>, where <class> is one of false-positive, not-applicable, pre-existing, evidence-supplied, infra-failure, reissue, deferred, owner-decision. What each class needs: docs/ci/ci-and-reviews.md#risk-release-records.

@bolichen97

Copy link
Copy Markdown
Contributor Author

/ai-review override gpt 9310d4b owner-decision: keep the drag behaviour; the setting is opt-in and a misplaced drop can be undone. Decision: #31417 (comment)

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Human judgment recorded

@bolichen97 recorded a owner-decision release (class owner-decision) for the gpt AI finding on 9310d4b07f39a236cc552797e388e2c2c8ba608f.

keep the drag behaviour; the setting is opt-in and a misplaced drop can be undone. Decision: #31417 (comment)

This decision applies only to this commit. A new push requires a new judgment.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention labels Nov 8, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

Re-sync budget reset

The base moved under this PR more times than the re-sync budget allows; a maintainer asked for one more round of re-syncs so it can be rebased and its conflicts resolved.

[operator: bolichen97]

@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in docs/feature-map/README.md, src/kiro_crew/docs/ui-index.generated.json, src/kiro_crew/docs/settings-registry.generated.json, website/src/pages/chat/ChatSettings.tsx, website/src/pages/ChatSidebar.tsx and the locale catalogs since this head went green (296017c -> 95b9c2b); CI re-running. The conflicts were the Session folders feature-map row, the generated find_ui index (regenerated) and the chat-settings defaults line (both new keys kept). The same push narrows one mechanism of this PR, answered in the disposition below.

[operator: bolichen97]

@bolichen97

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: reveal.ts made every folder reveal add to the folders kept shown for the visit, with the setting on or off
resolution: narrowed -- reveals add up only while Hide Empty Folders is on; with it off a reveal replaces the last one, as on main

fixed in 8d38d3f: a folder reveal adds to the folders kept shown for the visit only while Hide Empty Folders is on, which is what keeps every folder just created on screen; with the setting off it replaces the last one, as on main, so nothing changes for anyone who leaves the setting off.
Pinned by replaces the last folder revealed when the setting is off in website/src/test/ChatSidebar.hideEmptyFolders.test.tsx, red with the unconditional form and green with the fix.
Retrospective for the pr-level repeat count (3 pushes after a blocked head, all re-syncs onto a moving main): this mechanism narrowed, every other one kept.

[operator: bolichen97]

@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in src/kiro_crew/docs/ui-index.generated.json, website/src/pages/chat/ChatSettings.tsx, docs/feature-map/README.md, src/kiro_crew/docs/settings-registry.generated.json, website/src/components/commandPalette/settingsRegistry.gen.ts, website/src/pages/settings/ChatPanel.tsx and the locale catalogs since this head's CI ran (95b9c2b -> 65bdd09); CI re-running. GitHub reported the branch as conflicting, and that head's review lanes had errored on an API rate limit, so it never got a verdict. The ChatSettings.tsx defaults conflict kept both sides (main's widenTables next to this PR's hideEmptyFolders), and the generated find_ui index was rebuilt from the merged tree with npm run gen:ui (--check is clean). The new head also carries one change made since 8d38d3f: while the board is shown, useBoardColumns hands Hide Empty Folders on as off, so a failed create in an empty folder on the board shows its error once instead of twice. A new test pins that, and it fails with that line reverted. Locally: tsc, eslint, the static gates, semgrep (0 findings) and the 251 frontend and 24 backend related test files all pass.

[operator: bolichen97]

@KiroCrewCaptain

KiroCrewCaptain commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: A person should decide

Why: the decider thinks the change is probably fine but estimates an 18% chance that this change introduces a defect, above the 12% limit for approving on its own.

An opt-in setting, off by default and stored as a real boolean only (anything else reads as false), that adds a second reason to the existing folderIsHidden rule. With it off, folderIsHidden behaves as before and reveals still replace each other; the new tests pin both. Every reader of isFolderHidden (sidebar search matching, the hidden-folder rows and count, the root folder lanes, the folder blocks) takes the new reason through the same path Hide when empty uses. The setting is forced off on the board, which matches how renderedLane picks the board lane. Folder creation from the sidebar modal reveals the new folder, and seedCreatedChatFolder puts it in the cache before the reveal looks it up. The drag state goes through one set/reset path, so empty folders come back on a session drag and hide again on end or cancel. Tests cover each behaviour added. The pointer-shift on drag is disclosed, can be undone, and the owner accepted it on an earlier commit. No regressions, data loss or trust-boundary issues found.

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 e773f75169 · 391 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in src/kiro_crew/docs/ui-index.generated.json, src/kiro_crew/docs/settings-registry.generated.json, website/src/components/commandPalette/settingsRegistry.gen.ts, website/src/pages/chat/ChatSettings.tsx, website/src/pages/settings/ChatPanel.tsx, docs/feature-map/README.md and the locale catalogs since this head's CI ran (65bdd09 -> b152bc2); CI re-running. GitHub reported the branch as conflicting again, in the generated find_ui index only, and that head's review lanes had errored on an API rate limit, so it never got a verdict. The index was rebuilt from the merged tree with npm run gen:ui (--check is clean); every other file merged on its own, and the rest of the change is byte-identical to 81748e9. Locally: tsc, eslint, the static gates, semgrep, the flake-pattern ratchet and the 251 frontend related test files pass; of the 24 backend related files, two test/test_reveal_path.py tests fail only in the parallel run and pass when the file runs on its own (the change touches no Python).

[operator: bolichen97]

@bolichen97

Copy link
Copy Markdown
Contributor Author

Re-sync budget reset

GitHub reports this branch as conflicting with main again, and the base keeps moving in files this PR touches (the generated find_ui index and settings registry, the chat settings defaults and the locale catalogs). A maintainer asked for this PR to be kept green through its watch window, so the re-sync count restarts here and the branch is rebased to clear the conflict.

[operator: bolichen97]

@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in docs/feature-map/README.md, src/kiro_crew/docs/ui-index.generated.json, src/kiro_crew/docs/settings-registry.generated.json, website/src/components/commandPalette/settingsRegistry.gen.ts, website/src/pages/ChatSidebar.tsx, website/src/pages/chat-sidebar/scope.ts and the locale catalogs since this head's CI ran (b152bc2 -> 3703c2e); CI re-running.

GitHub reported the branch as conflicting again, in two files. In the feature map, main added a Sidebar session search row and reworded Folder search next to this PR's Session folders row: both of main's rows are kept as they are, beside this PR's edited row. The generated find_ui index was taken from main and rebuilt from the merged tree with npm run gen:ui (--check is clean), and the settings registry regenerates byte-identical. Every other file merged on its own, and apart from the regenerated index the change is line-for-line the same as dae7665.

That head's review lanes errored on an API rate limit and never reached a verdict. Its one test red, test_2000_submissions_all_complete_window_never_exceeds_64 timing out in Backend Tests (3.12, 4), is the flake tracked in #35370 (a fix is in review in #35441), recorded there; the diff changes no Python. Locally on this change: tsc, eslint, gen:ui --check, i18n:check, the static gates, semgrep and the flake-pattern ratchet pass, and so do the 244 frontend related spec files; of the 23 backend related files, one test/test_reveal_path.py test fails only in the parallel run and passes when the file runs on its own.

[operator: bolichen97]

buluoray
buluoray previously approved these changes Nov 11, 2026

@buluoray buluoray left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve on 08b10c9. 08b10c9 is a pure rebase of the approved head dae7665 onto 49 newer main commits. Every hunk is identical except the regenerated ui-index digest and counts (setting 322->323). Both generators report the committed files up to date, the PR's tests pass, the two guard mutations turn named tests red, and Opus and GPT both completed real reviews of this head with no findings. The earlier APPROVE carries over. Lead note (c141): the only red tests on this head are Backend Tests (3.12, 8) and Backend Tests (Windows) (8), and Coverage Gate fails closed behind them. Both shards fail on exactly two tests, test/test_mcp_remote_transport.py::TestRewriter::test_a_listed_remote_entry_passes_through_unwrapped and ::test_a_malformed_type_does_not_abort_the_rewrite (assert 0 == 1), and nothing else. Those two fail on main itself (issues #35534 and #35535) and this PR does not touch that code, so they do not count as a red test of this PR. Source for the two names: the check-run annotations of both shards, read at 20:2xZ; the raw job logs returned a GitHub server error twice and were not read. Decisive lines: website/src/utils/folderVisibility.ts:32, website/src/pages/ChatSidebar.tsx:443, website/src/pages/settings/ChatPanel.tsx:1118, src/kiro_crew/docs/ui-index.generated.json

@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in docs/feature-map/README.md, src/kiro_crew/docs/ui-index.generated.json, src/kiro_crew/docs/settings-registry.generated.json, website/src/pages/chat/ChatSettings.tsx and the locale catalogs since this head's CI ran (3703c2e -> 0feaa8b); CI re-running.

GitHub reported the branch as conflicting with main in two files. In website/src/pages/chat/ChatSettings.tsx, main added a reasoningStartsExpanded default on the same DEFAULTS line that carries this PR's hideEmptyFolders default: both are kept. The generated find_ui index was taken from main and rebuilt from the merged tree with npm run gen:ui (--check is clean), and the settings registry regenerates byte-identical. Apart from those two lines the change is line-for-line the same as 08b10c9.

The one test red on 08b10c9, two TestRewriter cases in test/test_mcp_remote_transport.py (Backend Tests shard 8 on Linux and Windows), was main's: #35535, fixed on main by #35541, which this rebase picks up. The diff changes no Python. Locally on this change: tsc, eslint, gen:ui --check, i18n:check, the static gates, semgrep and the flake-pattern ratchet pass, and so do the 252 related frontend spec files and the 24 related backend test files.

[operator: bolichen97]

@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in docs/feature-map/README.md, src/kiro_crew/docs/ui-index.generated.json, src/kiro_crew/docs/settings-registry.generated.json, website/src/components/commandPalette/settingsRegistry.gen.ts and the locale catalogs since this head went green (0feaa8b -> ff344c7); CI re-running.

GitHub reported the branch as conflicting with main in one file, the generated find_ui index (src/kiro_crew/docs/ui-index.generated.json). It was taken from main and rebuilt from the merged tree with npm run gen:ui (--check is clean); the settings registry, the locale catalogs and the feature map row merged without a conflict and keep every entry main has. Apart from the index's digest and counts, the change is line-for-line the same as 2524b52.

The one red on 2524b52, CodeQL Analyze (javascript-typescript), was its results upload hitting the API rate limit, not a finding. On a Linux host, on this exact tree before a clean replay onto 6 unrelated main commits: every local gate passes, and so do the 724 related frontend spec files and the related backend files, apart from two tests that fail the same way on a clean main checkout there (#32670 and a git fixture test); an isolated gateway run shows the toggle hiding and showing an empty folder.

[operator: bolichen97]

@bolichen97

Copy link
Copy Markdown
Contributor Author

Re-sync budget reset

GitHub reports this branch as conflicting with main again, in the generated find_ui index (src/kiro_crew/docs/ui-index.generated.json), and the base keeps moving in files this PR touches (that index, the settings registry, the feature map row and the locale catalogs). A maintainer asked for this PR to be kept green through its watch window, so the re-sync count restarts here and the branch is rebased to clear the conflict.

[operator: bolichen97]

@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in docs/feature-map/README.md, src/kiro_crew/docs/ui-index.generated.json, src/kiro_crew/docs/settings-registry.generated.json, website/src/components/commandPalette/settingsRegistry.gen.ts and the locale catalogs since this head went green (ff344c7 -> 51349e1); CI re-running.

GitHub reported the branch as conflicting with main in one file, the generated find_ui index (src/kiro_crew/docs/ui-index.generated.json). It was taken from main and rebuilt from the merged tree with npm run gen:ui (--check is clean); the settings registry, the locale catalogs and the feature map row merged without a conflict and keep every entry main has. Apart from the index's digest and counts, the change is line-for-line the same as 0e484f4. The new base also carries #36457, which fixes the mypy error main had in src/kiro_crew/cli_commands_memory.py.

Every red on 0e484f4 was CI's token hitting GitHub's API rate limit, not a finding. On a Linux host (Ubuntu 24.04), on this change over main at c8f6d62: every local gate passes apart from three reds that are not this change's (the two backend tests that fail the same way on a clean main checkout there, #32670 and a git fixture test; that mypy error, fixed by #36457; and bytecode the host's own test run left in an untracked cache), the 724 related frontend spec files pass (17,236 tests), and an isolated gateway run shows the toggle hiding and showing an empty folder and a new folder staying drawn.

[operator: bolichen97]

@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in docs/request-for-change/README.md, docs/feature-map/README.md and the locale catalogs since this head went green (51349e1 -> a45e97a); CI re-running.

The red Fast Gate on 3555744 was main's: its docs lint failed because docs/request-for-change/rfc-app-agent-tools-third-party-grant.md was not linked from any index, the same failure main's own Fast Gate had on 51349e1, and #36504 fixed it. Every other red on that head was CI's token hitting GitHub's API rate limit, not a finding. The feature map row and the locale catalogs merged without a conflict and keep every entry main has; the change is line-for-line the same as 3555744.

On a Linux host (Ubuntu 24.04), on this change over main at c22557c: every local gate passes apart from the two backend tests that fail the same way on a clean main checkout there (#32670 and a git fixture test); the 724 related frontend spec files pass (17,242 tests), 64,215 backend tests pass, and the docs lint is clean.

[operator: bolichen97]

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] Rebased onto current main to resolve the merge conflict in docs/feature-map/README.md, src/kiro_crew/docs/ui-index.generated.json, website/src/pages/ChatSidebar.tsx and website/src/pages/chat-sidebar/reveal.ts.

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed head 45442c8. The new opt-in setting adds one more reason to the existing folderIsHidden rule, so every reader of that rule (folder blocks, search hits, the hidden-folder count) picks it up the same way. With the setting off, nothing changes, and it is forced off on the board view, which draws every folder anyway. A new folder is in the cache before the reveal looks it up, so it stays visible after it is created. The PR's tests pass on this head. Reverting the hide rule, the drag gate or the reveal pile-up each turns a named test red, so the new tests really check the behaviour. CI is green and I found no wrong behaviour, crash or data loss, so nothing blocks.

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.

Option to hide empty session folders in the sidebar

3 participants