Repository navigation
feat(screens): preview layouts through the existing skill - #144
Merged
Merged
Conversation
Lancetnik
added this pull request to stack #131
October 10, 2026 17:17
7 tasks done
Branch coverage
49 files skipped due to complete coverage. |
marklysze
approved these changes
Oct 11, 2026
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.
Why are these changes needed?
The assistant could author layouts but could not inspect their rendered appearance. Add one progressively disclosed
screens/previewscript returning an image and measured component bounds through AG2's typed tool result. It previews saved Screens/instances, Chat drafts and unsaved Card or Screen candidates without saving files, revising drafts or running sources.Use the same compiled Svelte renderer in a passive preview entry. Collect page overflow, parent escape, horizontal scroll, browser errors and blocked resources. Chromium is selected explicitly per profile in Settings → General; an empty path disables preview. Rendering uses a temporary browser profile, blocks external resource requests, and cleans up browser/server processes. Screenshots are bounded to 4096px height and 8MB; fonts and remote images may differ because external resources are blocked.
Preview exists only in
screens; card-author references that script. No global tool or duplicate preview script is registered.Related issue number
Screen design feedback follow-up. Stacked on #143 in stack #131.
Checks
ruff check .,ruff format --check ., andpytest -m "not integration"locally and they pass.web/, I rebuilt and committed the SPA bundle (npm --prefix web run build).Validation: 2462 Python tests passed; mypy passed; 557 SPA tests passed; svelte-check reports no errors or warnings. Skill tests cover actual image results through both plugin modes, disabled skills, candidate references, draft edits and read-only behavior. API tests cover browser configuration. Live Chrome: desktop/narrow screenshot rendering and General setting save/reload, with console and network checks. Image tool results also survive WebSocket JSON and a real SQLite round trip.
AI assistance
Implementation and documentation were prepared with Codex assistance and reviewed against the actual diff, protocol results and browser behavior.