Multi-Agent Collaboration for Team and Friends
TypeScript agent-automationagent-orchestrationagent-workflowai-agentsai-collaborationai-memoryai-workforceautonomous-agentsclaude-codeclaude-code-skillscodexcoding-agentmulti-agentmultiple-agentone-person-businessone-person-companyone-person-teamopencodesolopreneur
feat(community): frameless create dialogs, name-as-hero (settings ④)
Gus3047dd3e3bc9
diff --git a/src/web/src/components/community/category-settings-dialog.tsx b/src/web/src/components/community/category-settings-dialog.tsxindex 6f1aa20b8..5c639bd7a 100644--- a/src/web/src/components/community/category-settings-dialog.tsx+++ b/src/web/src/components/community/category-settings-dialog.tsx@@ -3,9 +3,7 @@import { useState } from "react"import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from "@/components/ui/dialog"import { Button } from "@/components/ui/button"-import { Input } from "@/components/ui/input"import { onEnterSubmit } from "@/lib/ime"-import { Field } from "./field"import { PrivateCategoryRow } from "./private-category-row"// Category settings dialog — rename only. Privacy (public/private) is fixed at@@ -28,22 +26,23 @@ export function CategorySettingsDialog({ name, isPrivate, onClose, onSave }: {return (<Dialog open onOpenChange={(o) => { if (!o) onClose() }}><DialogContent className="w-105 max-w-[calc(100vw-2rem)] p-0">- <DialogHeader className="border-b border-border px-4 py-4">- <DialogTitle>Category Settings</DialogTitle>+ <DialogHeader className="px-5 pt-5 pb-0">+ <DialogTitle className="text-xs font-normal text-muted-foreground">Category settings</DialogTitle></DialogHeader>- <div className="space-y-4 px-4 pb-5">- <Field label="Category name">- <Input- value={nameDraft}- onChange={(e) => setNameDraft(e.target.value)}- onKeyDown={onEnterSubmit(save)}- placeholder="e.g. text channels"- autoFocus- />- </Field>+ <div className="space-y-6 px-5 pb-5 pt-2">+ {/* Category name = hero: large inline title input. */}+ <input+ value={nameDraft}+ onChange={(e) => setNameDraft(e.target.value)}+ onKeyDown={onEnterSubmit(save)}+ placeholder="e.g. Text channels"+ autoFocus+ aria-label="Category name"+ className="w-full border-0 bg-transparent p-0 text-[30px] font-medium leading-tight tracking-tight shadow-none outline-none placeholder:font-normal placeholder:text-muted-foreground/40 focus-visible:ring-0"+ />{isPrivate && <PrivateCategoryRow isPrivate locked />}</div>- <DialogFooter className="mx-0 mb-0 flex-row items-center justify-end gap-2 rounded-b-xl border-t border-border bg-card px-4 py-3">+ <DialogFooter className="mx-0 mb-0 flex-row items-center justify-end gap-2 px-5 pb-5"><Button variant="ghost" size="sm" onClick={onClose}>Cancel</Button><Button size="sm" onClick={save} disabled={!trimmedName}>Save</Button></DialogFooter>diff --git a/src/web/src/components/community/create-category-dialog.tsx b/src/web/src/components/community/create-category-dialog.tsxindex 71efa2412..706f5d809 100644--- a/src/web/src/components/community/create-category-dialog.tsx+++ b/src/web/src/components/community/create-category-dialog.tsx@@ -3,9 +3,7 @@import { useState } from "react"import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from "@/components/ui/dialog"import { Button } from "@/components/ui/button"-import { Input } from "@/components/ui/input"import { onEnterSubmit } from "@/lib/ime"-import { Field } from "./field"import { PrivateCategoryRow } from "./private-category-row"// Create Category dialog — name + private toggle (defaults to public). In a@@ -28,24 +26,25 @@ export function CreateCategoryDialog({ onClose, onCreate, canTogglePrivate = trureturn (<Dialog open onOpenChange={(o) => { if (!o) onClose() }}><DialogContent className="w-105 max-w-[calc(100vw-2rem)] p-0">- <DialogHeader className="border-b border-border px-4 py-4">- <DialogTitle>Create category</DialogTitle>+ <DialogHeader className="px-5 pt-5 pb-0">+ <DialogTitle className="text-xs font-normal text-muted-foreground">New category</DialogTitle></DialogHeader>- <div className="space-y-4 px-4 pb-5">- <Field label="Category name">- <Input- value={name}- onChange={(e) => setName(e.target.value)}- onKeyDown={onEnterSubmit(submit)}- placeholder="e.g. text channels"- autoFocus- />- </Field>+ <div className="space-y-6 px-5 pb-5 pt-2">+ {/* Category name = hero: large inline title input. */}+ <input+ value={name}+ onChange={(e) => setName(e.target.value)}+ onKeyDown={onEnterSubmit(submit)}+ placeholder="e.g. Text channels"+ autoFocus+ aria-label="Category name"+ className="w-full border-0 bg-transparent p-0 text-[30px] font-medium leading-tight tracking-tight shadow-none outline-none placeholder:font-normal placeholder:text-muted-foreground/40 focus-visible:ring-0"+ />{canTogglePrivate && (<PrivateCategoryRow isPrivate={isPrivate} onToggle={setIsPrivate} />)}</div>- <DialogFooter className="mx-0 mb-0 flex-row items-center justify-end gap-2 rounded-b-xl border-t border-border bg-card px-4 py-3">+ <DialogFooter className="mx-0 mb-0 flex-row items-center justify-end gap-2 px-5 pb-5"><Button variant="ghost" size="sm" onClick={onClose}>Cancel</Button><Button size="sm" onClick={submit} disabled={!name.trim()}>Create category</Button></DialogFooter>diff --git a/src/web/src/components/community/create-channel-dialog.tsx b/src/web/src/components/community/create-channel-dialog.tsxindex e9e3a4b29..95f6b1e14 100644--- a/src/web/src/components/community/create-channel-dialog.tsx+++ b/src/web/src/components/community/create-channel-dialog.tsx@@ -1,11 +1,11 @@"use client"import { useState } from "react"+import { Check } from "lucide-react"import { EntityIcon } from "./entity-icon"import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from "@/components/ui/dialog"import { Button } from "@/components/ui/button"import { tid } from "@/lib/community/testids"-import { Input } from "@/components/ui/input"import { onEnterSubmit } from "@/lib/ime"import { SlugHint } from "./slug-hint"import { previewSlug } from "@/lib/community/slug-preview"@@ -40,53 +40,59 @@ export function CreateChannelDialog({ category, initial, onClose, onCreate }: {return (<Dialog open onOpenChange={(o) => { if (!o) onClose() }}><DialogContent className="w-105 max-w-[calc(100vw-2rem)] p-0">- <DialogHeader className="border-b border-border px-4 py-4">- <DialogTitle>{editing ? "Edit Channel" : "Create Channel"}</DialogTitle>- <p className="text-sm text-muted-foreground">{category ? `in ${category}` : "top level"}</p>+ {/* Small breadcrumb for context; the name below is the hero. */}+ <DialogHeader className="px-5 pt-5 pb-0">+ <DialogTitle className="text-xs font-normal text-muted-foreground">+ {editing ? "Edit channel" : "New channel"}{category ? ` in ${category}` : ""}+ </DialogTitle></DialogHeader>- <div className="space-y-4 px-4 pb-5">+ <div className="space-y-6 px-5 pb-5 pt-2">+ {/* Channel name = hero: large inline title input, glyph in front. */}+ <div>+ <div className="flex items-center gap-2">+ <EntityIcon kind={type} className="size-6 shrink-0 text-muted-foreground" />+ <input+ value={name}+ onChange={(e) => setName(e.target.value)}+ onKeyDown={onEnterSubmit(submit)}+ placeholder="new-channel"+ autoFocus+ aria-label="Channel name"+ className="w-full border-0 bg-transparent p-0 text-[30px] font-medium leading-tight tracking-tight shadow-none outline-none placeholder:font-normal placeholder:text-muted-foreground/40 focus-visible:ring-0"+ />+ </div>+ <div className="mt-1 pl-8">+ <SlugHint {...namePreview} />+ </div>+ </div>+ {/* Channel type = secondary: quiet vertical list, selected row tinted + check. */}{!editing && (<div>- <div className="mb-2 text-xs font-semibold text-muted-foreground">Channel Type</div>- <div className="space-y-2">+ <div className="mb-1 text-xs text-muted-foreground">Type</div>+ <div className="space-y-1">{options.map((o) => (<buttonkey={o.value}onClick={() => setType(o.value)}+ aria-pressed={type === o.value}className={[- "flex w-full items-center gap-3 rounded-lg border p-3 text-left transition-colors",- type === o.value ? "border-primary bg-accent" : "border-border bg-card hover:bg-accent/50",+ "flex w-full items-center gap-3 rounded-md px-2 py-2 text-left transition-colors",+ type === o.value ? "bg-accent" : "hover:bg-accent/40",].join(" ")}>- <EntityIcon kind={o.value} className="size-5 shrink-0 text-muted-foreground" />- <div className="min-w-0 flex-1">- <div className="text-sm font-medium">{o.label}</div>- <div className="text-xs text-muted-foreground">{o.desc}</div>- </div>- <span className={`grid size-4 shrink-0 place-items-center rounded-full border ${type === o.value ? "border-primary" : "border-muted-foreground"}`}>- {type === o.value && <span className="size-2 rounded-full bg-primary" />}+ <EntityIcon kind={o.value} className="size-4 shrink-0 text-muted-foreground" />+ <span className="min-w-0 flex-1">+ <span className="block text-sm font-medium">{o.label}</span>+ <span className="block text-xs text-muted-foreground">{o.desc}</span></span>+ {type === o.value && <Check className="size-4 shrink-0 text-primary" />}</button>))}</div></div>)}- <label className="block">- <div className="mb-2 text-xs font-semibold text-muted-foreground">Channel Name</div>- <div className="relative">- <EntityIcon kind={type} className="absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" />- <Input- value={name}- onChange={(e) => setName(e.target.value)}- onKeyDown={onEnterSubmit(submit)}- placeholder="new-channel"- className="h-10 pl-9"- />- </div>- <SlugHint {...namePreview} />- </label></div>- <DialogFooter className="mx-0 mb-0 flex-row items-center justify-end gap-2 rounded-b-xl border-t border-border bg-card px-4 py-3">+ <DialogFooter className="mx-0 mb-0 flex-row items-center justify-end gap-2 px-5 pb-5"><Button variant="ghost" size="sm" onClick={onClose}>Cancel</Button><Button size="sm" data-testid={tid.createChannelSubmit} onClick={submit} disabled={!namePreview.slug}>{editing ? "Save" : "Create Channel"}</Button></DialogFooter>diff --git a/src/web/src/components/community/create-server-dialog.tsx b/src/web/src/components/community/create-server-dialog.tsxindex aaed11fd3..18cf53624 100644--- a/src/web/src/components/community/create-server-dialog.tsx+++ b/src/web/src/components/community/create-server-dialog.tsx@@ -6,8 +6,6 @@ import { Plus, ChevronRight, Link2 } from "lucide-react"import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from "@/components/ui/dialog"import { Button } from "@/components/ui/button"import { tid } from "@/lib/community/testids"-import { Input } from "@/components/ui/input"-import { Field } from "./field"import { SlugHint } from "./slug-hint"import { ImageCropDialog } from "./image-crop-dialog"import { previewSlug } from "@/lib/community/slug-preview"@@ -44,19 +42,22 @@ export function CreateServerDialog({ onClose, onCreateServer, onJoinServer }: {<><Dialog open onOpenChange={(o) => { if (!o) onClose() }}><DialogContent className="w-105 max-w-[calc(100vw-2rem)] p-0">- <DialogHeader className="border-b border-border px-4 py-4">- <DialogTitle>{step === "choose" ? "Create a Server" : step === "create" ? "Customize your server" : "Join a Server"}</DialogTitle>+ <DialogHeader className="px-5 pt-5 pb-0">+ <DialogTitle className={step === "choose" ? "" : "text-xs font-normal text-muted-foreground"}>+ {step === "choose" ? "Create a Server" : step === "create" ? "Customize your server" : "Join a Server"}+ </DialogTitle></DialogHeader>- <div className="px-4 pb-5">+ <div className="px-5 pb-5">{step === "choose" && (- <div className="space-y-2">+ <div className="space-y-1"><p className="mb-3 text-sm text-muted-foreground">Your server is where you and your agents hang out. Make yours and start talking.</p>- <button onClick={() => setStep("create")} className="flex w-full items-center gap-3 rounded-lg border border-border bg-card p-3 text-left hover:bg-accent">+ {/* Frameless hover rows — the icon chip carries the accent, no box. */}+ <button onClick={() => setStep("create")} className="flex w-full items-center gap-3 rounded-md p-2 text-left transition-colors hover:bg-accent/40"><span className="grid size-10 shrink-0 place-items-center rounded-full bg-primary text-primary-foreground"><Plus className="size-5" /></span><span className="flex-1 text-sm font-medium">Create a server</span><ChevronRight className="size-4 text-muted-foreground" /></button>- <button onClick={() => setStep("join")} className="flex w-full items-center gap-3 rounded-lg border border-border bg-card p-3 text-left hover:bg-accent">+ <button onClick={() => setStep("join")} className="flex w-full items-center gap-3 rounded-md p-2 text-left transition-colors hover:bg-accent/40"><span className="grid size-10 shrink-0 place-items-center rounded-full bg-secondary text-foreground"><Link2 className="size-5" /></span><span className="flex-1 text-sm font-medium">Join with invite</span><ChevronRight className="size-4 text-muted-foreground" />@@ -64,30 +65,53 @@ export function CreateServerDialog({ onClose, onCreateServer, onJoinServer }: {</div>)}{step === "create" && (- <div className="space-y-4">- <div className="flex flex-col items-center gap-2">- <input ref={fileRef} type="file" accept="image/png,image/jpeg,image/webp" className="hidden" onChange={onFileChange} />- <button onClick={pickIcon} className="grid size-20 place-items-center overflow-hidden rounded-full border-2 border-dashed border-input text-muted-foreground hover:border-primary hover:text-foreground">- {iconPreview ? (- <img src={iconPreview} alt="" className="size-full object-cover" />- ) : (+ <div className="flex flex-col items-center gap-4 pt-2">+ {/* Icon = centered on top, the single upload affordance (the+ dropzone IS the button — no redundant separate upload pill).+ A server's identity is visual, so the icon leads. NOT+ ServerIcon: no server id/marble seed pre-creation. */}+ <input ref={fileRef} type="file" accept="image/png,image/jpeg,image/webp" className="hidden" onChange={onFileChange} />+ <button onClick={pickIcon} className="group grid size-24 shrink-0 place-items-center overflow-hidden rounded-2xl ring-1 ring-border/50 text-muted-foreground transition-colors hover:text-foreground hover:ring-primary/60">+ {iconPreview ? (+ <img src={iconPreview} alt="" className="size-full object-cover" />+ ) : (+ <span className="flex flex-col items-center gap-1"><Plus className="size-6" />- )}- </button>- <span className="text-xs text-muted-foreground">{iconPreview ? "Change icon" : "Upload an icon"}</span>- </div>- <Field label="Server name">- <Input value={name} onChange={(e) => setName(e.target.value)} placeholder="My community" />+ <span className="text-[10px] font-medium">Upload icon</span>+ </span>+ )}+ </button>+ {/* Server name below the icon — left-aligned so the cursor sits+ at a consistent left position (a centered input makes the+ caret jump around as you type). */}+ <div className="w-full">+ <input+ value={name}+ onChange={(e) => setName(e.target.value)}+ placeholder="My community"+ autoFocus+ aria-label="Server name"+ className="w-full border-0 bg-transparent p-0 text-[26px] font-medium leading-tight tracking-tight shadow-none outline-none placeholder:font-normal placeholder:text-muted-foreground/40 focus-visible:ring-0"+ /><SlugHint {...namePreview} />- </Field>+ </div></div>)}{step === "join" && (- <Field label="Invite link"><Input value={invite} onChange={(e) => setInvite(e.target.value)} placeholder="Paste an invite link or code" /></Field>+ <div className="pt-2">+ <input+ value={invite}+ onChange={(e) => setInvite(e.target.value)}+ placeholder="Paste an invite link or code"+ autoFocus+ aria-label="Invite link"+ className="w-full border-0 bg-transparent p-0 text-lg shadow-none outline-none placeholder:text-muted-foreground/40 focus-visible:ring-0"+ />+ </div>)}</div>{step !== "choose" && (- <DialogFooter className="mx-0 mb-0 flex-row items-center justify-between rounded-b-xl border-t border-border bg-card px-4 py-3">+ <DialogFooter className="mx-0 mb-0 flex-row items-center justify-between px-5 pb-5"><Button variant="ghost" size="sm" onClick={() => setStep("choose")}>Back</Button><Buttonsize="sm"