Skip to content

Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.

feat(web): translate the Room side panel frame

Kilyn4ec48153e4ba
diff --git a/apps/web/src/app/globals.css b/apps/web/src/app/globals.css
index 2a015208..a0f5e08c 100644
--- a/apps/web/src/app/globals.css
+++ b/apps/web/src/app/globals.css
@@ -4385,7 +4385,7 @@ button.question-choice:focus-visible {
margin-right: -100%;
}
- .app-room-layout .panel-sidebar [aria-label="Resize sidebar"],
+ .app-room-layout .panel-sidebar [data-panel-resize-handle],
.panel-maximize-control {
display: none;
}
diff --git a/apps/web/src/features/rooms/chat/room-chat-documents.test.tsx b/apps/web/src/features/rooms/chat/room-chat-documents.test.tsx
index c0da207e..c8c8cbc0 100644
--- a/apps/web/src/features/rooms/chat/room-chat-documents.test.tsx
+++ b/apps/web/src/features/rooms/chat/room-chat-documents.test.tsx
@@ -144,7 +144,7 @@ describe("Room Chat", () => {
expect(openPanelTab).toHaveBeenCalledWith({
actorId: "actor-codex",
kind: "agentInfo",
- title: "Agent · Codex",
+ title: "Codex",
}),
);
expect(router.state.location.search).toBe("");
@@ -443,7 +443,7 @@ describe("Room Chat", () => {
expect(openPanelTab).toHaveBeenCalledWith({
actorId: "actor-codex",
kind: "agentInfo",
- title: "Agent · Codex",
+ title: "Codex",
}),
);
expect(router.state.location.search).toBe("");
diff --git a/apps/web/src/features/rooms/chat/room-chat-timeline.test.tsx b/apps/web/src/features/rooms/chat/room-chat-timeline.test.tsx
index 97cb6aa9..582b34f1 100644
--- a/apps/web/src/features/rooms/chat/room-chat-timeline.test.tsx
+++ b/apps/web/src/features/rooms/chat/room-chat-timeline.test.tsx
@@ -391,7 +391,7 @@ describe("Room Chat", () => {
expect.objectContaining({
kind: "agentActivity",
actorId: "actor-codex",
- title: "Activity · Codex",
+ title: "Codex",
}),
),
);
diff --git a/apps/web/src/features/rooms/chat/room-chat.test.tsx b/apps/web/src/features/rooms/chat/room-chat.test.tsx
index c41e692a..5ec65ed7 100644
--- a/apps/web/src/features/rooms/chat/room-chat.test.tsx
+++ b/apps/web/src/features/rooms/chat/room-chat.test.tsx
@@ -333,7 +333,7 @@ describe("Room Chat", () => {
expect.objectContaining({
actorId: "actor-codex",
kind: "agentActivity",
- title: "Activity · Codex",
+ title: "Codex",
}),
);
const opened = openPanelTab.mock.calls.at(-1)?.[0] as {
diff --git a/apps/web/src/features/rooms/chat/use-room-chat-navigation.ts b/apps/web/src/features/rooms/chat/use-room-chat-navigation.ts
index 5922fc4e..c1dcddde 100644
--- a/apps/web/src/features/rooms/chat/use-room-chat-navigation.ts
+++ b/apps/web/src/features/rooms/chat/use-room-chat-navigation.ts
@@ -17,14 +17,12 @@ import type {
TeamHubMessageDocumentSegment,
TeamHubMessageFileSegment,
} from "@/features/teamhub/teamhub-types";
-import { translate } from "@/i18n/language";
import { useRoomOutletContext } from "../room-connectivity";
import { artifactPreviewCache } from "../files/artifact-preview-cache";
import { prefetchArtifactPreview } from "../files/artifact-preview-loader";
import { documentCardVersionQueryKey } from "../files/use-document-card-metadata";
import type { RoomComposerDocumentContext } from "../room-drafts";
-import { runtimeStatusMessages } from "../runtime-status/runtime-status.messages";
import type { MessageDocumentOption } from "./message-composer-references";
import { patchRoomMessageThread } from "./room-projection";
@@ -135,9 +133,7 @@ export function useRoomChatNavigation(
activityRoomId,
anchorMessageId: sourceMessageId,
actorId: agent.id,
- title: translate(runtimeStatusMessages.activityTabTitle, {
- name: agent.display_name,
- }),
+ title: agent.display_name,
});
clearProfileParam();
},
@@ -149,9 +145,7 @@ export function useRoomChatNavigation(
kind: "agentActivity",
actorId: agent.id,
activityRoomId,
- title: translate(runtimeStatusMessages.activityTabTitle, {
- name: agent.display_name,
- }),
+ title: agent.display_name,
});
clearProfileParam();
},
@@ -159,9 +153,7 @@ export function useRoomChatNavigation(
openPanelTab({
kind: "agentInfo",
actorId: actor.id,
- title: translate(runtimeStatusMessages.agentTabTitle, {
- name: actor.display_name,
- }),
+ title: actor.display_name,
});
clearProfileParam();
},
diff --git a/apps/web/src/features/rooms/room-surface.tsx b/apps/web/src/features/rooms/room-surface.tsx
index 2620fdf0..448d9d70 100644
--- a/apps/web/src/features/rooms/room-surface.tsx
+++ b/apps/web/src/features/rooms/room-surface.tsx
@@ -216,7 +216,7 @@ function useSyncAgentInfoPanelTitle({
openPanelTab({
kind: "agentInfo",
actorId: agentProfileActor.id,
- title: `Agent · ${agentProfileActor.display_name}`,
+ title: agentProfileActor.display_name,
});
}, [agentProfileActor, openPanelTab]);
const agentInfoActorId = useRef<string | undefined>(undefined);
@@ -226,7 +226,7 @@ function useSyncAgentInfoPanelTitle({
directAgent?.actor ??
(directPeer?.kind === "agent" ? directPeer : undefined);
if (!agent) return;
- const title = `Agent · ${agent.display_name}`;
+ const title = agent.display_name;
if (
agentInfoActorId.current === agent.id &&
agentInfoTitle.current === title
@@ -438,7 +438,7 @@ function RoomSurfaceContent({
openPanelTabFromRoom({
kind: "agentInfo",
actorId: actor.id,
- title: `Agent · ${actor.display_name}`,
+ title: actor.display_name,
});
return;
}
@@ -490,7 +490,7 @@ function RoomSurfaceContent({
onOpenSettings={() =>
openPanelTab({
kind: "roomSettings",
- title: t(roomSurfaceMessages.roomSettings),
+ title: PANEL_COLLECTION_TAB_TITLES.roomSettings,
})
}
onTogglePanel={togglePanel}
@@ -549,7 +549,7 @@ function RoomSurfaceContent({
? () =>
openPanelTab({
kind: "roomSettings",
- title: t(roomSurfaceMessages.roomSettings),
+ title: PANEL_COLLECTION_TAB_TITLES.roomSettings,
})
: undefined
}
@@ -704,6 +704,7 @@ function RoomPanelSidebarFallback({
aria-label={t(roomSurfaceMessages.loadingPanelSidebar)}
className="panel-sidebar relative h-full min-h-0 shrink-0 bg-app-sidebar px-1 pb-1"
data-open="true"
+ data-voice-area="sidebar"
style={
{
"--panel-sidebar-width": `${readPanelSidebarWidth(accountId)}px`,
diff --git a/apps/web/src/features/rooms/runtime-status/runtime-status.messages.ts b/apps/web/src/features/rooms/runtime-status/runtime-status.messages.ts
index 6531cd4e..c2618b36 100644
--- a/apps/web/src/features/rooms/runtime-status/runtime-status.messages.ts
+++ b/apps/web/src/features/rooms/runtime-status/runtime-status.messages.ts
@@ -55,9 +55,6 @@ export const runtimeStatusMessages = defineMessages("runtimeStatus", {
runningMinutes: "{minutes} min",
runningHours: "{hours} h",
runningDays: "{days} d",
- // Panel tabs opened from the chat.
- activityTabTitle: "Activity · {name}",
- agentTabTitle: "Agent · {name}",
// The Message a link pointed at, shown above the timeline.
linkedSourceMessage: "Linked source Message",
closeLinkedSourceMessage: "Close linked source Message",
diff --git a/apps/web/src/features/rooms/task-sidebar/panel-create-items.ts b/apps/web/src/features/rooms/task-sidebar/panel-create-items.ts
index 0c207cbf..0daad060 100644
--- a/apps/web/src/features/rooms/task-sidebar/panel-create-items.ts
+++ b/apps/web/src/features/rooms/task-sidebar/panel-create-items.ts
@@ -1,23 +1,26 @@
+import type { Message } from "@/i18n/messages";
+
import type { PanelTabKind } from "./panel-tab-types";
+import { sidePanelMessages as m } from "./side-panel.messages";
const ALL_PANEL_CREATE_ITEMS = [
{
kind: "file",
- label: "Documents",
+ label: m.documents,
},
{
kind: "agentInfo",
- label: "Agent info",
+ label: m.agentInfo,
},
{
kind: "roomInfo",
- label: "Room info",
+ label: m.roomInfo,
},
{
kind: "collaboration",
- label: "Collaboration",
+ label: m.collaboration,
},
-] as const satisfies { kind: PanelTabKind; label: string }[];
+] as const satisfies { kind: PanelTabKind; label: Message<string> }[];
export type PanelCreateChoice = (typeof ALL_PANEL_CREATE_ITEMS)[number]["kind"];
diff --git a/apps/web/src/features/rooms/task-sidebar/panel-empty-state.tsx b/apps/web/src/features/rooms/task-sidebar/panel-empty-state.tsx
index e3abb7b2..5cd3c820 100644
--- a/apps/web/src/features/rooms/task-sidebar/panel-empty-state.tsx
+++ b/apps/web/src/features/rooms/task-sidebar/panel-empty-state.tsx
@@ -6,11 +6,13 @@ import {
} from "@hugeicons/core-free-icons";
import { Icon } from "@/components/ui/icon";
+import { useT } from "@/i18n/use-translation";
import type { TeamHubActorRef } from "@/features/teamhub/teamhub-types";
import { ActorAvatar } from "../members/actor-avatar";
import type { PanelCreateChoice } from "./panel-create-items";
+import { sidePanelMessages as m } from "./side-panel.messages";
export function PanelEmptyState({
agent,
@@ -23,6 +25,7 @@ export function PanelEmptyState({
onCreate: (choice: PanelCreateChoice) => void;
onOpenAgentInfo: () => void;
}) {
+ const t = useT();
const rowClassName =
"flex w-full items-center gap-3 rounded-xl bg-card p-3 text-left shadow-outline transition-colors duration-150 hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring";
@@ -40,18 +43,16 @@ export function PanelEmptyState({
<Icon icon={LayoutLeftIcon} size={20} />
</span>
<h2 className="text-base font-semibold text-foreground">
- Conversation details
+ {t(m.launcherTitle)}
</h2>
<p className="mt-1 text-sm text-muted-foreground">
- {agent
- ? "Agent settings, routines, activity, and shared documents — alongside your chat."
- : "Shared documents and message threads — alongside your chat."}
+ {t(agent ? m.launcherBodyWithAgent : m.launcherBody)}
</p>
</div>
<div className="space-y-2">
{agent ? (
<button
- aria-label="Agent info"
+ aria-label={t(m.agentInfo)}
className={rowClassName}
onClick={onOpenAgentInfo}
type="button"
@@ -64,10 +65,10 @@ export function PanelEmptyState({
/>
<span className="min-w-0 flex-1">
<span className="block text-sm font-semibold text-foreground">
- Agent info
+ {t(m.agentInfo)}
</span>
<span className="mt-0.5 block truncate text-xs text-muted-foreground">
- {agent.display_name} · Settings & activity
+ {t(m.agentInfoHint, { name: agent.display_name })}
</span>
</span>
<Icon
@@ -78,7 +79,7 @@ export function PanelEmptyState({
</button>
) : null}
<button
- aria-label="Documents"
+ aria-label={t(m.documents)}
className={rowClassName}
onClick={() => onCreate("file")}
type="button"
@@ -91,12 +92,12 @@ export function PanelEmptyState({
</span>
<span className="min-w-0 flex-1">
<span className="block text-sm font-semibold text-foreground">
- Documents
+ {t(m.documents)}
</span>
<span className="mt-0.5 block text-xs text-muted-foreground">
{documentCount > 0
- ? `${documentCount} shared ${documentCount === 1 ? "document" : "documents"}`
- : "Browse files shared in this conversation"}
+ ? t(m.sharedDocumentCount, { count: documentCount })
+ : t(m.browseSharedFiles)}
</span>
</span>
<Icon
@@ -106,7 +107,7 @@ export function PanelEmptyState({
/>
</button>
<button
- aria-label="Collaboration"
+ aria-label={t(m.collaboration)}
className={rowClassName}
onClick={() => onCreate("collaboration")}
type="button"
@@ -119,10 +120,10 @@ export function PanelEmptyState({
</span>
<span className="min-w-0 flex-1">
<span className="block text-sm font-semibold text-foreground">
- Collaboration
+ {t(m.collaboration)}
</span>
<span className="mt-0.5 block text-xs text-muted-foreground">
- Agent responsibilities and relationships
+ {t(m.collaborationHint)}
</span>
</span>
<Icon
@@ -133,8 +134,7 @@ export function PanelEmptyState({
</button>
</div>
<p className="mt-6 border-t border-border/60 pt-4 text-xs text-muted-foreground">
- Open a message thread, document, or routine to view it here. Your chat
- stays in place.
+ {t(m.launcherFooter)}
</p>
</div>
</div>
diff --git a/apps/web/src/features/rooms/task-sidebar/panel-resize-handle.tsx b/apps/web/src/features/rooms/task-sidebar/panel-resize-handle.tsx
index 2db41314..71ad955f 100644
--- a/apps/web/src/features/rooms/task-sidebar/panel-resize-handle.tsx
+++ b/apps/web/src/features/rooms/task-sidebar/panel-resize-handle.tsx
@@ -1,5 +1,7 @@
import { useEffect, useLayoutEffect, useRef, useState } from "react";
+import { useT } from "@/i18n/use-translation";
+
import {
clampPanelSidebarWidth,
PANEL_SIDEBAR_DEFAULT_WIDTH,
@@ -7,6 +9,7 @@ import {
PANEL_SIDEBAR_MIN_WIDTH,
writePanelSidebarWidth,
} from "./panel-width";
+import { sidePanelMessages as m } from "./side-panel.messages";
export function PanelResizeHandle({
accountId,
@@ -19,6 +22,7 @@ export function PanelResizeHandle({
onWidthChange: (width: number) => void;
width: number;
}) {
+ const t = useT();
const dragRef = useRef<{ originX: number; originWidth: number } | null>(null);
const widthRef = useRef(width);
const onWidthChangeRef = useRef(onWidthChange);
@@ -78,12 +82,13 @@ export function PanelResizeHandle({
return (
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- pointer dragging for the resize separator; keyboard input is handled by onKeyDown
<div
- aria-label="Resize sidebar"
+ aria-label={t(m.resizeSidebar)}
aria-orientation="vertical"
aria-valuemax={panelSidebarMaxWidth()}
aria-valuemin={PANEL_SIDEBAR_MIN_WIDTH}
aria-valuenow={width}
className="group absolute inset-y-0 left-0 z-20 w-3 -translate-x-1/2 cursor-col-resize touch-none"
+ data-panel-resize-handle=""
onDoubleClick={() => {
const next = writePanelSidebarWidth(
PANEL_SIDEBAR_DEFAULT_WIDTH,
@@ -121,7 +126,7 @@ export function PanelResizeHandle({
role="separator"
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex -- keyboard-operable resize separator
tabIndex={0}
- title="Drag to resize"
+ title={t(m.dragToResize)}
>
<span
aria-hidden="true"
diff --git a/apps/web/src/features/rooms/task-sidebar/panel-tab-label.test.ts b/apps/web/src/features/rooms/task-sidebar/panel-tab-label.test.ts
new file mode 100644
index 00000000..04e43a09
--- /dev/null
+++ b/apps/web/src/features/rooms/task-sidebar/panel-tab-label.test.ts
@@ -0,0 +1,95 @@
+// @vitest-environment jsdom
+import { afterEach, describe, expect, it } from "vitest";
+
+import { resetLanguageForTest, setLanguage } from "@/i18n/language";
+import zhCN from "@/i18n/locales/zh-CN.json";
+
+import { panelTabText } from "./panel-tab-label";
+import {
+ PANEL_COLLECTION_TAB_IDS,
+ PANEL_COLLECTION_TAB_TITLES,
+ type PanelTab,
+} from "./panel-tab-types";
+
+function tab(input: Partial<PanelTab> & Pick<PanelTab, "kind">): PanelTab {
+ return { id: "tab", lastActivatedAt: 1, title: "", ...input };
+}
+
+afterEach(() => {
+ resetLanguageForTest();
+});
+
+describe("panel tab text", () => {
+ it("words an Agent tab from the saved name", () => {
+ expect(panelTabText(tab({ kind: "agentInfo", title: "Codex" }))).toEqual({
+ label: "Agent · Codex",
+ name: "Codex",
+ });
+ expect(
+ panelTabText(tab({ kind: "agentActivity", title: "Codex" })),
+ ).toEqual({ label: "Activity · Codex", name: "Codex" });
+ expect(panelTabText(tab({ kind: "agentInfo" })).label).toBe(
+ "Agent · Agent",
+ );
+ });
+
+ it("reads titles saved with the English wording", async () => {
+ const info = tab({ kind: "agentInfo", title: "Agent · Codex" });
+ const activity = tab({ kind: "agentActivity", title: "Activity · Codex" });
+ expect(panelTabText(info).label).toBe("Agent · Codex");
+ expect(panelTabText(activity).name).toBe("Codex");
+
+ await setLanguage("zh-CN");
+ expect(panelTabText(activity)).toEqual({
+ label: zhCN.sidePanel.activityTab.replace("{name}", "Codex"),
+ name: "Codex",
+ });
+ });
+
+ it("names a collection tab after its kind, whatever was saved", async () => {
+ const files = tab({
+ id: PANEL_COLLECTION_TAB_IDS.file,
+ kind: "file",
+ title: PANEL_COLLECTION_TAB_TITLES.file,
+ });
+ const settings = tab({
+ id: PANEL_COLLECTION_TAB_IDS.roomSettings,
+ kind: "roomSettings",
+ title: zhCN.chat.roomSettings,
+ });
+ expect(panelTabText(files).label).toBe("Files");
+ expect(panelTabText(settings).label).toBe("Room settings");
+
+ await setLanguage("zh-CN");
+ expect(panelTabText(files).label).toBe(zhCN.sidePanel.filesTab);
+ expect(panelTabText(settings).label).toBe(zhCN.chat.roomSettings);
+ });
+
+ it("keeps names that are data and words an empty one", () => {
+ expect(
+ panelTabText(tab({ documentId: "doc-1", kind: "file", title: "Files" }))
+ .label,
+ ).toBe("Files");
+ expect(panelTabText(tab({ kind: "url", title: "example.com" })).label).toBe(
+ "example.com",
+ );
+ const message = { anchorMessageId: "message-1", kind: "thread" } as const;
+ expect(panelTabText(tab({ ...message, title: "Ship it" })).label).toBe(
+ "Ship it",
+ );
+ expect(panelTabText(tab(message)).label).toBe("Untitled");
+ });
+
+ it("words a Message tab saved as Untitled", async () => {
+ const saved = tab({
+ anchorMessageId: "message-1",
+ kind: "thread",
+ title: "Untitled",
+ });
+ await setLanguage("zh-CN");
+ expect(panelTabText(saved).label).toBe(zhCN.sidePanel.untitledTab);
+ expect(panelTabText({ ...saved, title: "" }).label).toBe(
+ zhCN.sidePanel.untitledTab,
+ );
+ });
+});
diff --git a/apps/web/src/features/rooms/task-sidebar/panel-tab-label.ts b/apps/web/src/features/rooms/task-sidebar/panel-tab-label.ts
new file mode 100644
index 00000000..054c4e83
--- /dev/null
+++ b/apps/web/src/features/rooms/task-sidebar/panel-tab-label.ts
@@ -0,0 +1,53 @@
+import { type Translate, translate } from "@/i18n/language";
+import type { Message } from "@/i18n/messages";
+
+import { roomSurfaceMessages } from "../room-surface.messages";
+import {
+ isPanelCollectionTab,
+ type PanelTab,
+ type PanelTabKind,
+} from "./panel-tab-types";
+import { sidePanelMessages as m } from "./side-panel.messages";
+
+/** Collection tabs are named after their kind, so the name follows the language. */
+const collectionTitles: Partial<Record<PanelTabKind, Message>> = {
+ file: m.filesTab,
+ roomSettings: roomSurfaceMessages.roomSettings,
+ roomInfo: m.roomInfo,
+ collaboration: m.collaboration,
+};
+
+// Tabs saved by earlier versions carry the English wording in their title.
+const savedAgentPrefix = /^Agent · /;
+const savedActivityPrefix = /^Activity · /;
+const savedUntitled = "Untitled";
+
+/**
+ * Words a saved tab for the screen. A tab is saved with a name only (an
+ * Agent, a Document, a page, the start of a Message), never with wording, so
+ * a saved tab reads in the language on screen.
+ *
+ * `label` is the full name of the tab; `name` is the short text beside its
+ * icon, which already tells an Agent tab from an Activity tab.
+ */
+export function panelTabText(
+ tab: PanelTab,
+ t: Translate = translate,
+): { label: string; name: string } {
+ if (tab.kind === "agentInfo" || tab.kind === "agentActivity") {
+ const agent = tab.kind === "agentInfo";
+ const name =
+ tab.title.replace(agent ? savedAgentPrefix : savedActivityPrefix, "") ||
+ t(m.agentFallbackName);
+ return { label: t(agent ? m.agentTab : m.activityTab, { name }), name };
+ }
+ const collection = isPanelCollectionTab(tab)
+ ? collectionTitles[tab.kind]
+ : undefined;
+ const label = collection
+ ? t(collection)
+ : !tab.title || (tab.kind === "thread" && tab.title === savedUntitled)
+ ? t(m.untitledTab)
+ : tab.title;
+ return { label, name: label };
+}
diff --git a/apps/web/src/features/rooms/task-sidebar/panel-tab-store.test.ts b/apps/web/src/features/rooms/task-sidebar/panel-tab-store.test.ts
index e59645b8..cc02c4c0 100644
--- a/apps/web/src/features/rooms/task-sidebar/panel-tab-store.test.ts
+++ b/apps/web/src/features/rooms/task-sidebar/panel-tab-store.test.ts
@@ -364,7 +364,7 @@ describe("panel tab store", () => {
expect(next.tabs[next.activeTabId!]?.actorId).toBe("agent-created");
expect(next.tabs[next.activeTabId!]?.kind).toBe("agentInfo");
expect(next.tabs[next.activeTabId!]?.activityRunStatusId).toBeUndefined();
- expect(next.tabs[next.activeTabId!]?.title).toBe("Agent · Slide Expert");
+ expect(next.tabs[next.activeTabId!]?.title).toBe("Slide Expert");
expect(next.openTabIds).not.toContain(
panelTabKey("agentInfo", { actorId: "previous-agent" }),
);
diff --git a/apps/web/src/features/rooms/task-sidebar/panel-tab-store.ts b/apps/web/src/features/rooms/task-sidebar/panel-tab-store.ts
index d0b7d193..29b63dbd 100644
--- a/apps/web/src/features/rooms/task-sidebar/panel-tab-store.ts
+++ b/apps/web/src/features/rooms/task-sidebar/panel-tab-store.ts
@@ -165,7 +165,7 @@ export function ensureDefaultAgentInfoTab(
return openPanelTab(scope, {
kind: "agentInfo",
actorId: agent.id,
- title: `Agent · ${agent.display_name}`,
+ title: agent.display_name,
});
}
@@ -182,7 +182,7 @@ export function retargetAgentInfoTab(
return openPanelTab(scope, {
actorId: toPeer.id,
kind: "agentInfo",
- title: `Agent · ${toPeer.display_name}`,
+ title: toPeer.display_name,
});
}
diff --git a/apps/web/src/features/rooms/task-sidebar/panel-tab-strip.tsx b/apps/web/src/features/rooms/task-sidebar/panel-tab-strip.tsx
index 2d1bc4a8..7b73f5c3 100644
--- a/apps/web/src/features/rooms/task-sidebar/panel-tab-strip.tsx
+++ b/apps/web/src/features/rooms/task-sidebar/panel-tab-strip.tsx
@@ -16,11 +16,16 @@ import {
} from "@hugeicons/core-free-icons";
import { ActionMenu, type ActionMenuItem } from "@/components/ui/action-menu";
import { Icon } from "@/components/ui/icon";
+import { useT } from "@/i18n/use-translation";
+
+import { roomSurfaceMessages } from "../room-surface.messages";
import { ActorAvatar } from "../members/actor-avatar";
import type { PanelCreateChoice } from "./panel-create-items";
import { panelCreateItems } from "./panel-create-items";
+import { panelTabText } from "./panel-tab-label";
import type { PanelTab } from "./panel-tab-types";
+import { sidePanelMessages as m } from "./side-panel.messages";
const kindIcons = {
agentActivity: Activity01Icon,
@@ -66,15 +71,17 @@ export function PanelTabStrip({
>;
tabs: PanelTab[];
}) {
+ const t = useT();
const { scrollRef, preview, clearDrag, onDragOver, onDrop, onDragStart } =
usePanelTabDrag({ activeTabId, launcherOpen, onReorder, tabs });
- const resizeLabel = maximized ? "Restore sidebar" : "Maximize sidebar";
+ const resizeLabel = t(maximized ? m.restoreSidebar : m.maximizeSidebar);
+ const hideLabel = t(roomSurfaceMessages.hideSidebar);
const resizeIcon = maximized ? ArrowShrink01Icon : ArrowExpand01Icon;
const createItems: ActionMenuItem[] = panelCreateItems(includeAgentInfo).map(
(item) => {
return {
icon: <Icon icon={kindIcons[item.kind] ?? File01Icon} size={14} />,
- label: item.label,
+ label: t(item.label),
onSelect: () => onCreate(item.kind),
};
},
@@ -89,7 +96,7 @@ export function PanelTabStrip({
<ActionMenu
buttonClassName="flex size-7 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-accent hover:text-foreground"
items={createItems}
- label="Add panel view"
+ label={t(m.addPanelView)}
trigger={<Icon icon={PlusSignIcon} size={16} />}
/>
@@ -105,10 +112,11 @@ export function PanelTabStrip({
<Icon icon={resizeIcon} size={16} />
</button>
<button
- aria-label="Hide sidebar"
+ data-voice-close
+ aria-label={hideLabel}
className="flex size-7 items-center justify-center rounded-lg bg-card text-foreground shadow-outline transition-colors hover:bg-muted"
onClick={onCollapse}
- title="Hide sidebar"
+ title={hideLabel}
type="button"
>
<SidebarVisibilityIcon />
@@ -126,7 +134,7 @@ export function PanelTabStrip({
<div className="flex min-w-0 flex-1 items-center gap-0.5 pl-1">
{/* eslint-disable-next-line jsx-a11y/interactive-supports-focus -- composite widget: focus is managed on its child items */}
<div
- aria-label="Panel tabs"
+ aria-label={t(m.panelTabs)}
className="panel-tab-scroll flex min-w-0 flex-1 items-center gap-1 overflow-x-auto overflow-y-hidden"
ref={scrollRef}
role="tablist"
@@ -154,14 +162,8 @@ export function PanelTabStrip({
const selected = tab.id === activeTabId;
const tabIcon = kindIcons[tab.kind] ?? File01Icon;
const status = statusByTabId[tab.id];
- const label = tab.title;
// The icons identify Agent and Activity tabs; show just the name.
- const visibleLabel =
- tab.kind === "agentInfo"
- ? label.replace(/^Agent · /, "")
- : tab.kind === "agentActivity"
- ? label.replace(/^Activity · /, "")
- : label;
+ const { label, name: visibleLabel } = panelTabText(tab, t);
return (
<div
className={`panel-tab-item group relative flex h-7 w-[128px] flex-none items-stretch rounded-full motion-safe:transition-transform motion-safe:duration-150 motion-safe:ease-out ${isGhost ? "outline outline-1 outline-dashed outline-app-focus bg-app-hover [&>button]:opacity-25" : ""} ${
@@ -263,7 +265,8 @@ export function PanelTabStrip({
</span>
</button>
<button
- aria-label={`Close ${label}`}
+ data-voice-close
+ aria-label={t(m.closeTab, { title: label })}
className={`panel-tab-close mr-1 flex size-5 shrink-0 self-center items-center justify-center rounded-full text-muted-foreground hover:bg-muted hover:text-foreground ${
selected
? "opacity-100"
@@ -281,7 +284,7 @@ export function PanelTabStrip({
<ActionMenu
buttonClassName="flex size-7 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-accent hover:text-foreground"
items={createItems}
- label="Add panel view"
+ label={t(m.addPanelView)}
trigger={<Icon icon={PlusSignIcon} size={16} />}
/>
</div>
@@ -298,10 +301,11 @@ export function PanelTabStrip({
<Icon icon={resizeIcon} size={16} />
</button>
<button
- aria-label="Hide sidebar"
+ data-voice-close
+ aria-label={hideLabel}
className="flex size-7 items-center justify-center rounded-lg bg-card text-foreground shadow-outline transition-colors hover:bg-muted"
onClick={onCollapse}
- title="Hide sidebar"
+ title={hideLabel}
type="button"
>
<SidebarVisibilityIcon />
diff --git a/apps/web/src/features/rooms/task-sidebar/panel-tab-title.ts b/apps/web/src/features/rooms/task-sidebar/panel-tab-title.ts
index b27187ba..15463260 100644
--- a/apps/web/src/features/rooms/task-sidebar/panel-tab-title.ts
+++ b/apps/web/src/features/rooms/task-sidebar/panel-tab-title.ts
@@ -1,6 +1,10 @@
+/**
+ * The name a Message tab is saved with: the start of its text. An empty name
+ * is worded as "Untitled" when the tab is shown.
+ */
export function panelTabTitle(body: string) {
const normalized = body.trim().replace(/\s+/g, " ");
return normalized.length > 24
? `${normalized.slice(0, 24).trimEnd()}…`
- : normalized || "Untitled";
+ : normalized;
}
diff --git a/apps/web/src/features/rooms/task-sidebar/panel-tab-types.ts b/apps/web/src/features/rooms/task-sidebar/panel-tab-types.ts
index 65a7d402..d35e2c3a 100644
--- a/apps/web/src/features/rooms/task-sidebar/panel-tab-types.ts
+++ b/apps/web/src/features/rooms/task-sidebar/panel-tab-types.ts
@@ -53,6 +53,11 @@ export const PANEL_COLLECTION_TAB_IDS = {
url: "url:preview",
} as const;
+/**
+ * The names collection tabs are saved with. They stay English because earlier
+ * versions show the saved name; the tab strip words these tabs from their kind
+ * (see panel-tab-label.ts).
+ */
export const PANEL_COLLECTION_TAB_TITLES = {
file: "Files",
thread: "Anotherme",
diff --git a/apps/web/src/features/rooms/task-sidebar/room-info-panel.tsx b/apps/web/src/features/rooms/task-sidebar/room-info-panel.tsx
index aa36560d..8ef89c17 100644
--- a/apps/web/src/features/rooms/task-sidebar/room-info-panel.tsx
+++ b/apps/web/src/features/rooms/task-sidebar/room-info-panel.tsx
@@ -6,6 +6,7 @@ import {
import { useState } from "react";
import { Icon } from "@/components/ui/icon";
+import { useT } from "@/i18n/use-translation";
import type {
TeamHubActorRef,
@@ -16,8 +17,13 @@ import { ActorAvatar } from "../members/actor-avatar";
import { RoomAvatar } from "../members/room-avatar";
import { cn } from "@/lib/cn";
+import { sidePanelMessages as m } from "./side-panel.messages";
+
type InfoView = "agents" | "files";
+const viewLabels = { agents: m.sectionAgents, files: m.sectionFiles };
+const kindLabels = { agent: m.kindAgent, human: m.kindHuman };
+
export function RoomInfoPanel({
documents,
hidden = false,
@@ -33,6 +39,7 @@ export function RoomInfoPanel({
onOpenRoomSettings?: () => void;
roomName: string;
}) {
+ const t = useT();
const [view, setView] = useState<InfoView>("agents");
return (
@@ -53,10 +60,10 @@ export function RoomInfoPanel({
<h1 className="truncate text-xl text-foreground">{roomName}</h1>
{onOpenRoomSettings ? (
<button
- aria-label="Edit Room"
+ aria-label={t(m.editRoom)}
className="flex size-7 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-accent hover:text-foreground"
onClick={onOpenRoomSettings}
- title="Edit Room"
+ title={t(m.editRoom)}
type="button"
>
<Icon icon={PencilEdit01Icon} size={14} />
@@ -64,7 +71,7 @@ export function RoomInfoPanel({
) : null}
</div>
<div
- aria-label={`${members.length} ${members.length === 1 ? "member" : "members"}`}
+ aria-label={t(m.memberCount, { count: members.length })}
className="mt-5 flex h-7 items-center justify-center rounded-full bg-muted px-2.5"
>
<div className="flex items-center pl-1">
@@ -92,7 +99,7 @@ export function RoomInfoPanel({
</header>
<div
- aria-label="Room info sections"
+ aria-label={t(m.roomInfoSections)}
className="mt-6 flex items-center gap-1"
role="tablist"
>
@@ -112,7 +119,7 @@ export function RoomInfoPanel({
role="tab"
type="button"
>
- {item}
+ {t(viewLabels[item])}
</button>
);
})}
@@ -137,13 +144,13 @@ export function RoomInfoPanel({
{member.display_name}
</span>
<span className="text-xs capitalize text-muted-foreground">
- {member.kind}
+ {t(kindLabels[member.kind])}
</span>
</div>
))}
</div>
) : (
- <EmptyInfo label="No members" />
+ <EmptyInfo label={t(m.noMembers)} />
)
) : documents.length ? (
<div className="space-y-1">
@@ -166,7 +173,7 @@ export function RoomInfoPanel({
))}
</div>
) : (
- <EmptyInfo label="No Room files" />
+ <EmptyInfo label={t(m.noRoomFiles)} />
)}
</div>
</div>
diff --git a/apps/web/src/features/rooms/task-sidebar/room-task-sidebar-impl.tsx b/apps/web/src/features/rooms/task-sidebar/room-task-sidebar-impl.tsx
index 0ca17f90..3f1140b7 100644
--- a/apps/web/src/features/rooms/task-sidebar/room-task-sidebar-impl.tsx
+++ b/apps/web/src/features/rooms/task-sidebar/room-task-sidebar-impl.tsx
@@ -248,22 +248,21 @@ export function RoomTaskSidebarImpl({
const actor = actors.items.find(
(candidate) => candidate.id === actorId,
);
- const name = actor?.display_name || "Agent";
setTabState(
openPanelTab(scope, {
kind: "agentInfo",
actorId,
activityRunStatusId: next?.runStatusId,
anchorMessageId: next?.messageId,
- title: `Agent · ${name}`,
+ title: actor?.display_name ?? "",
}),
);
if (next?.messageId) onActiveMessageChange?.(next.messageId);
}}
onAgentActivityChange={(actorId, next) => {
- const name =
- actors.items.find((actor) => actor.id === actorId)?.display_name ||
- "Agent";
+ const actor = actors.items.find(
+ (candidate) => candidate.id === actorId,
+ );
setTabState(
openPanelTab(scope, {
kind: "agentActivity",
@@ -271,7 +270,7 @@ export function RoomTaskSidebarImpl({
activityRunStatusId: next?.runStatusId,
activityRoomId: next?.activityRoomId,
anchorMessageId: next?.messageId,
- title: `Activity · ${name}`,
+ title: actor?.display_name ?? "",
}),
);
if (
@@ -360,7 +359,7 @@ function openPanelCreationChoice(
return openPanelTab(scope, {
kind: "agentInfo",
actorId: directPeer.id,
- title: `Agent · ${directPeer.display_name}`,
+ title: directPeer.display_name,
});
}
return openPanelTab(scope, {
diff --git a/apps/web/src/features/rooms/task-sidebar/side-panel.messages.ts b/apps/web/src/features/rooms/task-sidebar/side-panel.messages.ts
new file mode 100644
index 00000000..c7c94c50
--- /dev/null
+++ b/apps/web/src/features/rooms/task-sidebar/side-panel.messages.ts
@@ -0,0 +1,75 @@
+import { defineMessages } from "@/i18n/messages";
+
+/**
+ * The frame of the Room side panel: its tab strip, the "Add panel view" menu,
+ * the launcher shown when no tab is open, and the loading and error states
+ * around a panel. What each panel shows inside is declared with that panel.
+ */
+export const sidePanelMessages = defineMessages("sidePanel", {
+ panelSidebar: "Panel sidebar",
+ resizeSidebar: "Resize sidebar",
+ dragToResize: "Drag to resize",
+ panelTabs: "Panel tabs",
+ addPanelView: "Add panel view",
+ maximizeSidebar: "Maximize sidebar",
+ restoreSidebar: "Restore sidebar",
+ closeTab: "Close {title}",
+ // Tab titles. A tab is saved with a name only; these word it on screen.
+ agentTab: "Agent · {name}",
+ activityTab: "Activity · {name}",
+ agentFallbackName: "Agent",
+ filesTab: "Files",
+ roomInfo: "Room info",
+ collaboration: "Collaboration",
+ untitledTab: "Untitled",
+ // The "Add panel view" menu and the launcher.
+ documents: "Documents",
+ agentInfo: "Agent info",
+ launcherTitle: "Conversation details",
+ launcherBodyWithAgent:
+ "Agent settings, routines, activity, and shared documents — alongside your chat.",
+ launcherBody: "Shared documents and message threads — alongside your chat.",
+ agentInfoHint: "{name} · Settings & activity",
+ sharedDocumentCount: {
+ one: "{count} shared document",
+ other: "{count} shared documents",
+ },
+ browseSharedFiles: "Browse files shared in this conversation",
+ collaborationHint: "Agent responsibilities and relationships",
+ launcherFooter:
+ "Open a message thread, document, or routine to view it here. Your chat stays in place.",
+ // Loading and error states around a panel.
+ loadingTask: "Loading task",
+ loadingCollaboration: "Loading collaboration",
+ loadingFile: "Loading file",
+ loadingActivity: "Loading activity",
+ taskLoadFailedTitle: "Task could not be loaded",
+ taskLoadFailedBody: "The complete Room history could not be loaded.",
+ taskLoadingTitle: "Loading Task",
+ taskLoadingBody: "Looking through the Room history...",
+ messageGoneTitle: "This message no longer exists",
+ messageGoneBody: "This Message is not available in the current Room history.",
+ activityLoadFailed: "Activity history could not be loaded.",
+ agentActivityRegion: "{name} activity",
+ backToActivity: "Back to Activity",
+ loadEarlierActivity: "Load earlier activity",
+ retryEarlierActivity: "Retry loading earlier activity",
+ // The Anotherme draft panel.
+ greeting: "Good afternoon",
+ greetingWithName: "Good afternoon, {name}",
+ attachToAnotherme: "Attach to Anotherme message",
+ attach: "Attach",
+ messageAnotherme: "Message Anotherme",
+ sendAnothermeMessage: "Send Anotherme message",
+ send: "Send",
+ // Room info. The section and kind names are capitalized by the style sheet.
+ editRoom: "Edit Room",
+ memberCount: { one: "{count} member", other: "{count} members" },
+ roomInfoSections: "Room info sections",
+ sectionAgents: "agents",
+ sectionFiles: "files",
+ kindAgent: "agent",
+ kindHuman: "human",
+ noMembers: "No members",
+ noRoomFiles: "No Room files",
+});
diff --git a/apps/web/src/features/rooms/task-sidebar/task-sidebar.tsx b/apps/web/src/features/rooms/task-sidebar/task-sidebar.tsx
index 1e18f6cc..056e1817 100644
--- a/apps/web/src/features/rooms/task-sidebar/task-sidebar.tsx
+++ b/apps/web/src/features/rooms/task-sidebar/task-sidebar.tsx
@@ -14,6 +14,8 @@ import { useReducedMotion } from "motion/react";
import { Button } from "@/components/ui/button";
import { useTeamHubRuntime } from "@/features/teamhub/teamhub-runtime";
+import { commonMessages } from "@/i18n/common.messages";
+import { useT } from "@/i18n/use-translation";
import { roomMessagesInfiniteQueryOptions } from "../room-queries";
import { Icon } from "@/components/ui/icon";
import type {
@@ -44,6 +46,7 @@ import { selectMountedTaskTabs } from "./task-keep-alive";
import type { TaskAnchorResolution } from "./task-tab-types";
import { UrlPreviewPanel } from "./url-preview-panel";
import { PanelLoading } from "./panel-loading";
+import { sidePanelMessages as m } from "./side-panel.messages";
// Opening Agent info or tasks should not load the document editor.
const TaskActivitiesPanelTab = lazy(() =>
@@ -189,6 +192,7 @@ export function TaskSidebar({
const focusActiveTabRef = useRef(false);
const activeTabIdRef = useRef(activeTabId);
const sidebarWidth = clampPanelSidebarWidth(preferredWidth);
+ const t = useT();
const reduceMotion = useReducedMotion();
const exitAnimationEndRef = useRef(onExitAnimationEnd);
useLayoutEffect(() => {
@@ -306,10 +310,11 @@ export function TaskSidebar({
return (
<aside
aria-busy={activeResolution === "loading" || undefined}
- aria-label="Panel sidebar"
+ aria-label={t(m.panelSidebar)}
className={`panel-sidebar relative h-full min-h-0 shrink-0 ${activeTab?.kind === "agentInfo" ? "bg-card" : "bg-sidebar"}`}
data-dragging={dragging || undefined}
data-open={expanded ? "true" : "false"}
+ data-voice-area="sidebar"
data-voice-closable={expanded || undefined}
data-maximized={maximized || undefined}
inert={!open || undefined}
@@ -576,12 +581,13 @@ function MountedPanelTab({
tasksByMessageId,
tenantId,
}: MountedPanelTabProps) {
+ const t = useT();
if (!tab) return null;
const hidden = tabId !== activeTabId;
if (tab.kind === "taskActivity" && tab.taskId) {
return (
- <Suspense fallback={<PanelLoading label="Loading task" />}>
+ <Suspense fallback={<PanelLoading label={t(m.loadingTask)} />}>
<TaskActivitiesPanelTab
hidden={hidden || !sidebarOpen}
taskId={tab.taskId}
@@ -596,7 +602,7 @@ function MountedPanelTab({
return (
<AgentActivityTab
actorId={actor?.id ?? tab.actorId ?? ""}
- actorName={actor?.display_name ?? "Agent"}
+ actorName={actor?.display_name ?? t(m.agentFallbackName)}
hidden={hidden || !sidebarOpen}
onChange={onAgentActivityChange}
roomId={roomId}
@@ -610,7 +616,7 @@ function MountedPanelTab({
if (tab.kind === "agentInfo") {
const actor = resolvePanelAgentActor(actors, tab.actorId, directPeer);
const activityActorId = actor?.id ?? tab.actorId ?? "";
- const actorName = actor?.display_name ?? "Agent";
+ const actorName = actor?.display_name ?? t(m.agentFallbackName);
const nestedActivityMessage = tab.anchorMessageId
? roomMessages.find((message) => message.id === tab.anchorMessageId)
: undefined;
@@ -656,7 +662,7 @@ function MountedPanelTab({
if (isPanelCollectionTab(tab)) {
if (tab.kind === "collaboration") {
return (
- <Suspense fallback={<PanelLoading label="Loading collaboration" />}>
+ <Suspense fallback={<PanelLoading label={t(m.loadingCollaboration)} />}>
<CollaborationPanel
actors={roomMembers}
hidden={hidden || !sidebarOpen}
@@ -715,7 +721,7 @@ function MountedPanelTab({
if (tab.kind === "file") {
return (
- <Suspense fallback={<PanelLoading label="Loading file" />}>
+ <Suspense fallback={<PanelLoading label={t(m.loadingFile)} />}>
<ConnectedFilePanelTab
currentActorId={currentActorId}
documentId={tab.documentId!}
@@ -770,6 +776,7 @@ function AnothermePanel({
displayName?: string;
hidden: boolean;
}) {
+ const t = useT();
return (
<div
className={
@@ -792,26 +799,29 @@ function AnothermePanel({
<span className="size-16 rounded-full bg-muted" />
)}
<h3 className="mt-5 text-base font-semibold text-foreground">
- Good afternoon{displayName ? `, ${displayName}` : ""}
+ {displayName
+ ? t(m.greetingWithName, { name: displayName })
+ : t(m.greeting)}
</h3>
<div className="absolute inset-x-3 bottom-3 flex h-12 items-center gap-2 rounded-xl bg-card px-2 shadow-sm">
<button
- aria-label="Attach to Anotherme message"
+ aria-label={t(m.attachToAnotherme)}
className="flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground"
disabled
- title="Attach"
+ title={t(m.attach)}
type="button"
>
<Icon icon={PlusSignIcon} size={16} />
</button>
<span className="min-w-0 flex-1 text-left text-sm text-muted-foreground">
- Message Anotherme
+ {t(m.messageAnotherme)}
</span>
<button
- aria-label="Send Anotherme message"
+ data-voice-risk="never"
+ aria-label={t(m.sendAnothermeMessage)}
className="flex size-8 shrink-0 items-center justify-center rounded-full bg-(--composer-send) text-white opacity-50"
disabled
- title="Send"
+ title={t(m.send)}
type="button"
>
<Icon icon={ArrowUp02Icon} size={16} />
@@ -834,18 +844,19 @@ function TaskResolutionBody({
tabId: string;
title?: string;
}) {
+ const t = useT();
const content = {
error: {
- description: "The complete Room history could not be loaded.",
- title: title ?? "Task could not be loaded",
+ description: t(m.taskLoadFailedBody),
+ title: title ?? t(m.taskLoadFailedTitle),
},
loading: {
- description: "Looking through the Room history...",
- title: title ?? "Loading Task",
+ description: t(m.taskLoadingBody),
+ title: title ?? t(m.taskLoadingTitle),
},
unavailable: {
- description: "This Message is not available in the current Room history.",
- title: title ?? "This message no longer exists",
+ description: t(m.messageGoneBody),
+ title: title ?? t(m.messageGoneTitle),
},
}[resolution];
@@ -867,7 +878,7 @@ function TaskResolutionBody({
</p>
{onRetry ? (
<Button className="mt-3" onClick={onRetry} size="compact">
- Retry
+ {t(commonMessages.retry)}
</Button>
) : null}
</div>
@@ -894,6 +905,7 @@ function AgentActivityTab({
tab: PanelTab;
tenantId: string;
}) {
+ const t = useT();
const { client } = useTeamHubRuntime();
const targetRoomId = tab.activityRoomId ?? roomId;
const query = useInfiniteQuery({
@@ -921,19 +933,19 @@ function AgentActivityTab({
messages={roomMessages}
messagesRoomId={roomId}
onBack={back}
- backLabel="Back to Activity"
+ backLabel={t(m.backToActivity)}
roomId={targetRoomId}
tenantId={tenantId}
/>
);
if (targetRoomId !== roomId && query.isPending && !hidden)
- return <PanelLoading label="Loading activity" />;
+ return <PanelLoading label={t(m.loadingActivity)} />;
if (targetRoomId !== roomId && query.isError && !query.data && !hidden)
return (
<div role="alert" className="p-4 text-sm">
- <p>Activity history could not be loaded.</p>
+ <p>{t(m.activityLoadFailed)}</p>
<Button tone="secondary" onClick={() => void query.refetch()}>
- Retry
+ {t(commonMessages.retry)}
</Button>
</div>
);
@@ -944,14 +956,14 @@ function AgentActivityTab({
hidden={hidden}
message={message}
onBack={back}
- backLabel="Back to Activity"
+ backLabel={t(m.backToActivity)}
roomId={targetRoomId}
tenantId={tenantId}
/>
);
return (
<div
- aria-label={`${actorName} activity`}
+ aria-label={t(m.agentActivityRegion, { name: actorName })}
className={
hidden ? "hidden" : "workspace-scrollbar h-full min-h-0 overflow-y-auto"
}
@@ -982,10 +994,10 @@ function AgentActivityTab({
onClick={() => void query.fetchNextPage()}
>
{query.isFetchingNextPage
- ? "Loading…"
+ ? t(commonMessages.loading)
: query.isFetchNextPageError
- ? "Retry loading earlier activity"
- : "Load earlier activity"}
+ ? t(m.retryEarlierActivity)
+ : t(m.loadEarlierActivity)}
</Button>
</div>
) : null}
diff --git a/apps/web/src/features/rooms/use-room-panel-sidebar.ts b/apps/web/src/features/rooms/use-room-panel-sidebar.ts
index ed71ab3e..e5b2e666 100644
--- a/apps/web/src/features/rooms/use-room-panel-sidebar.ts
+++ b/apps/web/src/features/rooms/use-room-panel-sidebar.ts
@@ -38,8 +38,8 @@ export function useRoomPanelSidebar({
const title =
input.title ??
(input.kind === "file"
- ? (input.documentId ?? "Document")
- : panelTabTitle(input.anchorMessageId ?? "Untitled"));
+ ? (input.documentId ?? "")
+ : panelTabTitle(input.anchorMessageId ?? ""));
persistOpenPanelTab(scope, {
kind: input.kind,
activityRunStatusId: input.activityRunStatusId,
diff --git a/apps/web/src/i18n/locales/zh-CN.glossary.md b/apps/web/src/i18n/locales/zh-CN.glossary.md
index 9371bc59..d2904ffc 100644
--- a/apps/web/src/i18n/locales/zh-CN.glossary.md
+++ b/apps/web/src/i18n/locales/zh-CN.glossary.md
@@ -165,6 +165,8 @@ elsewhere.
| Email (an address) | 邮箱 | `邮件` is a message that is sent. |
| Keep (a Wiki page) | 保留 | The opposite of Delete in the Wiki directory. |
| Session (a sign-in) | 登录 / 浏览器会话 | `会话` only for the browser session. |
+| Panel, Panel view | 面板、面板视图 | A view in the Room's side panel. |
+| Collaboration | 协作 | The panel on how a Room's Agents work together. |
## Style
diff --git a/apps/web/src/i18n/locales/zh-CN.json b/apps/web/src/i18n/locales/zh-CN.json
index 93e54b38..84d01748 100644
--- a/apps/web/src/i18n/locales/zh-CN.json
+++ b/apps/web/src/i18n/locales/zh-CN.json
@@ -1442,8 +1442,6 @@
"runningMinutes": "{minutes} 分钟",
"runningHours": "{hours} 小时",
"runningDays": "{days} 天",
- "activityTabTitle": "活动 · {name}",
- "agentTabTitle": "Agent · {name}",
"linkedSourceMessage": "链接的原消息",
"closeLinkedSourceMessage": "关闭链接的原消息",
"loadingSourceMessage": "正在加载原消息…",
@@ -2121,5 +2119,63 @@
"teamHubUnreachable": "无法连接 TeamHub,请重试。",
"logoutUnconfirmed": "无法确认是否已退出登录,请重试。",
"logoutUnsavedDocuments": "有些文档的修改还没有保存。要退出登录并放弃这些修改吗?"
+ },
+ "sidePanel": {
+ "panelSidebar": "面板侧边栏",
+ "resizeSidebar": "调整侧边栏宽度",
+ "dragToResize": "拖动调整宽度",
+ "panelTabs": "面板标签页",
+ "addPanelView": "添加面板视图",
+ "maximizeSidebar": "最大化侧边栏",
+ "restoreSidebar": "还原侧边栏",
+ "closeTab": "关闭 {title}",
+ "agentTab": "Agent · {name}",
+ "activityTab": "活动 · {name}",
+ "agentFallbackName": "Agent",
+ "filesTab": "文件",
+ "roomInfo": "Room 信息",
+ "collaboration": "协作",
+ "untitledTab": "未命名",
+ "documents": "文档",
+ "agentInfo": "Agent 信息",
+ "launcherTitle": "对话详情",
+ "launcherBodyWithAgent": "Agent 设置、Routine、活动和共享文档,都在对话旁边。",
+ "launcherBody": "共享文档和消息话题,都在对话旁边。",
+ "agentInfoHint": "{name} · 设置与活动",
+ "sharedDocumentCount": { "other": "{count} 个共享文档" },
+ "browseSharedFiles": "浏览这个对话中共享的文件",
+ "collaborationHint": "Agent 的职责与关系",
+ "launcherFooter": "打开消息话题、文档或 Routine,就会显示在这里,对话保持原位。",
+ "loadingTask": "正在加载任务",
+ "loadingCollaboration": "正在加载协作",
+ "loadingFile": "正在加载文件",
+ "loadingActivity": "正在加载活动",
+ "taskLoadFailedTitle": "无法加载任务",
+ "taskLoadFailedBody": "无法加载完整的 Room 历史。",
+ "taskLoadingTitle": "正在加载任务",
+ "taskLoadingBody": "正在查找 Room 历史…",
+ "messageGoneTitle": "这条消息已不存在",
+ "messageGoneBody": "当前的 Room 历史中找不到这条消息。",
+ "activityLoadFailed": "无法加载活动历史。",
+ "agentActivityRegion": "{name} 的活动",
+ "backToActivity": "返回活动",
+ "loadEarlierActivity": "加载更早的活动",
+ "retryEarlierActivity": "重新加载更早的活动",
+ "greeting": "下午好",
+ "greetingWithName": "下午好,{name}",
+ "attachToAnotherme": "为 Anotherme 消息添加附件",
+ "attach": "添加附件",
+ "messageAnotherme": "给 Anotherme 发消息",
+ "sendAnothermeMessage": "发送 Anotherme 消息",
+ "send": "发送",
+ "editRoom": "编辑 Room",
+ "memberCount": { "other": "{count} 位成员" },
+ "roomInfoSections": "Room 信息分区",
+ "sectionAgents": "Agent",
+ "sectionFiles": "文件",
+ "kindAgent": "Agent",
+ "kindHuman": "成员",
+ "noMembers": "暂无成员",
+ "noRoomFiles": "暂无 Room 文件"
}
}