Skip to content

ci(superdoc): enroll use-password-prompt.js under checkJs gate (SD-2866)#3050

Merged
caio-pizzol merged 1 commit intomainfrom
caio/SD-2866-checkjs-password-prompt
May 1, 2026
Merged

ci(superdoc): enroll use-password-prompt.js under checkJs gate (SD-2866)#3050
caio-pizzol merged 1 commit intomainfrom
caio/SD-2866-checkjs-password-prompt

Conversation

@caio-pizzol
Copy link
Copy Markdown
Contributor

Third file under the SD-2863 ratchet. Stacked on #3048 because SD-2865 introduced the `*.vue` ambient shim that this PR also relies on; will rebase to main after #3048 merges.

The probe surfaced 8 errors. Closes them by:

  • Real drift: the internal queue's element type was `{ doc, errorCode }`, but `handleEncryptionError` pushes `{ doc, errorCode, originalException }` and `onUnhandled` reads the field back out. Promoted to a named `QueueEntry` typedef with the third field properly declared.
  • Strict-null guard: `queue.shift()` returns `undefined` when the queue is empty. Added an early return after the shift so the rest of `drainQueue` can rely on a defined entry.
  • Vue SFC import: the lazy import of `PasswordPromptSurface.vue` now goes through the `*.vue` ambient shim and casts the default export to `object` before `markRaw()`, mirroring the SD-2865 fix.

Verified: `pnpm --filter superdoc run check:jsdoc` reports 3 gated files clean. The `use-password-prompt` test suite (35 tests) passes.

@caio-pizzol caio-pizzol requested a review from a team as a code owner May 1, 2026 13:54
@linear
Copy link
Copy Markdown

linear Bot commented May 1, 2026

Base automatically changed from caio/SD-2865-checkjs-find-replace to main May 1, 2026 14:04
Third file under the SD-2863 ratchet. Closes 8 errors that the probe
surfaced:

- The internal queue's element type lacked the `originalException`
  field that handleEncryptionError pushes onto each entry. Real drift:
  the JSDoc said `{ doc, errorCode }` but the runtime stored
  `{ doc, errorCode, originalException }` and the value was read again
  in onUnhandled. Promoted to a named QueueEntry typedef with the
  field properly declared.
- queue.shift() returns undefined when empty; added a fast-path early
  return after the shift so the rest of the function can rely on a
  defined entry.
- The lazy import of PasswordPromptSurface.vue now goes through the
  *.vue ambient shim added in SD-2865 and casts the default export to
  object before passing to markRaw().

Stacks on caio/SD-2865-checkjs-find-replace because SD-2865 introduced
the *.vue shim.
@caio-pizzol caio-pizzol force-pushed the caio/SD-2866-checkjs-password-prompt branch from 9350891 to 832eb74 Compare May 1, 2026 14:05
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@caio-pizzol caio-pizzol merged commit 000af3e into main May 1, 2026
72 checks passed
@caio-pizzol caio-pizzol deleted the caio/SD-2866-checkjs-password-prompt branch May 1, 2026 14:23
@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 1, 2026

🎉 This PR is included in @superdoc-dev/mcp v0.3.0-next.29

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 1, 2026

🎉 This PR is included in @superdoc-dev/react v1.2.0-next.72

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 1, 2026

🎉 This PR is included in vscode-ext v2.3.0-next.74

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 1, 2026

🎉 This PR is included in superdoc v1.30.0-next.31

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 1, 2026

🎉 This PR is included in superdoc-cli v0.8.0-next.47

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 1, 2026

🎉 This PR is included in superdoc-sdk v1.8.0-next.33

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 1, 2026

🎉 This PR is included in superdoc-cli v0.8.0

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 1, 2026

🎉 This PR is included in superdoc-sdk v1.8.0

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 1, 2026

🎉 This PR is included in @superdoc-dev/mcp v0.3.0

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 1, 2026

🎉 This PR is included in superdoc v1.31.0

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 5, 2026

🎉 This PR is included in vscode-ext v2.3.0

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 7, 2026

🎉 This PR is included in @superdoc-dev/react v1.3.0

The release is available on GitHub release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants