Compare commits

..
3 Commits
Author SHA1 Message Date
Andrew S Erwin e4ea50f740 release 0.3.14: bump federated service VERSION, installer image version and mcp package version
release gate / check (push) Failing after 5m27s
release / smoke (push) Successful in 10m19s
release / publish (push) Failing after 9m55s
2026-12-01 06:51:22 -06:00
Andrew S Erwin 4523a07fc0 Library: /pages (no id) shows the All-pages info view, not auto-opened page
release gate / check (push) Canceled after 1m2s
- Remove the auto-select-first-page effect so the Library index (filters,
  folder path, relative edited label, click-to-edit) is actually reachable
- Edited column uses Today/Yesterday/Mon D labels computed in the fetch callback
- Update mobile regression + e2e to the new /pages landing (index, not editor)
2026-12-01 06:50:19 -06:00
Andrew S Erwin 521987e16d Library: keep New folder / New page header actions always visible
release gate / check (push) Failing after 5m30s
The Library group's add-folder and add-page icons were hover-only; make them
persistently visible (other group headers keep hover-reveal).
2026-12-01 06:39:29 -06:00
11 changed files with 46 additions and 22 deletions
+10
View File
@@ -7,6 +7,16 @@ Versions correspond to git tags and to the published image set
(the line was reset to 0.2.x at 0.2.14 — Superbrain is pre-beta). (the line was reset to 0.2.x at 0.2.14 — Superbrain is pre-beta).
Dates are tag dates. Dates are tag dates.
## 0.3.14 — 2026-12-01
### Fixed
- **Library "All pages" info view is reachable**: `/pages` with no `?id` no
longer auto-opens the first page; it shows the filterable Library index
(All / Recent / Pinned / Untagged) with folder path and a relative
Today / Yesterday / date "Edited" column; clicking a row enters the editor.
- **Library header actions always visible**: the New folder / New page icons
no longer require hover.
## 0.3.13 — 2026-12-01 ## 0.3.13 — 2026-12-01
### Added ### Added
+1 -1
View File
@@ -48,7 +48,7 @@ SUPERBRAIN_APP_IP="192.168.0.94"
SUPERBRAIN_MIGRATE_IP="192.168.0.95" SUPERBRAIN_MIGRATE_IP="192.168.0.95"
# Release to install; the generic `upgrade` flow keeps .env in step with the # Release to install; the generic `upgrade` flow keeps .env in step with the
# service file's VERSION afterwards. # service file's VERSION afterwards.
SUPERBRAIN_IMAGE_VERSION="0.3.13" SUPERBRAIN_IMAGE_VERSION="0.3.14"
# render_superbrain_compose writes the app-dir compose file. Called by # render_superbrain_compose writes the app-dir compose file. Called by
# config_superbrain (install) and by deploy/federated/update.sh after a lib # config_superbrain (install) and by deploy/federated/update.sh after a lib
+1 -1
View File
@@ -2,7 +2,7 @@ NAME=superbrain
DESCRIPTION="Bookmark & Knowledge Base" DESCRIPTION="Bookmark & Knowledge Base"
DOCS=https://github.com/andrew/superbrain DOCS=https://github.com/andrew/superbrain
CONTAINER=federatedcomputer/superbrain-app CONTAINER=federatedcomputer/superbrain-app
VERSION=0.3.13 VERSION=0.3.14
INTERNAL_IP=192.168.0.93 INTERNAL_IP=192.168.0.93
DEPENDS="postgresql" DEPENDS="postgresql"
PORTS=3000 PORTS=3000
+1 -1
View File
@@ -91,7 +91,7 @@ func httpClient(conn Conn) *http.Client {
// ListTools connects, initializes and lists the server's tools, then closes // ListTools connects, initializes and lists the server's tools, then closes
// the session. The context bounds the whole exchange. // the session. The context bounds the whole exchange.
func ListTools(ctx context.Context, conn Conn) ([]Tool, error) { func ListTools(ctx context.Context, conn Conn) ([]Tool, error) {
client := mcpsdk.NewClient(&mcpsdk.Implementation{Name: "superbrain", Version: "0.3.13"}, nil) client := mcpsdk.NewClient(&mcpsdk.Implementation{Name: "superbrain", Version: "0.3.14"}, nil)
var transport mcpsdk.Transport var transport mcpsdk.Transport
hc := httpClient(conn) hc := httpClient(conn)
switch conn.Transport { switch conn.Transport {
+1 -1
View File
@@ -7,7 +7,7 @@ name = "superbrain-mcp"
# Versioned in lockstep with the Superbrain release it speaks to (house # Versioned in lockstep with the Superbrain release it speaks to (house
# tooling tracks one version per app); the federated mcpserver gateway # tooling tracks one version per app); the federated mcpserver gateway
# installs this package and spawns `superbrain-mcp` per linked instance. # installs this package and spawns `superbrain-mcp` per linked instance.
version = "0.3.13" version = "0.3.14"
description = "MCP server for Superbrain — bookmarks, tags and pages over the Superbrain REST API" description = "MCP server for Superbrain — bookmarks, tags and pages over the Superbrain REST API"
readme = "README.md" readme = "README.md"
requires-python = ">=3.10" requires-python = ">=3.10"
+1 -1
View File
@@ -1,3 +1,3 @@
"""Superbrain MCP server — bookmarks, tags and pages for AI tooling.""" """Superbrain MCP server — bookmarks, tags and pages for AI tooling."""
__version__ = "0.3.13" __version__ = "0.3.14"
+3 -2
View File
@@ -58,7 +58,8 @@ try {
await page.getByPlaceholder('Password', { exact: true }).fill(password) await page.getByPlaceholder('Password', { exact: true }).fill(password)
await page.getByRole('button', { name: 'Sign in with Email', exact: true }).click() await page.getByRole('button', { name: 'Sign in with Email', exact: true }).click()
await page.waitForURL('**/pages') await page.waitForURL('**/pages')
await page.getByRole('heading', { name: 'No pages yet', exact: true }).waitFor() // /pages with no id is the Library "All pages" info view (empty for a new account).
await page.getByRole('heading', { name: 'Library', exact: true }).waitFor()
const me = await json(await context.request.get(`${base}/api/me`)) const me = await json(await context.request.get(`${base}/api/me`))
accounts.push(me.user.id) accounts.push(me.user.id)
// Target/cleanup identity preflight (review TEST-03): the account created // Target/cleanup identity preflight (review TEST-03): the account created
@@ -140,7 +141,7 @@ try {
const moved = await json(await context.request.delete(`${base}/api/kanban/columns/${custom.id}`)) const moved = await json(await context.request.delete(`${base}/api/kanban/columns/${custom.id}`))
assert.equal(moved.moved, 1) assert.equal(moved.moved, 1)
await page.goto(`${base}/pages`) await page.goto(`${base}/pages`)
await page.getByRole('button', { name: 'New page', exact: true }).click() await page.getByRole('button', { name: 'New page', exact: true }).first().click()
await page.getByRole('textbox', { name: 'Page title' }).waitFor() await page.getByRole('textbox', { name: 'Page title' }).waitFor()
// TipTap contenteditable: drive it with keyboard.insertText (fill() does // TipTap contenteditable: drive it with keyboard.insertText (fill() does
// not work on contenteditable) and watch the workspace save badge. // not work on contenteditable) and watch the workspace save badge.
+1 -1
View File
@@ -1015,7 +1015,7 @@ try {
} }
// Drawer: off-canvas by default, hamburger opens it, navigating closes it. // Drawer: off-canvas by default, hamburger opens it, navigating closes it.
await mobile.goto(`${base}/pages`) await mobile.goto(`${base}/pages?id=a`)
await mobile.locator('[data-page-editor]').waitFor() await mobile.locator('[data-page-editor]').waitFor()
assert.ok(await drawerClosed(), 'sidebar must start off-canvas on phones') assert.ok(await drawerClosed(), 'sidebar must start off-canvas on phones')
await noOverflow('pages') await noOverflow('pages')
+2 -7
View File
@@ -155,13 +155,8 @@ export function PagesClient({ initialId }: { initialId: string | null }) {
editorRef.current?.resetContent(draft ?? data.content) editorRef.current?.resetContent(draft ?? data.content)
}, [autosave]) }, [autosave])
useEffect(() => { // /pages with no ?id is the Library "All pages" info view (library-index);
const timer = setTimeout(() => loadPages().then((data) => { // it must NOT auto-open the first page, or the index would never be seen.
if (!activePage.current && data.length) { activePage.current = data[0].id; setActiveId(data[0].id) }
}).catch((e) => console.error('Failed to load pages', e)), 0)
return () => clearTimeout(timer)
}, [loadPages])
useEffect(() => { useEffect(() => {
const timer = setTimeout(() => { const timer = setTimeout(() => {
if (activeId) loadPage(activeId).catch((e) => console.error('Failed to load page', e)) if (activeId) loadPage(activeId).catch((e) => console.error('Failed to load page', e))
+18 -5
View File
@@ -15,7 +15,6 @@ import {
} from '@/components/ui/dropdown-menu' } from '@/components/ui/dropdown-menu'
import { toast } from 'sonner' import { toast } from 'sonner'
import { PAGES_CHANGED, type PageSummary } from '@/lib/pages' import { PAGES_CHANGED, type PageSummary } from '@/lib/pages'
import { SafeDate } from '@/components/safe-format'
import { useMounted } from '@/components/client-only' import { useMounted } from '@/components/client-only'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
@@ -33,16 +32,30 @@ export function LibraryIndex() {
const mounted = useMounted() const mounted = useMounted()
const [pages, setPages] = useState<PageSummary[]>([]) const [pages, setPages] = useState<PageSummary[]>([])
const [recentIds, setRecentIds] = useState<Set<string>>(new Set()) const [recentIds, setRecentIds] = useState<Set<string>>(new Set())
const [editedLabels, setEditedLabels] = useState<Record<string, string>>({})
const [filter, setFilter] = useState<Filter>('all') const [filter, setFilter] = useState<Filter>('all')
const load = useCallback(() => { const load = useCallback(() => {
fetch('/api/pages').then((r) => (r.ok ? r.json() : [])).then((d) => { fetch('/api/pages').then((r) => (r.ok ? r.json() : [])).then((d) => {
const list: PageSummary[] = Array.isArray(d) ? d : [] const list: PageSummary[] = Array.isArray(d) ? d : []
setPages(list) setPages(list)
// Recency is computed here (in the fetch callback), not during render, // Recency + relative edit labels are computed here (in the fetch
// so the render path stays pure and hydration-safe. // callback), not during render, so the render path stays pure and
// hydration-safe.
const now = Date.now() const now = Date.now()
setRecentIds(new Set(list.filter((p) => p.updatedAt && now - new Date(p.updatedAt).getTime() < 2 * 24 * 60 * 60 * 1000).map((p) => p.id))) const startOfToday = new Date(); startOfToday.setHours(0, 0, 0, 0)
const recent = new Set<string>()
const labels: Record<string, string> = {}
for (const p of list) {
if (!p.updatedAt) continue
const t = new Date(p.updatedAt)
if (now - t.getTime() < 2 * 24 * 60 * 60 * 1000) recent.add(p.id)
const day = new Date(t); day.setHours(0, 0, 0, 0)
const days = Math.round((startOfToday.getTime() - day.getTime()) / (24 * 60 * 60 * 1000))
labels[p.id] = days === 0 ? 'Today' : days === 1 ? 'Yesterday' : t.toLocaleDateString(undefined, { month: 'short', day: 'numeric' })
}
setRecentIds(recent)
setEditedLabels(labels)
}).catch(() => {}) }).catch(() => {})
}, []) }, [])
@@ -137,7 +150,7 @@ export function LibraryIndex() {
))} ))}
</button> </button>
<span className="truncate text-xs text-muted-foreground">{folderPath(p) || '—'}</span> <span className="truncate text-xs text-muted-foreground">{folderPath(p) || '—'}</span>
<span className="text-xs text-muted-foreground">{p.updatedAt ? <SafeDate date={p.updatedAt} localize /> : '—'}</span> <span className="text-xs text-muted-foreground">{editedLabels[p.id] ?? '—'}</span>
<DropdownMenu> <DropdownMenu>
<DropdownMenuTrigger asChild> <DropdownMenuTrigger asChild>
<button aria-label={`Actions for ${p.title}`} className="rounded p-0.5 text-muted-foreground hover:bg-accent hover:text-foreground"><MoreHorizontal className="h-4 w-4" /></button> <button aria-label={`Actions for ${p.title}`} className="rounded p-0.5 text-muted-foreground hover:bg-accent hover:text-foreground"><MoreHorizontal className="h-4 w-4" /></button>
+7 -2
View File
@@ -155,12 +155,13 @@ export function Sidebar({ open, mobileOpen = false, onToggle, onCloseMobile, onQ
) )
} }
function GroupHeader({ label, expanded, onToggle, action, action2 }: { function GroupHeader({ label, expanded, onToggle, action, action2, alwaysVisibleActions = false }: {
label: string label: string
expanded: boolean expanded: boolean
onToggle: () => void onToggle: () => void
action?: { label: string; onClick: () => void; icon?: React.ComponentType<{ className?: string }> } action?: { label: string; onClick: () => void; icon?: React.ComponentType<{ className?: string }> }
action2?: { label: string; onClick: () => void; icon?: React.ComponentType<{ className?: string }> } action2?: { label: string; onClick: () => void; icon?: React.ComponentType<{ className?: string }> }
alwaysVisibleActions?: boolean
}) { }) {
const renderAction = (a?: { label: string; onClick: () => void; icon?: React.ComponentType<{ className?: string }> }) => { const renderAction = (a?: { label: string; onClick: () => void; icon?: React.ComponentType<{ className?: string }> }) => {
if (!a) return null if (!a) return null
@@ -170,7 +171,10 @@ function GroupHeader({ label, expanded, onToggle, action, action2 }: {
onClick={a.onClick} onClick={a.onClick}
title={a.label} title={a.label}
aria-label={a.label} aria-label={a.label}
className="shrink-0 rounded p-1 text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-foreground group-hover/header:opacity-100 focus-visible:opacity-100" className={cn(
'shrink-0 rounded p-1 text-muted-foreground transition-opacity hover:bg-accent hover:text-foreground focus-visible:opacity-100',
alwaysVisibleActions ? 'opacity-100' : 'opacity-0 group-hover/header:opacity-100'
)}
> >
<Icon className="h-3.5 w-3.5" /> <Icon className="h-3.5 w-3.5" />
</button> </button>
@@ -722,6 +726,7 @@ function SidebarNav({ open, pathname, isAdmin = false }: { open: boolean; pathna
onToggle={() => setPagesExpanded(!pagesExpanded)} onToggle={() => setPagesExpanded(!pagesExpanded)}
action={{ label: 'New folder', onClick: () => void createFolder(), icon: FolderPlus }} action={{ label: 'New folder', onClick: () => void createFolder(), icon: FolderPlus }}
action2={{ label: 'New page', onClick: () => void createPage() }} action2={{ label: 'New page', onClick: () => void createPage() }}
alwaysVisibleActions
/> />
{pagesExpanded && ( {pagesExpanded && (
<> <>