feat(app): add inline file browser tabs#35829
Open
Hona wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an inline “Open File” file-browser experience to the V2 review pane/session side panel, including a placeholder tab, TanStack Query–backed file search, and updated tab-preview/pinning behavior, plus supporting unit/E2E coverage.
Changes:
- Introduces a reusable
SessionFilePanelV2wrapper and refactors the V2 review toolbar intotoolbarStart/toolbarEndslots. - Adds an inline “Open File” tab with searchable results (ARIA combobox/listbox wiring) and double-click to open permanently.
- Refactors session tab state to support “preview” tabs and the Open File placeholder, and adds regression/unit tests around these flows.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/session-ui/src/v2/components/session-review-v2.tsx | Refactors review pane to render inside the new shared file panel and adds ARIA combobox props for the filter input. |
| packages/session-ui/src/v2/components/session-file-panel-v2.tsx | New shared panel wrapper for sidebar + toolbar + preview/empty states. |
| packages/app/src/pages/session/v2/session-file-list-v2.tsx | Enhances flat search results list with listbox/option roles, option ids, and double-click handling. |
| packages/app/src/pages/session/v2/session-file-browser-tab.tsx | New inline Open File tab: project tree + TanStack Query search results with keyboard navigation. |
| packages/app/src/pages/session/use-session-commands.tsx | Extends session command context to indicate file-browser availability. |
| packages/app/src/pages/session/session-side-panel.tsx | Integrates the Open File tab and preview/pinning behaviors into the session side panel tab strip/content. |
| packages/app/src/pages/session/helpers.ts | Updates tab derivation to treat the Open File placeholder as a panel tab (not a file tab). |
| packages/app/src/pages/session/helpers.test.ts | Adds tests for Open File placeholder behavior within createSessionTabs. |
| packages/app/src/pages/session/file-tabs.tsx | Splits SessionFileView from FileTabContent to allow reuse inside the new file browser tab. |
| packages/app/src/pages/session.tsx | Enables the inline file browser on desktop/new session design and wires state into the side panel. |
| packages/app/src/context/layout.tsx | Refactors session tab open/close logic to use new layout-tabs helpers and stores preview metadata ephemerally. |
| packages/app/src/context/layout-tabs.ts | New helpers for preview/open/close tab transitions + Open File placeholder constant. |
| packages/app/src/context/layout-tabs.test.ts | Unit tests for preview/open/close session tab transition helpers. |
| packages/app/src/context/file.tsx | Extends file search to support limit and AbortSignal (for query cancellation). |
| packages/app/src/components/session/session-sortable-tab.tsx | Adds “temporary/preview” styling and double-click pin support on tabs. |
| packages/app/src/components/session-context-usage.tsx | Updates createSessionTabs usage to account for file-browser availability gating. |
| packages/app/src/components/file-tree.tsx | Adds optional file double-click callback and wires it to file nodes. |
| packages/app/e2e/utils/mock-server.ts | Adds mock endpoint support for /find/file used by inline search. |
| packages/app/e2e/regression/review-open-file.spec.ts | New Playwright regression covering inline Open File open/search/tab-switch flows. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+108
to
+119
| <SessionReviewV2Sidebar | ||
| open={props.state.sidebarOpened()} | ||
| title={<span class="truncate">{title()}</span>} | ||
| filter={filter()} | ||
| onFilterChange={setFilter} | ||
| onFilterKeyDown={onFilterKeyDown} | ||
| filterAutofocus={props.placeholder} | ||
| filterRef={props.filterRef} | ||
| filterControls={resultsID} | ||
| filterActiveDescendant={highlighted() ? optionID(highlighted()!) : undefined} | ||
| filterExpanded={query().length > 0 && files().length > 0} | ||
| width={props.state.sidebarWidth()} |
Comment on lines
174
to
+180
| export function FileTabContent(props: { tab: string }) { | ||
| return ( | ||
| <Tabs.Content value={props.tab}> | ||
| <SessionFileView tab={props.tab} /> | ||
| </Tabs.Content> | ||
| ) | ||
| } |
Contributor
|
This PR cannot be merged into the beta branch due to: Merge conflicts with dev branch Please resolve this issue to include this PR in the next beta release. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Testing