From 05e75a6b9d604cf2916a2aec85214f8ff56b82d1 Mon Sep 17 00:00:00 2001 From: Snow Lee Date: Thu, 9 Jul 2026 13:40:22 -0700 Subject: [PATCH] redesign(web): Linear-grade viewer/admin + file-tree UX MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rework the bdrive web UI away from the violet Obsidian-ish theme to a near-black, honey-accented, hairline-crafted look in the spirit of Linear: - Replace the mixed emoji glyphs (chevrons, clocks, palette icons, admin badge, history markers, share dialog) with one coherent SVG line-icon sprite + a svgIcon() helper; colored letter-marks for projects. - Repoint the design tokens and rewrite style.css: near-black grounds, 7% hairline borders, tightened type, honey spent only on active state, the ⌘K selection, and brand marks. - Restyle the server-rendered auth pages and the public /s/ share shell to the same tokens so sign-in and the app read as one product. File-tree behavior: - Folders start collapsed; a lone root folder opens on load. - Opening a file (search, wikilink, deep link) unfolds the path to it and scrolls the row into view. State now tracks open dirs (not collapsed), so it survives the periodic tree refresh. - Plain-text/JSONL views wrap long unbreakable lines instead of overflowing the reading column. Verified in the running example hub across desktop + mobile; go build, go vet, go test ./... all green; zero horizontal page overflow. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01R7Q9ZKSZRTdvrSJkYLUmYs --- internal/webapp/authlocal.go | 48 ++- internal/webapp/shares.go | 11 +- internal/webapp/static/app.js | 112 +++-- internal/webapp/static/index.html | 57 ++- internal/webapp/static/style.css | 677 ++++++++++++++---------------- 5 files changed, 476 insertions(+), 429 deletions(-) diff --git a/internal/webapp/authlocal.go b/internal/webapp/authlocal.go index b78cfd2..9c83524 100644 --- a/internal/webapp/authlocal.go +++ b/internal/webapp/authlocal.go @@ -544,25 +544,31 @@ func authPage(w http.ResponseWriter, title, body string) { %s β€” BearDrive

%s

%s
`, +code{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.08);padding:2px 6px;border-radius:5px; +font-family:ui-monospace,Menlo,monospace} +

%s

%s
`, html.EscapeString(title), html.EscapeString(title), body) } @@ -598,13 +604,13 @@ func (a *BuiltinAuth) pageLogin(w http.ResponseWriter, r *http.Request) { if a.AllowSignup { note := "" if len(a.AllowedDomains) > 0 { - note = ` (` + html.EscapeString(a.domainList()) + ` only)` + note = ` (` + html.EscapeString(a.domainList()) + ` only)` } signup = fmt.Sprintf(`

No account? Sign up%s

`, url.QueryEscape(next), note) } brand := "" if a.Brand != "" { - brand = `

` + html.EscapeString(a.Brand) + `

` + brand = `

` + html.EscapeString(a.Brand) + `

` } authPage(w, "Sign in", brand+inviteBanner(next)+fmt.Sprintf(`
%s%s%s
%s

Forgot password?

`, @@ -653,7 +659,7 @@ func (a *BuiltinAuth) pageSignup(w http.ResponseWriter, r *http.Request) { } brand := "" if a.Brand != "" { - brand = `

` + html.EscapeString(a.Brand) + `

` + brand = `

` + html.EscapeString(a.Brand) + `

` } authPage(w, "Create account", brand+inviteBanner(next)+fmt.Sprintf(`
%s%s%s%s%s

Have an account? Sign in

`, diff --git a/internal/webapp/shares.go b/internal/webapp/shares.go index 3a1242c..77f8ea4 100644 --- a/internal/webapp/shares.go +++ b/internal/webapp/shares.go @@ -329,11 +329,12 @@ func (s *Server) handleShared(w http.ResponseWriter, r *http.Request) { const sharedMarkdownShell = ` %s