Finish the @sema-lang/ui migration: notebook + playground on 0.2.0, e2e restored (#69) - #97
Merged
Merged
Conversation
Sema Coder moved out of the monorepo into the standalone sema-lisp/sema-coder repo (a workspace member). It's no longer an example; it depends only on the sema binary and runs via a shebang.
All remaining hand-rolled primitives move onto library components: - toolbar/cell/pill buttons -> sema-button wrapped in sema-tooltip - insert dropdown -> sema-popover + sema-menu (activation via sema-select, covering keyboard and mouse in one path) - reset confirm -> sema-dialog; save feedback/failure -> toast() - title input -> sema-input with testid forwarding - markdown-rendered testid moves to the component's testid prop so the forwarded shadow node carries it (innerHTML assertions see rendered HTML) - Escape blurs the editor again (new blur() delegate) and edits persist on focusout — change alone misses script-mutated values (Tab indent) - notebook.js is an ES module importing toast directly; no window bridge - tokens.css vendored + served (new asset route + test); style.css keeps only warm-palette overrides on the library's token names - vendored bundle refreshed to the locally built @sema-lang/ui 0.2.0 Cell focus for new cells waits on customElements.whenDefined instead of racing element upgrade.
- webServer serves a copy of the demo notebook (runs are idempotent; the suite used to save through to the git-tracked fixture and compound failures across runs) - PW_CHANNEL env escape hatch for machines where the managed chromium download stalls - reset flow drives the sema-dialog instead of window.confirm; save feedback asserts a toast; Tab test sets the caret explicitly (the component parks it at the end on programmatic value assignment); disabled checks assert the reflected property (aria-disabled is role-gated in Playwright and the host deliberately has no role)
…nization - Run->Stop uses the run+danger at-rest styling (dead .stop-btn class removed); Clear VFS gated behind a sema-dialog confirm; transient feedback routed through toast() (steady-state status text unchanged) - sema-tree updates in place (reconcile by name+kind) instead of full innerHTML rebuilds per interaction - tokens.css vendored via build.mjs (shared vendorFromSemaUi helper) and linked before style.css; ~230 lines of dead pre-component CSS deleted; text tokens renamed onto the library namespace - debugger specs target the editor's gutter part tokens through a shared tests/gutter.ts helper module (the old .gutter-line class no longer exists); infinite-loop test asserts the step-limit self-termination the VM actually performs; Run tooltip opens below like its siblings - ascii-art example: string/repeat needs an int; wrap the rounded bar length (examples.js regenerated)
- notebook-ui-vendor recipe (lost when the Makefile was retired) fetches the pinned @sema-lang/ui bundle + tokens.css from unpkg - new notebook-e2e workflow (pre-builds the sema binary so the playwright webServer's 60s startup timeout survives a cold cache; uploads test-results on failure) - test.playground-e2e recipe alongside the other browser suites
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.
Summary
Completes #69 — the notebook (and playground) now consume
@sema-lang/uifor every primitive the issue mapped, and the verification loop around them is restored.Notebook: buttons/tooltips, insert dropdown (popover+menu), reset dialog, toast feedback,
sema-inputtitle — plus fixes for the three regressions the original slice shipped: themarkdown-renderedtestid contract, Escape-blur (edits now commit), and persist-on-focusout (script-mutated values like Tab-indent never arm the native dirty flag). Design tokens are served and the palette uses the library's token names.Playground: Stop button finally reads destructive, Clear VFS gets a confirm dialog, toasts for transient feedback, in-place
sema-treeupdates, ~230 lines of dead CSS deleted, debugger specs modernized onto the editor's new gutter part tokens (they had silently rotted since the editor dogfood — the old.gutter-lineclass hasn't existed in any published bundle), and theascii-art.semaexample no longer crashes onstring/repeatwith a float.Tests/infra: the e2e suite serves a temp copy of its fixture (runs were mutating the git-tracked demo notebook and compounding failures), a
PW_CHANNELescape hatch for machines with broken Playwright downloads, a new notebook-e2e CI workflow (this suite has never run in CI), the restorednotebook-ui-vendorjake recipe (lost with the Makefile), and atest.playground-e2erecipe.Verification (all run against this exact tree)
cargo check+cargo test -p sema-notebook(50 tests) green;jake -lparses@sema-lang/uiat the vendored build: 299/299 component tests, lint/typecheck/build cleanDependencies
sema-ui.jshere is that PR's built bundle, so this PR is self-contained at runtime; thenotebook-ui-vendorrecipe's0.2.0pin resolves once ui#1 merges and publishes.Closes #69.