Files
superbrain/web/app/help/page.tsx
T
Andrew S Erwin 53127cc8fa Automations: move from Settings to a sidebar workspace with a task dropdown
The Automations caret in the main sidebar lists the user's tasks (status
dot, persisted expand state, live refresh via AUTOMATIONS_CHANGED) and
deep-links /automations?task=<id>, which scrolls to the card and highlights
it. The management surface (compiler, task list, run history) moves to the
standalone /automations route; the settings tab is removed and legacy
?tab=automations deep links redirect. Assistant proposal creation notifies
the sidebar too. README/RUNNING/help wording follows; browser regression
covers the dropdown, deep link, redirect and mobile overflow.
2026-11-23 14:19:37 -06:00

193 lines
9.2 KiB
TypeScript

import Link from 'next/link'
import { Button } from '@/components/ui/button'
import { Badge } from '@/components/ui/badge'
import { HelpFaq } from './faq'
import { BrandIcon } from '@/components/brand-icon'
import {
Bookmark, FolderOpen, FileText, Kanban, Radar, Bell, Bot,
FolderSync, KeyRound, ArrowRight,
} from 'lucide-react'
export const dynamic = 'force-dynamic'
const SECTIONS = [
{
id: 'getting-started',
icon: ArrowRight,
title: 'Getting started',
body: [
'Sign in with your email and password, or with Authelia single sign-on if your deployment uses it. On first run, create your account from the sign-up page — then start by saving a bookmark, writing a page, or connecting a service in Settings.',
'Forgot your password? Use the "Forgot password?" link on the sign-in page; a single-use reset link is emailed to you. On single-sign-on deployments, recovery is handled by your identity provider instead.',
],
where: 'Sign in → /login · Reset → /forgot-password',
},
{
id: 'bookmarks',
icon: Bookmark,
title: 'Bookmarks & tags',
body: [
'Every URL you save becomes a bookmark with a title, description, notes, tags and an optional due date. Open a bookmark to edit its details, attach it to pages and collections, or place it on the board.',
'Sharing a tag shares every bookmark under it with the recipients — group-wide, including bookmarks other recipients add later. A public bookmark link publishes the title, description, notes, due date, tags and preview to anyone with the link, and deliberately carries no owner attribution.',
],
where: 'Sidebar → Bookmarks · Tags',
},
{
id: 'collections',
icon: FolderOpen,
title: 'Collections',
body: [
'Collections group bookmarks manually or by smart filters, and render as a table or a board grouped by any select property. Shared collections are read-only for recipients.',
'Connected services materialize as collections automatically: each WebDAV share, CalDAV calendar and CardDAV address book becomes its own collection whose files, events or contacts are bookmarks. Syncing mirrors the server — removed items detach, and your own removals stay removed.',
],
where: 'Sidebar → Collections · Settings → WebDAV / CalDAV / CardDAV',
},
{
id: 'pages',
icon: FileText,
title: 'Pages',
body: [
'Pages are WYSIWYG documents stored as Markdown. Every URL you add — via the Link button, the links popover, or a bare-URL paste — is also saved as a bookmark linked to the page, reusing an existing bookmark for the same URL instead of duplicating it.',
'Pages can nest under a parent; deleting a parent promotes its children. Every save keeps a revision you can restore, and deleted pages are recoverable from Trash. Autosave pauses on a version conflict so you never clobber newer content.',
],
where: 'Sidebar → Pages · Trash',
},
{
id: 'board',
icon: Kanban,
title: 'Kanban board',
body: [
'The board places bookmarks in columns you define. Drag cards between columns or reorder within a column; moves are saved immediately. Shared cards are read-only.',
],
where: 'Sidebar → Board',
},
{
id: 'signals',
icon: Radar,
title: 'Signals & mailbox watches',
body: [
'Signals are events attached to bookmarks — notes, arrivals, reminders. Connect an IMAP mailbox in Settings and add a watch from a bookmark\'s Signals panel: matching emails become signals on that bookmark.',
],
where: 'Settings → IMAP · Bookmark → Signals',
},
{
id: 'notifications',
icon: Bell,
title: 'Notifications',
body: [
'Notification rules fire on signals created, bookmarks coming due, or shares received, and deliver through your channels: email, Slack, Matrix, Telegram or Signal. Rules can target other people in your organization; each recipient gets the delivery through their own channel. History shows every delivery, including suppressed ones.',
'Email preferences live in Settings → Notifications. Every notification email also carries an unsubscribe link that turns off your email channels and any automations that email you — password resets and other account emails are not affected.',
],
where: 'Settings → Notifications',
},
{
id: 'assistant',
icon: Bot,
title: 'Assistant & automations',
body: [
'The assistant answers questions about your data and can propose automations: stored tasks that periodically check a page and then notify you, send an email, or save a bookmark. Proposals are compiled into a validated spec and only run after you confirm them — the assistant never acts on its own.',
'AI features use your own provider key (Settings → AI) or the server key when your plan includes it. Without any AI configured, the app tells you where to add one instead of failing silently.',
],
where: 'Assistant panel · Automations (sidebar) · Settings → AI',
},
{
id: 'connections',
icon: FolderSync,
title: 'Connections',
body: [
'Settings connects Superbrain to your services: WebDAV shares, CalDAV calendars, CardDAV address books, Nextcloud contacts sync, and IMAP mailboxes. Credentials are stored encrypted and are write-only — the app never shows them back to you.',
'On Core deployments with Nextcloud, the connection forms offer a one-click prefill for your account.',
],
where: 'Settings → Connections',
},
{
id: 'developer',
icon: KeyRound,
title: 'API keys & MCP',
body: [
'Personal API keys (sb_…) authenticate machine clients against the Go API directly; the plaintext key is shown once at creation and stored hashed. The superbrain-mcp server exposes your data to MCP clients through the federated gateway.',
'You can also register external MCP servers (Settings → MCP) for Superbrain to dial as a client.',
],
where: 'Settings → API Keys / MCP',
},
]
export default function HelpPage() {
return (
<div className="min-h-screen bg-background">
<header className="border-b border-border">
<div className="mx-auto flex max-w-4xl items-center justify-between px-6 py-4">
<Link href="/login" className="flex items-center gap-2 font-display text-lg font-bold tracking-tight">
<BrandIcon className="h-6 w-6" />
superbrain
</Link>
<Button asChild size="sm">
<Link href="/login">Open Superbrain</Link>
</Button>
</div>
</header>
<main className="mx-auto max-w-4xl px-6 pb-24">
<div className="pt-16 pb-10">
<Badge variant="secondary" className="mb-4">Help center</Badge>
<h1 className="font-display text-4xl font-bold tracking-tight">
How Superbrain works
</h1>
<p className="mt-3 max-w-2xl text-base text-muted-foreground">
Bookmarks, pages, collections and automations — a quick guide to every
surface of the app. Jump to a topic below, or browse the FAQ at the end.
</p>
<nav className="mt-6 flex flex-wrap gap-2">
{SECTIONS.map(s => (
<a
key={s.id}
href={`#${s.id}`}
className="rounded-full border border-border px-3 py-1 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground"
>
{s.title}
</a>
))}
<a
href="#faq"
className="rounded-full border border-border px-3 py-1 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground"
>
FAQ
</a>
</nav>
</div>
<div className="space-y-12">
{SECTIONS.map(s => (
<section key={s.id} id={s.id} className="scroll-mt-8">
<div className="flex items-center gap-3">
<div className="flex h-9 w-9 items-center justify-center rounded-lg bg-primary/10 text-primary">
<s.icon className="h-5 w-5" />
</div>
<h2 className="font-display text-2xl font-bold tracking-tight">{s.title}</h2>
</div>
<div className="mt-4 space-y-3 text-sm leading-relaxed text-foreground/90">
{s.body.map((p, i) => <p key={i}>{p}</p>)}
</div>
<p className="mt-3 font-mono text-xs text-muted-foreground">{s.where}</p>
</section>
))}
<section id="faq" className="scroll-mt-8">
<h2 className="font-display text-2xl font-bold tracking-tight">Frequently asked questions</h2>
<HelpFaq />
</section>
</div>
</main>
<footer className="border-t border-border">
<div className="mx-auto flex max-w-4xl flex-wrap items-center justify-between gap-2 px-6 py-6 text-xs text-muted-foreground">
<span>Superbrain — your second brain, federated.</span>
<span className="flex gap-4">
<Link href="/login" className="hover:text-primary hover:underline">Sign in</Link>
<Link href="/forgot-password" className="hover:text-primary hover:underline">Reset password</Link>
</span>
</div>
</footer>
</div>
)
}