Files
Maven/AGENTS.md
T
kami d7c0cf89d3 mavweb: unify UI — shared ui.css + nav partial across all pages
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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ASstMtsZWLSRcD1Tq8T68Q
2026-07-05 18:36:31 +04:00

47 lines
2.1 KiB
Markdown

# Maven — Agent Context
## Vikunja
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 <<EOF
{ "db_path": "$R/maven.db", "socket_path": "$R/mavend.sock",
"state_dir": "$R", "tick_interval": "10s" }
EOF
$R/mavend -config $R/mavend.json &
$R/mavweb -addr 127.0.0.1:9299 -core $R/mavend.sock &
```
- No models/voice/phraser config needed — the phraser stub covers it; mavend
runs fine bare. mavweb serves `/`, `/dash`, `/history`, `/trace`,
`/notifications`, `/tools`.
- **Socket path must be short** — unix sockets cap at ~108 chars; a deep tmp
dir fails with `bind: invalid argument`.
- Seed data through `ipc.Client` (internal package — the seeder must live
inside the module, e.g. a throwaway `cmd/seedtmp/main.go`, deleted after):
`WriteFact`, `RecordNudge`+`ResolveNudge`, `CreateReminder`, `ProposeTool`.
- `/trace` is empty until the first tick fires (wait one `tick_interval`).
- Screenshots: `chromium --headless --disable-gpu --screenshot=out.png
--window-size=1280,900 --hide-scrollbars --virtual-time-budget=2000
http://127.0.0.1:9299/dash` (use `--window-size=430,900` for the phone/PWA
view). **Always pass `--virtual-time-budget`** — without it the screenshot
can snap mid-layout and silently drop elements (the PWA lang toggle
"disappeared" this way).
## Web UI conventions
- All server-rendered pages share `cmd/mavweb/static/ui.css` (served at
`/ui.css`) and the `nav` template partial (`navHTML` in `cmd/mavweb/main.go`,
invoked as `{{template "nav" "<active-page>"}}`). New pages must link both —
no per-page inline `<style>` beyond true one-offs.
- Wrap every table in `<div class=scroll>` so wide data pans on a phone
instead of breaking the layout.