Skip to content

Components rendered via v-for fail to fetch correct component data #16

@tuskermanshu

Description

@tuskermanshu

Components rendered via v-for fail to fetch correct component data

Description

When using v-for to render multiple instances of the same component, MCP fails to fetch the correct component data. This is because MCP currently only uses componentName for identification, which is not unique for v-for rendered components.

Steps to Reproduce

  1. Create a component that uses v-for to render multiple instances of the same child component
<template>
  <div v-for="(tab, index) in tabs" :key="index">
    <Count :label="tab.name" />
  </div>
</template>
  1. Try to fetch or modify the state of a specific Count component
  2. MCP cannot correctly target the intended component instance

Expected Behavior

  • Should be able to fetch and modify state for specific component instances in v-for loops
  • Each component instance should be uniquely identifiable

Current Behavior

  • Cannot distinguish between multiple instances of the same component
  • State operations may target the wrong component instance
  • Component data fetching is unreliable with duplicate components

Environment

  • Vue.js version: 3.5.13
  • MCP version: [0.3.2]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions