Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

fix(chat): keep the Show in folder wording for the new right-click reveal

milind-soni70778df56165
diff --git a/src/components/AttachmentPreview.test.ts b/src/components/AttachmentPreview.test.ts
index 15e5f75c72..031c131193 100644
--- a/src/components/AttachmentPreview.test.ts
+++ b/src/components/AttachmentPreview.test.ts
@@ -173,16 +173,16 @@ describe("attachment preview surfaces", () => {
});
});
-describe("Open containing folder for a file outside the workspace", () => {
+describe("Show in folder for a file outside the workspace", () => {
const render = (filePath: string) => renderToStaticMarkup(createElement(OutsideWorkspaceFile, { filePath }));
it("offers the reveal only for an absolute local path, and only in the local desktop app", () => {
vi.stubGlobal("window", { ogb: { revealInFolder: vi.fn(), remoteClient: { active: false } } });
try {
- expect(render("/Users/maus/_draft/ollama-gen.js")).toContain("Open containing folder");
- expect(render("C:\\Users\\Maus\\_draft\\ollama-gen.js")).toContain("Open containing folder");
+ expect(render("/Users/maus/_draft/ollama-gen.js")).toContain("Show in folder");
+ expect(render("C:\\Users\\Maus\\_draft\\ollama-gen.js")).toContain("Show in folder");
for (const filePath of ["_draft/ollama-gen.js", "\\\\server\\share\\ollama-gen.js"]) {
- expect(render(filePath)).not.toContain("Open containing folder");
+ expect(render(filePath)).not.toContain("Show in folder");
expect(render(filePath)).toContain(`>${filePath}</code>`);
}
} finally {
diff --git a/src/components/ChatMarkdown.test.ts b/src/components/ChatMarkdown.test.ts
index 543a34e54c..cdb2f146c3 100644
--- a/src/components/ChatMarkdown.test.ts
+++ b/src/components/ChatMarkdown.test.ts
@@ -962,7 +962,7 @@ describe("ChatMarkdown attachments", () => {
const html = render(false, filePath, true);
expect(html).not.toContain("This file is outside this chat&#x27;s working folder, so it can&#x27;t be saved from here");
expect(html).not.toContain("the linked file is outside");
- expect(html).toContain('title="Open containing folder"');
+ expect(html).toContain('title="Show in folder"');
expect(html).toContain("lucide-folder-open");
expect(html).not.toContain("<code");
} finally {
@@ -974,7 +974,7 @@ describe("ChatMarkdown attachments", () => {
vi.stubGlobal("window", { ogb: { revealInFolder, remoteClient: { active: true } } });
try {
const html = render(true, filePath, null);
- expect(html).not.toContain('title="Open containing folder"');
+ expect(html).not.toContain('title="Show in folder"');
expect(html).toMatch(/<code[^>]*select-all[^>]*>C:\\Users\\Maus\\_draft\\ollama-gen\.js<\/code>/);
} finally {
vi.unstubAllGlobals();
@@ -1049,7 +1049,7 @@ describe("ChatMarkdown attachments", () => {
const root = createRoot(host);
try {
await act(async () => root.render(createElement(ChatMarkdown, { text, message: { threadId: "thread-1", messageId: "message-1" } })));
- const show = host.querySelector('button[title="Open containing folder"]') as HTMLButtonElement;
+ const show = host.querySelector('button[title="Show in folder"]') as HTMLButtonElement;
await act(async () => show.click());
expect(reveal).toHaveBeenCalledWith(folder);
} finally {
@@ -1079,7 +1079,7 @@ describe("ChatMarkdown attachments", () => {
text: `[ollama-gen.js](${filePath})`, message: { threadId: "thread-1", messageId: "message-1" },
}));
expect(html).toContain("the linked file is outside this conversation&#x27;s workspace");
- expect(html).not.toContain('title="Open containing folder"');
+ expect(html).not.toContain('title="Show in folder"');
expect(html).not.toContain(filePath);
} finally {
vi.unstubAllGlobals();
diff --git a/src/components/RevealOriginalMenu.dom.test.ts b/src/components/RevealOriginalMenu.dom.test.ts
index c68159c230..a233e273ad 100644
--- a/src/components/RevealOriginalMenu.dom.test.ts
+++ b/src/components/RevealOriginalMenu.dom.test.ts
@@ -69,7 +69,7 @@ it("offers the original on a file the reply links inline instead of showing it i
}));
const link = [...document.querySelectorAll("span[dir=ltr]")].at(-1)!;
await openMenu(link);
- expect(menuButton()?.textContent).toBe("Open containing folder");
+ expect(menuButton()?.textContent).toBe("Show in folder");
await act(async () => { menuButton()!.click(); });
expect(revealInFolder).toHaveBeenCalledWith(ORIGINAL);
act(() => root.unmount());
@@ -84,7 +84,7 @@ it("reveals an ordinary Windows file link without a delivered attachment", async
}));
const link = [...document.querySelectorAll("button")].find(button => button.textContent === "report")!;
await openMenu(link);
- expect(menuButton()?.textContent).toBe("Open containing folder");
+ expect(menuButton()?.textContent).toBe("Show in folder");
await act(async () => { menuButton()!.click(); });
expect(revealInFolder).toHaveBeenCalledWith("C:/My Files/report.pdf");
act(() => root.unmount());
diff --git a/src/components/RevealOriginalMenu.test.ts b/src/components/RevealOriginalMenu.test.ts
index 245401bdfa..0eaf853bfc 100644
--- a/src/components/RevealOriginalMenu.test.ts
+++ b/src/components/RevealOriginalMenu.test.ts
@@ -25,8 +25,8 @@ describe("Show in Finder for the original of a bot's attachment", () => {
it("says Finder on a Mac and folder elsewhere", () => {
expect(revealOriginalLabel("darwin")).toBe("Show in Finder");
- expect(revealOriginalLabel("win32")).toBe("Open containing folder");
- expect(revealOriginalLabel("linux")).toBe("Open containing folder");
+ expect(revealOriginalLabel("win32")).toBe("Show in folder");
+ expect(revealOriginalLabel("linux")).toBe("Show in folder");
});
it("shows the original, and says so when it moved or is gone instead of falling back to the copy", async () => {
diff --git a/src/locales/en.json b/src/locales/en.json
index 4d4acf0181..0337b8472f 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -3219,7 +3219,7 @@
"attach.retrySaveAria": "Retry saving {name}",
"attach.downloading": "Downloading…",
"attach.downloaded": "Downloaded",
- "attach.showInFolder": "Open containing folder",
+ "attach.showInFolder": "Show in folder",
"attach.showInFinder": "Show in Finder",
"attach.originalMissing": "The original file was moved or deleted",
"attach.folderEmpty": "This folder has no files to open here",