Repository navigation
feat(website): add in-app open rows to the file-path menu - #19121
Conversation
A path chip's right-click menu offered only native actions that run on the gateway host, so a dashboard viewed from another machine had no row that did anything visible there. The menu now also offers "Open in side panel" for a file and "Show in Files panel" for its containing folder whenever the host passes the matching handler. Path chips thread the renderer's handlers; the file tab header threads the side panel's folder-tab opener. Native rows and their locality/Windows gates are unchanged, and there is no backend change. Fixes #9411
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing to check. [DESIGN-REVIEWED] d2270d8 Description read[DESCRIPTION-READ] d28871bcba3a7e270258af36142c1800ad6dc2740010c89b8be2d989754c1a35 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 |
First Principles Review (Opus 5.5) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS On a path chip, "Open in side panel" does the same thing as left-clicking the chip. The folder rows are the only new capability here. Not justified as shipped
What this change shipsInventory (6 items) — 4 justifiedIntent: a dashboard user on another machine can act on a path from its right-click menu and see the result on their own screen. ADDITION.
[FIRST-PRINCIPLES-REVIEWED] d2270d8 Description read[DESCRIPTION-READ] 46afcd1c28d25f801fee5d071e3f18b126f6ff6976cb658511d286ad4e2cace7 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS The blind reader could not tell which folder "Show folder in side panel" opens, or how "side panel" differs from "file manager". Watch
Suggestions
[UX-REVIEWED] d2270d8 Description read[DESCRIPTION-READ] bb15af6695da81e4849ebc913c7bab3fa32a67c4fbf41cdbc95b4541f22600af That sha256 names everything this verdict read: the PR description, plus the 13 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
911df85 to
6554e98
Compare
"Show in Files panel" read as selecting the file inside a listing and as a different place from "Open in side panel", and on a directory it was unclear whether the directory or its parent opened. A directory now gets "Open in side panel" for the directory itself, and a file gets "Show folder in side panel" (key show_folder_in_side_panel, every locale) for its folder. The in-app rows sit in their own group above the native rows, behind a separator.
6554e98 to
d2270d8
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Approved at head d2270d8: PR Readiness is green, no open change requests, and the review lanes passed. (AI-assisted review at bolichen97's request.)
Problem / Motivation
Goal: A dashboard user on any machine can act on a path chip from its right-click menu and see the result on their own screen.
On a dashboard opened from a different machine than the gateway, the path-chip menu's native rows ("Show in file manager", "Open with default app") act on the gateway host. A remote viewer is offered nothing that works where they are looking. Through a plain
ssh -Ltunnel the gateway treats the browser as local, so a launcher opens on the remote machine and the click looks dead.Why it matters
Running the gateway on a remote or headless host and using the dashboard from a laptop is a common setup. In that setup every row of the path menu either does nothing visible or copies a path that does not exist on the viewer's machine. The in-app side panel can already open the file or folder, but the menu never offers it.
Not a goal
What changed (motivation → approach → change)
FilePathMenuaccepts optionalonFileOpen/onFolderOpenhandlers. When the host passes them, the menu adds in-app rows as their own group above the native rows, behind a separator. Each row names what opens:onFileOpen) and Show folder in side panel (its containing folder as a side-panel folder tab, viaonFolderOpen). The folder label leads with the folder, so it reads apart from "Open in side panel" and not as selecting the file in a listing.onFolderOpen). It gets no parent-folder row, because two folder rows would leave the reader unsure which folder opens.InlineCode) thread the renderer's handlers. "Open in side panel" goes through the same activation as a plain click, so afile:12citation still lands on line 12. It duplicates the plain click on purpose. The issue's detection-free proposal asks for both in-app items in the menu, and the right-click menu is where a user looks after a click on the native rows appeared to do nothing.MarkdownPanel→FileHeaderBreadcrumb) acceptsonFolderOpen. The side panel wires it to its folder-tab opener. The file is already on screen there, so the header menu gets no "Open in side panel" row.components.filePathMenu.open_in_side_panel/show_folder_in_side_panelin every locale, plus the regenerated pseudolocale.Design summary
The design weighed three shapes:
The issue also suggested treating a plain
{ok: true}reveal response as a failure. That is not correct on current main: that response is the genuine local success case, so it is left alone.Backwards compatibility
Compatible: the new props are optional, and with no handler passed the menu renders exactly the rows it renders today.
Removes nothing: the diff only adds optional props, menu rows and a separator before them. No existing row, gate, prop or string is removed, renamed or narrowed.
Tests
FilePathMenu.inApp.test.tsx:onFileOpenwith the file andonFolderOpenwith its folder, and never calls the reveal endpoint.C:\Users\me, and a path with no parent gets no folder row.MarkdownRenderer:file:12chip opens with{ line: 12 }MarkdownPanel.test.tsx: the header breadcrumb menu offers "Show folder in side panel" (with no "Open in side panel" row), and stays native-only without a handler.sidePanelFileTabOpenFolder.test.tsx: the file tab's folder handler opens a focusedfolder:<dir>tab carrying the file tab's origin chat. It fails with the side-panel wiring reverted.src/i18n(46 files, all green).tsc -p tsconfig.app.json, and eslint on the touched filesnpm run i18n:check(all checks ok), andnpm run gen:ui(no index change)Manual verification
Rendered the real
MarkdownRenderer,FilePathMenu,MarkdownPanelandFolderPanelin the isolated path-chips capture entry. That entry mounts as a remote session (directLocalfalse). Right-clicked a file chip and a directory chip in dark and light themes, before and after the change.For the header frames and the local-session frames only, a local, uncommitted edit to that entry did two things: it passed
onFolderOpento its panel scene, and it mounted the real branding provider with a seededdirect_local: trueanswer.Before, both chip menus held only "Copy path". After:
Not exercised: a click-through inside a live remote deployment; the handler calls it makes are covered by the tests above.
Screenshots / video
Before (main): remote session, file chip. Copy path is the only row.
After: remote session, file chip, dark and light.
After: local session, file chip. The in-app group sits above the native rows, which are unchanged.
After: file tab header, remote and local. The red notices behind the menu come from the capture entry's stubbed backend, not from this change.
Where the folder row lands: the folder tab body (
FolderPanel) the row opens, rendered for the folder that holdsREADME.md.More frames
After: directory chip, remote session. "Open in side panel" opens the directory itself; there is no parent-folder row.
Before (main): directory chip, remote session, Copy path only.
Related Issues
Fixes #9411
Related: #11345 (opens remote files in a local editor over ssh links), which is complementary.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.