feat(hub): named views and sequences for blueprints - #88
Merged
Merged
Conversation
Blueprints were one dense canvas. They now ship named views and sequences,
and the Hub viewer and both studio import paths actually use them (the Hub
format used to drop `views` entirely, so the few hand-authored ones never
showed up anywhere).
Code
- hub/conceptViews.ts: one translation of concept views -> studio views,
used by the Hub viewer (ids kept) and both import paths (ids remapped to
the new nodes / relations / sequences, name prefixed with the concept).
Views keep only elements that exist on the receiving side; a dynamic view
whose sequence did not survive falls back to static; empty views drop.
Stored positions are used only in the viewer (an import re-centres nodes).
- hubFormat carries `views`; conceptToDiagramData adds the concept's canvas
views ahead of the synthetic wiki / table views.
- Hub viewer: a view selector next to Canvas ("All elements" + the
concept's views), deep-linkable as #/c/<id>/v/canvas/cv/<viewId>. The
viewer runs in explore mode, where switching views deliberately keeps the
current layout, so it reloads the concept laid out for the chosen view.
Data (47 views, 26 sequences across the 7 blueprints)
- Every blueprint: System context (people, the platform collapsed, external
systems in one row), Containers, Governance (requirements, fitness
functions and ADRs with what they constrain).
- One dynamic view per screen flow over a sequence of its navigates-to
steps, described as "<action> -> <screen>. <what the screen is for>".
- New technical flows with a dynamic view for the three blueprints that had
none: e-commerce "Place an order and pay", SaaS "Sign-up to a provisioned
workspace", analytics "From event to dashboard".
- The four existing technical flow views get explicit positions.
Tests cover conceptViewsToDiagram (viewer and import), the cv route
parameter, and view / sequence consistency in every blueprint.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Until now each blueprint was one dense canvas. With this PR, blueprints ship named views and sequences, and the Hub viewer and both studio import paths use them.
The Hub format previously dropped
viewsentirely. The few views that were already hand-authored in blueprints and patterns therefore never appeared anywhere.Code
hub/conceptViews.ts(new). Converts a concept's views into studio views. Three places use it:importConcept), which remap ids to the newly created nodes, relations and sequences and prefix view names with the concept name.Conversion rules:
hubFormat/conceptToDiagramData.viewsis now carried through. The concept's canvas views are listed before the synthetic Wiki and Table views.Hub viewer. A view selector next to Canvas offers "All elements" plus the concept's own views. A view can be deep-linked with
#/c/<id>/v/canvas/cv/<viewId>.The viewer runs in explore mode, where switching views deliberately keeps the current layout. So when you pick a view, the viewer reloads the concept laid out for that view. This is the same thing that happens on first open, and the viewer saves nothing.
Data: 47 views and 26 sequences across the 7 blueprints
Three views in every blueprint:
One dynamic view per screen flow (19 in total). Each plays a sequence of the flow's
navigates-tosteps. A step description reads " → . ".New technical flows, each with a dynamic view, for the three blueprints that had none:
Existing technical flow views. The four that already existed now have explicit positions.
Type of change
Checklist
npm testpasses (408/408)npm run typecheckpasses with no errorsconceptViewsToDiagramin the viewer and on import (id remap, dropped elements, static fallback, positions)cvroute parameterTest plan
npm run dev:webwith headless Chromium:…/cv/view-flow-onboardinggoes straight to the SaaS "Onboarding journey" view.Known issue, not introduced here: if a concept is open and only the URL hash changes to a different concept, the viewer closes and falls back to the catalogue. The same happens on
main. Clicking cards and opening links in a new tab both work.🤖 Generated with Claude Code