mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-19 00:03:13 +03:00
fix(app): show file change count before label (#58353)
This commit is contained in:
committed by
GitHub
Unverified
parent
bdf757209f
commit
09399e3eec
@@ -501,7 +501,7 @@ test("file tree expands Windows paths and scrolls long names in both directions"
|
||||
await expect(panel.getByText("contents:frontend/app.ts", { exact: true })).toBeVisible()
|
||||
})
|
||||
|
||||
test("a restored file tab keeps the file tree on Files Changed", async ({ page }) => {
|
||||
test("a restored file tab keeps the file tree on files changed", async ({ page }) => {
|
||||
const directory = "C:/OpenCode/TreeRestore"
|
||||
await openSession(page, {
|
||||
name: "TreeRestore",
|
||||
@@ -522,13 +522,13 @@ test("a restored file tab keeps the file tree on Files Changed", async ({ page }
|
||||
await treeTab("All files").click()
|
||||
await tree.getByRole("button", { name: "README.md" }).click()
|
||||
await expect(readme).toHaveAttribute("aria-selected", "true")
|
||||
await treeTab("Files Changed 1").click()
|
||||
await expect(treeTab("Files Changed 1")).toHaveAttribute("aria-selected", "true")
|
||||
await treeTab("1 file changed").click()
|
||||
await expect(treeTab("1 file changed")).toHaveAttribute("aria-selected", "true")
|
||||
|
||||
await page.reload()
|
||||
await expect(readme).toHaveAttribute("aria-selected", "true")
|
||||
await expect(panel.getByText("contents:README.md", { exact: true })).toBeVisible()
|
||||
await expect(treeTab("Files Changed 1")).toHaveAttribute("aria-selected", "true")
|
||||
await expect(treeTab("1 file changed")).toHaveAttribute("aria-selected", "true")
|
||||
|
||||
// Selecting a file tab after load still shows it among all files.
|
||||
await panel.locator("#session-side-panel-review-tab").click()
|
||||
|
||||
@@ -40,7 +40,7 @@ test("review and terminal follow the session tab and stay mounted", async ({ pag
|
||||
await expect(terminalPanel).toHaveAttribute("data-size-animated", "true")
|
||||
await expect(chat).toHaveCSS("width", "580px")
|
||||
await expect(terminalPanel).toHaveCSS("height", "300px")
|
||||
await expect(page.locator("#session-side-panel-review-tab")).toHaveText("Files Changed 2740")
|
||||
await expect(page.locator("#session-side-panel-review-tab")).toHaveText("2740 files changed")
|
||||
await expect.poll(() => pty.sockets.length).toBe(1)
|
||||
await mark(review)
|
||||
await mark(terminal)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
export default {
|
||||
"tree.all": "All files",
|
||||
"tree.empty": "No files",
|
||||
"tree.changes.one": "Files Changed {{count}}",
|
||||
"tree.changes.other": "Files Changed {{count}}",
|
||||
"tree.changes.one": "{{count}} file changed",
|
||||
"tree.changes.other": "{{count}} files changed",
|
||||
"tab.notFound": "File not found: {{name}}",
|
||||
"mobile.title": "Files",
|
||||
"mobile.openTabs": "Open files",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export default {
|
||||
"tab.title": "Review",
|
||||
"tab.count.one": "Files Changed {{count}}",
|
||||
"tab.count.other": "Files Changed {{count}}",
|
||||
"tab.count.one": "{{count}} file changed",
|
||||
"tab.count.other": "{{count}} files changed",
|
||||
"mobile.title.one": "Change",
|
||||
"mobile.title.other": "Changes",
|
||||
"empty.git": "No uncommitted changes yet",
|
||||
|
||||
@@ -209,7 +209,7 @@ export function createReviewModel(input: {
|
||||
)
|
||||
|
||||
// Opening the side region refreshes changes a tree already shows. Otherwise it loads them once, so the
|
||||
// pinned tab reads "Files Changed N": v2 opened the region on the review tab before selecting another.
|
||||
// pinned tab reads "N files changed": v2 opened the region on the review tab before selecting another.
|
||||
// A region restored open does not load them until something shows them.
|
||||
const opened = createMemo(
|
||||
on(
|
||||
|
||||
Reference in New Issue
Block a user