feat: DAG Behavioral Changes (Canvas resource, Source Models, ... buttons)#8715
feat: DAG Behavioral Changes (Canvas resource, Source Models, ... buttons)#8715
Conversation
royendo
left a comment
There was a problem hiding this comment.
Code Review - DAG Nit Behavioral Fixes
Good UX improvements with the dropdown menu replacing the old toolbar. Here's my feedback:
Issues to Address
1. ResourceNode.svelte - Code duplication
The node markup is duplicated for error vs non-error cases (lines ~134-230 and ~240-330). This makes maintenance harder. Consider extracting the common parts:
<!-- Common node wrapper -->
{#snippet nodeContent()}
<Handle ... />
<Handle ... />
{#if !isInOverlay}
<div class="node-menu">...</div>
{/if}
<div class="icon-wrapper">...</div>
<div class="details">...</div>
{/snippet}
{#if hasError}
<Tooltip>
<div class="node" ...>
{@render nodeContent()}
</div>
<TooltipContent>...</TooltipContent>
</Tooltip>
{:else}
<div class="node" ...>
{@render nodeContent()}
</div>
{/if}2. ResourceNode.svelte - Import formatting (line ~17)
import { GitFork } from "lucide-svelte";
import { builderActions, getAttrs } from "bits-ui";The GitFork import has inconsistent indentation.
3. ResourceNode.svelte - Unused import
NodeToolbar is still in the imports but was removed from usage. Clean this up.
4. ResourceNode.svelte - handleRefresh doesn't show feedback
function handleRefresh(e?: MouseEvent) {
e?.stopPropagation();
if (!isModel || !data?.resource?.meta?.name?.name) return;
void $triggerMutation.mutateAsync({...});
}Consider adding loading state or toast notification so users know the refresh was triggered.
5. GraphCanvas.svelte - Global CSS selector
:global(.svelte-flow .svelte-flow__pane) {
background-color: var(--surface-background, #ffffff);
}This could unintentionally affect other xyflow instances in the app. Consider scoping it more specifically or using a data attribute.
Minor Suggestions
- The icon size changed from
20pxto16pxin the node - was this intentional? - Consider memoizing
handleViewGraphsince it accesses reactive stores
Otherwise the dropdown approach is much cleaner than the old toolbar!
Error case wraps in with error tooltip content
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7032fe6 to
160e485
Compare
There was a problem hiding this comment.
Several UX issues that should be addressed before this ships, followed by a design suggestion that could address many of them holistically.
1. Confusing initial state. The graph initializes showing disconnected dashboard nodes floating in space with no connecting edges. There's no orientation for the user — the first impression is "something is broken." The graph should initialize in a state that shows a connected, meaningful lineage.
2. URL does not stay in sync with graph state. Navigating through the graph (selecting resources, filtering, searching) doesn't consistently update the URL in Rill Cloud. The status filter in Rill Developer also isn't reflected in the URL. All user-facing state should be URL-addressable so links can be shared and the back button works.
3. Clicking a node highlights it but does nothing. Selecting a node adds a highlight border and dims other edges, but there's no contextual information surfaced — no detail panel, no inline expansion. The only affordance is the three-dot menu, which you have to discover separately. This makes selection feel broken.
4. Node titles are frequently truncated. auction_ex..., Adbid..., model_metrics_expl..., bids_data_r... — the resource name is the most important piece of information on a node, but it's consistently cut off. The kind badge and three-dot menu consume most of the horizontal space.
5. Unbounded vertical scrolling with duplicated nodes. Different DAGs are stacked vertically on the same surface with no containment or index. In the "dashboards" sprawl view, the same source (e.g., Adbids) appears three times side-by-side identically, making it look like three different resources rather than one shared dependency. There's no indication of how many graphs exist or where you are.
6. "Refresh all sources and models" button is oversized. The button is visually much taller than the toolbar buttons above it (Deploy, AI) and bumps against the page edge.
7. Layout shift on project title hover (Rill Developer). Hovering over the project title causes a pencil icon to appear that pushes the DAG icon sideways.
A possible design direction
Many of these issues stem from the same root cause: the nodes are optimized for inspection when the graph should be optimized for orientation. The primary value of a DAG is showing how a project connects — topology first, detail second. But the current node design inverts this: the kind badge (Metrics View, Explore, Source) is the most prominent element, the three-dot menu is always visible, and the content row (badges, measures, connector icons) is always rendered. The resource name gets whatever space is left.
This cascades: tall, wide nodes mean fewer fit on screen, connections span larger distances, topology is harder to read, and you need vertical scrolling and "sprawl mode" with duplicated nodes to see everything. Selection feels like a no-op because all the metadata is already shown inline — there's nothing left to reveal.
Consider making nodes compact and name-first, with selection or hover revealing the detail layer:
- Default state: A small colored kind indicator (dot or icon, not a full text badge) and the resource name. No three-dot menu, no content row. Nodes become roughly half their current height.
- Selected/hovered state: The node expands to show the metadata row and surfaces the context menu. This gives selection a clear purpose — it's how you inspect a node.
The kind is already communicated by color and DAG position; the text badge is redundant at the overview level. With compact nodes, the topology becomes legible at a glance, names stop truncating, more trees fit in a bounded viewport, and the sprawl mode with duplicated resources may become unnecessary.
Developed in collaboration with Claude Code
|
Tagging @Di7design for design thoughts as well |
…e-use resourceTable remove hover error message and use correct CSS values
Reworking DAG viewer as an alternate resource reviewer with richer context per node.
Edit 3/24: https://www.loom.com/share/aee0287f46ca44f4888920d5064b5578
https://www.loom.com/share/e76af474e7474ad28496ddd4153ea901
coerceResourceKind, with a distinct emerald color (--source) and "source model" display nameparse_canvas.go,parse_node.go)ResourceDescribeModalwith detailed resource info including connector, refresh schedule (as YAML), retry config (as YAML), security policies, measures/dimensions lists, SQL query, and partition navigation/graph): Full-page sidebar layout with breadcrumb navigation, tree dropdown with search and status filter (OK/Pending/Errored), and refresh allResourceGraphOverlaynow uses the app Dialog component instead of custom Overlay with fixed/absolute positioningconnector-type-detector.tsthat infers connector type from file paths (S3, GCS, Azure, HTTPS, local) and SQL content (read_parquet,read_csv, etc.)SummaryGraph/SummaryNode(replaced byResourceKindSelector), removedErrorBoundary,navigation-utils,url-syncmodulesPost-review refinements (latest commits)
normalizeSeeds()using aSetResourceKindconstants ingraph-builder.tsSECTION_ORDER/SECTION_LABELSinto sharedconfig.tsjoin("|")toJSON.stringifyto handle names with pipesderiveConnectorType()console.logfromGraphCanvasensureFlowPropsreactive block with staticvoid []to avoid unnecessary Svelte reactivitytitleattribute--source) for light mode readability (emerald-600 / emerald-light-400)w-64tow-96Checklist: