Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions deploy/compose/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ services:
- buzz-net

postgres:
image: postgres:18-alpine
image: postgres:17-alpine
environment:
POSTGRES_DB: ${POSTGRES_DB:-buzz}
POSTGRES_USER: ${POSTGRES_USER:-buzz}
Expand All @@ -69,7 +69,7 @@ services:
- buzz-net

redis:
image: redis:8-alpine
image: redis:7-alpine
command: ["redis-server", "--appendonly", "yes", "--requirepass", "${REDIS_PASSWORD:?set REDIS_PASSWORD}"]
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD:?set REDIS_PASSWORD}
Expand Down
2 changes: 1 addition & 1 deletion desktop/scripts/check-px-text.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const rules = [
// glyph is a fixed display size sized to its avatar box (not readable message
// text), so it stays as the lone documented `text-[6rem]` literal.
const overrides = new Set([
"src/features/settings/ui/ProfileSettingsCard.tsx:573",
"src/features/settings/ui/ProfileSettingsCard.tsx:572",
"src/features/onboarding/ui/AvatarStep.tsx:89",
]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { rewriteRelayUrl } from "@/shared/lib/mediaUrl";
import { Button } from "@/shared/ui/button";
import { Input } from "@/shared/ui/input";
import { SettingsOptionGroup } from "@/features/settings/ui/SettingsOptionGroup";
import { SettingsSectionHeader } from "@/features/settings/ui/SettingsSectionHeader";

/**
* Custom emoji management (NIP-30, kind:30030). Each member owns their own set:
Expand Down Expand Up @@ -124,13 +125,15 @@ export function CustomEmojiSettingsCard() {

return (
<section className="min-w-0" data-testid="settings-custom-emoji">
<div className="mb-12 space-y-1">
<h2 className="text-2xl font-semibold tracking-tight">Custom Emoji</h2>
<p className="text-base font-normal text-muted-foreground">
Add your own custom emoji for everyone on this relay to use. Type{" "}
<code>:name:</code> in messages and reactions.
</p>
</div>
<SettingsSectionHeader
title="Custom Emoji"
description={
<>
Add your own custom emoji for everyone on this relay to use. Type{" "}
<code>:name:</code> in messages and reactions.
</>
}
/>

<div className="space-y-6">
<form
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
SettingsOptionGroup,
SettingsOptionRow,
} from "@/features/settings/ui/SettingsOptionGroup";
import { SettingsSectionHeader } from "@/features/settings/ui/SettingsSectionHeader";
import { classifyModelRef, modelRefHintLabel } from "../classifyModelRef";
import { useMeshNodeStatus } from "../hooks/useMeshNodeStatus";

Expand Down Expand Up @@ -135,13 +136,15 @@ export function MeshComputeSettingsCard() {

return (
<section className="min-w-0" data-testid="settings-mesh-share-compute">
<div className="mb-12 min-w-0">
<h2 className="text-2xl font-semibold tracking-tight">Share compute</h2>
<p className="text-base font-normal text-muted-foreground">
Share this machine with your relay. When on, other members can run
their agents here.
</p>
</div>
<SettingsSectionHeader
title="Share compute"
description={
<>
Share this machine with your relay. When on, other members can run
their agents here.
</>
}
/>

{error ? (
<p className="mb-3 rounded-lg bg-destructive/10 px-3 py-2 text-sm text-destructive">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import {
DropdownMenuTrigger,
} from "@/shared/ui/dropdown-menu";
import { Input } from "@/shared/ui/input";
import { SettingsSectionHeader } from "@/features/settings/ui/SettingsSectionHeader";
import { VirtualizedList } from "@/shared/ui/VirtualizedList";

type AssignableRelayRole = Exclude<RelayMemberRole, "owner">;
Expand Down Expand Up @@ -353,13 +354,15 @@ export function RelayMembersSettingsCard({

return (
<section className="min-w-0" data-testid="settings-relay-members">
<div className="mb-12 space-y-1">
<h2 className="text-2xl font-semibold tracking-tight">Relay Access</h2>
<p className="text-base font-normal text-muted-foreground">
Manage who can connect to this relay. Owners can invite admins or
members; admins can invite members.
</p>
</div>
<SettingsSectionHeader
title="Relay Access"
description={
<>
Manage who can connect to this relay. Owners can invite admins or
members; admins can invite members.
</>
}
/>

<div className="space-y-6">
<form className="space-y-1.5" onSubmit={handleAddMember}>
Expand Down
15 changes: 6 additions & 9 deletions desktop/src/features/settings/UpdateChecker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,17 @@ import {
SettingsOptionGroup,
SettingsOptionRow,
} from "./ui/SettingsOptionGroup";
import { SettingsSectionHeader } from "./ui/SettingsSectionHeader";

export function UpdateChecker() {
const { status, checkForUpdate, relaunch } = useUpdaterContext();

return (
<section className="min-w-0">
<div className="mb-12 min-w-0">
<h2 className="text-2xl font-semibold tracking-tight">
Software Updates
</h2>
<p className="text-base font-normal text-muted-foreground">
Keep Buzz up to date with the latest features and fixes.
</p>
</div>
<section className="min-w-0" data-testid="settings-updates">
<SettingsSectionHeader
title="Software Updates"
description="Keep Buzz up to date with the latest features and fixes."
/>

<SettingsOptionGroup>
{status.state === "idle" && (
Expand Down
38 changes: 19 additions & 19 deletions desktop/src/features/settings/ui/ChannelTemplatesSettingsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import type {
UpdateChannelTemplateInput,
} from "@/shared/api/types";
import { cn } from "@/shared/lib/cn";
import { SettingsSectionHeader } from "./SettingsSectionHeader";
import {
AlertDialog,
AlertDialogAction,
Expand Down Expand Up @@ -103,27 +104,26 @@ export function ChannelTemplatesSettingsCard() {

return (
<section className="min-w-0" data-testid="settings-channel-templates">
<div className="mb-12 flex min-w-0 items-start justify-between gap-4">
<div className="min-w-0">
<h2 className="text-2xl font-semibold tracking-tight">
Channel Templates
</h2>
<p className="text-base font-normal text-muted-foreground">
<SettingsSectionHeader
title="Channel Templates"
description={
<>
Save reusable channel configurations and apply them when creating
new channels.
</p>
</div>
<Button
className="shrink-0"
onClick={() => setIsCreateOpen(true)}
size="sm"
type="button"
variant="outline"
>
<Plus className="mr-1.5 h-4 w-4" />
Create
</Button>
</div>
</>
}
action={
<Button
onClick={() => setIsCreateOpen(true)}
size="sm"
type="button"
variant="outline"
>
<Plus className="mr-1.5 h-4 w-4" />
Create
</Button>
}
/>

{templatesQuery.isLoading ? (
<p className="py-6 text-center text-sm text-muted-foreground">
Expand Down
49 changes: 23 additions & 26 deletions desktop/src/features/settings/ui/DoctorSettingsPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import type { AcpRuntimeCatalogEntry } from "@/shared/api/types";
import { cn } from "@/shared/lib/cn";
import { Button } from "@/shared/ui/button";
import { SettingsOptionGroup } from "./SettingsOptionGroup";
import { SettingsSectionHeader } from "./SettingsSectionHeader";

function StatusIcon({
availability,
Expand Down Expand Up @@ -268,32 +269,28 @@ export function DoctorSettingsPanel() {
}

return (
<section data-testid="settings-doctor">
<div className="mb-12 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between">
<div className="min-w-0">
<h2 className="text-2xl font-semibold tracking-tight">Doctor</h2>
<p className="mt-1 text-base font-normal text-muted-foreground">
Verify the ACP runtime commands available to the desktop app.
</p>
</div>

<Button
className="shrink-0"
disabled={isRefreshing}
onClick={() => {
setInstallResults({});
void runtimesQuery.refetch();
}}
size="sm"
type="button"
variant="outline"
>
<RefreshCw
className={cn("h-4 w-4", isRefreshing && "animate-spin")}
/>
Re-run
</Button>
</div>
<section className="min-w-0" data-testid="settings-doctor">
<SettingsSectionHeader
title="Doctor"
description="Verify the ACP runtime commands available to the desktop app."
action={
<Button
disabled={isRefreshing}
onClick={() => {
setInstallResults({});
void runtimesQuery.refetch();
}}
size="sm"
type="button"
variant="outline"
>
<RefreshCw
className={cn("h-4 w-4", isRefreshing && "animate-spin")}
/>
Re-run
</Button>
}
/>

<div className="space-y-5">
<SettingsOptionGroup>
Expand Down
17 changes: 10 additions & 7 deletions desktop/src/features/settings/ui/ExperimentalFeaturesCard.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { desktopFeatures, useFeatureToggle } from "@/shared/features";
import type { FeatureDefinition } from "@/shared/features";
import { Switch } from "@/shared/ui/switch";
import { SettingsSectionHeader } from "./SettingsSectionHeader";

function FeatureRow({ feature }: { feature: FeatureDefinition }) {
const [enabled, toggle] = useFeatureToggle(feature.id);
Expand Down Expand Up @@ -31,13 +32,15 @@ export function ExperimentalFeaturesCard() {

return (
<section className="min-w-0" data-testid="settings-experimental">
<div className="mb-12 min-w-0">
<h2 className="text-2xl font-semibold tracking-tight">Experiments</h2>
<p className="text-base font-normal text-muted-foreground">
These features are functional but still being refined. Enable them to
try new capabilities early.
</p>
</div>
<SettingsSectionHeader
title="Experiments"
description={
<>
These features are functional but still being refined. Enable them
to try new capabilities early.
</>
}
/>

<div className="flex flex-col gap-2">
{previewFeatures.map((f) => (
Expand Down
13 changes: 5 additions & 8 deletions desktop/src/features/settings/ui/KeyboardShortcutsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
type KeyboardShortcut,
} from "@/shared/lib/keyboard-shortcuts";
import { SettingsOptionGroup, SettingsOptionRow } from "./SettingsOptionGroup";
import { SettingsSectionHeader } from "./SettingsSectionHeader";

function KeyCombo({ shortcut }: { shortcut: KeyboardShortcut }) {
const keys = getPlatformKeys(shortcut);
Expand Down Expand Up @@ -32,14 +33,10 @@ export function KeyboardShortcutsCard() {

return (
<section className="min-w-0" data-testid="settings-shortcuts">
<div className="mb-12 min-w-0">
<h2 className="text-2xl font-semibold tracking-tight">
Keyboard Shortcuts
</h2>
<p className="mt-1 text-base font-normal text-muted-foreground">
All available keyboard shortcuts. Shortcuts are read-only.
</p>
</div>
<SettingsSectionHeader
title="Keyboard Shortcuts"
description="All available keyboard shortcuts. Shortcuts are read-only."
/>

<div className="space-y-4">
{[...categories.entries()].map(([category, shortcuts]) => (
Expand Down
19 changes: 11 additions & 8 deletions desktop/src/features/settings/ui/MobilePairingCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
DialogTitle,
} from "@/shared/ui/dialog";
import { SettingsOptionGroup, SettingsOptionRow } from "./SettingsOptionGroup";
import { SettingsSectionHeader } from "./SettingsSectionHeader";

type PairingStep =
| "generating"
Expand Down Expand Up @@ -321,14 +322,16 @@ export function MobilePairingCard({

return (
<section className="min-w-0" data-testid="settings-mobile">
<div className="mb-12 space-y-1">
<h2 className="text-2xl font-semibold tracking-tight">Mobile</h2>
<p className="text-base font-normal text-muted-foreground">
Connect the Buzz mobile app to this relay by scanning a QR code. The
connection is secured with end-to-end encryption and a verification
code.
</p>
</div>
<SettingsSectionHeader
title="Mobile"
description={
<>
Connect the Buzz mobile app to this relay by scanning a QR code. The
connection is secured with end-to-end encryption and a verification
code.
</>
}
/>

<SettingsOptionGroup>
<SettingsOptionRow className="gap-3">
Expand Down
11 changes: 5 additions & 6 deletions desktop/src/features/settings/ui/NotificationSettingsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { cn } from "@/shared/lib/cn";
import { Button } from "@/shared/ui/button";
import { Switch } from "@/shared/ui/switch";
import { SettingsOptionGroup, SettingsOptionRow } from "./SettingsOptionGroup";
import { SettingsSectionHeader } from "./SettingsSectionHeader";
import { SoundPicker } from "./SoundPicker";

export function NotificationSettingsCard({
Expand Down Expand Up @@ -60,12 +61,10 @@ export function NotificationSettingsCard({

return (
<section className="min-w-0" data-testid="settings-notifications">
<div className="mb-12 min-w-0">
<h2 className="text-2xl font-semibold tracking-tight">Notifications</h2>
<p className="text-base font-normal text-muted-foreground">
Desktop alerts are on by default. Fine-tune what gets through below.
</p>
</div>
<SettingsSectionHeader
title="Notifications"
description="Desktop alerts are on by default. Fine-tune what gets through below."
/>

<span className="sr-only" data-testid="notifications-desktop-state">
{notificationPermission === "unsupported"
Expand Down
Loading