Playground resilience and [alt.ai] sample policies - #1
Merged
Conversation
A uPlot chart was sized once at mount and never again, so a narrower or resized column left a fixed-width canvas spilling past its bounds and forcing a horizontal scrollbar. The live re-render path also leaked a detached canvas on every keystroke. The chart element now tracks its container width through a ResizeObserver, pushes each change into the plot, and tears the observer and plot down when it unmounts.
The preview pane could be pushed wider than its column by an image, a long unbroken token, or a wide table. Clamp media to the pane, wrap long tokens, scroll wide tables in their own box, and track the dynamic viewport so mobile browser chrome no longer crops the bottom pane.
The samples showed off components but never the AI collaboration convention, so a reader never saw what an [alt.ai] policy looks like in practice. Each example now declares which of its sections an agent may edit, and the starter explains the otherwise invisible block.
proptest found a NUL plus BOM input the sanitiser cleaned non-idempotently; the fix landed earlier but its seed stayed untracked. Saving it re-runs the case for everyone, matching the other crates' regression files.
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.
Makes the playground hold its shape under real use and shows the AI collaboration convention in the samples.
Changes
Verification
typecheck clean, 13 unit tests, eslint clean, build 45 KB, 14 Playwright e2e green. CLI confirms each sample policy parses, every policy key resolves to a real heading anchor, and the policy block leaves no trace in rendered output. Live reflow on resize is verified by construction; an eyeball on a window drag is still worth it.