Added opt-in showSemanticIds to DOM renderer.#67
Closed
github-actions[bot] wants to merge 1 commit into
Closed
Conversation
Collaborator
|
Closing as superseded.
|
Collaborator
|
Closing as superseded by #66 |
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.
Completion Report
Branch:
opencode/issue63-20260626103740Base:
mainCommit:
4752d62PR: Created automatically by infrastructure
Files changed (7 files, +209/-7)
.changeset/forty-hotels-write.md— empty changeset (no version bump needed)packages/dom/src/index.ts— addedshowSemanticIdsoption,semanticSlugifyandcreateSemanticIdFactoryhelpers, updatedbuildDomto emitdata-intent-screen,data-intent-surface,data-intent-ask,data-intent-actionattributespackages/dom/src/dom-router.ts— forwardedshowSemanticIdsoption throughrenderRouterpackages/dom/src/dom.test.ts— added 6 tests covering: absent-by-default, present-when-enabled, same ID on label+input, duplicate ask labels, duplicate action labels, and accessibility preservationpackages/dom/README.md— mentionedshowSemanticIdsin feature listdocs/Inspect-Screen.md— updated boundary note to reflect new capabilitydocs/Quickstart.md— addedshowSemanticIdsto example optionsSummary
Added an opt-in
showSemanticIdsoption torenderDom()andrenderRouter(). When enabled, rendered DOM elements receivedata-intent-*attributes matching the semantic IDs produced byinspectScreen():<main data-intent-screen="screen:invite-member"><main data-intent-surface="surface:main"><label data-intent-ask="ask:email">+<input data-intent-ask="ask:email"><button data-intent-action="action:invite-member">Semantic ID generation replicates the same
slugify+ per-kind counter algorithm used by core'sinspectScreen(), producing identical IDs for the same screen definition.Validation
pnpm test✅ — 329 tests passpnpm typecheck✅pnpm build✅pnpm lint✅pnpm pack:check✅pnpm changeset status✅Known limitations
Next recommended step
CI will run automatically on the PR. Since this is a runtime/API change, do not merge automatically — wait for review.
Closes #63
opencode session | github run