feat(studio): annotations for HTML sources via sidecar file#37
Merged
Conversation
The studio's flagship review feature was inoperative for HTML scenarios (annotations were explicitly skipped). Now: - foo.html annotations live in foo.annotations.json, same object format as the JSON scenarios' annotations field; lazily created, deleted when empty, corrupt sidecars error loudly and are never overwritten; the HTML source itself is never modified - studio load/hot-reload and rustmotion's load_input merge the sidecar into raw['annotations'] so the panel, info, still, render and validate all see the same scenario (validation.rs hooked up during integration review — both loaders stay coherent) - append/delete on HTML sources carry the PR #30 guarantees (visible write_error, generation bump, no silent failures) - apply-annotations skill documents where annotations live per source Known v1 limit: the sidecar itself is not watched; external edits show up at the next HTML reload.
18 tasks
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.
Closes #16.
Goal: the annotate-for-the-agent workflow works for HTML-dialect scenarios — it was explicitly skipped ("HTML sources have no place to store them").
foo.html↔foo.annotations.jsonsidecar, identical annotation object format as JSON scenarios. Lazily created on first comment, deleted when the last one is removed, corrupt sidecars fail loudly and are never overwritten. The HTML source is never touched by annotations.raw["annotations"]at studio load/hot-reload and inrustmotion::loader::load_input(new additiveload_html_annotations_sidecar), so the panel,info,still,renderandvalidateall see the same scenario. The agent flagged thatvalidate/rendergo through a separate CLI load path outside its authorized scope — hooked up during integration review (6 lines invalidation.rs), keeping both loaders coherent.write_error, generation bump, no silent failures.apply-annotationsskill updated: read/resolve annotations inline for JSON, in the sidecar for HTML.Tests: 9 new (TDD red-first): path derivation, merge, empty/missing reads, creation format, remove-and-delete-when-empty, corrupt-never-overwritten, loader merge, corrupt-fails-load, missing-is-empty. 190 total, all green.
Verify:
cargo check -p rustmotion-studio✓ ·cargo test --workspace→ 190 passed ✓ ·cargo fmt --check✓ · clippy 0 warnings ✓