{"record":{"id":"89726752812d5254","repo":"slint-ui/slint","slug":"missing-resolved-data-for-rownamekey-in-mode-modename","errorCode":null,"errorMessage":"Missing resolved data for ${rowNameKey} in mode ${modeName}","messagePattern":"Missing resolved data for (.+?) in mode (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"tools/figma-inspector/backend/utils/export-variables.ts","lineNumber":430,"sourceCode":"                            `Missing resolved variable data for root key: ${rowNameKey}`,\n                        );\n                        // Add instance even if empty to avoid breaking hierarchy\n                        propertyInstances.set(sanitizedChildName, instance);\n                        continue; // Skip to next child\n                    }\n\n                    if (collectionData.modes.size > 1) {\n                        instance.isMultiMode = true;\n                        for (const modeName of collectionData.modes) {\n                            const resolvedData =\n                                resolvedVariableModesMap.get(modeName);\n                            if (resolvedData) {\n                                instance.modeData!.set(modeName, {\n                                    value: resolvedData.value,\n                                    comment: resolvedData.comment, // <<< Use resolved comment >>>\n                                });\n                            } else {\n                                console.warn(\n                                    `Missing resolved data for ${rowNameKey} in mode ${modeName}`,\n                                );\n                                instance.modeData!.set(modeName, {\n                                    value: \"#FF00FF\",\n                                    comment: `Missing data for mode ${modeName}`,\n                                });\n                            }\n                        }\n                    } else {\n                        // Single mode\n                        const singleModeName =\n                            [...collectionData.modes][0] || \"value\";\n                        const resolvedData =\n                            resolvedVariableModesMap.get(singleModeName);\n                        if (resolvedData) {\n                            instance.modeData!.set(singleModeName, {\n                                value: resolvedData.value,\n                                comment: resolvedData.comment, // <<< Use resolved comment >>>","sourceCodeStart":412,"sourceCodeEnd":448,"githubUrl":"https://github.com/slint-ui/slint/blob/bb937076de3f7919766c1f25e2e969367cf77e9a/tools/figma-inspector/backend/utils/export-variables.ts#L412-L448","documentation":"When building the instance model for exported Slint structs/enum modes, each mode row expects resolved variable data. If the resolution step produced no data for a (row, mode) pair, the code logs this warning and inserts a magenta placeholder value ('#FF00FF') with an explanatory comment instead of failing the export. It signals an incomplete or inconsistent variable resolution for that mode.","triggerScenarios":"Running generateStructsAndInstances/buildInstanceModel over exported Figma data where a mode's variable reference could not be resolved — e.g. the variable was deleted, unreachable, or getOriginalVariableData returned null for that row's reference.","commonSituations":"Figma files where some variable modes were removed after being referenced; partial library access; stale exports referencing variables absent from the current file.","solutions":["Re-export/re-sync the Figma data so all mode variables are re-fetched with current ids","Fix the source variable in Figma (recreate or relink the missing mode value)","Inspect the log for the specific rowNameKey/modeName and patch the referenced variable id in the export pipeline","Replace the '#FF00FF' placeholder downstream only after confirming the variable is intentionally absent"],"exampleFix":"// before\n// unresolved mode silently becomes magenta placeholder\n// after: fail fast on missing data\nif (!resolvedData) {\n  throw new Error(`Unresolved variable for ${rowNameKey} in mode ${modeName}`);\n}\ninstance.modeData!.set(modeName, { value: resolvedData.value, comment: resolvedData.comment });","handlingStrategy":"validation","validationCode":"for (const mode of modes) {\n  const resolved = resolutionMap.get(`${rowNameKey}:${mode}`);\n  if (!resolved) {\n    throw new Error(`Unresolved data for ${rowNameKey} in mode ${mode} — fix the Figma source before exporting`);\n  }\n}","typeGuard":"function hasResolvedData(entry) {\n  return entry != null && typeof entry === 'object' && typeof entry.value === 'string' && entry.value.length > 0;\n}","tryCatchPattern":"try {\n  const model = await buildInstanceModel(rows, modes);\n} catch (e) {\n  console.error('Export aborted: incomplete mode data', e.message);\n  process.exitCode = 1;\n}","preventionTips":["Ensure all mode variables referenced in Figma exist and are accessible before export","Re-run the variable resolution pass after any Figma library edits","Treat '#FF00FF' placeholders in output as a signal to re-sync, never as valid design data"],"tags":["figma","codegen","data-missing"],"backgroundTag":"resource-not-found","analyzedSha":"bb937076de3f7919766c1f25e2e969367cf77e9a","analyzedAt":"2026-09-16T01:37:20.251Z","contentChangedAt":"2026-09-16T01:37:20.251Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}