Skip to content

Add H3ERE pipeline scaffolding visualization to live graph#644

Open
emooreatx wants to merge 1 commit intomainfrom
claude/live-pipeline-visualization-jYY8z
Open

Add H3ERE pipeline scaffolding visualization to live graph#644
emooreatx wants to merge 1 commit intomainfrom
claude/live-pipeline-visualization-jYY8z

Conversation

@emooreatx
Copy link
Copy Markdown
Contributor

Summary

Adds a visual scaffolding representation of the H3ERE reasoning pipeline around the memory cylinder in the live graph. The scaffolding consists of vertical struts and horizontal rings that light up as pipeline stages are activated during reasoning.

Key Changes

  • New PipelineScaffolding.kt module: Defines core data structures for pipeline visualization

    • PipelineStage: Represents each H3ERE reasoning stage (THINK, CONTEXT, DMA, IDMA, SELECT, CONSCIENCE, ACT) with associated colors
    • PipelineState: Immutable state container tracking stage activation times with activate() and reset() methods
    • ScaffoldPoint: 3D-to-2D projection data for scaffolding geometry
    • projectScaffoldPoint(): Projects cylinder surface points to screen coordinates with depth-based alpha
  • Enhanced LiveGraphBackground.kt: Integrates scaffolding rendering

    • Added pipelineState parameter to composable
    • Implemented drawPipelineScaffolding() to render vertical struts and horizontal rings
    • Implemented drawScaffoldStruts() for cage-like vertical structure
    • Implemented drawScaffoldRing() with glow effects when stages activate
    • Rings glow for 3 seconds after activation, then fade
    • Scaffolding renders behind nodes for proper depth layering
  • Updated InteractViewModel.kt: Manages pipeline state lifecycle

    • Added _pipelineState StateFlow to track active stages
    • Listens for ReasoningEvent.PipelineStep events from SSE stream
    • Resets pipeline on new thought (thought_start event)
    • Activates corresponding ring when each pipeline stage event fires
  • Extended ReasoningStreamClient.kt: Emits pipeline events

    • Added ReasoningEvent.PipelineStep sealed class variant
    • Emits pipeline step for every SSE event type to trigger scaffolding visualization
    • Marks thought_start events to signal pipeline reset
  • Updated InteractScreen.kt: Passes pipeline state to graph

    • Collects pipelineState from ViewModel
    • Passes to LiveGraphBackground for rendering

Implementation Details

  • 3D Projection: Scaffolding uses same 3D rotation system as nodes (rotationX/rotationY) for consistent visual alignment
  • Depth-based Rendering: Front of cylinder is brighter (alpha 1.0), back is dimmer (alpha 0.15) for depth perception
  • Glow Animation: Active rings scale from 0.2 to 0.9 alpha and 1.5 to 3.5px width over 3-second fade
  • Performance: Scaffolding renders once per frame with efficient path drawing; inactive rings are very subtle (0.08 alpha)
  • Stage Distribution: 7 pipeline stages evenly distributed along cylinder height with 10% padding top/bottom

https://claude.ai/code/session_01V6SFhPJWn2SMncFyBP5cQW

Add a structural cage visualization around the 3D memory cylinder that
lights up as SSE reasoning events flow through the H3ERE pipeline.

- PipelineScaffolding.kt: Data model for 7 pipeline stages with glow timing,
  projection math for scaffold points on cylinder surface
- ReasoningStreamClient: Emit PipelineStep events alongside Emoji events
- InteractViewModel: Track PipelineState, reset on new thought rounds
- LiveGraphBackground: Draw vertical struts + horizontal rings per stage,
  rings glow in stage color when activated, fade over 3 seconds
- InteractScreen: Wire pipelineState through to background

https://claude.ai/code/session_01V6SFhPJWn2SMncFyBP5cQW
@cla-assistant
Copy link
Copy Markdown

cla-assistant bot commented Mar 17, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 110ebf4734

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +736 to +739
drawPath(
path = path,
color = ringColor.safeAlpha(baseRingAlpha * baseOpacity),
style = Stroke(width = ringWidth, cap = StrokeCap.Round)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Apply depth alpha when rendering scaffold ring paths

In drawScaffoldRing, segAlpha is computed from projectScaffoldPoint depth per segment, but the final drawPath call uses a constant ringColor.safeAlpha(baseRingAlpha * baseOpacity) for the whole path. When a stage is active, back-side segments often pass the threshold and then get drawn at the same opacity as front-side segments, which breaks the intended front/back depth cue and can make the ring appear to sit on top of the scene. Splitting paths by depth (or drawing per-segment with segAlpha) avoids this regression.

Useful? React with 👍 / 👎.

@sonarqubecloud
Copy link
Copy Markdown

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.

2 participants