Show About you inside General settings (#165)
The profile had its own settings tab although it is a few rows of personal details. It now sits as one card under Account in General, hides itself while empty, and the separate tab is gone. Claude-Session: https://claude.ai/code/session_017gHYZ4c9Twex73v4ZasmMJ Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
parent
23d70971f8
commit
3291a32d37
@ -245,7 +245,6 @@ export async function openUserSettings(
|
||||
| "integrations"
|
||||
| "models"
|
||||
| "memory"
|
||||
| "profile"
|
||||
| "voice"
|
||||
| "notifications"
|
||||
| "usage"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* E2E: Settings → About you edits a fact in place: its wording, category and the spaces it
|
||||
* E2E: Settings → General → About you edits a fact in place: its wording, category and the spaces it
|
||||
* shows in.
|
||||
*/
|
||||
import { expect, test } from "@playwright/test";
|
||||
@ -15,7 +15,7 @@ test("a fact's wording, category and spaces are edited in place", async ({ page
|
||||
addFacts: [{ category: "preferences", value: "Prefers tea" }],
|
||||
});
|
||||
|
||||
const settings = await openUserSettings(page, "profile");
|
||||
const settings = await openUserSettings(page);
|
||||
const profile = settings.getByTestId("user-profile-settings");
|
||||
const tea = profile.getByTestId("user-fact").filter({ hasText: "Prefers tea" });
|
||||
await tea.getByRole("button", { name: "Edit" }).click();
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* E2E: onboarding fills the user profile without asking (time zone, locale and language from
|
||||
* the browser) and records the focus answer as a fact; Settings → About you shows every fact
|
||||
* the browser) and records the focus answer as a fact; Settings → General → About you shows every fact
|
||||
* with its origin, confirms a pending one, and forgets one or all of them.
|
||||
*/
|
||||
import { expect, test } from "@playwright/test";
|
||||
@ -58,8 +58,8 @@ test("onboarding feeds the profile; facts can be confirmed and forgotten", async
|
||||
addFacts: [{ category: "health", value: "Allergic to peanuts", source: "onboarding" }],
|
||||
});
|
||||
|
||||
const settings = await openUserSettings(page, "profile");
|
||||
await expect(settings).toHaveAttribute("data-settings-section", "profile");
|
||||
const settings = await openUserSettings(page);
|
||||
await expect(settings).toHaveAttribute("data-settings-section", "general");
|
||||
const profile = settings.getByTestId("user-profile-settings");
|
||||
await expect(profile.getByTestId("profile-field-timeZone")).toContainText("Europe/Vienna");
|
||||
await expect(profile.getByTestId("profile-field-language")).toContainText("English");
|
||||
@ -99,6 +99,6 @@ test("onboarding feeds the profile; facts can be confirmed and forgotten", async
|
||||
|
||||
await profile.getByRole("button", { name: "Forget everything" }).click();
|
||||
await page.getByRole("alertdialog").getByRole("button", { name: "Forget", exact: true }).click();
|
||||
await expect(profile).toContainText("Nothing yet");
|
||||
await expect(profile).toHaveCount(0);
|
||||
expect(await rpc<{ facts: unknown[] }>(page, "profile/get", null)).toMatchObject({ facts: [] });
|
||||
});
|
||||
|
||||
@ -151,20 +151,22 @@ export function UserProfileSettings() {
|
||||
</Button>
|
||||
);
|
||||
|
||||
if (!error && (!state || (fields.length === 0 && groups.length === 0))) return null;
|
||||
|
||||
return (
|
||||
<div data-testid="user-profile-settings" className="space-y-5">
|
||||
<section
|
||||
data-testid="user-profile-settings"
|
||||
className="space-y-4 rounded-xl border border-border px-4 py-4"
|
||||
>
|
||||
<h3 className="text-ui-body font-medium text-foreground">
|
||||
<Trans>About you</Trans>
|
||||
</h3>
|
||||
{error ? (
|
||||
<p role="alert" className="text-ui-body-sm text-destructive">
|
||||
{error}
|
||||
</p>
|
||||
) : null}
|
||||
{state && fields.length === 0 && groups.length === 0 ? (
|
||||
<p className="text-ui-body-sm text-muted-foreground">
|
||||
<Trans>Nothing yet</Trans>
|
||||
</p>
|
||||
) : null}
|
||||
{fields.length > 0 ? (
|
||||
<section className="rounded-xl border border-border px-4 py-4">
|
||||
<ul className="space-y-3">
|
||||
{fields.map(({ field, value }) => (
|
||||
<Row
|
||||
@ -187,18 +189,13 @@ export function UserProfileSettings() {
|
||||
/>
|
||||
))}
|
||||
</ul>
|
||||
</section>
|
||||
) : null}
|
||||
{groups.map((group) => (
|
||||
<section
|
||||
key={group.category}
|
||||
data-testid={`user-facts-${group.category}`}
|
||||
className="rounded-xl border border-border px-4 py-4"
|
||||
>
|
||||
<h3 className="text-ui-body font-medium text-foreground">
|
||||
<div key={group.category} data-testid={`user-facts-${group.category}`}>
|
||||
<h4 className="text-ui-body-sm text-muted-foreground">
|
||||
{categoryLabels[group.category]}
|
||||
</h3>
|
||||
<ul className="mt-3 space-y-3">
|
||||
</h4>
|
||||
<ul className="mt-2 space-y-3">
|
||||
{group.facts.map((fact) =>
|
||||
fact.id === editingId ? (
|
||||
<UserFactEditor
|
||||
@ -269,7 +266,7 @@ export function UserProfileSettings() {
|
||||
),
|
||||
)}
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
))}
|
||||
{fields.length > 0 || groups.length > 0 ? (
|
||||
<Button variant="destructive" disabled={busy} onClick={() => setForgetOpen(true)}>
|
||||
@ -300,6 +297,6 @@ export function UserProfileSettings() {
|
||||
</AlertDialogFooter>
|
||||
</AlertDialogContent>
|
||||
</AlertDialog>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
@ -311,7 +311,7 @@ msgstr "Über Gruppen"
|
||||
msgid "About spaces"
|
||||
msgstr "Über Spaces"
|
||||
|
||||
#: src/pages/SettingsOverlay.tsx
|
||||
#: src/components/UserProfileSettings.tsx
|
||||
msgid "About you"
|
||||
msgstr "Über dich"
|
||||
|
||||
@ -3645,10 +3645,6 @@ msgstr "Nichts läuft mehr"
|
||||
msgid "Nothing remembered yet"
|
||||
msgstr "Noch nichts gemerkt"
|
||||
|
||||
#: src/components/UserProfileSettings.tsx
|
||||
msgid "Nothing yet"
|
||||
msgstr "Noch nichts"
|
||||
|
||||
#: src/pages/SettingsOverlay.tsx
|
||||
#: src/pages/shell/bot-panel.tsx
|
||||
msgid "Notifications"
|
||||
|
||||
@ -311,7 +311,7 @@ msgstr "About groups"
|
||||
msgid "About spaces"
|
||||
msgstr "About spaces"
|
||||
|
||||
#: src/pages/SettingsOverlay.tsx
|
||||
#: src/components/UserProfileSettings.tsx
|
||||
msgid "About you"
|
||||
msgstr "About you"
|
||||
|
||||
@ -3645,10 +3645,6 @@ msgstr "Nothing is still running"
|
||||
msgid "Nothing remembered yet"
|
||||
msgstr "Nothing remembered yet"
|
||||
|
||||
#: src/components/UserProfileSettings.tsx
|
||||
msgid "Nothing yet"
|
||||
msgstr "Nothing yet"
|
||||
|
||||
#: src/pages/SettingsOverlay.tsx
|
||||
#: src/pages/shell/bot-panel.tsx
|
||||
msgid "Notifications"
|
||||
|
||||
@ -311,7 +311,7 @@ msgstr ""
|
||||
msgid "About spaces"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/SettingsOverlay.tsx
|
||||
#: src/components/UserProfileSettings.tsx
|
||||
msgid "About you"
|
||||
msgstr ""
|
||||
|
||||
@ -3645,10 +3645,6 @@ msgstr "No queda nada en ejecución"
|
||||
msgid "Nothing remembered yet"
|
||||
msgstr "Aún no hay recuerdos"
|
||||
|
||||
#: src/components/UserProfileSettings.tsx
|
||||
msgid "Nothing yet"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/SettingsOverlay.tsx
|
||||
#: src/pages/shell/bot-panel.tsx
|
||||
msgid "Notifications"
|
||||
|
||||
@ -311,7 +311,7 @@ msgstr ""
|
||||
msgid "About spaces"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/SettingsOverlay.tsx
|
||||
#: src/components/UserProfileSettings.tsx
|
||||
msgid "About you"
|
||||
msgstr ""
|
||||
|
||||
@ -3645,10 +3645,6 @@ msgstr "कुछ भी नहीं चल रहा"
|
||||
msgid "Nothing remembered yet"
|
||||
msgstr "अभी तक कुछ याद नहीं किया गया"
|
||||
|
||||
#: src/components/UserProfileSettings.tsx
|
||||
msgid "Nothing yet"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/SettingsOverlay.tsx
|
||||
#: src/pages/shell/bot-panel.tsx
|
||||
msgid "Notifications"
|
||||
|
||||
@ -311,7 +311,7 @@ msgstr ""
|
||||
msgid "About spaces"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/SettingsOverlay.tsx
|
||||
#: src/components/UserProfileSettings.tsx
|
||||
msgid "About you"
|
||||
msgstr ""
|
||||
|
||||
@ -3645,10 +3645,6 @@ msgstr "실행 중인 작업 없음"
|
||||
msgid "Nothing remembered yet"
|
||||
msgstr "아직 기억한 내용이 없습니다"
|
||||
|
||||
#: src/components/UserProfileSettings.tsx
|
||||
msgid "Nothing yet"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/SettingsOverlay.tsx
|
||||
#: src/pages/shell/bot-panel.tsx
|
||||
msgid "Notifications"
|
||||
|
||||
@ -311,7 +311,7 @@ msgstr ""
|
||||
msgid "About spaces"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/SettingsOverlay.tsx
|
||||
#: src/components/UserProfileSettings.tsx
|
||||
msgid "About you"
|
||||
msgstr ""
|
||||
|
||||
@ -3645,10 +3645,6 @@ msgstr "Nada ainda está em execução"
|
||||
msgid "Nothing remembered yet"
|
||||
msgstr "Nada memorizado ainda"
|
||||
|
||||
#: src/components/UserProfileSettings.tsx
|
||||
msgid "Nothing yet"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/SettingsOverlay.tsx
|
||||
#: src/pages/shell/bot-panel.tsx
|
||||
msgid "Notifications"
|
||||
|
||||
@ -311,7 +311,7 @@ msgstr "О группах"
|
||||
msgid "About spaces"
|
||||
msgstr "О пространствах"
|
||||
|
||||
#: src/pages/SettingsOverlay.tsx
|
||||
#: src/components/UserProfileSettings.tsx
|
||||
msgid "About you"
|
||||
msgstr ""
|
||||
|
||||
@ -3645,10 +3645,6 @@ msgstr ""
|
||||
msgid "Nothing remembered yet"
|
||||
msgstr "Пока ничего не запомнено"
|
||||
|
||||
#: src/components/UserProfileSettings.tsx
|
||||
msgid "Nothing yet"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/SettingsOverlay.tsx
|
||||
#: src/pages/shell/bot-panel.tsx
|
||||
msgid "Notifications"
|
||||
|
||||
@ -311,7 +311,7 @@ msgstr ""
|
||||
msgid "About spaces"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/SettingsOverlay.tsx
|
||||
#: src/components/UserProfileSettings.tsx
|
||||
msgid "About you"
|
||||
msgstr ""
|
||||
|
||||
@ -3645,10 +3645,6 @@ msgstr "Hâlâ çalışan bir şey yok"
|
||||
msgid "Nothing remembered yet"
|
||||
msgstr "Henüz hatırlanan bir şey yok"
|
||||
|
||||
#: src/components/UserProfileSettings.tsx
|
||||
msgid "Nothing yet"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/SettingsOverlay.tsx
|
||||
#: src/pages/shell/bot-panel.tsx
|
||||
msgid "Notifications"
|
||||
|
||||
@ -311,7 +311,7 @@ msgstr ""
|
||||
msgid "About spaces"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/SettingsOverlay.tsx
|
||||
#: src/components/UserProfileSettings.tsx
|
||||
msgid "About you"
|
||||
msgstr ""
|
||||
|
||||
@ -3645,10 +3645,6 @@ msgstr "没有仍在运行的任务"
|
||||
msgid "Nothing remembered yet"
|
||||
msgstr "暂无记忆"
|
||||
|
||||
#: src/components/UserProfileSettings.tsx
|
||||
msgid "Nothing yet"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/SettingsOverlay.tsx
|
||||
#: src/pages/shell/bot-panel.tsx
|
||||
msgid "Notifications"
|
||||
|
||||
@ -15,6 +15,7 @@ import { SuccessPop } from "../components/ai/primitives";
|
||||
import { ComputersUnavailableHint } from "../components/ComputersUnavailableHint";
|
||||
import { DesktopUpdateSection } from "../components/DesktopUpdates";
|
||||
import { SoftwareUpdateSection } from "../components/SoftwareUpdateSection";
|
||||
import { UserProfileSettings } from "../components/UserProfileSettings";
|
||||
import { authClient } from "../lib/auth";
|
||||
import { getActiveUiLocale, setUiLocale } from "../lib/i18n";
|
||||
import {
|
||||
@ -65,6 +66,8 @@ export function GeneralSettingsPanels({
|
||||
{email ? <p className="mt-1 text-ui-body-sm text-muted-foreground/70">{email}</p> : null}
|
||||
</section>
|
||||
|
||||
<UserProfileSettings />
|
||||
|
||||
<ChangePasswordSection email={email} />
|
||||
|
||||
{messagingEnabled && onOpenMessaging ? (
|
||||
|
||||
@ -12,7 +12,6 @@ import {
|
||||
Monitor,
|
||||
Settings,
|
||||
ShieldCheck,
|
||||
UserRound,
|
||||
Volume2,
|
||||
XIcon,
|
||||
} from "lucide-react";
|
||||
@ -20,7 +19,6 @@ import { type ComponentType, useEffect, useRef, useState } from "react";
|
||||
import { computersAreUnavailable } from "../components/ComputersUnavailableHint";
|
||||
import { MediaSettings } from "../components/MediaSettings";
|
||||
import { NotificationSettingsPanel } from "../components/NotificationSettingsPanel";
|
||||
import { UserProfileSettings } from "../components/UserProfileSettings";
|
||||
import {
|
||||
ComputerSettingsPanel,
|
||||
GeneralSettingsPanels,
|
||||
@ -38,7 +36,6 @@ export type SettingsSection =
|
||||
| "integrations"
|
||||
| "models"
|
||||
| "memory"
|
||||
| "profile"
|
||||
| "voice"
|
||||
| "media"
|
||||
| "notifications"
|
||||
@ -108,7 +105,6 @@ export function SettingsOverlay({
|
||||
{ id: "integrations", label: t`Integrations`, icon: LayoutGrid },
|
||||
{ id: "models", label: t`Models`, icon: Cpu },
|
||||
{ id: "memory", label: t`Memory`, icon: Brain },
|
||||
{ id: "profile", label: t`About you`, icon: UserRound },
|
||||
{ id: "voice", label: t`Voice`, icon: Volume2 },
|
||||
...(isDeploymentOwner ? [{ id: "media" as const, label: t`Media`, icon: Clapperboard }] : []),
|
||||
{ id: "notifications", label: t`Notifications`, icon: Bell },
|
||||
@ -247,7 +243,6 @@ export function SettingsOverlay({
|
||||
onOpenMcp={onOpenMcp ? () => leaveSettings(onOpenMcp) : undefined}
|
||||
/>
|
||||
) : null}
|
||||
{section === "profile" ? <UserProfileSettings /> : null}
|
||||
{section === "media" && isDeploymentOwner ? <MediaSettings /> : null}
|
||||
{section === "notifications" ? <NotificationSettingsPanel /> : null}
|
||||
{section === "usage" ? (
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user