Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
4e51714
refactor(ui): rebuild shell, workspace, and connections screens
farhan-syah Oct 25, 2026
8e4b879
refactor(explorer): rebuild explorer with record browsing and editing
farhan-syah Oct 25, 2026
0f69599
refactor(workbench): rebuild query and console screens
farhan-syah Oct 25, 2026
4d6a12e
refactor(designer): rebuild designer with schema canvas and change re…
farhan-syah Oct 25, 2026
98d542d
refactor(events): replace streams screen with events screen
farhan-syah Oct 25, 2026
711e983
refactor(graph): rebuild graph explorer as a scene-based screen
farhan-syah Oct 25, 2026
ab88185
refactor(vector): rebuild vector screen with projection, index, and S…
farhan-syah Oct 25, 2026
97af125
refactor(timeseries): rebuild timeseries screen with charts and lifec…
farhan-syah Oct 25, 2026
dcd427c
refactor(spatial): rebuild spatial screen as a dedicated module
farhan-syah Oct 25, 2026
9511e34
refactor(search): replace FTS inspector with a search screen
farhan-syah Oct 25, 2026
7530ba8
refactor(cluster): rebuild cluster screen with monitor, raft, placeme…
farhan-syah Oct 25, 2026
f185852
refactor(sync): rebuild sync screen with devices, subscriptions, reje…
farhan-syah Oct 25, 2026
579c779
refactor(admin): rebuild admin screen with access, policies, credenti…
farhan-syah Oct 25, 2026
9d995c7
refactor(ui): remove legacy stylesheet and split oversized modules
farhan-syah Oct 25, 2026
8b78677
feat(designer): refuse apply of a stale reviewed revision
farhan-syah Oct 25, 2026
ac723c9
docs: update README and AGENTS for the backend seam and workspace
farhan-syah Oct 25, 2026
ad6e427
Merge remote-tracking branch 'origin/main' into redesign/calm-workbench
farhan-syah Oct 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
31 changes: 19 additions & 12 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ NodeDB Studio is a **desktop GUI client for NodeDB**, built in Rust with
- **Rust**: edition 2024, MSRV pinned in `Cargo.toml` (`rust-version`, currently 1.96).
- **UI**: Dioxus **0.7** with the `desktop` + `router` features.
- **Backend seam**: `nodedb-client` / `nodedb-types` (the typed Rust client).
Today the app runs on hardcoded mock data behind a `ConnectionService` trait;
the real client-backed impl plugs in at that seam.
Views reach the backend only through `Rc<dyn Backend>` (`services/backend.rs`),
composed of per-domain async traits (`services/*_data.rs`). Today
`services/mock/` serves hardcoded data; `services/nodedb/` is the client-backed
stub that returns `StudioError::NotConnected` until wired.
- **Serialization**: `sonic_rs` for any runtime JSON (display), `serde` derive on
models. The wire format to the server is the client's concern (MessagePack).

Expand Down Expand Up @@ -71,24 +73,25 @@ cargo nextest run
For UI changes, also check the screen renders: `cargo run -p nodedb-studio`, or
`scripts/screenshots.sh` and read the PNGs. A new screen or overlay needs a scene in
`src/screenshots/scenes.rs`. Launch through `cargo run`: a bare debug or release
binary counts as a `dx` bundle and loads no stylesheet.
binary counts as a `dx` bundle and loads no stylesheet. Scenes live in
`src/screenshots/scenes.rs` and the per-area `*_scenes.rs` files.

## Project structure

```
nodedb-studio/src/
main.rs desktop launch + window config (Config / WindowBuilder)
app.rs root App: context providers + connected/disconnected state machine
routes.rs Route enum + StudioLayout (persistent chrome + Outlet)
components/ reusable chrome (rail, topbar, statusbar, modal, popovers, …)
views/ one module per routed screen (explorer, admin, streams, …)
routes/ Route enum, typed tab segments (tabs.rs), sidebar destinations, StudioLayout
components/ reusable chrome (sidebar, header, footer, panel, tabs, view menu, popovers, …)
views/ one module per routed screen (explorer, query, events, cluster, admin, …)
modals/ modal bodies + the ModalHost
state/ live UI state as Dioxus signals (connection, prefs, ui, …)
models/ typed domain data (collection, notification, …)
services/ ConnectionService trait — the backend seam (mock impl today)
state/ live UI state as Dioxus signals; workspace panel layout + persistence
models/ typed domain data
services/ Backend seam: per-domain traits, mock/ impl, nodedb/ stub
data/mock/ ALL hardcoded mock data, in one place
screenshots/ scene runner + WebKitGTK capture (`screenshots` feature, Linux only)
assets/styles.css CSS ported from the design (loaded via asset!)
assets/ tokens.css (design tokens, light + dark), shared sheets, one sheet per area
scripts/ screenshot capture + PR diff report (CI: .github/workflows/screenshots.yml)
```

Expand Down Expand Up @@ -120,7 +123,11 @@ scripts/ screenshot capture + PR diff report (CI: .github/workflows/s
closures over existing handlers.
- **Forms submit by default in 0.7** — call `e.prevent_default()` in `onsubmit`.
- **Never block the main thread.** CPU work → `std::thread::spawn`; async IO →
`spawn` / `use_resource` / `use_action`; long-lived tasks → `spawn_forever`.
`use_resource` / `use_action`; event-handler tasks → `spawn_forever` (never
scope-bound `spawn(` in views, components, or modals).
- Views, components, and modals read data only through the `Backend` seam, never
`data::mock` or `services::mock`; connect through `apply_connect`.
`tests/seam_discipline.rs` enforces both.
Write results back into a signal.
- Keep business/state logic in plain Rust (`state/`, `services/`, `data/`) so it
is testable without a renderer.
Expand Down Expand Up @@ -148,7 +155,7 @@ scripts/ screenshot capture + PR diff report (CI: .github/workflows/s

**Ask first**
- Adding a new dependency, or bumping the Dioxus / Rust version.
- Adding a new top-level module or changing the `ConnectionService` seam.
- Adding a new top-level module or changing the `Backend` seam's shape.

**Never**
- Commit secrets, credentials, or `.cargo/config.toml`.
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ nodedb-types = "0.6"
async-trait = "0.1"
tokio = { version = "1", features = ["rt-multi-thread", "macros", "time"] }
# UI. The `router` feature re-exports the router through dioxus::prelude.
# Desktop-only for the skeleton.
# Desktop only.
dioxus = { version = "0.7", features = ["desktop", "router"] }
# Test-only: render components to a string for render-level assertions.
dioxus-ssr = "0.7"
Expand All @@ -34,8 +34,8 @@ dioxus-ssr = "0.7"
webkit2gtk = "2.0"
cairo-rs = { version = "0.18", features = ["png"] }

# Serialization. Kept for derive on models/preferences; no runtime parsing
# happens in the skeleton (mock data is hardcoded Rust).
# Serialization: derive on models and persisted workspace/preferences;
# sonic-rs for runtime JSON.
serde = { version = "1", features = ["derive"] }
sonic-rs = "0.5"

Expand Down
Loading
Loading