Skip to content

feat: add data flow annotations to connections#17

Merged
trmquang93 merged 1 commit intomainfrom
feat/data-flow-annotations
Mar 30, 2026
Merged

feat: add data flow annotations to connections#17
trmquang93 merged 1 commit intomainfrom
feat/data-flow-annotations

Conversation

@trmquang93
Copy link
Copy Markdown
Collaborator

Summary

  • Connections now carry typed data items (dataFlow: [{ name, type, description }]) describing what information passes between screens
  • New DataFlowEditor component integrated into both ConnectionEditModal and HotspotModal (navigate, modal, API success/error, and conditional modes)
  • Teal pill badge on canvas connections that have data annotations
  • Generated instructions now include "Input Parameters" tables per screen in screens.md, a "Data" column in navigation.md, and annotated wire items in tasks.md
  • MCP server create_connection and update_connection tools accept data_flow parameter
  • FILE_VERSION bumped from 10 to 11 with backward-compatible migration

Why

This is the single biggest gap in instruction generation. The flow captures where users navigate but not what data they carry. Without this, AI agents generate screens that don't receive the data they need, leading to broken navigation or redundant API calls.

Test plan

  • Create a connection between two screens, open the edit modal, add data items (name, type, description) -- verify they persist after save and reopen
  • Verify teal badge appears on connections with data, shows param name (1 item) or "N params" (multiple)
  • Open HotspotModal for navigate/modal action -- verify DataFlowEditor appears after target screen
  • Open HotspotModal for API action -- verify DataFlowEditor in On Success and On Error sections
  • Export instructions -- verify navigation.md has "Data" column and screens.md has "Input Parameters" tables
  • Open an older .drawd file (v10) -- verify it loads without errors (dataFlow backfilled to [])
  • MCP server: create_connection with data_flow param, verify in list_connections
  • npm run lint passes
  • npm test passes (271/271, excluding pre-existing @grida/refig issue)

Connections can now carry typed data items (name, type, description) that
describe what information passes between screens. This closes the biggest
gap in instruction generation -- AI agents now know exactly what parameters
each screen receives.

- Add dataFlow[] to connection data model (FILE_VERSION 10 -> 11)
- New DataFlowEditor component for editing data items in modals
- Integrate into ConnectionEditModal (navigate + conditional modes)
- Integrate into HotspotModal (navigate, modal, API success/error, conditional)
- Render teal pill badge on canvas for connections with data annotations
- Add "Input Parameters" table per screen in generated screens.md
- Add "Data" column to navigation.md connection table
- Annotate wire items in tasks.md with passed parameters
- Add data_flow parameter to MCP server create/update connection tools
- Update user guide with data flow annotations documentation
@trmquang93 trmquang93 merged commit 3645a59 into main Mar 30, 2026
1 check passed
@github-actions github-actions bot deleted the feat/data-flow-annotations branch March 30, 2026 02:57
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.

1 participant