Skip to content

refactor(ui): rebuild Studio to the Calm Workbench design - #13

Merged
farhan-syah merged 17 commits into
mainfrom
redesign/calm-workbench
Oct 25, 2026
Merged

farhan-syah merged 17 commits into
mainfrom
redesign/calm-workbench

Conversation

@farhan-syah

Copy link
Copy Markdown
Member

Rebuilds every Studio screen to the Calm Workbench design. Each screen reads and writes through a typed, per-domain backend seam. Mock data serves every call. No network I/O yet.

Shell and workspace

  • Sidebar groups:
    • WORKSPACE: Explorer, Query, Designer, Events & Jobs.
    • TOOLS: Graph Explorer, Vector Space, Timeseries, Spatial, Search.
    • OPERATIONS: Cluster, Sync, Administration, Console.
  • Typed tab routes, for example /cluster/raft-groups.
  • Resizable panels with a View menu. Layout and preferences persist to ~/.config/nodedb-studio/.
  • Connections manager, connection switcher, database selector, account, notifications, preferences, and command palette.
  • Light and dark themes on one token set (assets/tokens.css), with one stylesheet per area.

Screens

Screen Tabs
Explorer Viewer per storage profile, record editor, import and export
Query / Console Editor, results, plan, transactions, saved library, multi-protocol console
Designer Schema canvas, create collection, change review
Events & Jobs Change feeds, Materialized views, Topics, Notifications, Scheduled jobs
Graph Explorer Cypher, Builder, GraphRAG
Vector Space Search, Projection, Index
Timeseries Explore, Dashboards, Lifecycle, Backfill
Spatial Map, Analyze, Raster
Search Search, Analyze, Indexes
Cluster Nodes, Raft groups, Placement, Monitoring, Activity
Sync Devices, Subscriptions, Rejected writes, Activity
Administration Access, Row policies, Audit, Backups, Config, Credentials

Backend seam

  • Rc<dyn Backend> composes per-domain async traits (services/*_data.rs).
  • services/mock/ implements them on in-memory stores. services/nodedb/ is the client stub and returns StudioError::NotConnected.
  • Every write follows one contract: review or preview, then apply with the revision the review read. The backend refuses a stale revision. Applied admin changes record an audit event.
  • Where the server reports nothing, the UI shows "Not reported". Studio never invents values.
  • tests/seam_discipline.rs keeps views, components, and modals off mock data and off scope-bound spawn(.

Cleanup

  • The legacy styles.css, legacy token aliases, transitional views, and dead modules are removed.
  • No #[allow(dead_code)] remains. Files are split to stay under 500 lines.
  • Catch-all arms on Studio enums are replaced with explicit variants.

Not in this PR

  • Panel docking. The design does not show it.
  • Audit export, the credential reveal, and the restore point picker stay disabled until they are designed.
  • The real nodedb-client wiring.

Screenshots

76 scenes in light and dark. The README gallery points at the new scene names. The screenshots branch refreshes after merge to main. Until then, use the screenshots workflow artifact on this PR.

Checks

  • cargo fmt --all --check
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo nextest run: 1384 passed
  • scripts/screenshots.sh: 152 images

Replace the fixed rail/subnav/topbar chrome with a header, sidebar,
tabs, and footer shell built around a panel registry and a persisted
workspace layout. Routing moves into a routes module with destination
and tab definitions.

Split the monolithic connection service into a trait plus separate
mock and NodeDB implementations organised per domain, and add a
cluster data service with its models and mock data.

Add a connections screen (saved list, details, activity, sorting) and
a cluster screen. Rework the connection form and preferences modals
into multi-file dialogs, and rework the connection, database, and
avatar popovers, command palette, and notification drawer.

Split the single stylesheet into token, base, shell, panel, control,
overlay, and connections stylesheets. Update the screenshot scenes
for the new screens and overlays.
Replace the per-engine viewer modules and sidebar with a catalog,
workspace, table, and details layout driven by typed record models.
Add paged record reads, a schema view, an array workspace, graph
records, a record editor modal with validation, and import/export
transfer jobs.

The explorer service seam, mock backend, and NodeDB-backed service
gain the matching record and transfer operations. Explorer styles move
to their own stylesheet, and the screenshot scenes cover the new
screens.
Replace the placeholder query and console views with full screens. The
query screen gains tabbed statement editing, bound parameters, a saved
query library, a schema browser, result and plan views, and export. The
console gains a transcript, history, and transaction controls with a
transaction badge.

Add typed models for console sessions, saved queries, query plans, and
SQL text handling, plus the matching UI state. The workbench service
seam, mock backend, and NodeDB-backed service gain run, explain,
library, and transaction operations, with new typed errors for empty
statements, syntax errors, missing parameters, and transaction misuse.
Workbench styles move to their own stylesheet, and the screenshot scenes
cover the new screens.
…view

Replace the placeholder designer with a schema canvas of draggable
collection cards, a form for editing collections, and a change review
that generates DDL for pending changes. Card positions persist in the
workspace layout apart from panel state.

Add a Uuid field type to record validation and editing. The mock
service serves collections created through the designer to the
explorer, and the screenshot harness gains designer scenes.
Rebuild the streams area as an events screen with dedicated views and
models for topics, change feeds, materialized views, cron jobs, and
listen channels. Each has a data service with mock and NodeDB-backed
implementations behind the backend seam.

Add shared JSON editor and sheet components, extra icons, an events
stylesheet, panel registry and async state support, mock behavior
controls, and screenshot scenes for the new screens. Remove the old
streams, CDC, and live-tail code and its mock data.
Replace the graph_explorer placeholder views with a graph screen
backed by typed models for the scene, layout, Cypher, builder, and
GraphRAG, plus a graph data service with mock and NodeDB
implementations and shared UI state.

Move graph-specific styles into their own stylesheet, drop graph
data from the viewers model and service, and add screenshot scenes
for the new screen.
…QL tabs

Replace the legacy scatter placeholder with a routed screen backed by a
vector service seam, mock data, and PCA/projection models. Add an actions
slot to the page tab strip, new pointer icons, vector scenes for the
screenshot harness, and a dedicated stylesheet.
…ycle views

Replace the static timeseries dashboard with a service-backed screen.
Add typed models for aggregation, axes, charts, backfill, dashboard,
and retention lifecycle, plus mock and NodeDB service implementations,
UI state, styles, and screenshot scenes.

Remove the sparkline and stat card components that only the old
dashboard used.
Replace the single-file spatial view with a view module backed by its
own models, state, mock data, and service seam. Add geometry
projection, raster, analysis, and image-encoding helpers, a dedicated
stylesheet, and screenshot scenes. Move spatial data out of the shared
viewers service and add the async state support it needs.
Add a dedicated search module with Search, Analyze, and Indexes tabs,
backed by search models, mock data built over the vector corpus, and a
service seam with mock and NodeDB implementations. Remove the old FTS
inspector and its hit model.

Wire the explorer's vector record view to open semantic search for the
selected record, and add search scenes to the screenshot harness.
…nt, and activity views

Move the cluster, raft, and shard panels out of the admin screen into
a dedicated cluster module with its own state, models, mock data,
service methods, styles, and screenshot scenes.
…ctions, and activity

Replace the placeholder sync page with a dedicated module covering
registered devices, subscriptions, quarantined writes, and the sync
event log. Add models, a sync store with mock data, a backend service
seam, panel registry entries, and screenshot scenes. Remove the
superseded viewers peer data. Link the sync rejection notification to
the specific rejected write.
…als, backups, and config views

Replace the transitional RBAC and RLS pages with dedicated admin
modules: access, policies with editor and test panel, credentials,
backups, tasks, config review, and an expanded audit view. Add the
matching models, mock data, service methods, panel registry entries,
styles, and screenshot scenes.
Drop the legacy stylesheet and its token aliases now that every screen
uses the rebuilt sheets, and rename leftover topbar/statusbar wording
to header/footer.

Split large icon, model, mock data, service state, screenshot scene,
and view files into focused sibling modules so non-test files stay
under the size limit. Mark mock behaviors that only tests construct
with scoped dead-code expectations.
The review now carries a revision that moves whenever the catalog or
the staged set changes. apply_changes takes the revision the review
read and refuses it with StaleRevision when it no longer matches, so
nothing is applied from an outdated review. The review panel shows the
refusal and offers to review again.
Describe the Backend trait seam, current project layout, panel
persistence, and screenshot scenes. Refresh Cargo.toml comments and
remove a duplicated TimeseriesData bound in the Backend blanket impl.
# Conflicts:
#	nodedb-studio/src/services/error.rs
@farhan-syah
farhan-syah merged commit 7c97593 into main Oct 25, 2026
6 checks passed
@farhan-syah
farhan-syah deleted the redesign/calm-workbench branch October 25, 2026 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant