get_code_connect_map (MCP): silent empty map is indistinguishable from wrong fileKey / timeout — return distinguishable errors
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 45/100
- Tipo de issue
- Funcionalidade
- Clareza
- Claramente especificada
- Status de atividade
- Pouca atividade
- Stack de tecnologia
- typescript
Direção de pesquisa
Start by tracing the get_code_connect_map MCP tool and how it represents empty results and lookup timeouts; the issue names no files or tests. Identify where the file lookup and timeout outcomes are handled, then add distinguishable machine-readable results or errors for those cases while preserving a genuine empty map. Done means MCP clients can tell all three outcomes apart; add or update coverage for each case.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Feature request
get_code_connect_map (Figma MCP) currently returns an empty map {} with success semantics in at least three distinct situations:
- The queried fileKey has no published Code Connect — typically because the caller passed the fileKey of a design file that instantiates the components, rather than the library file the mappings were published against. Response: bare
{}. - The node genuinely has no mappings. Response: bare
{}. - The backend lookup timed out — e.g. when the queried node is too broad (page/document root on a large file). Response:
{}plus only a prose note appended to the result: "Note: the Code Connect lookup timed out, so this response may be missing Code Connect data." (reproduced 2/2).
For MCP clients — especially agents — 1 and 3 are indistinguishable from 2. The practical failure mode is an agent confidently concluding "this component has no Code Connect mapping" and writing that into downstream code or docs, when the mappings exist and the call was merely mis-scoped or timed out. Since passing a design-file key is the natural first attempt (it's the fileKey the caller is holding), case 1 is the default path for anyone who doesn't already know the library fileKey.
Request: make the outcomes distinguishable. Any of these would work for MCP clients:
- an error (or MCP tool error result) for "this file has no Code Connect published" and for "lookup timed out", or
- a machine-readable
statusfield alongside the map (ok/no_code_connect_for_file/timeout_partial), keeping{}only for a genuine empty result.
Scope note: I'm aware #284 was routed away as an MCP-server issue, but #373 (MCP response shape) was fixed via this repo, so filing here for the paper trail — happy to move this to the right channel if there is one.
Related, not duplicates: #340 (MCP silently ignores Angular mappings), #292 (placeholder snippets), forum threads 42405 and 56495 (empty/partial maps with different root causes — those are about missing entries, this one is about failure modes being unsignaled).
- Linguagem predominante
- TypeScript
- Estrelas
- 1.6k
- Forks
- 126
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de figma/code-connect
-
normalizePropName strips `#` characters from Figma property names instead of only the `#id` suffixAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
figma/code-connect#419 ·
-
feature request
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
figma/code-connect#403 ·
-
feature request
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 38/100
figma/code-connect#414 ·
-
feature request
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
figma/code-connect#413 · 1 comentário ·
-
feature request
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 54/100
figma/code-connect#412 · 1 comentário ·
Todas as issues de figma/code-connect
Issues semelhantes
-
お問い合わせのメール送信に失敗しても成功と表示されるAbertaarea: web
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
inabagumi/shinju-date#6823 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
vercel-labs/ui#540 ·
Mantenedores costumam responder em até 1 dia
-
accepted ai-dev ai-implementing
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
livesport/homer#218 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia