Skip to content

Fix four silent drops found by the mobile surface attempt - #232

Merged
vicmaster merged 3 commits into
masterfrom
fix-mobile-attempt-defects
Oct 31, 2026
Merged

vicmaster merged 3 commits into
masterfrom
fix-mobile-attempt-defects

Conversation

@vicmaster

Copy link
Copy Markdown
Owner

Fixes four defects found while building one phone screen end to end. In each case framesmith dropped something the agent wrote, or two tools contradicted each other, without saying so. All four affect web canvases too.

canvas_create honours width and height

canvas_create used to discard width and height, so every canvas came out 1440×900 and there was no documented way to make a phone artboard. It now takes both as optional positive integers. Each one defaults on its own (1440 and 900), and the result reports the artboard size.

Three tools still measured every canvas at 1440×900 even when it was rendered at its own size, so a 390-wide canvas was laid out inside a 1440 viewport. Detailed-mode canvas_evaluate and snapshot_layout now lay out at the artboard size. canvas_diff now defaults to the first canvas's size. Checked against the built server, a 390-wide root moves from x=525 to x=0. Results for a 1440×900 canvas are unchanged.

gap: 0 is never flagged

gap: 0 was reported as off the spacing scale, with a fix suggesting 2px, even though leaving gap unset renders the same and is never flagged. Flush stacks such as divider-separated rows and tab bars are a normal pattern, so the spacing check now skips a gap of exactly 0. Any other off-scale gap, including a negative one, is still reported.

Chart highlight accepts a single index

highlight: 5 on a chart series used to render no emphasis, without any message. It now means the same as [5], and null clears it. Any other value, or an entry that is not a whole-number index within the series data, renders no emphasis. The batch_design op result carries a warning naming the series, through the same channel as the ignored-shadow warning. Charts nested inside an inserted subtree are checked too.

canvas_evaluate respects the last canvas_stress result

canvas_evaluate could say "READY TO PRESENT" while canvas_stress was failing on the same canvas. Each canvas_stress run now records its result per canvas in server memory. canvas_evaluate returns it as a stress field ({ verdict, warnings, current }), and the directive stays NOT READY after a FRAGILE result until a full CLEAN run replaces it.

Two cases might look like they should clear it, and deliberately don't:

  • The canvas was edited after the FRAGILE run. The design is still not ready: an edit is not proof that the breaks are fixed. The directive asks for a stress re-run to confirm.
  • A run covered only some perturbations. It can record FRAGILE but cannot record CLEAN, because a narrower run that passes does not show the rest still pass.

Because the result is kept in memory, a server restart forgets it, and the docs say so. canvas_evaluate never runs stress itself.

Docs

The tool docstrings, INSTRUCTIONS, GOTCHAS, the init cheatsheet, docs/GUIDELINES.md and the README all describe the new behaviour. The READY rules everywhere now mention the stress result. The screenshot and export parameter docs now state their real default: they already rendered at the artboard size, but the docs said 1440.

Not in this PR

  • project_evaluate can still call every screen presentable while a screen has a FRAGILE stress result. That roll-up is advisory and does not decide readiness.
  • The MCP SDK drops unknown arguments on every tool without saying so, not only on canvas_create. Warning about them would mean registering tools with full object schemas instead of plain field lists.

Testing

test-silent-drops.ts covers all four fixes, and each group has a check that fails on master. npm run test:full passes (105/105), test-discoverability.ts passes (117/117), and tsc is clean. I also drove the built server over MCP and checked:

  • a canvas created at 390×844
  • a FRAGILE stress result blocking evaluate, which a passing partial run did not clear
  • the highlight warning
  • snapshot_layout at the artboard size

canvas_create kept 1440x900 whatever width/height said, gap: 0 warned as off-scale, a scalar chart
highlight rendered no emphasis without a warning, and canvas_evaluate said READY while canvas_stress
was FRAGILE on the same version.
A passing stress subset could clear a FRAGILE verdict and any edit got past one; highlight: null
warned; nested charts went unchecked; detailed evaluate and canvas_diff still rendered at 1440.
snapshot_layout still measured every canvas at 1440x900. Docs: READY rules now name the stress
verdict, and screenshot/export/detailed-mode describe their real artboard-size defaults.
@vicmaster
vicmaster merged commit 1b40732 into master Oct 31, 2026
3 checks passed
@vicmaster
vicmaster deleted the fix-mobile-attempt-defects branch October 31, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant