Skip to content

Latest commit

 

History

History
 
 

zbugs-gpui

Folders and files

README.md

zbugs in GPUI

zbugs as a native desktop app on the Zero Rust client (rust/zero-client) and GPUI, through GPUI Kit (gpui-kit). macOS first.

  • The model, apps/zbugs-model, is shared with the Rune app: the generated schema and the ports of zbugs' queries and mutators.
  • src/transport.rs: the client's clock and timers on GPUI's foreground executor, so the client runs on the main thread with the UI, and its WebSockets on a tokio thread of the app's own (tokio-tungstenite, rustls). zero-client itself only gets its sqlite feature.
  • src/live.rs: a typed query kept current in a GPUI view.
  • src/app.rs: the issue list (filters, search, the synced count, paging as it scrolls) and the selected issue (markdown, labels, comments, commenting, closing and reopening).
  • The local store is SQLite in ~/Library/Application Support/zbugs-gpui, apart from zbugs-swift's.

Running the app

Start zbugs' backend as for zbugs-swift (see apps/zbugs-swift/README.md), which prints a token for a crew user and ready <zero-cache> <API>:

ZBUGS_PG=postgresql://user:password@127.0.0.1:6434/postgres \
  node apps/zbugs-swift/server/server.ts

Then run the app with the token:

cd apps/zbugs-gpui
ZBUGS_TOKEN=<token> cargo run

ZBUGS_CACHE_URL (default http://127.0.0.1:4848) and ZBUGS_API_URL (default http://127.0.0.1:5173) point it elsewhere. Each is also read from a file of that name (token, cache-url, api-url) in the app's directory.

On macOS, cargo run runs the app as an app: bundle.sh, Cargo's runner there (.cargo/config.toml), makes ZBugs GPUI.app beside the executable (target/debug, or target/release with --release) and runs the app from inside it, so the Dock and the app switcher show its icon. The environment and the output are as before. The bundle stays, to open from Finder or keep in the Dock; it reads the token and the servers from the files above. The icon is compiled with Xcode's actool, which needs Xcode 26 or later.

The icon (AppIcon.icon, an Icon Composer file) is zbugs-swift's with GPUI's logo as a badge, the mark from gpui.rs. GPUI and its logo are Zed Industries'.