-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Make a TSL playground session work end-to-end when driven through MCP in a browser that already supports WebGPU.
This issue is not about broad TSL architecture validation. It is about making the existing MCP ? web app ? SSE ? browser preview loop behave correctly for TSL sessions in the same way GLSL sessions already aim to.
Problem
The codebase already has TSL-shaped support across the stack:
- MCP accepts
language: "tsl"andtslSource - the playground session model persists
shader_languageandtsl_source - the playground layout switches to a single-source editor for TSL
PlaygroundCanvasdelegates toTslPreviewCanvas
What is still missing is a proven and reliable roundtrip for agent-driven TSL sessions.
Today we do not have evidence that all of the following work together in one flow:
- MCP
create_playgroundcreates a TSL session with initial source - Opening the returned session URL renders that TSL source in the playground
- MCP
update_shaderwithtslSourcepushes changes through SSE and updates the live preview - The browser posts either a fresh screenshot or structured TSL errors back to the server
- MCP receives the resulting screenshot or errors in the
update_shaderresponse
Scope
In scope:
- TSL session creation through
create_playground - TSL source updates through
update_shader - Browser-side live preview updates in
TslPreviewCanvas - Screenshot capture for successful TSL renders
- Structured error propagation for failed TSL updates
- Automated coverage for the TSL roundtrip at the server and browser boundary where practical
Out of scope:
- Non-WebGPU browser support beyond a clear existing fallback message
- Playground landing/onboarding UX
- General editor polish such as better TypeScript syntax highlighting
- Larger TSL runtime architecture changes unless required to make this path work
Acceptance Criteria
-
create_playgroundaccepts{ language: "tsl", tslSource }and returns a usable session URL - Opening
/playground?session=<id>for that session shows the persisted TSL source in the editor - A valid
update_shadercall withtslSourceupdates the browser preview for that session - A successful TSL update causes the browser to post a screenshot and
update_shaderreturns it when a preview client is connected - An invalid TSL update causes the browser to post structured errors and
update_shader/get_errorsreturn them - The supported-browser path is documented and manually verified in one real WebGPU-capable browser
Suggested Implementation Notes
- Treat this as a roundtrip reliability issue, not a schema issue. Most of the type plumbing already exists.
- Reuse the same response contract as GLSL where possible: success returns screenshot, failure returns errors.
- If TSL error kinds need refinement, keep them within the existing structured error model rather than inventing a parallel reporting path.
- Add at least one integration-style test or harness that prevents this flow from regressing again.
Follow-up Work
If needed, split separate follow-ups for:
- TSL editor syntax highlighting improvements
- richer no-WebGPU fallback UX
- broader browser compatibility support
- deeper TSL sandbox/runtime redesign
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request