Repository navigation
Conversation
`ui_tree` takes `root` (`e<k>`), keeping only that node and its descendants in reading order for tree, text and find; a root the fresh read does not name is stale_ref naming the ref, window and snapshot, and an invalid root is -32602. Find searches and counts only the subtree, while `in` still names the scrollable above it. The phone marks a visible row the display or a scrollable clips `clipped: true`; the Mac parses, declares and prints it (a `clipped` state in the text view's bracket), and the fake phone learns a `clipped-tree` mode for the e2e suite. Docs: PROTOCOL.md "UI tree" row field, MCP-116 spec row, design tools table and answer shapes, WIN-79's row states. Fixes #392
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Outcome
MCP-116 (issue #392):
ui_treetakesrootto keep one subtree, and a row the display or a scrollable clips saysclipped: true.:core):UiTree.rowemits"clipped": trueon a visible row whose screenboxis strictly clipped by the display or a scrollable ancestor's visible viewport; a row wholly inside omits it, and anoffrow never carries it (UiTreeTest.testAPartiallyClippedNodeSaysSo_MCP116).UITree.Nodeparses/preservesclippedand encodes it only when true; the text view prints it as aclippedstate in the bracket ([e12 Button clipped]), a clipped plain label included; the row is declared (with a description) in theui_tree/ observed-treeoutput schema.root:ui_tree {root: "e12"}resolves against the fresh read's keys and keeps that node and its descendants in document order (pagainst keptivalues, so gapped indices after an off-screen read keep the right rows). It works forformat: "tree",format: "text"andfind; withfind, the search,matchedandtotalcover the subtree whileinstill names the scrollable above it that holds an off-screen match. Arootthe read does not name failsstale_refnaming the ref, window and snapshot;rootis validated liketap'sref(^e[0-9]+$, ≤ 2147483647), so a non-key fails-32602("root must look like e12: use a ref from ui_tree"). The answered rows become that client'sexpects.clippedrow field, item 9),MCP-116spec row with proofs, designui_treedescription/table (word-for-word withMCPCore.swift), arguments and answer shapes, WIN-79's row states, and thestale_referror table row.suite_read.pycovers root in tree/text/find, a find outside the subtree, a stale root, a malformed root, and (through the fake phone's newclipped-treemode) a clipped row in the tree and text view.Fixes #392
Checks
scripts/check-rules.sh --base $(git merge-base HEAD main)scripts/check-ratchets.sh --base $(git merge-base HEAD main)scripts/check-format.sh --base $(git merge-base HEAD main)cd android && JAVA_HOME=/opt/homebrew/opt/openjdk@17 ./gradlew -q :core:test :app:assembleDebug :app:testDebugUnitTestThe app tasks pass;
:core:teststops on the three documented environment-dependent cases:The focused
:core:test --tests app.contigua.server.UiTreeTestand the app tasks:cd macos && swift build && swift test --filter "ContiguaCoreTests|MCPCoreTests|MCPToolHostTests"That filter only selects the
ContiguaCoreTeststarget on this toolchain, so the four affected suites were run explicitly:python3 -m unittest discover -s tools/mcp-eval -p 'test_*.py'E2E (tier 2,
PD_E2E_PORT=47772 PD_E2E_PROFILE=e2e ./scripts/check-e2e.sh mcp)The two failures are the pre-existing
suite-screenscreenshotno_frameon this machine (the fake phone's frame timing), unrelated to this change.