Skip to content

[Bug]: The No project folder stays in English when the app language changes #38648

Closed

Description

@StiensWout

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Open Settings, then Labs.
  2. Turn on Boring sidebar (group by project).
  3. Set Language to Japanese in General settings.
  4. Start a thread without a project.
  5. Send a message in the thread.
  6. Look at its folder name in the sidebar.

Expected behavior

The folder is labeled プロジェクトなし.

Actual behavior

The folder is labeled No project.

scratch folder in japanese

failure

Impact

Minor bug or occasional failure. Web and desktop users see an English folder name whenever they group threads by project while using another language.

Version or commit

main at 8cf97b5f06. The cause is at apps/web/src/sidebarProjectGrouping.ts:151.

Environment

Linux x64 boat.dev default machine, a fresh checkout.

Logs or stack traces

expected: text containing "プロジェクトなし"
Automated repro

Fails in 2 of 2 runs on main: apply the patch with git apply, then run the command.

diff --git a/scripts/scenarios/scratch-folder-follows-language.e2e.ts b/scripts/scenarios/scratch-folder-follows-language.e2e.ts
new file mode 100644
index 0000000000..3bca5aab28
--- /dev/null
+++ b/scripts/scenarios/scratch-folder-follows-language.e2e.ts
@@ -0,0 +1,86 @@
+/// <reference lib="dom" />
+import { expect } from "e2e";
+
+import { test, WEB } from "./t3.ts";
+
+test(
+  "The project folder for threads without a project follows the app language",
+  WEB,
+  async ({ t3, app, browser, screen }) => {
+    const project = await t3.project("scenario-scratch");
+    const thread = await t3.thread({ project, title: "Scratch work", messages: ["Start"] });
+
+    // The scenario home is inside a Git checkout, where the server disables native scratch.
+    // Advertise the seeded workspace as scratch while leaving the real project and thread in place.
+    await browser.addInitScript((scratchWorkspaceRoot) => {
+      const configRequests = new WeakMap<WebSocket, string>();
+      const send = WebSocket.prototype.send;
+      WebSocket.prototype.send = function (data) {
+        if (typeof data === "string") {
+          for (const request of [JSON.parse(data)].flat()) {
+            if (request?._tag === "Request" && request.tag === "subscribeServerConfig") {
+              configRequests.set(this, String(request.id));
+            }
+          }
+        }
+        return send.call(this, data);
+      };
+      const addEventListener = WebSocket.prototype.addEventListener;
+      WebSocket.prototype.addEventListener = function (
+        this: WebSocket,
+        type: string,
+        listener: EventListenerOrEventListenerObject,
+        options?: boolean | AddEventListenerOptions,
+      ) {
+        if (type !== "message" || typeof listener !== "function") {
+          return addEventListener.call(this, type, listener, options);
+        }
+        return addEventListener.call(
+          this,
+          type,
+          (event: Event) => {
+            const data = (event as MessageEvent).data;
+            if (typeof data !== "string") return listener.call(this, event);
+            const parsed = JSON.parse(data);
+            let changed = false;
+            for (const message of [parsed].flat()) {
+              if (
+                message?._tag !== "Chunk" ||
+                String(message.requestId) !== configRequests.get(this)
+              )
+                continue;
+              for (const value of message.values) {
+                if (value.type === "snapshot") {
+                  value.config.scratchWorkspaceRoot = scratchWorkspaceRoot;
+                  changed = true;
+                }
+              }
+            }
+            return listener.call(
+              this,
+              changed ? new MessageEvent("message", { data: JSON.stringify(parsed) }) : event,
+            );
+          },
+          options,
+        );
+      } as typeof WebSocket.prototype.addEventListener;
+    }, project);
+
+    await t3.open("/settings/labs");
+    await screen.getByLabel("Boring sidebar (group by project)", { exact: true }).tap();
+    await screen.getByLabel("Two-line folder rows", { exact: true }).waitFor();
+
+    await t3.open("/settings/general");
+    await screen.getByLabel("Language", { exact: true }).tap();
+    await screen.getByText("日本語", { exact: true }).tap();
+    await screen.getByLabel("言語", { exact: true }).waitFor();
+
+    await t3.open(thread);
+    const folder = screen.getByTestId("sidebar-project-folder");
+    await folder.getByText(/^(?:No project|プロジェクトなし)$/, { exact: true }).waitFor({
+      timeout: 60_000,
+    });
+    await app.screenshot("scratch-folder-in-japanese");
+    await expect(folder).toContainText("プロジェクトなし");
+  },
+);
pnpm scenarios:prove scripts/scenarios/scratch-folder-follows-language.e2e.ts --base main

Workaround

No response

Activity

  1. added
    vouch:trusted
    on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    vouch:trusted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions