feat(contracts): publish portable web interactions v1 - #5
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR introduces a framework-neutral “portable web interactions” contract (v1) plus a shared conformance vector suite and a plain HTML/JS reference fixture, and extends the existing contract verifier to enforce the new artifacts without requiring the React/Tailwind specimen app.
Changes:
- Added
opencoven.ui-web-interactions/v1contract JSON describing 14 primitives, global laws, states, and conformance hooks. - Added
opencoven.ui-test-vectors/v1shared conformance vectors (mutation-guarded) and a native-first reference HTML/JS fixture. - Extended
scripts/verify-contracts.mjsand ESLint config to validate/enable the new portable artifacts.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/verify-contracts.mjs | Adds portable contract/vector/fixture/doc validation to the existing architecture contract gate. |
| eslint.config.js | Adds browser globals for the plain JS fixture linting context. |
| contracts/web-interactions.v1.json | New portable interaction/semantics contract (v1). |
| contracts/test-vectors.v1.json | New shared conformance vectors (v1). |
| contracts/README.md | Documents ownership boundary, hooks, conformance vocabulary, and versioning expectations. |
| contracts/fixtures/reference.js | Native-first progressive-enhancement reference behaviors (tabs, tooltip, copy, theme, mobile nav, dialog). |
| contracts/fixtures/reference.html | Plain HTML reference surface demonstrating the primitives and hooks without React/Tailwind. |
| contracts/CHANGELOG.md | Changelog entry for v1.0.0 contract release. |
| .prettierignore | Excludes contracts/ from Prettier formatting. |
Files not reviewed (1)
- contracts/fixtures/reference.js: Generated file
Suppressed comments (1)
scripts/verify-contracts.mjs:213
- Similarly,
disclosureis excluded from the reference fixture coverage check. If disclosure is one of the published primitives, the reference fixture should include adata-oc-primitive="disclosure"example (or disclosure should be removed from the required list).
for (const id of requiredPrimitives.filter((id) => id !== "disclosure")) {
requirePortable(
fixture.includes(`data-oc-primitive="${id}"`),
`reference fixture is missing ${id}`,
);
}
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+152
to
+155
| requirePortable( | ||
| portable.global?.targetMinimumCssPx?.every((value) => value >= 44), | ||
| "target minimum must be 44×44 CSS px", | ||
| ); |
Comment on lines
+201
to
+206
| for (const mode of ["no-js", "reduced-motion", "forced-colors", "320px", "200%-zoom"]) { | ||
| requirePortable( | ||
| vectors.vectors.some((vector) => vector.modes.includes(mode)), | ||
| `no vector covers ${mode}`, | ||
| ); | ||
| } |
Comment on lines
+197
to
+200
| requirePortable(vectorIds.size >= 24, "at least 24 shared vectors are required"); | ||
| for (const id of requiredPrimitives.filter((id) => id !== "disclosure")) { | ||
| requirePortable(covered.has(id), `no vector covers ${id}`); | ||
| } |
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.
Objective
Publish the framework-neutral interaction, accessibility, failure, and progressive-enhancement contract required by OpenCoven public web surfaces without forcing React, Tailwind, Base UI, or the UI specimen application onto static consumers.
What changed
opencoven.ui-web-interactions/v1machine contract with 14 primitives:data-oc-*conformance hooks, shared states, keyboard maps, focus entry/containment/return, 44×44 targets, no-JavaScript behavior, failure/recovery, reduced motion, forced colors, and forbidden misuse;Ownership boundary
OpenCoven/uiowns reusable interaction semantics and test vectors. Visual identity/token values remain owned byOpenCoven/brand. Product state, authority, protocol, and runtime behavior remain owned by their product/protocol repositories.Ordinary site navigation is not an application menu. Mobile navigation is not a modal. Tabs do not perform remote mutation. Tooltips contain no essential or interactive content. Progress is measured, not decorative. Page JavaScript never owns installer bytes. Dialogs are reserved for true modal tasks. Guided proof remains complete without canvas, WebGL, drag, or motion.
Verification
The contract gate now verifies the existing UI architecture plus 14 portable primitives and at least 24 shared vectors. Unsupported platform/capability coverage must be reported with a reason and is never counted as pass.
Downstream handoff
After merge,
coven-landingwill pin the immutable merge revision, vendor only the exported contract/vector artifacts with provenance hashes, expose the stable hooks, and execute the applicable shared vectors in its static Astro implementation.Closes #4.
Refs OpenCoven/coven-landing#73, OpenCoven/coven-landing#81, and OpenCoven/coven-landing#82.