docs(sdk-playground): accurate README with stage coverage and CanResult#1429
Conversation
91c6b42 to
edb9a98
Compare
edb9a98 to
79044aa
Compare
…nt cascade - header undo/redo buttons disabled when canUndo()/canRedo() returns false - History/inspect op section shows live canUndo/canRedo badges (update on every patch) - removeElement logs override-set after removal to demonstrate cascade + orphan cleanup - README: stage 4 row updated to full coverage; Danger section + Ops table annotated - mutate.ts: add fallow-ignore-file code-duplication (structural handler boilerplate) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…omposition) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
69025c1 to
cb7cfd1
Compare
james-russo-rames-d-jusso
left a comment
There was a problem hiding this comment.
Verified at HEAD cb7cfd18.
Docs/playground README rewrite. Cross-checked the stage-coverage table and ops-panel rows against the actual SDK exports + playground wiring at the PR head. The mapping is accurate. No forward-reference to unmerged stages.
Verified
- Stage 5 row —
createHeadlessAdapter+createMemoryAdapterare re-exported from@hyperframes/sdkand the playground imports both (main.ts:1, live demo atmain.ts:1096–1104). README claim matches code. - Stage 6 row —
find({ composition })exists in the sibling PR #1434 (session.ts:186); scoped-dispatch form is wired in the playground atmain.ts:1070. Demo composition has thehf-cardhost withhf-card-title/hf-card-bodyso the documented example resolves against real DOM. CanResultshape — README example matches the type from PR #1426 ({ok, code?, message?, hint?}).- Removed
moveElementrow is correct — no such op handler exists in the SDK. - "Planned / not yet wired" section accurately calls out the keyframe ops gap.
Concern — Stage 6 row claims scoped-dispatch parity for "ops"
The Ops-panel "Scoped dispatch" row says comp.setStyle("hf-card/hf-card-title", styles) — Stage 6: address elements inside inlined sub-compositions. This is true for setStyle / setText / setAttribute / removeElement / setTiming (all resolve via resolveScoped per #1434). But addGsapTween with a scoped target writes a broken CSS selector (see my #1434 review for the underlying bug). If that's not fixed in #1434, the playground README should either (a) explicitly call out that addGsapTween does NOT yet accept scoped targets, or (b) wait on the #1434 fix before claiming full op coverage. Soft concern only — depends on #1434 verdict.
Nit — table column width
The Stage 5 / Ops-panel tables have very long second-column rows (line lengths past 200 chars). GitHub renders fine but README.md raw is awkward to diff. Not worth a reflow. (nit)
What I didn't verify
- Did not run
bun run --cwd packages/sdk-playground devto confirm every documented button exists in the rendered UI. - Did not render the README on GitHub to confirm table alignment — relied on raw markdown shape only.
Review by Rames D Jusso
miguel-heygen
left a comment
There was a problem hiding this comment.
Docs-only PR — no code changes. CI blocked by root oxfmt failure in #1423.
README accurately reflects the stage coverage (T1–T7), CanResult API shape, and adapter contract table. A few content notes:
Nit:
- The "Stage coverage" table lists T7 as "HTTP persist adapter" but T7 now includes SDK session wiring into Studio, setSelection, reload-on-change, shadow dispatch, and cutover (PRs #1441–#1452). The table will need another pass once the full T7 stack merges.
CanResultcode examples in the README useresult.code === "E_UNKNOWN_OP"— would be better to import the exported constant once #1426 exports it (see that PR's review).
Verdict: APPROVE (pending #1423 oxfmt fix)
Reasoning: Docs are accurate for the current merge state. Minor freshness notes above are follow-ups, not blockers.
— magi

What
Rewrites
packages/sdk-playground/README.mdto accurately document what the playground does, what SDK stages it exercises, and what's still unimplemented.Why
The original README had several inaccuracies that would mislead reviewers:
moveElementlistedcomp.moveElement(id, { parent, index })but that method/signature doesn't exist. Drag-to-reposition usescomp.setStyle(id, { left, top })internally. No explicit moveElement button in the ops panel.can()docs — described as returning a plain boolean; it now returnsCanResult {ok: boolean, code?: string, message?: string, hint?: string}(landed in PR feat(sdk): can() returns CanResult; T4 dispatch-boundary tests #1426).addGsapKeyframe,setGsapKeyframe,removeGsapKeyframeare implemented in the SDK but have no UI in the playground; the old README omitted this gap.Changes
moveElementrow; added combinedsetGsapTween / removeGsapTweenrow; fixedaddLabel/removeLabeldispatch syntaxcan()docs to showCanResultshape with exampleTest plan
bun run --cwd packages/sdk-playground dev→ Ops tab)