Skip to content

feat: tangent - interactive chips in tangent chat - #2732

Open
maxy-shpfy wants to merge 1 commit into
09-17-chore_save_id_stack_to_replay_ids_on_reloadsfrom
09-17-feat_tangent_-_interactive_chips_in_tangent_chat
Open

maxy-shpfy wants to merge 1 commit into
09-17-chore_save_id_stack_to_replay_ids_on_reloadsfrom
09-17-feat_tangent_-_interactive_chips_in_tangent_chat

Conversation

@maxy-shpfy

@maxy-shpfy maxy-shpfy commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds clickable entity:// and component:// chip rendering to the embedded AI chat. When the AI references a pipeline entity (task, input, or output) or a component in a message, the link now renders as an interactive chip instead of a plain anchor.

Clicking an entity chip activates the workarea pipeline tab that owns the entity and focuses it on the canvas. The resolution logic first tries to match by $id, then falls back to matching by label name to handle stale IDs from prior sessions. Component chips hydrate by digest, using a context-provided map when available and falling back to a service call.

Key additions:

  • resolveChatEntity — resolves an entity ID/label pair against a live ComponentSpec tree, including subgraph traversal and label-based fallback for drifted IDs.
  • chatEntityKindFromId — infers entity kind from the ID prefix for icon rendering before a spec is loaded.
  • entityIcon — extracted shared icon lookup for task, input, output, and unknown kinds.
  • chatAnchorProtocolsAnchorProtocolMap wiring entity:// to EntityAnchor and component:// to ComponentAnchor, passed into the embedded <Chat> component.
  • ChatEntityRevealContext — React context that carries the revealEntity callback from TangentProjectStore down to the anchor renderers.
  • ComponentChipFromContext / ComponentRefsContext — extracted from renderMarkdown into their own module so they can be shared between the markdown renderer and the new anchor protocol handler.
  • TangentProjectStore.revealEntity — iterates open pipeline tabs, finds the one whose live spec resolves the entity, activates it, and delegates focus to navigateToEntity.

Screenshots (if applicable)

Screen Recording 2026-09-18 at 12.36.30 PM.mov (uploaded via Graphite)

Test Instructions

  1. Open a project with at least two pipeline tabs.
  2. Start a chat session and trigger a response that includes entity:// chip links referencing tasks or inputs in one of the pipelines.
  3. Click an entity chip — the owning pipeline tab should become active and the referenced entity should be focused on the canvas.
  4. Verify that chips with stale IDs (where the label still matches a live entity name) also resolve correctly.
  5. Verify that component:// chips render and hydrate correctly by digest.
  6. Confirm that entity chips with no matching open pipeline tab are rendered but inert (no crash on click).

Additional Comments

ComponentChipFromContext and ComponentRefsContext were moved out of renderMarkdown.tsx into their own file to allow reuse by the new anchor protocol handler without circular dependencies.

@github-actions

github-actions Bot commented Sep 17, 2026

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: 09-17-feat_tangent_-_interactive_chips_in_tangent_chat/9aff02f

maxy-shpfy commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@maxy-shpfy
maxy-shpfy force-pushed the 09-17-feat_tangent_-_interactive_chips_in_tangent_chat branch from 40b4c48 to fd9ed3e Compare September 18, 2026 18:52
@maxy-shpfy
maxy-shpfy force-pushed the 09-17-feat_tangent_-_interactive_chips_in_tangent_chat branch from fd9ed3e to ac2652f Compare September 18, 2026 19:13
@maxy-shpfy
maxy-shpfy force-pushed the 09-17-feat_tangent_-_interactive_chips_in_tangent_chat branch from ac2652f to 9fff15f Compare September 18, 2026 19:18
@maxy-shpfy
maxy-shpfy force-pushed the 09-17-feat_tangent_-_interactive_chips_in_tangent_chat branch from 9fff15f to 17aba5f Compare September 18, 2026 19:28
@maxy-shpfy
maxy-shpfy marked this pull request as ready for review September 18, 2026 19:37
@maxy-shpfy
maxy-shpfy requested a review from a team as a code owner September 18, 2026 19:37
@Mbeaulne
Mbeaulne added this pull request to stack #2781 September 22, 2026 14:58
@camielvs
camielvs force-pushed the 09-17-feat_tangent_-_interactive_chips_in_tangent_chat branch from 17aba5f to b4dcaba Compare September 23, 2026 22:22
@camielvs
camielvs force-pushed the 09-17-feat_tangent_-_interactive_chips_in_tangent_chat branch from b4dcaba to 94a3a57 Compare September 23, 2026 22:35
@camielvs
camielvs force-pushed the 09-17-feat_tangent_-_interactive_chips_in_tangent_chat branch from 94a3a57 to fee11da Compare September 23, 2026 23:37
@camielvs
camielvs force-pushed the 09-17-feat_tangent_-_interactive_chips_in_tangent_chat branch from fee11da to 9aff02f Compare September 23, 2026 23:57

This branch has not been deployed

No deployments
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