Syngnat c7ac6d8a23 🐛 fix(sidebar): 优化数据库树纵向滚动条显示 (#838) (#842)
## 关联 Issue

Fixes #838

## 问题根因

新版侧边栏使用 Ant Design
虚拟树。其纵向虚拟滚动条会随树内容高度变化参与显示状态更新,数据库节点展开或收起时滑块长度持续变化,造成右侧滚动条闪动和卡顿感。

## 修复方案

- 在新版侧边栏树容器捕获真实纵向滚轮和触摸滚动活动。
- 默认隐藏纵向虚拟滚动条,仅在用户滚动后的 500ms 活动窗口内显示,停止后自动隐藏。
- 拖动滑块期间保持滚动条可见。
- 保持现有横向滚动条、树虚拟化参数、数据库加载及展开逻辑不变。
- 补充侧边栏纵向滚动条显隐规则回归测试。

## 验证结果

| 验证项 | 命令或步骤 | 结果 |
| --- | --- | --- |
| 目标回归测试 | `npm --prefix frontend test --
src/components/Sidebar.locate-toolbar.test.tsx` | 通过,86/86 |
| 完整前端测试 | `npm --prefix frontend test` | 通过,444 个测试文件、3747 个用例 |
| 前端生产构建 | `npm --prefix frontend run build` | 通过,TypeScript 与 Vite 构建成功
|
| 桌面视口 GUI | 1280x720 下展开 24 个模拟数据库节点并静置,检查 DOM 与截图 | 通过;纵向滚动条存在但保持
`visibility: hidden`,树壳无滚动活动类 |
| 窄屏 GUI | 640x720 下展开、收起同一数据库树,检查 DOM、截图和布局 |
通过;展开/收起不显示纵向滚动条,侧边栏与主内容无重叠 |
| 滚轮瞬态 GUI | 内置浏览器在虚拟树区域执行滚轮手势 | 未执行成功;浏览器运行时未向虚拟树产生有效位移或 `wheel`
活动,因此未把该项记为通过;显隐状态由回归测试覆盖 |

GUI 测试使用浏览器 mock 临时准备一条 MySQL 连接和 24
个数据库节点,测试后已完全还原,未进入提交。浏览器工具未提供控制台日志读取能力;测试期间未观察到白屏、错误弹窗或布局异常。

## 风险与兼容性

- 改动仅作用于 v2 侧边栏树的纵向虚拟滚动条,不影响旧版 UI 和现有横向滚动条。
- 不改变公共 API、配置、持久化数据、数据库请求、树节点结构或虚拟滚动尺寸。
- 500ms 空闲窗口只控制视觉显隐;滚动和拖动仍由 Ant Design 虚拟列表处理。
- GUI 工具未能直接验证滚轮活动期间的瞬态显示,这是当前验证边界。

## 回滚方式

回滚提交 `95703065223d7c06cad6179bea7657ba7d69a1e9`
即可恢复原滚动条行为。该回滚不涉及数据、配置或迁移。
2026-08-04 20:56:20 +08:00

GoNavi Logo

GoNavi

Navigate every data source — native speed, agent-ready, zero Electron bloat.

A high-performance cross-platform database client built with Wails (Go) + React. Desktop-first. MCP-ready. ~30MB class binaries.

Release Downloads Stars License

Go Wails React Build

Language: English · 简体中文  ·  ⬇ Download · Quick Start · Features · 🤖 MCP

Sponsored by 华龙中转站 / Hualong Transfer Station


Why GoNavi?

Most database GUIs are Electron shells with megabytes of tax. GoNavi takes a different path:

Typical Electron client GoNavi
Runtime Chromium + Node Go + native WebView
Binary size Hundreds of MB ~30MB class
Startup Heavy Fast
Memory High baseline Lean
AI / Agents Bolt-on or absent First-class MCP + multi-provider AI
Data sources Mostly RDBMS SQL · Cache · Vector · MQ · Search · Time-series · Domestic DBs

One cockpit for MySQL, Postgres, Redis, Kafka, Milvus, OceanBase, ClickHouse…
Query, edit, audit, sync — and hand structured context to coding agents without leaking passwords off-host.


At a Glance

┌──────────────────────────────────────────────────────────────────────┐
│  GoNavi Workbench                                                    │
│  ┌─────────────┐  ┌──────────────────┐  ┌─────────────────────────┐  │
│  │ Connections │  │ Monaco SQL + AI  │  │ Virtualized DataGrid    │  │
│  │ SSH / Proxy │  │ Schema context   │  │ Batch edit · Export     │  │
│  │ Drivers     │  │ Slash commands   │  │ Txn submit / rollback   │  │
│  └─────────────┘  └────────┬─────────┘  └─────────────────────────┘  │
│                            │                                         │
│              ┌─────────────▼─────────────┐                           │
│              │  Go core · Audit · Sync   │                           │
│              │  MCP HTTP · Web Server    │                           │
│              └───────────────────────────┘                           │
└──────────────────────────────────────────────────────────────────────┘

Product screenshots

Each image is a full GoNavi application window, scaled proportionally for README display.

GoNavi full window — connections, queries, and workbench   GoNavi full window — AI assistant with schema context

GoNavi full window — new connection data-source selector

Real desktop captures · full window


Key Features

🤖 AI that knows your schema

  • OpenAI · Gemini · Claude · custom OpenAI-compatible APIs
  • Attach live table schemas as context
  • Slash commands: generate SQL, explain, optimize, review
  • MCP: install into Claude Code / Codex, or Streamable HTTP for remote agents
  • Secrets stay on the GoNavi host — agents get tools, not raw passwords

Built for large data

  • Virtualized DataGrid for heavy result sets
  • In-place cell edit · batch CRUD · transaction submit/rollback
  • Large-field popup editor · smart read/write modes
  • Export: CSV · XLSX · JSON · Markdown
  • Monaco editor with context-aware completion

🔌 Connectivity without drama

  • URI generate / parse
  • SSH tunnel · proxy
  • Connection JSON import / export
  • On-demand optional driver agents
  • Custom Driver + DSN extensibility

🛡️ Observable & shippable

  • SQL execution logs with timing
  • Audit center (redacted by default, retention, export)
  • Desktop + experimental Web Server mode
  • Docker / K8s / Helm / Podman packaging
  • Auto update checks · multi-arch releases

🧩 Stack

Go 1.24 · Wails v2 · React 18 · TypeScript · Vite · Ant Design 5 · Zustand · Monaco


🗄 Supported Data Sources

Built-in — ready out of the box · Optional agent — install via Driver Manager

Built-in MySQL · GoldenDB · PostgreSQL · Oracle · Redis · Chroma · Qdrant · Milvus · RocketMQ · MQTT · Kafka · RabbitMQ
Optional MariaDB · Doris · StarRocks · Sphinx · SQL Server · SQLite · DuckDB · OceanBase · Dameng · Kingbase · HighGo · Vastbase · OpenGauss · GaussDB · IRIS · MongoDB · TDengine · IoTDB · ClickHouse · Trino · Elasticsearch · Custom Driver/DSN
Full capability matrix
Category Data Source Driver Mode Typical Capabilities
Relational MySQL Built-in Schema browsing, SQL query, data editing, export/backup
Domestic DB GoldenDB Built-in MySQL-compatible query workflow and distributed transaction scenarios
Relational PostgreSQL Built-in Schema browsing, SQL query, data editing, object management
Relational Oracle Built-in Query execution, object browsing, data editing
Cache Redis Built-in Key browsing, command execution, encoding/view switch
Vector Database Chroma Built-in Collection browsing, vector retrieval, metadata filtering
Vector Database Qdrant Built-in Collection browsing, vector search, payload filtering
Vector Database Milvus Built-in Collection browsing, vector search, scalar filtering
Message Queue RocketMQ Built-in Topic browsing, consumer-group inspection, message-oriented workflow
Message Queue MQTT Built-in Broker and topic-filter workflow with QoS-aware connection settings
Message Queue Kafka Built-in Topic browsing, broker metadata, consumer-group workflow
Message Queue RabbitMQ Built-in Queue/exchange browsing, virtual host inspection, management API workflow
Relational MariaDB Optional driver agent Querying, object management, data editing
Relational Doris Optional driver agent Querying, object browsing, SQL execution
Columnar Analytics StarRocks Optional driver agent Querying, object browsing, SQL execution
Search Sphinx Optional driver agent SphinxQL querying and object browsing
Relational SQL Server Optional driver agent Schema browsing, SQL query, object management
File-based SQLite Optional driver agent Local DB browsing, editing, export
File-based DuckDB Optional driver agent Large-table query, pagination, file-DB workflow
Domestic DB OceanBase Optional driver agent MySQL / Oracle tenant access, object browsing, query workflow
Domestic DB Dameng Optional driver agent Querying, object browsing, data editing
Domestic DB Kingbase Optional driver agent Querying, object browsing, data editing
Domestic DB HighGo Optional driver agent Querying, object browsing, data editing
Domestic DB Vastbase Optional driver agent Querying, object browsing, data editing
Domestic DB OpenGauss Optional driver agent PostgreSQL-like schema browsing, SQL query, object management
Domestic DB GaussDB Optional driver agent PostgreSQL-like schema browsing, SQL query, object management
Multi-model InterSystems IRIS Optional driver agent Namespace browsing, SQL query, object management
Document MongoDB Optional driver agent Document query, collection browsing, connection management
Time-series TDengine Optional driver agent Time-series schema browsing and querying
Time-series Apache IoTDB Optional driver agent Storage group / device / timeseries browsing and querying
Columnar Analytics ClickHouse Optional driver agent Analytical query, object browsing, SQL execution
Federated Query Trino Optional driver agent Cross-source SQL via multiple catalogs, catalog.schema browsing, SQL execution
Search Elasticsearch Optional driver agent Index browsing, mapping inspection, guarded REST console, JSON DSL / query_string search
Extensibility Custom Driver/DSN Custom Extend to more data sources via Driver + DSN

Elasticsearch REST console

Elasticsearch connections reuse the query workspace as a version-aware REST console:

  • Write Dev Tools-style METHOD /path requests with JSON bodies, or NDJSON for _bulk and _msearch; run the request at the cursor, the exact selection, or a batch in editor order.
  • Search hits can be viewed as a table while the complete HTTP response remains available as raw JSON or text.
  • A server-side allowlist accepts supported search, document, index, mapping, settings, alias, health, and limited CAT operations. Unknown and high-privilege endpoints are rejected by default.
  • Destructive operations require an expiring one-time confirmation. Connection protection still takes precedence and blocks writes as well as script-bearing reads.
  • Writes are limited to concrete indices and require Elasticsearch view_index_metadata (or manage) permission so GoNavi can verify the target before sending data; aliases and data streams are not accepted as write targets.
  • Request templates adapt document, mapping, and Bulk paths for Elasticsearch 6, 7, and 8.

This console targets Elasticsearch 6/7/8. It does not claim OpenSearch compatibility, and intentionally excludes reindex, security, snapshot, node, cluster-settings, template, pipeline, lifecycle, and other unrestricted administration APIs.


🚀 Quick Start

Prerequisites

go install github.com/wailsapp/wails/v2/cmd/wails@v2.11.0

Develop

git clone https://github.com/Syngnat/GoNavi.git
cd GoNavi

wails dev                          # full hot reload
node tools/wails-fast-dev.mjs      # faster when Go exports unchanged
node tools/wails-fast-dev.mjs --refresh-bindings  # after Go export signature changes

Build

wails build
wails build -clean   # clean build before release

Artifacts → build/bin.

Prefer a binary?

Grab the latest build from Releases
(macOS AMD64/ARM64 · Windows AMD64 · Linux WebKitGTK 4.0/4.1).


🌐 Web Server (Experimental)

Same Go backend + React UI over HTTP — not a containerized Wails window.

go build .
.\GoNavi-Wails.exe web-server --addr 127.0.0.1:34116
  • First visit → /setup (admin password; optional Google Authenticator)
  • Bridge: window.go.* / window.runtime.* → HTTP / SSE
  • Sessions, recovery codes, login rate limits

Docker / Podman

cp docker.web-server.env.example docker.web-server.env
# set GONAVI_HOST_DATA_ROOT (absolute path)
# optional: GONAVI_WEB_PASSWORD (min 6 chars)
docker compose --env-file docker.web-server.env -f docker-compose.web-server.yml up -d

Open http://127.0.0.1:34116. Mount the active data root at /data
(connections.json, daily_secrets.json, optional drivers/).
Auth state → web_auth.json.

Do not expose an unhardened web entry to the public internet. Use reverse proxy + HTTPS in production.

Health: GET /__gonavi/healthz
Local source build: add -f docker-compose.web-server.local.yml --build.

After changing env passwords:

docker compose --env-file docker.web-server.env -f docker-compose.web-server.yml up -d --force-recreate

(docker restart does not reload env files.)


🤖 MCP & Agents

Ship schema tools to agents without shipping your vault:

cp docker.mcp-server.env.example docker.mcp-server.env
docker compose --env-file docker.mcp-server.env -f docker-compose.mcp-server.yml up -d
Surface Entry
MCP container docker-compose.mcp-server.ymlghcr.io/syngnat/gonavi-mcp-server
Web UI container docker-compose.web-server.ymlghcr.io/syngnat/gonavi-web-server
Podman / Quadlet deploy/podman/gonavi-mcp-server
Kubernetes deploy/k8s/gonavi-mcp-server
Helm deploy/helm/gonavi-mcp-server
Build-only image Dockerfile.build-envghcr.io/syngnat/gonavi-build-env

Safety defaults: remote schema-only omits execute_sql; mutating SQL requires explicit allowMutating=true.
Details: cmd/gonavi-mcp-server/README.md.

Linux build environment only

docker build -f Dockerfile.build-env -t gonavi-build-env:local .
docker run --rm -it -v "$PWD:/workspace" -w /workspace gonavi-build-env:local bash

📦 Release Pipeline

Push a v* tag → GitHub Actions builds multi-arch releases.
Notes auto-generated from merged PRs via .github/release.yaml.


🛠 Troubleshooting

Windows: missing Microsoft Edge WebView2 Runtime (common on intranet images)

The GoNavi desktop app on Windows depends on the Microsoft Edge WebView2 Runtime (a system component, not full Chrome).
Some intranet / thin / Server / LTSC images ship without it. Symptoms:

  • Process exits immediately, blank/white window
  • Errors about missing WebView2 / WebView2 Runtime
  • Installer blocked by AV or group policy

1. Check whether Runtime is installed

In PowerShell:

# Common Evergreen install path (64-bit Windows)
Test-Path "${env:ProgramFiles(x86)}\Microsoft\EdgeWebView\Application"

# Registry (a `pv` version usually means installed)
Get-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" `
  -ErrorAction SilentlyContinue |
  Select-Object pv, name

If the path is missing and registry has no pv, install the Runtime.

2. Online install (simplest)

  1. Open the official download page:
    Microsoft Edge WebView2
  2. Download the Evergreen Bootstrapper (small; needs network during install)
  3. Run as Administrator, then restart GoNavi

The Bootstrapper fails on fully air-gapped machines. Use the Evergreen Standalone Installer instead:

  1. On a machine with internet, download the matching architecture package, e.g.:
    • MicrosoftEdgeWebView2RuntimeInstallerX64.exe (most 64-bit PCs)
    • …X86.exe / …ARM64.exe as needed
  2. Copy the installer into the intranet (USB, software center, share)
  3. Install as Administrator on the target PC:
# Interactive
.\MicrosoftEdgeWebView2RuntimeInstallerX64.exe

# Silent (batch / SCCM friendly)
.\MicrosoftEdgeWebView2RuntimeInstallerX64.exe /silent /install
  1. Start GoNavi again. If it still fails, sign out or reboot Windows once.

4. Group policy / locked-down PCs

  • Needs local admin, or IT push via SCCM / software center
  • Ensure policies do not block Edge/WebView2 install or updates
  • Enterprises may pin a Fixed Version Runtime (most users should prefer Evergreen)

5. Temporary workaround: Web Server mode

If the desktop WebView cannot be installed yet, run the experimental Web Server and use a normal browser:

.\GoNavi.exe web-server --addr 127.0.0.1:34116

Open http://127.0.0.1:34116. See the Web Server section above.
Do not expose an unhardened Web endpoint to the public internet.

Tracker / discussion: #672.

macOS: “App is damaged and cant be opened”

Without Apple notarization, Gatekeeper may block the app:

sudo xattr -rd com.apple.quarantine /Applications/GoNavi.app

Or right-click → Open (Control-click flow). Move the app to Applications first.

Linux: missing WebKitGTK
# Debian 13 / Ubuntu 24.04+
sudo apt-get update
sudo apt-get install -y libgtk-3-0 libwebkit2gtk-4.1-0 libjavascriptcoregtk-4.1-0

# Ubuntu 22.04 / Debian 12
sudo apt-get update
sudo apt-get install -y libgtk-3-0 libwebkit2gtk-4.0-37 libjavascriptcoregtk-4.0-18

Artifacts with -WebKit41 prefer Debian 13 / Ubuntu 24.04+.

Linux: Chinese glyphs as tofu boxes
sudo apt-get update
sudo apt-get install -y fonts-noto-cjk fonts-wqy-microhei
fc-cache -fv

💖 Sponsors

华龙中转站 Hualong Transfer Station

华龙中转站 · Hualong Transfer Station
AI API Gateway · multi-model routing · domestic high-speed endpoint

Special thanks to 华龙中转站 (Hualong Transfer Station) for sponsoring GoNavi open-source development.

What they are An AI API Gateway that unifies multi-model access behind an OpenAI-compatible surface — so you can ship LLM features without fighting provider fragmentation and network friction.
What you get Multi-model routing · OpenAI-compatible API · domestic high-speed direct endpoint · practical for indie devs and open-source projects that need reliable LLM access
Why we recommend them GoNavi is AI/MCP-first. Stable model access is core infrastructure for coding agents, schema-aware assistants, and day-to-day development.

Looking for a solid LLM relay?
👉 https://api-fast.hualong.online/ — console, docs, and the domestic high-speed endpoint.

Hualong also sponsored a shared 50B token pool for GoNavi co-maintainers, used via API Key (not 50B per person). Rules and how to apply: Issue #671.


🤝 Contributing

Issues and PRs welcome. Branch from dev, PR against dev.


💬 Contact & Feedback

Channel Notes
GitHub Issues Preferred for bugs, feature requests, and docs — easier to track and reproduce
WeChat ygf1140302783 (note “GoNavi”) — maintainer can invite you to the community group for discussion

For technical reports, include version, OS, and repro steps when possible. Windows blank/crash on intranet images: WebView2 guide.


Star History

Star history

License

Apache-2.0

Built for people who live in SQL, schemas, and agent loops.

Description
现代化、原生体验的数据库管理工具,支持 MySQL、PostgreSQL、SQLite 等数据库,采用 Go 后端 + Wails + React 前端构建,启动快、体积小、性能强。
Readme Apache-2.0 144 MiB
Languages
TypeScript 56.6%
Go 38.1%
CSS 2.2%
Python 1.1%
HTML 0.7%
Other 1.3%