mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-21 10:43:23 +00:00
fix(app): show folder names in file tree (#43835)
This commit is contained in:
parent
9be9dd737c
commit
5e77c494c7
2 changed files with 7 additions and 2 deletions
|
|
@ -60,7 +60,7 @@ test("expands a folder whose path has a trailing Windows separator", async ({ pa
|
|||
if (path) return []
|
||||
return [
|
||||
{
|
||||
name: "frontend",
|
||||
name: "",
|
||||
path: "frontend\\",
|
||||
absolute: `${directory}/frontend`,
|
||||
type: "directory" as const,
|
||||
|
|
@ -116,6 +116,7 @@ test("expands a folder whose path has a trailing Windows separator", async ({ pa
|
|||
|
||||
const frontendRow = panel.locator('[data-slot="file-tree-v2-row"][data-path="frontend"]')
|
||||
await expect(frontendRow).toBeVisible()
|
||||
await expect(frontendRow.getByText("frontend", { exact: true })).toBeVisible()
|
||||
await expect(frontendRow).toHaveAttribute("aria-expanded", "false")
|
||||
await frontendRow.click()
|
||||
await expect(frontendRow).toHaveAttribute("aria-expanded", "true")
|
||||
|
|
|
|||
|
|
@ -100,7 +100,11 @@ const FileTreeNodeV2 = (
|
|||
>
|
||||
{local.children}
|
||||
<span class="flex-1 min-w-0 text-start text-12-medium whitespace-nowrap truncate">
|
||||
<bdi dir="auto">{local.node.name}</bdi>
|
||||
<bdi dir="auto">
|
||||
{local.node.type === "directory"
|
||||
? normalizeFileTreeV2Path(local.node.path).split("/").at(-1)
|
||||
: local.node.name}
|
||||
</bdi>
|
||||
</span>
|
||||
{(() => {
|
||||
const value = kind()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue