Skip to content

fix(files): reach folders past the project tree's 10,000-row cap - #20523

Merged
chenmingwei23 merged 1 commit into
mainfrom
fix/files-rail-past-tree-cap-16819
Oct 15, 2026
Merged

chenmingwei23 merged 1 commit into
mainfrom
fix/files-rail-past-tree-cap-16819

Conversation

@bolichen97

@bolichen97 bolichen97 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: On a project with more than 10,000 items, every folder can be reached from the Files rail.

The project tree listing stops at 10,000 rows (files and folders together, #16029). On a bigger project, a folder past the cap is not a row at all. The rail's name filter only searches the rows the tree holds, so that folder cannot be found or opened from the rail.

Why it matters

Large monorepos and non-git folders are exactly the projects where the Files rail is most useful, and there it silently loses folders. The Design and UX lanes on #16029 flagged it.

Not a goal

  • Raising or removing the 10,000-row cap, or changing how the whole listing spends it.
  • Changing the existing path and access checks of /api/project/tree.
  • Changing the folder tab (FolderPanel), which already sends a truncated tree's query to the search.

What changed (motivation → approach → change)

The cap hides folders, so the rail needs ways past it that do not raise the cap. The issue names three; this PR does the first two, which meet its acceptance (every folder reachable from the rail). Task 3, a folder-scoped "Search this folder", is split out to #20632.

  1. Per-folder listing. GET /api/project/tree takes an optional dir= and lists just that folder, same cap, paths still project-relative and the echoed dir redacted like every path. All the existing checks on path run first, unchanged. Then dir must be a plain relative path, link-free, strictly inside the project root, and not sensitive. Otherwise it is refused (403 dir_refused, 404 dir_not_found, both audited). The checked folder is then pinned through the shared pinned_fs.open_pinned_descendant_dir (_project_tree_pin; a descriptor walk refusing a link at every component, POSIX; Windows keeps that helper's documented by-name residual): the walk reads it only while it is still that folder, and git lists it from the project root with a literal pathspec instead of using it as the working directory, so an ancestor swapped for a link after the check reads nothing outside the project. Known limitation: on Windows, where git follows junctions, a folder listing takes that walk instead of git, so it does not honour .gitignore there (heavy tool folders are still skipped).
  2. Lazy loading (Project tree: reach folders past the 10,000-row cap from the Files rail #16819 Task 2, for the user browsing the rail's own tree who expands a cut folder in place; opening a separate folder tab loses the rail's tree, its expansion and its selection). Expanding a folder named in truncatedDirectories fetches its own listing, and the tree merges it in (pierre/treeFolderListings.ts, at most 20 per mount and 40,000 rows across them; a folder the bound drops while open is not reloaded until it is closed, so the bound cannot cycle). Folder listings are not polled on their own: each whole-tree poll that lands re-reads at most three of the loaded folders that are open, in turn (a change inside a folder past the cap is invisible to the whole listing), and Refresh re-reads them all. A listing whose latest read fails is named in a notice above the tree, also when its earlier rows are still shown, with its own Retry button. A folder that answers 404 gets "no longer exists" and one that answers 403 gets "can't be opened here: it's a link or a protected folder", each with dismiss and no retry, since none can change it. A 404 also re-reads the whole listing once, so the tree stops showing the deleted folder. This includes a folder opened through a folded chain row.
  3. Search past the cap. While the tree is truncated, the rail's name filter goes to /api/file-search (files and folders), under the folder tab's own note (search_beyond_tree): the same budgeted search, the same caveat. The cut tree's own matching files join its hits through the folder tab's own mergeTreeMatches, now shared in website/src/lib/treeSearchMatches.ts, also when the search fails. Its failure copy is the folder tab's own map, SEARCH_FAILURE_KEYS, moved into website/src/lib/searchErrorCause.ts beside its sibling maps so both surfaces read one copy. A folder hit opens that folder in the tree; a file hit opens the file.
  4. Badges. Row badges now ellipsize at their end instead of being clipped from the start on narrow (folded chain) rows (website/src/pierre/config.ts).

Files: backend in src/kiro_crew/dashboard/file_api/project_tree.py (re-exported from handlers/files.py), client in website/src/api/client/files.ts, rail in website/src/pages/chat/FileBrowserRail.tsx, tree in website/src/pierre/. Four new catalog keys (folder_listing_failed, folder_listing_retry, folder_gone, folder_refused) in website/src/i18n/locales/, translated in every shipped language. The spec paragraph in learn-cron-dashboard.md is updated. The ! config signal is website/src/pierre/config.ts: it adds one CSS rule so this one state row takes the pointer.

Backwards compatibility

Compatible: dir is a new, optional query parameter, and api.projectTree gets an optional second argument. A request without dir takes the same code path as before (the listing body only moved into _project_tree_listing). A gateway that ignores dir answers with the whole tree, which has no dir field, and the merge skips it.

Removes nothing: no route, key, field or check is removed or narrowed. The old row_truncated label stays for hosts with no folder search.

Tests

  • test/test_project_tree_folder_listing.py::TestProjectTreeFolderListing: a folder cut by the cap is listed on its own, inside a repo too. .., ../outside, a/../../outside, ./a, a//b, /etc, a/, a/. and a NUL are refused. A link out of the project is refused, and so is a path beneath it, with nothing outside read. TestProjectTreeFolderListingIsPinned: an ancestor swapped for a link to an outside folder right after the check lists nothing outside, on the walk (red without the pin) and on git. A sensitive folder is refused, a missing folder or a file gives 404, and an unknown project still gets 403 before dir is read.
  • website/src/test/treeFolderListings.test.ts: merge un-cuts a loaded folder, keeps a still-cut one cut, ignores another root, and bounds the listing count and the total rows (oldest dropped, newest kept), and un-cuts folders beneath a listed folder unless its listing cuts them again. A loaded folder that answers 404 or 403 is dropped and not reloaded until closed, while its notice stays until dismissed or a later load succeeds; a revealed folder is selected.
  • website/src/test/PierreWorkspaceTreeImpl.test.tsx ("folders past the row cap"): expand loads the folder and feeds its rows. A chain row loads it and keeps it open. An open loaded folder is re-read when the whole-tree poll lands, a closed one is not, and at most three per poll. A gone (404) or refused (403) folder is dropped with its notice kept until dismissed, and one that stays open is not reloaded (the test hangs in the reload loop without the guard). A reveal loads and expands, and tells the host it was consumed so a remount cannot replay it. A failed folder listing is named in a notice whose Retry re-reads it and clears it on success; a refused one has no Retry. A folder the 20-listing bound drops while still open is not reloaded on later store events (without the guard this test runs out of memory in the reload loop).
  • website/src/test/FileBrowserRail.test.tsx ("past the tree row cap"): a whole tree keeps the local filter. A truncated tree sends the query to the search, a file hit opens and a folder hit reveals. Rows the cut tree holds that the search missed join the hits, also when the search fails. A folder hit from a Windows gateway (backslash paths) reveals.

Determinism: the new frontend tests ran 3 times with --sequence.shuffle plus the three files together shuffled. All passed. test/test_project_tree.py and test/test_project_tree_folder_listing.py (split out of it for the file line cap) pass with -n 0 and -n 2.

Manual verification

Driven in Chromium with the real rail, tree and catalogs via website/capture/files-rail-past-tree-cap.html (/api/project/tree and /api/file-search stubbed at fetch). Each frame was reached by typing and clicking (website/scripts/capture-files-rail-past-tree-cap.mjs). Local gates: related backend tests ran. 18 failures are host-environment ones in test_acp_spawn_offload.py and test_auto_improvement_members.py, and the same 18 fail on a clean origin/main worktree. flake8, isort, black, mypy on the changed module, semgrep (diff-scoped), the flake ratchet, tsc, eslint and i18n:check (with I18N_BASE_REF=origin/main) are all clean. The clone has no git hooks installed, so no commit hook ran. Local AI review subagents were not dispatched; CI's review lanes are the review.

Screenshots / video

Cut tree, then packages expanded: its own listing brings the folders the cap hid.

light cut tree light folder loaded

A name query on a cut tree searches past the cap; clicking the folder hit opens it in the tree.

light name search light folder revealed

A folder still cut on its own listing keeps its limit row (main's wording).

light still cut

A cut folder that answers 404: its own notice says it no longer exists, with dismiss and no Retry, and the re-read tree no longer lists it. One that answers 403: its notice says it is a link or a protected folder, also dismiss only. A cut folder whose own listing fails: the notice above names it with its own Retry, the folder keeps its cut. The search in flight, and refused, with the tree's own matches kept.

light folder unavailable light folder refused light folder load failed light search pending light search failed

Dark theme, all frames

dark 01 dark 02 dark 03 dark 04 dark 05 dark 06 dark 06b dark 07 dark 08 dark 09

Related Issues

Closes #16819

Follow-up: #20632 (Task 3, folder-scoped "Search this folder", split out)

Pattern harvest

Not generalizable: a capped listing needing a per-part follow-up read is specific to this tree's 10,000-row budget.

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

@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners October 14, 2026 22:22
@bolichen97
bolichen97 requested a review from buluoray October 14, 2026 22:23
@bolichen97
bolichen97 enabled auto-merge (squash) October 14, 2026 22:23
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 14, 2026
@bolichen97
bolichen97 force-pushed the fix/files-rail-past-tree-cap-16819 branch 2 times, most recently from 4e16560 to a5cae18 Compare October 14, 2026 22:59
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] Rebased: main moved in website/src/i18n/locales/*.json and nearby docs since this head went green (a37cfae -> b3faf90); CI re-running.

@bolichen97
bolichen97 force-pushed the fix/files-rail-past-tree-cap-16819 branch from a5cae18 to d04d7b2 Compare October 14, 2026 23:22
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 9b5c1f7ffe922819a18fcdba35b363cd6d4bd0b9 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Check on Windows that expanding a cut folder still works there: it skips git, ignores .gitignore and spends the same 10,000-row cap.

[DESIGN-REVIEWED] 9b5c1f7

Description read

[DESCRIPTION-READ] f77c897150a5a4781abe12f1469466b4382dc3030d793932cd0d0f78ae642780

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 Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — 🟡 CONCERNS

UX-level review of 9b5c1f7ffe922819a18fcdba35b363cd6d4bd0b9 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: CONCERNS

Expanding a folded "packages / core" row splits it into separate rows with no visible link between the two forms, and the cut-folder row is clipped mid-sentence.

Watch

  • Folded row turns into a different shape. Expanding the folded row loads packages, and the tree swaps the one "packages / core" row for a "packages" row with core, zz-billing and zz-search under it (shot-01 → shot-02). The blind reader said: "I can't tell 'packages / core' on one row … apart from 'packages' with 'core' underneath … nothing tells me why it changes." Users hit this on every folded folder past the limit, so it is constant friction on the PR's main path. No recording was supplied, so a human should check that the change is followable. Smallest fix: keep the clicked row's place and selection when it splits, and attach a recording of the split.
  • Cut-folder note is unreadable. Under a loaded folder that is still cut, row_truncated shows as "Some ite…t of 10,000 items reached" (shot-05). The reader "can't read it whole" and was unsure whether it can be clicked. The PR fixes ellipsis for badges (config.ts) but not for this state row, which appears on every folder that hits the limit. Smallest fix: give state rows a short label (e.g. "More items not shown") or end-ellipsis them like the badges.
  • Refused notice contradicts the tree. "packages can't be opened here: it's a link or a protected folder" appears while "packages / core" is open with its files showing (shot-07). The reader called it "confusing that the message says packages can't be opened when I can see inside packages/core." The state is rare, but it erodes trust. Smallest fix: say what is missing, e.g. "Other items in packages can't be shown: it's a link or a protected folder."

Suggestions

  • NameSearchResults error: the reused "No access to this folder" leaves the reader unsure "whether the search finished or stopped partway" (shot-10). Name the folder, or add "Results may be incomplete" when merged tree rows are still listed.
  • NameSearchResults folder hit: the reader read the click as "opens that file or jumps to it in the list" and called it a guess. Add a "Show in tree" hint (a title or trailing text) on folder hits.

[UX-REVIEWED] 9b5c1f7

Description read

[DESCRIPTION-READ] 3c15850903b85c69bc9b88f7fbc5f0009aa40e6b88d217b8d7e0e9b9ecb1dc4f

That sha256 names everything this verdict read: the PR description, plus the 23 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 Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 9b5c1f7ffe922819a18fcdba35b363cd6d4bd0b9 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 9b5c1f7

Verdict parsed from the review's SHA-scoped output markers for commit 9b5c1f7ffe922819a18fcdba35b363cd6d4bd0b9.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 9b5c1f7ffe922819a18fcdba35b363cd6d4bd0b9: <one-sentence reason>

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 9b5c1f7ffe922819a18fcdba35b363cd6d4bd0b9 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 9b5c1f7

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 9b5c1f7ffe922819a18fcdba35b363cd6d4bd0b9: <one-sentence reason>

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — 🟡 CONCERNS

Premise-level review of 9b5c1f7ffe922819a18fcdba35b363cd6d4bd0b9 — 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/CONCERNS are advisory.

First-Principles-Verdict: CONCERNS

The poll that re-reads loaded folders goes past the Goal: it keeps folders fresh, while the Goal only asks that they be reachable. Refresh and re-expanding already re-read them.

Not justified as shipped

  • Item 4 — oversized: the Goal is "every folder can be reached from the Files rail", but the diff also ships "each whole-tree poll that lands re-reads at most three of the loaded folders that are open, in turn". That is a freshness mechanism, with its own rotation, guard and tests. Without it, a loaded folder updates on Refresh ("Refresh re-reads them all") or when it is closed and re-expanded, and no stale-folder report is cited.
    Subtraction: delete the poll-driven re-read rotation in PierreWorkspaceTreeImpl.tsx, so loaded folder listings are re-read only by Refresh, Retry or re-expanding.
    Clears when: the mechanism is removed, or a human amends the Goal.

What this change ships

Inventory (10 items) — 7 justified

Intent: let someone working on a project with more than 10,000 items find and open any folder from the Files rail. FIX.

  1. Expanding a folder cut by the cap loads its contents in place — justified
  2. /api/project/tree?dir= lists one folder, pinned, with checks and audit records — justified
  3. While the tree is truncated, the rail's filter searches the server, merged with the tree's own hits; a folder hit reveals it — justified
  4. Open loaded folders are re-read on whole-tree polls, at most three per poll — oversized
  5. Notices for failed, deleted or refused folder listings, with Retry or dismiss, and four new strings — justified
  6. A deleted folder triggers one re-read of the whole listing — justified
  7. Folder listings are capped at 20 per mount and 40,000 rows — justified
  8. On Windows, a folder listing uses the walk instead of git, so .gitignore is not honoured — justified
  9. Row badges ellipsize at their end instead of losing their start — rides along: a CSS fix for clipped badges
  10. The folder tab's search merge and failure copy move to shared lib/ modules — justified

[FIRST-PRINCIPLES-REVIEWED] 9b5c1f7

Description read

[DESCRIPTION-READ] de9520cb057fdde9e631fdda0d76b38800caa6599809c3802eb09a95b4c676e5

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 added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 15, 2026
@bolichen97
bolichen97 force-pushed the fix/files-rail-past-tree-cap-16819 branch from d04d7b2 to 63465a1 Compare October 15, 2026 00:43
@bolichen97

bolichen97 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] fixed

  • span=57d9f3fcb45e

Fixed in 63465a1: a folder the 20-listing bound drops while it is still open is recorded as evicted and is not auto-reloaded until the user closes it (a reveal still loads it), so eviction can no longer cycle.
Regression test does not reload a folder the listing bound dropped while it stays open (PierreWorkspaceTreeImpl.test.tsx): with the guard disabled the run runs out of memory in the reload loop; with it, the folder-listing request count stays flat across further store events.

@bolichen97

bolichen97 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] fixed

  • span=d22672f63209

Fixed in 63465a1: the action row now reads "Search this folder" (all 12 languages), short enough to render whole at rail width; the folder's own badge already says items are not shown. New frame light/dark-05 shows it untruncated.

@bolichen97

bolichen97 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] fixed

  • span=7071d268cde2

Fixed in 63465a1: the rail's search past the cap now says "Searching the whole project, including items not listed" (search_past_cap, no "filter" next to "search"), and shows no note when scoped to a folder, where the scope chip says where it searches.
The workspace notice and the folder badge are the existing #16029 wording for the same limit and are unchanged; the new row is an action, not a fourth description.

@bolichen97

bolichen97 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] rebutted

  • span=136619189ae6

Not introduced here: the chain-row badge clipping ("me items not shown") is Pierre's middle-truncation of the existing workspace_directory_truncated badge on main; this PR does not change the badge or its rendering.
Out of this PR's goal (reaching folders past the cap); left as-is.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] rebutted (Design PASS punchline: latency of sending name queries to /api/file-search)

The search runs only while the whole listing is truncated (or scoped to a cut folder) and the query is at least 2 characters, debounced 200 ms, capped at 50 rows; a whole tree keeps the instant local filter (test keeps a whole tree on the local filter).
It is the same bounded endpoint and deadline the folder tab already uses for a truncated tree (FolderPanel treeFiltersLocally), with the in-memory file index fast path when the index is ready; the local filter could not find those folders at all.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Oct 15, 2026
@bolichen97
bolichen97 force-pushed the fix/files-rail-past-tree-cap-16819 branch from 63465a1 to fa23c9d Compare October 15, 2026 01:17
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] fixed

  • span=6826882e4975

Fixed in fa23c9d: the rail note is now "The search also covers items not listed above" (search_past_cap), the same promise as search_beyond_tree, and the spec line no longer says "whole project".

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] fixed

  • span=a7dd5594cef1

Fixed in fa23c9d: the merged listings now have a total ceiling, MAX_FOLDER_LISTING_ROWS = 40,000 rows (foldersOverRowBudget, oldest dropped, newest kept), on top of the 20-listing bound; dropped folders reuse the evicted guard so they cannot reload in a loop.
Unit test foldersOverRowBudget drops the oldest listings past the row budget and always keeps the newest.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] fixed

  • span=0623f863e601

Fixed in fa23c9d: the rail's search hits are now joined by the cut tree's own rows whose name contains the query (folders and files, within the scoped folder when scoped), as the folder tab does.
Test adds the rows the cut tree already holds that the search missed (FileBrowserRail.test.tsx). A whole tree never reaches this path: it keeps the local filter.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] fixed

  • span=de709981fa7c

Fixed in fa23c9d: where the state row is the "Search this folder" action, the folder keeps its "some items not shown" badge while open, so the cut is still named next to the action (frame 05).

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] Rebased onto origin/main 8f07eea (head ecc702e); main touched the same locale catalogs (#20781). No change to this PR's own diff. Re-ran locally: i18n check, all i18n tests and PierreWorkspaceTreeImpl (1117 passed).

@bolichen97
bolichen97 force-pushed the fix/files-rail-past-tree-cap-16819 branch from ecc702e to 1268bbf Compare October 15, 2026 13:09
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] fixed

  • span=cbcc034c4f88

Fixed on 1268bbf: the map is one copy, SEARCH_FAILURE_KEYS in website/src/lib/searchErrorCause.ts beside LISTING_FAILURE_KEYS and TREE_FAILURE_KEYS; FolderPanel and the rail both import it. grep -n "search_timed_out'" website/src/pages/chat finds nothing, and the one definition is in src/lib.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] fixed

  • span=855002798e62

Fixed on 1268bbf: a 404 now re-reads the whole listing once (exact key, folder listings untouched), so a deleted folder leaves the tree as the notice says. Pinned by re-reads the whole listing once when a folder answers 404, not when it answers 403; frame 06 recaptured: the notice above a tree with no packages rows.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] rebutted

  • span=44e91c7eb046

The split is Pierre's flattenEmptyDirectories on main: a folder with one listed child shows as a chain row, and once its own listing names more children it no longer is one. Frames 01 and 02 are the before and after of that expand.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] rebutted

  • span=85ded6f44ffa

Frame 05 is the still-cut case on purpose: that folder's own listing is itself over the cap. The label is main's row_truncated, middle-clipped by Pierre's row renderer; the rail's name search (frame 03) is the way past it, named by the grey line above. Changing main's row label is outside #16819.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] rebutted

  • span=ce8b821cfc6f

search_beyond_tree is main's string, reused per the First Principles lane's ask not to add a duplicate; it is shared with the folder tab, so rewording it changes main's copy for both callers, outside #16819.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] rebutted (PASS punchline)

Confirmed by CI, not assumed: the Windows shard runs test/test_project_tree_folder_listing.py, where test_a_platform_that_cannot_pin_lists_with_the_walk_not_git pins the walk branch, and the shard's earlier red on 3c72c79 (https://github.com/kirodotdev/KiroCrew/actions/runs/38698112487/job/116301929802) is why it exists. The .gitignore cost is bounded by the same 10,000-row cap and skip list, and tracked on #20632.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] Rebased onto origin/main (head 1268bbf), together with the shared search-failure map and the 404 whole-listing re-read. Re-ran locally: tsc, PierreWorkspaceTreeImpl, FileBrowserRail, FolderPanel, treeFolderListings (236 passed), docs-lint.

@bolichen97
bolichen97 force-pushed the fix/files-rail-past-tree-cap-16819 branch from 1268bbf to 9b5c1f7 Compare October 15, 2026 13:18
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] rebutted

  • span=078d4d6be846

Needed for reachability, not only freshness: the whole tree re-reads every 10 s, but a loaded folder's own rows would otherwise never change, so a file deleted or added inside a folder past the cap would be shown (and openable) wrongly forever, since the whole listing cannot see inside it. The Design lane raised exactly that (span e51576c57811). It is bounded: open loaded folders only, at most three per poll, in turn. Refresh and re-expanding are manual; nothing tells the user a listing went stale.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] rebutted

  • span=979633aae7bd

The split is Pierre's flattenEmptyDirectories on main: a folder with one listed child shows as a chain row, and once its own listing names more children it no longer is one. Frames 01 and 02 are the before and after of that expand; changing Pierre's chain rendering is outside #16819.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] rebutted

  • span=b7eedfe040be

The label is main's row_truncated, middle-clipped by Pierre's own row renderer (the state row is a path row inside Pierre's shadow root, not a decoration span, so the badge rule cannot reach it). The rail's name search (frame 03) is the way past it, named by the grey line above. Changing main's row label is outside #16819.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] rebutted

  • span=9f6d4ef44fb1

A stub artifact, not live behaviour: a 403 dir_refused means a link or a protected folder, and the whole walk lists a link as a linkedDirectories row with nothing beneath it, so in a live tree no files show under it. The capture keeps the same whole listing across frames 06b and 07 so only the notice differs.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] rebutted

  • span=e09c69c71068

The string is main's search_denied, shared with the folder tab through the one SEARCH_FAILURE_KEYS map the First Principles lane asked for; giving the rail its own copy would re-create the duplicate it flagged. The search runs over the project root the rail header names.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] rebutted

  • span=1de25dc1ffbd

A folder hit carries the folder icon, and clicking it reveals, expands and selects the folder in the tree, the same as the folder tab's hits do on main. A hover hint would be a new string on one surface only; out of scope for #16819.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] rebutted (PASS punchline)

Covered by CI on every head: the Windows backend shard runs test/test_project_tree_folder_listing.py, including test_a_platform_that_cannot_pin_lists_with_the_walk_not_git and the cap tests, and the frontend expansion path is platform-independent. The listing goes through the same 10,000-row allotment and skip list; the .gitignore cost is tracked on #20632.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Oct 15, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor

Holding at 9b5c1f7 for human review. I found no defect. This change adds a caller-supplied ?dir= path to the served file listing GET /api/project/tree (src/kiro_crew/dashboard/file_api/project_tree.py, re-exported in src/kiro_crew/dashboard/handlers/files.py). Path-confinement changes on a file-access endpoint go to a human reviewer. What I checked: dir is read only after the existing project and sensitive-root checks (L595-L615). It refuses NUL, absolute paths, ./.. and empty segments, any link along the path, the root itself and sensitive folders, then pins the folder's identity (L630-L674). git runs from the project root with literal pathspecs and fsmonitor off (L744-L776), and the echoed dir is redacted. The tests cover traversal forms and an ancestor swapped for a link after the check. Every current-head AI concern has a reasoned per-span reply. The two deferrals (Task 3 and the Windows .gitignore gap) are tracked on #20632, which I checked. Checks are green. The approval decision is the human reviewer's. — crew-pr-reviewer (r104)

@chenmingwei23
chenmingwei23 merged commit e33caf7 into main Oct 15, 2026
108 of 116 checks passed
@chenmingwei23
chenmingwei23 deleted the fix/files-rail-past-tree-cap-16819 branch October 15, 2026 22:54
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 15, 2026

@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.

Approved by a maintainer who read the review lane findings on this head and accepted them as follow-up work; the findings stay on the record for whoever picks them up.

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.

Project tree: reach folders past the 10,000-row cap from the Files rail

4 participants