feat: add an explorer tab rooted at the chat project directory - #3598
feat: add an explorer tab rooted at the chat project directory#3598warren830 wants to merge 1 commit into
Conversation
GPT 5.6 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
Design Review (Fable 5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS A real recoverability gap, closed at the right layer — the existing menu catalog — reusing [DESIGN-REVIEWED] 5e4f73a |
First Principles Review (Fable 5, fork) — 🔴 BLOCKPremise-level review of I've finished the investigation. The decisive finding: commit 54c8ffd (PR #4072, in the trusted base) deleted the folder auto-open and its First-Principles-Verdict: BLOCK The gap this row fills was closed by #4072: the base's pinned Files tab already browses the whole project tree, and the motivating one-way-door marker no longer exists. What this change shipsIntent: let a user re-open a browsable project tree for a chat after the auto-opened tab is closed — an ADDITION.
Blockers
Subtraction that resolves all three: drop the change. Subtractions
[FIRST-PRINCIPLES-REVIEWED] 5e4f73a |
Opus 4.8 Review (fork) — ✅ no blocking findingsReviewed Review detailsThe diff is a straightforward, type-safe UI addition. Discovery found no candidates. I verified the two load-bearing integration points myself: No findings. [OPUS-REVIEWED] 5e4f73a |
UX Review (Fable 5, fork) — ✅ PASSUX-level review of UX-Verdict: PASS "Project tree" names the outcome, opens exactly that, and hides itself when no project exists — the label keeps its promise. Suggestions
[UX-REVIEWED] 5e4f73a |
fe6217c to
7fd8718
Compare
|
Both advisory reviews found real problems. Addressed in First Principles — the premise was wrong, not just overstated. I checked First Principles — undeclared second surface. Also correct. The empty-panel UX — locale register. Verified against the siblings and fixed:
Screenshot Evidence is the one check still red. The change has a genuine |
7fd8718 to
b416b29
Compare
b416b29 to
c578d4c
Compare
c578d4c to
0745dc4
Compare
|
Hi @warren830, a maintainer nudge on this one: it is carrying the Current state:
Could you resolve the conflicts against the latest git fetch upstream # or: git fetch origin, if this branch lives here
git rebase upstream/main
# resolve any conflicts, run the local gates below, then update the branch with
# a force-with-lease so the rebase lands without clobbering anyone else's workThe local gates to run before updating the branch: black src/kiro_crew test && isort src/kiro_crew test
flake8 src/kiro_crew test && mypy src/kiro_crew
python -m pytest
cd website && npm run build && npm run testA good part of this branch's redness is likely stale rather than a real defect: it predates a lot of what is now on |
|
Kiro Crew [operator: chenmingwei23#de330d0c]: This PR has been inactive for 7+ days with failing CI. I have assessed the blockers and they appear resolvable -- I will push fixes directly to this branch as a co-author. Assessment: All five AI review lanes are clean/advisory (GPT pass, Design pass, First Principles pass, Opus pass, UX advisory CONCERNS already addressed in 7fd8718). The only failures are (1) a merge conflict on frontend files (SidePanel.tsx + i18n locale JSON) resolvable from the PR's clear intent vs main, and (2) one Backend Tests (Windows) shard red that is a pre-existing temp-file PermissionError in crew_chat.py / test_active_turn_session_key.py -- files not in this PR's diff. Fix plan: rebase onto latest main to cut a fresh merge ref (resolving the conflict and re-running the stale Windows shard), verify frontend gates (tsc/vitest), and drive to green. If you would prefer I do not touch this PR, add the pr-no-autofix label. |
The base auto-opens a folder tab for a chat's project directory, but only once per slot+path and behind a persisted localStorage marker, so once it is closed there is no way to open it again. Offer it from the + menu, which makes re-opening a deliberate affordance rather than a one-shot side effect. The root is the chat's own project directory, read at click time, and the tab lands in that chat's per-slot strip bucket. Those two together are what makes switching chats browse the tree of the chat you switched to, with no new state-scoping logic -- the same pairing Terminal already uses for its cwd. `folder` is a document-kind tab rather than a ViewKind because the panel unmounts category views on tab switch, which would discard the cwd the user browsed to. That widens the menu's key type to MenuKind, keeping the compile-time guarantee that an entry without a label and description is a type error. The row is hidden for a chat with no project directory, matching the Summary gate: with no root it could only open an empty listing the user cannot re-root from the panel, and hiding it removes the dead end rather than wording around it. The empty-panel launcher grid renders the same catalog, so the entry appears there too -- intended, and it keeps the two surfaces from disagreeing about what the panel can open. The entry is named "Project tree", not "Explorer": the sibling "Files" entry lists only the files this session touched, and the file-explorer app already displays as "Files", so a third use of that word would collide rather than disambiguate. "tree" also matches the entry's icon, and each locale's description now states the contrast in user-visible copy instead of leaving it in translator context. Descriptions follow each catalog's existing register: infinitive in es and pt, informal in bn. Co-authored-by: Kiro Crew <noreply@kirodotdev.github.io>
aaeb578 to
5e4f73a
Compare
|
Kiro Crew [operator: chenmingwei23]: Rebased this PR onto main (97d9c23) to clear the merge conflict, per the drive-to-green pipeline. Changes made, all as one force-pushed commit (5e4f73a) preserving warren's authorship: Conflict resolution (main's structure + this PR's additions):
One functional fix required by the rebase:
Commit message: retyped em dashes to Local verification on the rebased head: The Windows temp-file PermissionError flake noted in triage is pre-existing and not in this diff; if it reds again on this head it will be re-run, not patched here. |
|
Kiro Crew [operator: chenmingwei23]: Status after the rebase drive: all CI checks are green on
All three verify as true, so this is a real premise-level finding, not one to override. The base simply moved underneath this PR between authoring and now: #4072 shipped a stronger version of the same capability four days after this was opened. The rebase and conflict-resolution work above stands (the branch is conflict-free and fully green apart from this verdict), but whether to keep a second entry point to the project tree is a product decision for the maintainers and @warren830, not something the pipeline should decide. Escalating to the maintainer with the verification evidence. One small cleanup is worth keeping regardless of the outcome: the stale |
|
Kiro Crew [operator: chenmingwei23]: Closing this as superseded by #4072, per maintainer decision. @warren830 -- thank you for this contribution, and genuinely sorry about the timing. When you authored this on Aug 14 the gap was real: the auto-opened folder tab was one-shot behind a persisted marker, and closing it left no way back. Your commit message and the premise-level reasoning in it were solid -- the review bots verified your description of the base was accurate for the base you wrote against. Four days later #4072 landed a permanently pinned Files tab that renders the full project tree rooted at the chat's project directory, which removed both the defect and the need for a second entry point. The base simply moved underneath the PR; nothing here was wrong when written. The rebase work from the drive-to-green pass (conflict resolution across SidePanel + 13 locales, all CI green, four review lanes clean) is preserved on your branch One small piece of your review remains actionable and will be filed separately: the stale Hope to see more PRs from you -- this one lost to timing, not to quality. |
Pull request was closed
No problem, I will contribute more |
Problem / Motivation
A chat's project directory can be browsed in the side panel —
FolderPanelandthe folder tab kind both already exist — but there is no way to re-open that
view on demand once it is gone.
Three entry points exist today, and each has a gap:
ChatPage.tsx—tabsCtl.openFolder(_slotProject, activeSlot)mc-folder-panel-opened:<slot>:<path>marker. Close the tab and it never returns.handleFolderOpen→tabsCtl.openFolderSidePanel.tsx—onFolderOpenSo the reachable state is: the tab was auto-opened once, the user closed it, no
message mentions the project root — and the project tree is now unreachable for
that chat short of clearing
localStorage.Why it matters
The auto-open marker is persisted, so this is a one-way door per chat: closing
the tab is irreversible through the UI. The panel is the surface where a user
orients themselves in the project a chat is scoped to, and the recovery today is
to know that a
localStoragekey governs it.Scope note, to avoid overstating the increment: this PR adds a fourth entry
point. It does not add the folder panel, the folder tab kind, or the auto-open —
those already exist on
main(auto-open landed in #1636, after the v0.2.0 tag).What changed
One row in the chat side panel's
+menu — Project tree — that opens afolder tab rooted at the chat's own project directory.
MenuKind = ViewKind | 'folder', andNEW_MENU_LABEL_KEY/NEW_MENU_DESC_KEY/NEW_MENU_GROUPS/DEV_ONLY_VIEWSwiden to it. Theexisting partition test then pins the new entry into exactly one group.
workspacesgroup besidesideandbrowser, with aFolderTreeicon.folderis deliberately a document-kind tab, not aViewKind: the panelunmounts category views on tab switch, which would discard the cwd the user
browsed to.
openMenuItemroutes'folder'toopenFolder(projectDir ?? '', slot), sothe root is read at click time. Panel tabs are already bucketed per chat slot
(
mc-panel-tabs:<slot>), so switching chats browses that chat's own tree withno new state-scoping logic.
newMenuSectionsgainshasProjectDir?: boolean; the row is hidden whenthe chat has no project directory, since its root is that directory and the
panel offers no way to re-root. Defaults to
trueso callers with no notionof a project (the grouping tests) still see the full catalog.
menu_folder/menu_folder_descinen.manual.json(the correct homefor keys with no extractable source literal, matching
menu_browser) plus 11translation locales, regenerated
en-XA.json, and a translator note inen.context.json.The label is
Project tree, notFilesorExplorer: the file-explorer app'sown
app.jsonalready ships"displayName": "Files", so those names were taken.The description states the contrast in user-visible copy — "Browse the whole
project tree, not just files this chat touched".
Tests
website/src/test/sidePanelAddMenu.test.tsx— the render helper isparameterized with
projectDir, and three cases were added:newMenuSectionsdrops only that rowTwo existing group-order assertions were updated to include
'folder'. 12/12pass in that file.
Gates run locally:
npm run i18n:check(all sub-gates, including key parityacross 12 locales, DNT and manifest-sync),
npx tsc --noEmitclean,eslint0 errors.
Manual verification
The empty-panel launcher grid renders from the same catalog
(
menuItems = menuSections.flatMap(...)), so the row appears there too. Thatsurface could not be captured: auto-pinned tabs mean
tabs.lengthis never 0 ina real instance.
Not verified: this branch has not been launched end-to-end from a packaged build.
Screenshots
1. The menu entry — component harness, real stylesheet + provider stack, Playwright driving the real
+button2. The destination — full application, instance built from this branch
Frame 2 shows the destination, not the click that reached it — on its own it
does not distinguish this entry from the base's auto-open. Frame 1 is the
evidence for the entry itself.
Locale register
Each translation follows its own catalog's sibling
menu_files_descregister:infinitive in es/pt (
Explorar/Navegar), informal in bn (করো). The 11non-English strings are machine-generated and would benefit from a native
speaker's eye.
no linked issue: this is a small usability gap found while using the panel, not
a filed report.