Skip to content

fix(importer): skip the embed launcher for missing or blank client IDs (0.7.8 backport) - #210

Merged
behnam-oneschema merged 3 commits into
release/0.7from
devin/1792436843-release-0.7-blank-client-id
Oct 19, 2026
Merged

behnam-oneschema merged 3 commits into
release/0.7from
devin/1792436843-release-0.7-blank-client-id

Conversation

@behnam-oneschema

@behnam-oneschema behnam-oneschema commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Summary

This backports #209 to the new release/0.7 maintenance line as @oneschema/importer 0.7.8. It also adds the release plumbing that publishes that line under the npm dist-tag release-0.7, so latest never moves. release/0.7 was cut from 9eaa44a0b42a8c9fbe8561a83384b554aabf5037 (Version Packages (#188)). All four @oneschema/{importer,react,vue,angular}@0.7.7 tags point at that commit.

Fix, adapted to the 0.7.7 synchronous API (no new public API or enum members)

// setIframe(), after the destroyed check
if (!this.#hasValidClientId()) { console.error(INVALID_CLIENT_ID_MESSAGE); return }  // iframe src never set
queryParams.push(`embed_client_id=${encodeURIComponent(this.#params.clientId)}`)

// launch(), after _hasAttemptedLaunch = true; launchSession() delegates here
// emits "launched" with, and returns, the same shape as the MissingJwt/MissingTemplate failures:
{ success: false, error: OneSchemaLaunchError.LaunchError, message: INVALID_CLIENT_ID_MESSAGE }
  • A client ID is invalid when it is missing, not a string, or blank after trimming. The message is "OneSchema config error: clientId must be a non-empty string".
  • The existing generic LaunchError code is used because main's InvalidClientId is a new enum member and can't ship in a patch.

Maintenance release plumbing (this branch only; main's release.yml is untouched)

  • .changeset/config.json: baseBranch: "release/0.7".
  • package.json: the release script runs changeset publish --tag release-0.7.
  • release.yml: triggers on push to release/0.7. The Changesets action gets branch: release/0.7 and title/commit Version Packages (release/0.7), so the version PR targets release/0.7 from changeset-release/release/0.7, which can't collide with main's changeset-release/main. The read-only verify job, the release environment, OIDC trusted publishing, pinned actions, tag checks and verify-published.mjs (which packs name@version, not a dist-tag) are unchanged.

How maintenance releases work (also in CONTRIBUTING.md#maintenance-releases; README updated)

  1. release/<major>.<minor> is cut from that line's last release commit.
  2. Fixes land through PRs into it, each with a patch changeset.
  3. A push opens Version Packages (release/0.7). Merging that PR publishes under release-0.7.
  4. ^0.7.x ranges resolve to the newest 0.7 patch by semver. @oneschema/react@0.7.1 depends on @oneschema/importer@^0.7.0, so it picks up 0.7.8 on a fresh resolve or npm update.

Repo-admin steps (Behnam)

  • Add release/0.7 to the release environment's deployment-branch policy. (API confirms the policies are now main and release/0.7.)
  • Add branch protection for release/0.7. (protect-main ruleset now also includes refs/heads/release/*; API confirms release/0.7 gets deletion, non-fast-forward, linear history, pull request and required status check rules.)
  • Confirm npm trusted publishing for all four packages accepts release.yml + environment release when it runs from release/0.7. (npm's trusted-publisher settings have no branch field; the first real check is the first release/0.7 publish.)

Notes

  • yarn changeset status --verbose plans only @oneschema/importer 0.7.8. With this config the linked group does not bump the wrappers. React, Vue and Angular stay at 0.7.7, and their ^0.7.7 importer range already admits 0.7.8. I didn't add wrapper changesets.
  • Unverified: the Changesets action also creates GitHub Releases, and GitHub may mark a 0.7.x release as the repo's "Latest" release after 1.0 ships. This does not affect npm's latest tag.

Testing

  • yarn build, yarn check (0 errors; one pre-existing ESLint warning in filefeeds-react), yarn test:ci (importer 9/9), yarn check:ranges, yarn check:install, actionlint.
  • New importer tests cover "", whitespace, undefined and 123 (no src, no iframe, exact failure return and launched event, console.error, no iframe message). They also cover managed-DOM construction with no client ID (nothing appended), the unchanged default URL, encoding client id/one → client%20id%2Fone, and launchSession() returning the same failure.

Link to Devin session: https://app.devin.ai/sessions/8e97956405544cdb86cfaa00c37b94ca
Open in Devin Desktop: https://app.devin.ai/desktop/session/8e97956405544cdb86cfaa00c37b94ca?variant=devin
Requested by: @behnam-oneschema

behnam-oneschema and others added 2 commits October 19, 2026 19:10
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…se-0.7 dist-tag

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Team
  • Run ID: 7626cb9f-e80b-49b5-89f0-868ca6a40c0d
📥 Commits

Reviewing files that changed from the base of the PR and between 9eaa44a and 8bfee61.

📒 Files selected for processing: 8
  • .changeset/blank-client-id.md
  • .changeset/config.json
  • .github/workflows/release.yml
  • CONTRIBUTING.md
  • README.md
  • package.json
  • packages/importer/src/importer.ts
  • packages/importer/test/importer.test.cjs

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Walkthrough

The importer now validates client IDs before launch and iframe setup, and URL-encodes valid IDs. The repository also configures the 0.7 maintenance release branch, publish tag, and related release documentation.

Changes

Importer client ID handling

Layer / File(s) Summary
Validate client IDs and test launch behavior
packages/importer/src/importer.ts, packages/importer/test/importer.test.cjs, .changeset/blank-client-id.md
The importer rejects missing, non-string, and blank client IDs before launch or iframe setup. Invalid launches return and emit a LaunchError. Valid IDs are URL-encoded. Tests cover these behaviors and the changeset records the patch.

0.7 maintenance releases

Layer / File(s) Summary
Configure and document the maintenance release process
.changeset/config.json, .github/workflows/release.yml, package.json, README.md, CONTRIBUTING.md
Changesets and the release workflow target release/0.7. The release script uses the release-0.7 npm tag. The README and contribution guide describe the maintenance release process and environment branch requirements.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Suggested reviewers: ryapapap

Merge Risk: ⚪ Minimal · up to 8bfee

No confirmed issue blocks merging. Verify the external release-environment and npm publishing setup before the first 0.7 release.

Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

Failed Failed checks: 1 warning · 1 inconclusive

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (6 skipped: 6 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Security Check Inconclusive No code-level security defect is evident. The importer now rejects invalid client IDs and URL-encodes valid IDs. However, the PR changes the credentialed release workflow to trust release/0.7; that … Request human review before merge or release. Confirm that release/0.7 has appropriate branch protection and required reviews, that the release environment permits only authorized branches, and that npm trusted publishing is restricted …
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title uses the required Conventional Commits format and clearly describes the importer client ID fix and 0.7.8 backport.
Description check Passed The description directly explains the client ID fix, maintenance-release plumbing, tests, and remaining repository setup.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (6 skipped: 6 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Full details: Security Check

Explanation

No code-level security defect is evident. The importer now rejects invalid client IDs and URL-encodes valid IDs. However, the PR changes the credentialed release workflow to trust release/0.7; that job has contents: write, pull-requests: write, and id-token: write. Repository-controlled files do not verify branch protection, the release environment branch policy, or npm trusted-publisher configuration. The PR description marks those admin steps as pending.

Resolution

Request human review before merge or release. Confirm that release/0.7 has appropriate branch protection and required reviews, that the release environment permits only authorized branches, and that npm trusted publishing is restricted to this repository, workflow, environment, and intended package action. After confirmation, re-run the security check.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

… backport

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Bundle size report

Package/file Gzip size Raw size Delta vs base (gzip)
@oneschema/angular/esm2022/base-index.mjs 553 B 700 B 0 B (0.00%)
@oneschema/angular/esm2022/oneschema-angular.mjs 421 B 512 B 0 B (0.00%)
@oneschema/angular/esm2022/src/lib/oneschema.button.mjs 1,411 B 2,578 B 0 B (0.00%)
@oneschema/angular/esm2022/src/lib/oneschema.module.mjs 1,459 B 3,363 B 0 B (0.00%)
@oneschema/angular/esm2022/src/lib/oneschema.params.mjs 603 B 848 B 0 B (0.00%)
@oneschema/angular/esm2022/src/lib/oneschema.service.mjs 1,544 B 3,189 B 0 B (0.00%)
@oneschema/angular/esm2022/src/public-api.mjs 517 B 761 B 0 B (0.00%)
@oneschema/angular/fesm2022/oneschema-angular.mjs 1,465 B 5,025 B 0 B (0.00%)
@oneschema/filefeeds-react/main.js 7,857 B 35,825 B 0 B (0.00%)
@oneschema/filefeeds-react/module.js 7,730 B 35,424 B 0 B (0.00%)
@oneschema/filefeeds-react/module.mjs 7,731 B 35,425 B 0 B (0.00%)
@oneschema/filefeeds/main.js 6,694 B 29,909 B 0 B (0.00%)
@oneschema/filefeeds/module.js 6,647 B 29,774 B 0 B (0.00%)
@oneschema/filefeeds/module.mjs 6,648 B 29,775 B 0 B (0.00%)
@oneschema/filefeeds/oneschema-filefeeds-0.5.3.min.js 3,278 B 9,350 B 0 B (0.00%)
@oneschema/filefeeds/oneschema-filefeeds-0.5.latest.min.js 3,282 B 9,355 B 0 B (0.00%)
@oneschema/importer/main.js 8,602 B 40,896 B +158 B (1.87%)
@oneschema/importer/module.js 8,548 B 40,638 B +159 B (1.90%)
@oneschema/importer/module.mjs 8,549 B 40,639 B +159 B (1.90%)
@oneschema/importer/oneschema-importer-0.7.7.min.js 4,145 B 12,506 B +95 B (2.35%)
@oneschema/importer/oneschema-importer-0.7.latest.min.js 4,149 B 12,511 B +96 B (2.37%)
@oneschema/react/main.js 10,338 B 46,976 B +153 B (1.50%)
@oneschema/react/module.js 10,214 B 46,432 B +154 B (1.53%)
@oneschema/react/module.mjs 10,215 B 46,433 B +154 B (1.53%)
@oneschema/vue/main.js 26,939 B 115,324 B +158 B (0.59%)
@oneschema/vue/module.js 26,891 B 115,193 B +159 B (0.59%)
@oneschema/vue/module.mjs 26,891 B 115,194 B +158 B (0.59%)

@behnam-oneschema
behnam-oneschema marked this pull request as ready for review October 19, 2026 19:19
@behnam-oneschema

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@behnam-oneschema
behnam-oneschema merged commit f0dcddc into release/0.7 Oct 19, 2026
4 checks passed
@behnam-oneschema
behnam-oneschema deleted the devin/1792436843-release-0.7-blank-client-id branch October 19, 2026 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant