Rename sidebar Team section to Conversations (Unterhaltungen)
Conversation threads (1:1 and group) live under Unterhaltungen with the group-start action. Projekte keeps thematic project creation only; thread lists no longer split across Team and Projekte. Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
This commit is contained in:
parent
ff3e358e27
commit
ae0b8c256d
@ -12,19 +12,20 @@ async function createBot(page: Page, name: string) {
|
||||
return createNamedBot(page, name);
|
||||
}
|
||||
|
||||
test("start group conversation is top-level, not inside Projekte", async ({ page }) => {
|
||||
test("start group conversation lives under Conversations, not Projekte", async ({ page }) => {
|
||||
const stamp = Date.now();
|
||||
await signup(page, `group-ia-${stamp}@rakazo.test`, "password12", "Group IA");
|
||||
await completeOnboarding(page);
|
||||
await page.goto("/app");
|
||||
await page.waitForURL(/\/app\/[^/]+$/);
|
||||
|
||||
const startGroup = page.getByTestId("start-group-conversation");
|
||||
const conversations = page.locator(".sidebar-conversations");
|
||||
await expect(conversations.getByText("Conversations", { exact: true })).toBeVisible();
|
||||
const startGroup = conversations.getByTestId("start-group-conversation");
|
||||
await expect(startGroup).toBeVisible();
|
||||
await expect(page.locator(".sidebar-projekte").getByTestId("start-group-conversation")).toHaveCount(
|
||||
0,
|
||||
);
|
||||
await expect(page.locator(".sidebar-projekte")).toContainText("Projekte");
|
||||
await expect(page.locator(".sidebar-projekte")).not.toContainText("Start a group conversation");
|
||||
});
|
||||
|
||||
|
||||
@ -477,6 +477,10 @@
|
||||
"Server URL": "Server-URL",
|
||||
"Set up voice to call": "Stimme für Anrufe einrichten",
|
||||
"Settings": "Einstellungen",
|
||||
"Conversations": "Unterhaltungen",
|
||||
"One-to-one and group threads": "Einzel- und Gruppengespräche",
|
||||
"No conversations yet.": "Noch keine Unterhaltungen.",
|
||||
"Add an Oo": "Oo hinzufügen",
|
||||
"Start a group conversation": "Gruppengespräch starten",
|
||||
"No projects yet.": "Noch keine Projekte.",
|
||||
"Create a project": "Projekt erstellen",
|
||||
|
||||
@ -221,6 +221,9 @@ msgid "Add"
|
||||
msgstr "Hinzufügen"
|
||||
|
||||
#: src/components/ApprovalRulesSettings.tsx:151
|
||||
msgid "Add an Oo"
|
||||
msgstr "Oo hinzufügen"
|
||||
|
||||
msgid "Add a model in Settings to use this."
|
||||
msgstr ""
|
||||
|
||||
@ -1022,6 +1025,9 @@ msgstr "Die Verbindung zu {0} steht noch aus. Du kannst dieses Fenster schließe
|
||||
|
||||
#: src/pages/ModelSettingsOverlay.tsx:590
|
||||
#: src/pages/Onboarding.tsx:519
|
||||
msgid "Conversations"
|
||||
msgstr "Unterhaltungen"
|
||||
|
||||
msgid "Context limit"
|
||||
msgstr "Kontextlimit"
|
||||
|
||||
@ -2536,6 +2542,9 @@ msgid "No model catalog is available."
|
||||
msgstr "Kein Modellkatalog verfügbar."
|
||||
|
||||
#: src/pages/Shell.tsx:3086
|
||||
msgid "No conversations yet."
|
||||
msgstr "Noch keine Unterhaltungen."
|
||||
|
||||
msgid "No projects yet."
|
||||
msgstr "Noch keine Projekte."
|
||||
|
||||
@ -3896,6 +3905,9 @@ msgid "Discovery"
|
||||
msgstr "Entdeckung"
|
||||
|
||||
#: src/pages/Onboarding.tsx:428
|
||||
msgid "One-to-one and group threads"
|
||||
msgstr "Einzel- und Gruppengespräche"
|
||||
|
||||
msgid "One connection — then we take it from here"
|
||||
msgstr "Eine Verbindung — danach übernehmen wir"
|
||||
|
||||
|
||||
@ -220,6 +220,9 @@ msgid "Add"
|
||||
msgstr "Add"
|
||||
|
||||
#: src/components/ApprovalRulesSettings.tsx:151
|
||||
msgid "Add an Oo"
|
||||
msgstr "Add an Oo"
|
||||
|
||||
msgid "Add a model in Settings to use this."
|
||||
msgstr "Add a model in Settings to use this."
|
||||
|
||||
@ -1021,6 +1024,9 @@ msgstr "Connection to {0} is still pending. You can close this and check again."
|
||||
|
||||
#: src/pages/ModelSettingsOverlay.tsx:590
|
||||
#: src/pages/Onboarding.tsx:519
|
||||
msgid "Conversations"
|
||||
msgstr "Conversations"
|
||||
|
||||
msgid "Context limit"
|
||||
msgstr "Context limit"
|
||||
|
||||
@ -2535,6 +2541,9 @@ msgid "No model catalog is available."
|
||||
msgstr "No model catalog is available."
|
||||
|
||||
#: src/pages/ModelSettingsOverlay.tsx:453
|
||||
msgid "No conversations yet."
|
||||
msgstr "No conversations yet."
|
||||
|
||||
msgid "No projects yet."
|
||||
msgstr "No projects yet."
|
||||
|
||||
@ -3894,6 +3903,9 @@ msgid "Discovery"
|
||||
msgstr "Discovery"
|
||||
|
||||
#: src/pages/Onboarding.tsx:428
|
||||
msgid "One-to-one and group threads"
|
||||
msgstr "One-to-one and group threads"
|
||||
|
||||
msgid "One connection — then we take it from here"
|
||||
msgstr "One connection — then we take it from here"
|
||||
|
||||
|
||||
@ -3038,22 +3038,6 @@ export function ShellPage() {
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
data-testid="start-group-conversation"
|
||||
onClick={() => {
|
||||
setMobileSidebarOpen(false);
|
||||
setPanel("create-group");
|
||||
}}
|
||||
className="mx-0 mb-2 flex w-full items-center gap-3 rounded-xl px-2.5 py-2 hover:bg-sidebar-accent"
|
||||
>
|
||||
<span className="grid h-[30px] w-[30px] place-items-center rounded-lg bg-accent text-foreground/80">
|
||||
<Users strokeWidth={1.8} className="size-icon-md" />
|
||||
</span>
|
||||
<span className="text-ui-body font-medium text-foreground/90">
|
||||
<Trans>Start a group conversation</Trans>
|
||||
</span>
|
||||
</button>
|
||||
<div className="sidebar-projekte">
|
||||
{/* PROJEKTE SECTION */}
|
||||
<div className="flex items-center justify-between pt-4 pb-1 mt-2 border-t border-white/5 px-2.5">
|
||||
@ -3074,14 +3058,7 @@ export function ShellPage() {
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{sidebarGroups
|
||||
.map((group) => ({
|
||||
...group,
|
||||
bots: group.bots.filter(
|
||||
(b) => b.kind === "group" && b.chat.id !== hauptthreadGroup?.id,
|
||||
) as any[],
|
||||
}))
|
||||
.filter((group) => group.bots.length > 0 || group.emptySpaceId).length === 0 ? (
|
||||
{spaces.filter((space) => !space.isDefault).length === 0 ? (
|
||||
<div className="p-4 text-center text-ui-label text-muted-foreground">
|
||||
<p>{t`No projects yet.`}</p>
|
||||
<Button
|
||||
@ -3095,163 +3072,19 @@ export function ShellPage() {
|
||||
</Button>
|
||||
</div>
|
||||
) : null}
|
||||
{sidebarGroups
|
||||
.map((group) => ({
|
||||
...group,
|
||||
bots: group.bots.filter(
|
||||
(b) => b.kind === "group" && b.chat.id !== hauptthreadGroup?.id,
|
||||
) as any[],
|
||||
}))
|
||||
.filter((group) => group.bots.length > 0 || group.emptySpaceId)
|
||||
.map((group) => {
|
||||
const collapsed =
|
||||
Boolean(group.title) && collapsedSidebarSections.has(group.key);
|
||||
return (
|
||||
<div key={`proj-${group.key}`} data-sidebar-group={group.key}>
|
||||
{group.title ? (
|
||||
<div className="flex items-center pt-3 pb-0.5">
|
||||
<button
|
||||
type="button"
|
||||
className="flex min-w-0 flex-1 items-center justify-between gap-2 rounded-lg px-2.5 py-1 text-ui-label font-semibold tracking-wider uppercase text-muted-foreground/60 hover:text-foreground focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-ring"
|
||||
onClick={() => {
|
||||
if (group.emptySpaceId) {
|
||||
openSpaceChat(group.emptySpaceId, "/onboarding");
|
||||
return;
|
||||
}
|
||||
toggleSidebarSection(group.key);
|
||||
}}
|
||||
onContextMenu={
|
||||
group.sectionId
|
||||
? (event) => {
|
||||
event.preventDefault();
|
||||
const sections =
|
||||
group.spaceId === bootstrapMe?.spaceId
|
||||
? botSections
|
||||
: (spaces.find((space) => space.id === group.spaceId)
|
||||
?.botSections ?? []);
|
||||
const section = sections.find(
|
||||
(item) => item.id === group.sectionId,
|
||||
);
|
||||
if (!section) return;
|
||||
sectionMenuAnchor.current = event.currentTarget;
|
||||
setSectionMenu({
|
||||
section,
|
||||
spaceId: group.spaceId,
|
||||
position: { x: event.clientX, y: event.clientY },
|
||||
});
|
||||
}
|
||||
: undefined
|
||||
}
|
||||
aria-expanded={group.emptySpaceId ? undefined : !collapsed}
|
||||
>
|
||||
<span className="flex min-w-0 items-center gap-1.5 truncate">
|
||||
{group.showLock ? (
|
||||
<Lock
|
||||
strokeWidth={2}
|
||||
aria-hidden="true"
|
||||
className="size-icon-sm"
|
||||
/>
|
||||
) : null}
|
||||
<span className="truncate">{group.title}</span>
|
||||
</span>
|
||||
{group.emptySpaceId ? null : (
|
||||
<ChevronDown
|
||||
strokeWidth={1.8}
|
||||
className={`size-icon-md ${collapsed ? "-rotate-90 transition-transform" : "transition-transform"}`}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
) : null}
|
||||
{!collapsed &&
|
||||
group.bots.map((item) => (
|
||||
<button
|
||||
key={`${item.kind}:${item.chat.id}`}
|
||||
type="button"
|
||||
aria-label={t`Group conversation ${item.chat.name}`}
|
||||
onClick={() => {
|
||||
openSpaceChat(item.chat.spaceId, `/app/g/${item.chat.id}`);
|
||||
}}
|
||||
onContextMenu={(event) => {
|
||||
if (item.chat.spaceId !== bootstrapMe?.spaceId) return;
|
||||
event.preventDefault();
|
||||
botMenuAnchor.current = event.currentTarget;
|
||||
setBotMenu({
|
||||
kind: item.kind,
|
||||
id: item.chat.id,
|
||||
position: { x: event.clientX, y: event.clientY },
|
||||
});
|
||||
}}
|
||||
className={`flex w-full items-center gap-3 rounded-2xl px-3 py-3 mb-[2px] text-start transition-all duration-150 cursor-pointer min-h-[52px] ${
|
||||
item.kind === "group" && inGroup && activeGroup?.id === item.chat.id
|
||||
? "bg-white/[0.09] shadow-[inset_0_1px_0_rgba(255,255,255,0.14),0_4px_16px_rgba(0,0,0,0.4)] border border-emerald-500/30"
|
||||
: "hover:bg-white/[0.05] border border-transparent"
|
||||
}`}
|
||||
>
|
||||
<GroupAvatar
|
||||
members={
|
||||
item.chat.id === activeSnapshot?.groupId
|
||||
? (activeSnapshot?.members ?? item.chat.members)
|
||||
: item.chat.members
|
||||
}
|
||||
size={40}
|
||||
/>
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="flex items-center justify-between gap-1.5">
|
||||
<div className="flex min-w-0 items-center gap-2 overflow-hidden">
|
||||
<span
|
||||
dir="auto"
|
||||
className={`shrink-0 max-w-[170px] truncate text-ui-body tracking-tight ${
|
||||
item.chat.unread
|
||||
? "font-bold text-white"
|
||||
: "font-semibold text-white/95"
|
||||
}`}
|
||||
>
|
||||
{item.chat.name}
|
||||
</span>
|
||||
</div>
|
||||
<div className="flex shrink-0 items-center gap-1.5">
|
||||
<span className="text-ui-body-sm text-zinc-400 tabular-nums font-medium">
|
||||
{formatRosterTime(item.chat.updatedAt)}
|
||||
</span>
|
||||
{item.chat.unread ? (
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className="inline-block h-2 w-2 rounded-full bg-emerald-400"
|
||||
/>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
dir="auto"
|
||||
className={`mt-0.5 truncate text-ui-body leading-snug ${
|
||||
item.chat.unread ? "font-medium text-white" : "text-zinc-300"
|
||||
}`}
|
||||
>
|
||||
{cleanRosterPreview(item.chat.preview) ||
|
||||
item.chat.members.map((member: any) => member.name).join(", ")}
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
<div className="sidebar-team">
|
||||
{/* TEAM SECTION */}
|
||||
<div className="sidebar-conversations">
|
||||
<div className="flex items-center justify-between pt-4 pb-1 px-2.5">
|
||||
<div>
|
||||
<div className="rk-shell-section-label">{t`Team`}</div>
|
||||
<div className="rk-shell-section-label">{t`Conversations`}</div>
|
||||
<p className="mt-0.5 px-0.5 text-ui-caption text-muted-foreground/70">
|
||||
{t`Your Oos — open a 1:1 conversation`}
|
||||
{t`One-to-one and group threads`}
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex items-center">
|
||||
<button
|
||||
type="button"
|
||||
aria-label="Neues Teammitglied"
|
||||
aria-label={t`Add an Oo`}
|
||||
onClick={() => setPanel("create")}
|
||||
className="text-muted-foreground/60 hover:text-foreground/90 transition-colors"
|
||||
>
|
||||
@ -3259,14 +3092,34 @@ export function ShellPage() {
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
data-testid="start-group-conversation"
|
||||
onClick={() => {
|
||||
setMobileSidebarOpen(false);
|
||||
setPanel("create-group");
|
||||
}}
|
||||
className="mx-0 mb-2 flex w-full items-center gap-3 rounded-xl px-2.5 py-2 hover:bg-sidebar-accent"
|
||||
>
|
||||
<span className="grid h-[30px] w-[30px] place-items-center rounded-lg bg-accent text-foreground/80">
|
||||
<Users strokeWidth={1.8} className="size-icon-md" />
|
||||
</span>
|
||||
<span className="text-ui-body font-medium text-foreground/90">
|
||||
<Trans>Start a group conversation</Trans>
|
||||
</span>
|
||||
</button>
|
||||
{sidebarGroups
|
||||
.map((group) => ({
|
||||
...group,
|
||||
bots: group.bots.filter((b) => b.kind === "bot") as any[],
|
||||
bots: group.bots.filter(
|
||||
(b) =>
|
||||
b.kind === "bot" ||
|
||||
(b.kind === "group" && b.chat.id !== hauptthreadGroup?.id),
|
||||
) as any[],
|
||||
}))
|
||||
.filter((group) => group.bots.length > 0 || group.emptySpaceId).length === 0 ? (
|
||||
<div className="p-4 text-center text-ui-label text-muted-foreground">
|
||||
<p>{t`No Oos in your team yet.`}</p>
|
||||
<p>{t`No conversations yet.`}</p>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
@ -3281,7 +3134,11 @@ export function ShellPage() {
|
||||
{sidebarGroups
|
||||
.map((group) => ({
|
||||
...group,
|
||||
bots: group.bots.filter((b) => b.kind === "bot") as any[],
|
||||
bots: group.bots.filter(
|
||||
(b) =>
|
||||
b.kind === "bot" ||
|
||||
(b.kind === "group" && b.chat.id !== hauptthreadGroup?.id),
|
||||
) as any[],
|
||||
}))
|
||||
.filter((group) => group.bots.length > 0 || group.emptySpaceId)
|
||||
.map((group) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user