Redesign the UI on brain's look: sidebar with search, Overview, modules, grouped Settings

- Left sidebar as in brain: search at the top (press /), Overview,
  Inventory, the modules (Content with Inbox, Sources, Scheduled and
  Published; later phases greyed out), Settings at the bottom; a top bar
  with breadcrumbs, and a menu that slides in on narrow screens.
- brain's colour tokens, type, radius and shadows, with a dark theme that
  follows the system setting.
- Settings as grouped tabs: Profile; Social accounts (was Credentials, now
  keys and sign-in together per network); Core & Hermes; AI, which now
  holds the API keys too. Old addresses redirect.
- /search matches every word across posts, fetched items, the inventory,
  products and settings pages.
- Overview: a card per module, then the setup checklist, folded once done.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-21 07:50:24 -07:00
co-authored by Claude Opus 5.5
parent 81a7d0596c
commit a89121f1ec
29 changed files with 1141 additions and 364 deletions
+12 -18
View File
@@ -50,11 +50,6 @@ type step struct {
Link string
}
type module struct {
Name, Phase, Body string
Link string // set once the module is usable
}
func (s *Server) dashboard(w http.ResponseWriter, r *http.Request) {
p, err := profile.Load(s.DB)
if err != nil {
@@ -86,27 +81,24 @@ func (s *Server) dashboard(w http.ResponseWriter, r *http.Request) {
steps := []step{
{Label: "AI provider", Done: aiErr == nil, Link: "/settings/ai",
Detail: ifElse(aiErr == nil, aiCfg.Provider+" · "+aiCfg.Model, "Choose Anthropic or a server on your network; the profile draft and posts need it")},
{Label: "Company profile", Done: p.IsSet(), Link: "/profile",
{Label: "Company profile", Done: p.IsSet(), Link: "/settings/profile",
Detail: ifElse(p.IsSet(), p.Name, "Describe the company, its products and its customers (the AI can draft it from your website)")},
{Label: "Inventory", Done: len(entries) > 0, Link: "/inventory",
Detail: inventorySummary(counts)},
{Label: "Social accounts", Done: s.Secrets.Has(secrets.XAccessToken) || s.Secrets.Has(secrets.LinkedInAccessToken) || s.Secrets.Has(secrets.RedditAccessToken),
Link: "/settings/credentials", Detail: s.connectionSummary(conns)},
{Label: "Federated Core", Done: s.Core != nil, Link: "/core",
Link: "/settings/accounts", Detail: s.connectionSummary(conns)},
{Label: "Federated Core", Done: s.Core != nil, Link: "/settings/core",
Detail: ifElse(s.Core != nil, coreDomain(s.Core), "No Core found; run `configure core` in CoreDesktop")},
{Label: "Hermes bridge", Done: last != nil, Link: "/core",
{Label: "Hermes bridge", Done: last != nil, Link: "/settings/core",
Detail: ifElse(last != nil, "Last check-in "+ago(atOf(last)), "Hermes hasn't checked in yet")},
}
modules := []module{
{"Content", "Phase 1", "Draft posts from partner and competitor news and your own products; review and publish to X, LinkedIn and Reddit.", "/content"},
{"Prospects", "Phase 2", "Find companies and people who fit your targets, and add the ones you approve to EspoCRM through Hermes.", ""},
{"SEO", "Phase 3", "Audit your websites and open fixes as pull requests on your Hugo repositories.", ""},
{"Metrics", "Phase 4", "Pipeline influence, CAC, CLV and NRR from Stripe, EspoCRM and Plausible.", ""},
{"Sites", "Phase 5", "Build pages and sites from a component library and publish them through Gitea.", ""},
}
queued, _ := content.CountDrafts(s.DB)
scheduled, _ := content.ListDrafts(s.DB, 1000, content.StatusScheduled)
pending := false
for _, st := range steps {
pending = pending || !st.Done
}
s.render(w, r, "dashboard", page{Title: "Overview", Nav: "home", Data: map[string]any{
"Steps": steps,
@@ -114,6 +106,8 @@ func (s *Server) dashboard(w http.ResponseWriter, r *http.Request) {
"ImportStatus": s.ImportStatus,
"ImportErr": errString(s.ImportErr),
"QueuedPosts": queued,
"Scheduled": len(scheduled),
"Pending": pending,
}})
}
@@ -226,7 +220,7 @@ func (s *Server) corePage(w http.ResponseWriter, r *http.Request) {
command: socat
args: ["STDIO", "UNIX-CONNECT:` + d.MCPSocket + `"]`
d.HermesEnv = `MCPHUB_AUTH=<your own hub token from your Core: the part after "Basic ">`
s.render(w, r, "core", page{Title: "Core & Hermes", Nav: "core", Data: d})
s.render(w, r, "core", page{Title: "Core & Hermes", Nav: "settings/core", Data: d})
}
func publicPort(u string) string {