feat(emit): show for-ancestry and description on sequence lifelines#14
Merged
Merged
Conversation
Lifeline head cards previously showed only kind + name, so a container or component lifeline gave no clue where it belongs, and dropped the node's `///` description that C4 cards display. Each container/component lifeline now shows its `for` ancestry (enclosing node names, outermost first) dimmed beneath the name, and every declared lifeline shows its `///` summary, wrapped like a C4 card. The ancestry is walked from the graph `for` chain in the projection (the FQN is module-flat and does not encode C4 nesting), threaded through the shared layout engine, and drawn by both the SVG emitter and the web-IDE svelte-flow renderer. Card height is now computed dynamically so the taller head clears the lifelines. Applies to both renderers via one layout source; collapse in the web IDE recomputes the ancestry/summary for the collapsed node. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Deploying pseudoscript-landing with
|
| Latest commit: |
5b8dc6c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://87ca7638.pseudoscript-landing.pages.dev |
| Branch Preview URL: | https://feat-sequence-lifeline-ances.pseudoscript-landing.pages.dev |
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.
What
Sequence-diagram lifeline head cards previously showed only kind + name. A
container/componentlifeline gave no clue where it belongs, and dropped the node's///description that C4 cards show.Now each lifeline head shows:
for-ancestry (enclosing node names, outermost first) beneath the name — forcontainer/componentonly.///summary, wrapped (≤2 lines + ellipsis) and dimmed, like a C4 card — for every declared lifeline.Synthesised initiators (client/scheduler/event/caller) carry neither.
Applied to both renderers — the static SVG emitter and the web-IDE svelte-flow canvas — via the one shared layout engine, so they stay byte-aligned. Card height is computed dynamically so the taller head clears the lifelines/messages.
How
The FQN is module-flat (
batch::SagaSweeper, not…::Batch::SagaSweeper), so the ancestry is walked from the graph'sforparent chain in the projection, then threaded through the layout IR to both render edges.emit/scene.rs,project.rsLifelinegainssummary+parent_path;ancestry_pathwalks theforchain (cycle-guarded)layout/text.rswrap_desc— 2-line wrap + ellipsis, mirroring the C4 cardlayout/sequence/*headgeometry module shared with the renderer)emit/render.rswasm/lib.rsoutlineexposessummaryso the IDE's depth-collapse resolves the collapsed nodeweb-ideSequenceLifeline.svelterenders the two dimmed linesLANG.md §9.2Verification
batch::SagaSweeper::sweep): components show kind / name / dimmedAcmePay::Batch/ 2-line summary;schedulerinitiator carries neither.cargo clippy --all-targetsclean;cargo fmtapplied.sequence.test.tsfor collapse ancestry/summary);svelte-check0 errors.npm run build:wasm); regeneratedpds-wasm_bg.wasmincluded.🤖 Generated with Claude Code