From d7c0cf89d39e9c3c6722ea3cda7f71f97a691d08 Mon Sep 17 00:00:00 2001 From: kami Date: Sun, 5 Jul 2026 18:36:31 +0400 Subject: [PATCH] =?UTF-8?q?mavweb:=20unify=20UI=20=E2=80=94=20shared=20ui.?= =?UTF-8?q?css=20+=20nav=20partial=20across=20all=20pages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit One theme (the PWA's dark palette) for dash/history/trace/notifications/ tools/passkey via static/ui.css; shared nav template with active-page highlight; tables wrapped in .scroll so they pan on phones; PWA nav no longer clips the RU/EN toggle; dash 'updated' timestamp fixed (selector matched nothing). AGENTS.md documents the local preview/screenshot recipe. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01ASstMtsZWLSRcD1Tq8T68Q --- AGENTS.md | 40 +++++++++++++++++++++ cmd/mavweb/dash.html | 38 ++++++++------------ cmd/mavweb/history.html | 47 ++++++++---------------- cmd/mavweb/main.go | 68 +++++++++++++++++++++-------------- cmd/mavweb/notifications.html | 58 +++++++----------------------- cmd/mavweb/static/index.html | 8 +++-- cmd/mavweb/static/ui.css | 64 +++++++++++++++++++++++++++++++++ cmd/mavweb/trace.html | 34 +++++++----------- cmd/mavweb/webauthn.go | 16 +++++---- 9 files changed, 215 insertions(+), 158 deletions(-) create mode 100644 cmd/mavweb/static/ui.css diff --git a/AGENTS.md b/AGENTS.md index 3b0d550..b003a0a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,3 +4,43 @@ This repo maps to **Maven** (project ID: 2) in Vikunja. Feature work, bugs, deployment tasks all go here. MCP endpoint: `http://localhost:9100/mcp` (or `http://192.168.1.104:9100/mcp` from workpc) + +## Rendering / previewing the web UI locally + +To see mavweb pages with real data without touching the production stack: + +```sh +R=/tmp/mvn-preview; mkdir -p $R +go build -o $R/mavend ./cmd/mavend/ && go build -o $R/mavweb ./cmd/mavweb/ +cat > $R/mavend.json <"}}`). New pages must link both — + no per-page inline ` - + +maven · dash + +{{template "nav" "dash"}}

presence

{{.Presence.Bucket}} — score {{printf "%.2f" .Presence.Score}} ({{ago .Presence.Updated}})

-
обновляется каждые 10с
+
обновляется каждые 10с

nudges

- -{{range .Nudges}}{{end}} -
whenrulechanoutcomemessage
{{ago .Ts}}{{.Rule}}{{.Channel}}{{.Outcome}}{{.Message}}
+
+{{range .Nudges}}{{end}} +
whenrulechanoutcomemessage
{{ago .Ts}}{{.Rule}}{{.Channel}}{{.Outcome}}{{.Message}}

facts

- -{{range .Facts}}{{end}} -
whenkindkeyvaluesourceconf
{{ago .Ts}}{{.Kind}}{{.Key}}{{.Value}}{{.Source}}{{printf "%.2f" .Confidence}}
+
+{{range .Facts}}{{end}} +
whenkindkeyvaluesourceconf
{{ago .Ts}}{{.Kind}}{{.Key}}{{.Value}}{{.Source}}{{printf "%.2f" .Confidence}}

notes

- +
whensourcetext
{{range .Notes}}{{end}} -
whensourcetext
{{ago .Ts}}{{.Source}}{{.Text}}
+ \ No newline at end of file + diff --git a/cmd/mavweb/history.html b/cmd/mavweb/history.html index 60a5332..87fa20e 100644 --- a/cmd/mavweb/history.html +++ b/cmd/mavweb/history.html @@ -1,43 +1,24 @@ - - - + maven · history - -

maven · command history

- -

{{len .Facts}} facts shown (newest first)

-
- + + +{{template "nav" "history"}} +

command history

+

{{len .Facts}} facts shown (newest first)

+ +
{{range .Facts}}{{if .VoidsID}}{{else}}{{end}} - + - +{{end}} -
whenkindkeyvaluesourceconf
{{if .VoidsID}}⨯ voided{{end}}{{.Ts.Format "2006-01-02 15:04"}} {{.Kind}} {{.Key}} {{.Value}}{{.Source}}{{.Source}} {{printf "%.2f" .Confidence}}{{if not .VoidsID}}{{end}}{{if not .VoidsID}}{{end}}
+