← Back to Pull requests

feat(studio): let people see an event model's lanes and links in 3D #199

Closed
unknown closed this pull request without merging on Oct 20, 2026 03:39 UTC
View on GitHub
unknown unknown commented on Oct 20, 2026 01:32 UTC
Author

Summary

On the Board, a link between two distant cards runs across the cards between its ends. In a dense model, a reader cannot tell which cards a link connects. The new Lane mesh tab draws the Board in 3D. Each card keeps its Board lane row and slice column, and links arc out in front of the cards and end on card edges. The view is read only.

What changes

  • Tab: ?view=lanes, labelled "Lane mesh". It shows when the model has slices and the board is not a saved snapshot.

  • Layout: src/lib/lanemesh.ts reads the Board's own layout. x is the slice column, y is the lane row, and depth routes the links. Scene ids are the Board's occurrence and edge ids, so a selection carries across views.

  • Ports: src/lib/ports.ts finds where a link meets a box, sphere, octahedron or cylinder. On a thin card or disc the port moves to the rim. Ports that share a rim spread in the order of their far ends, so links do not cross at the card.

  • Code wall: when entities carry a CodeRefAnnotation, the cited files sit on a wall under the board, bundled by repo and the first two directories. Cite links leave from the card's bottom rim and run behind the lanes. A model without code references has no wall.

  • Camera: Front, Overview, and a stepper through the slice columns. A focus request from the Inspector, the sidebar or a deep link flies to the card. A click only selects, as on the Board.

  • Rendering: src/components/canvas/three/ holds one renderer for any scene. It handles labels, picking, hover, resize and full disposal. It draws a frame only when something moves, so an idle tab does not use the GPU.

  • Shared ids: the Context map and the multi-context Board now build seam edge ids and context prefixes from SEAM_EDGE_PREFIX in model.ts and NS_SEP in multiboard.ts. The 3D view reads those ids back, so one definition keeps the 2D producers and the 3D reader in step. The ids themselves do not change.

  • Bundle: three 0.186.1 and @types/three 0.186.0 are pinned. three.js loads only when a 3D tab opens, in its own chunk. The main bundle and the stylesheet do not change. Without WebGL the tab shows a plain message and downloads no 3D code.
  • How to test

    1. In tsworkspace/webapps/studio, run pnpm lint, pnpm typecheck, pnpm test and pnpm build.
    2. Run grep -c WebGLRenderer public/snapshot/runtime.js. The count is 0.
    3. Start the dev stack and apply the Acme storefront example. Open the board and select the "Lane mesh" tab.
    4. Click Front, Overview, and the slice arrows. Click a card. The Inspector opens and the card's links light up.
    5. Add a CodeRefAnnotation to a command and reload. The file appears on the wall under the board, linked from the card.
    6. Turn off WebGL in the browser. The tab shows "This view needs WebGL".

    Known limits

  • A saved board does not offer the 3D tabs. Its runtime is one inlined file, and three.js would add about 580 kB to it, so the saved-board build swaps the 3D code for a stub.

  • The 3D view shows no branch badges, issue badges or fork roads yet.

  • The camera position is not kept in the URL or across tab switches.

  • Cite links come from an entity's first occurrence only, because read models, screens and automations repeat once per slice.
  • <!-- codesmith:footer -->
    ---
    <a href="https://app.blacksmith.sh/TrogonStack/codesmith/atlas/pr/199?autoLogin=true&ref=codesmith_pr_footer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-light-v3.svg"><img alt="View with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3.svg"></picture></a> <a href="https://backend.blacksmith.sh/track/enable-autofix?expires=1795051928&installation_model_id=437969&pr_number=199&ref=codesmith_pr_footer&repository=TrogonStack%2Fatlas&return_to=https%3A%2F%2Fgithub.com%2FTrogonStack%2Fatlas%2Fpull%2F199&signature=9c62b8c9e43c9172990d396515cf0780e0a0f3eb95a5316b87fa93710d77ac81"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"><img alt="Autofix with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"></picture></a>
    <sup>Need help on this PR? Tag <code>@codesmith-bot</code> with what you need.</sup>

    <!-- codesmith:autofix:disabled -->
    <!-- /codesmith:footer -->

    Diff: 587 lines (+440 / -147) across 7 files Reviewer: yordis Review duration: 127m
    All Vouch review confidence checks passed
    Residual risk 0.22 = Change Risk (0.50) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 587 lines diff across 7 files
    0.50
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.382
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #199"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 49.9% (MEDIUM) · Higher = larger blast radius
    49.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 21.6% · Safe to merge
    21.6%