Skip to content

feat(mcp): add preview-flutter-component prompt - #205

Merged
ElbertePlinio merged 5 commits into
mainfrom
feat/43-flutter-component-preview
Sep 25, 2026
Merged

ElbertePlinio merged 5 commits into
mainfrom
feat/43-flutter-component-preview

Conversation

@ElbertePlinio

Copy link
Copy Markdown
Member

PR 1 of #43. Adds the MCP prompt preview-flutter-component (required widget, optional states and viewports). It walks an agent through rendering one Flutter widget without the full app: discovery and a git status baseline first, the widget-test harness for every check (state matrix, exact sizes, overflow, tester.takeException(), semantics, text scaling, meetsGuideline), and the Widget Previewer for pixels, with a temporary web entrypoint only as a fallback. Visual lanes are served on loopback from the agent's shell and viewed in a Pickforge browser session. Captures join the session's evidence run and the verdict goes through evidence_outcome. Generated paths are tracked and removed, and production routing, app startup, committed code and goldens are off limits.

README lists the prompt. docs/releases/UNRELEASED.md still held the published 0.6.0 notes, so it is reset from the template as RELEASING.md prescribes, with an entry for this prompt.

Validation

  • bun run typecheck, bun run lint, bun run build; prompt and stdio conformance tests: 28 passed.
  • Full bun run test on the first commit: 2121 passed, 8 failed in 5 files (containment, agents, commands, browser evidence, one conformance case). All 5 files passed when rerun alone (174 tests), so these were load flakes on this host. Later commits touch only the prompt text and its tests.
  • PickCheck clean on the changed TypeScript.
  • Smoke on a real Flutter app (a public portfolio app, ProjectDetailPage, three states at 390/768/1440), run by GPT-6 Astra low through this branch's MCP server in a detached worktree. The first run found two prompt defects, fixed here: runSlug captures landed outside the evidence run so evidence_outcome failed, and captures could catch loading frames. The rerun rendered the previewer at all three widths in a browser session and recorded the verdict on the session's evidence run. git status --short was empty before and after both runs.
  • Independent review by Fable (medium), with a focused recheck after fixes.

The portable skill is PR 2, in the dotfiles repo.

Registers an MCP prompt that walks an agent through rendering one
Flutter widget in isolation: discovery, the previewer, widget-test and
web entrypoint lanes in that order, captures in a Pickforge session,
text scaling and semantics checks, and cleanup of every generated path.

Also resets the release draft after 0.6.0 and records the prompt there.
@ElbertePlinio
ElbertePlinio merged commit ed6f300 into main Sep 25, 2026
10 checks passed
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