feat(playground): add MCP-first landing page#77
Conversation
devallibus
left a comment
There was a problem hiding this comment.
Review: Approve (self-PR — submitted as comment)
Solid PR. Clean MCP-first landing page with good state management and a well-factored TSL error-reporting refactor. CI passes. No blockers.
Suggestions (non-blocking)
-
suggestion:Use<Switch>/<Match>instead of nested<Show>—playground.tsx:90-146
The two mutually-exclusive<Show when={X}>/<Show when={!X}>with a ternary in the fallback obscures the state machine.<Switch>/<Match>would make the four states (landing / loading / error / session) explicit. -
suggestion:Addrole="alert"to error containers —PlaygroundLanding.tsx:153,playground.tsx:117
Error messages appear dynamically but have no ARIA live region — screen readers won't announce them. -
suggestion:Use semantic<ol>for the 3-step instructions —PlaygroundLanding.tsx:54-96
Steps are visually numbered but use flat<div>s.<ol>/<li>gives screen readers "item X of Y" context. -
suggestion:Rate-limitcreateManualSession—playground.tsx:17-23
This POST creates a new SQLite row with no rate limiting. The reviews system already has per-IP limiting — same pattern should apply here. -
nitpick:Remove deadsetLoading(false)—playground.tsx:77
loadingis alreadyfalsewhen this path runs (no session param on landing). -
nitpick:Use<Show when={props.error}>instead of ternary —PlaygroundLanding.tsx:153
Consistency with the rest of the codebase.
Test coverage notes
tsl-error-reporting.ts: 3 untested branches ingetMessage(string input, non-Error/non-string, empty message) — quick win in existing test file.- Route state machine: 8 transitions at 0% coverage — best addressed with E2E tests (future work).
Summary
Testing
Closes #69