fix(figma): complete selected SECTION exports and improve selection lists - #10
fix(figma): complete selected SECTION exports and improve selection lists#10owjs3901 wants to merge 2 commits into
Conversation
Add bounded visible-text previews and a runnable frameIds example while preserving selected-screen exports. Verified live index and unchanged example execution; Node 6, Section integration 3, fmt and clippy pass. Full workspace tests and release build blocked by disk exhaustion.
Changepacksdevup-mcp@0.2.1 → 0.3.0 - crates/devup-mcp/Cargo.tomlMinor
Patch
devup-mcp-devup-ui@0.2.1 → 0.3.0 - crates/devup-mcp-devup-ui/Cargo.tomlMinor
devup-mcp-figma@0.2.1 → 0.3.0 - crates/devup-mcp-figma/Cargo.tomlMinor
Patch
devup-mcp-visual@0.2.1 → 0.2.2 - crates/devup-mcp-visual/Cargo.tomlPatch
|
|
Closing in favour of #13. The collector half of this PR is already on main: #9 added cursor handling to the same The selection-list half is not duplicated and is worth having, so it is extracted onto current main as #13 — text previews, One correction for the record: the "unresolved SourcePolicy" failure in the verification notes was not shared build-artifact interference. |
…ose from (#13) A Section link answers with candidates rather than screens, and the list gave a name, a type and a URL. That is not enough to tell two frames apart when a designer named them alike, so the choice was a guess and the wrong guess costs a full export. Each candidate now carries a preview of the visible text under it, bounded to 120 characters per candidate, 64 nodes walked, and 2 KiB across the whole list, so the index stays compact. An empty or short preview means the walk found little text, not that the screen is empty. The list also says how complete it is - selection.status and selection.count - with truncated read from the index rather than inferred from a round count of 100, which called a Section holding exactly that many partial. And nextAction carries an example built from this call's own artifactId and a candidate actually in the list, so the next step is a call to run rather than a shape to assemble. Taken from #10, which also re-implemented the multi-root cursor handling that #9 already landed; only the selection-list half is here.
Explicit SECTION
frameIdsexports stopped after the first fast snapshot page even when its cursor reportedcomplete: false. Continue the same selected-root request atnextOffset, validate cursor progress/completion, and merge nodes and tokens across pages without relaxing completeness checks.The default SECTION response remains a compact selection list. Add bounded visible-text previews (120 Unicode characters per candidate, 2 KiB total), list status/count, and an executable
frameIdsexport example so callers can choose frames before exporting them.Verification
SourcePolicyand missingSectionCandidate.text_preview, although these exist in this checkout. Shared build-artifact interference is suspected, not confirmed. Full validation of the final head remains pending; this PR is a draft.Detailed measurements: verification record. Two changepacks are included. No Figma design, installed MCP binary or global MCP configuration changes; no deployment or release.