cowork-bot: automated improvements (cowork/improve-vscode-schemaforge) - #9
Merged
Merged
Conversation
Harden the SchemaForge command entry points against the extension's silent-failure class: - runCommand() (new src/runCommand.ts): command handlers previously rejected into unhandled promise rejections, so a failed conversion (e.g. schemaforge CLI not installed) showed the user nothing even though cli.ts had already built a helpful message. The wrapper catches and surfaces errors via showErrorMessage, and forwards arguments verbatim — which also fixes the explorer context-menu commands (convert/detect) silently dropping the clicked resource Uri. - getOutputChannel()/disposeOutputChannels() (new src/output.ts): the commands called vscode.window.createOutputChannel on every invocation, leaking a fresh channel each run; channels are now cached by name and disposed on deactivate. - Minor: removed an unused defaultTarget in ConvertCommand.run and an unused docB binding in DiffCommand.run (eslint warnings 9 -> 7). Verified: tsc -p ./ clean (strict), eslint 0 errors.
This was referenced Jul 13, 2026
Coding-Dev-Tools
added a commit
that referenced
this pull request
Jul 20, 2026
* cowork-bot: centralize schema-format list and normalize detected formats The canonical list of supported schema formats was inlined in three places (convert.ts, previewPanel.ts, and cli.ts's getAvailableFormats fallback) — a drift risk that already bit us once (PR #9). Extract it into a single source of truth, src/formats.ts (SCHEMA_FORMATS + normalizeFormat). normalizeFormat() trims/lowercases the label the `detect` CLI emits before it is forwarded to `convert --from/--to`. Previously a label like "SQL" or " Prisma " was passed verbatim, producing an opaque CLI error while the command appeared to do nothing — the classic silent-failure trap. Unknown formats still pass through unchanged so the CLI errors clearly instead of silently. Adds network-free regression tests (tests/formats.test.js) covering normalizeFormat behavior and the list/enum consistency across call sites. * cowork-bot: fix test discovery in CI Remove quotes around the tests/*.test.js argument so the shell expands the test files on Node 18 and 20. This resolves PR #11 CI failures where Node received the literal glob and ran zero tests. --------- Co-authored-by: cowork-bot <cowork-bot@users.noreply.github.com> Co-authored-by: cowork-bot <jaixiicrypto@gmail.com>
Coding-Dev-Tools
pushed a commit
that referenced
this pull request
Jul 21, 2026
#12) * cowork-bot: centralize schema-format list and normalize detected formats The canonical list of supported schema formats was inlined in three places (convert.ts, previewPanel.ts, and cli.ts's getAvailableFormats fallback) — a drift risk that already bit us once (PR #9). Extract it into a single source of truth, src/formats.ts (SCHEMA_FORMATS + normalizeFormat). normalizeFormat() trims/lowercases the label the `detect` CLI emits before it is forwarded to `convert --from/--to`. Previously a label like "SQL" or " Prisma " was passed verbatim, producing an opaque CLI error while the command appeared to do nothing — the classic silent-failure trap. Unknown formats still pass through unchanged so the CLI errors clearly instead of silently. Adds network-free regression tests (tests/formats.test.js) covering normalizeFormat behavior and the list/enum consistency across call sites. * cowork-bot: fix test discovery in CI Remove quotes around the tests/*.test.js argument so the shell expands the test files on Node 18 and 20. This resolves PR #11 CI failures where Node received the literal glob and ran zero tests. * fix(deps): npm audit fix - resolve brace-expansion, js-yaml, minimatch vulnerabilities --------- Co-authored-by: cowork-bot <cowork-bot@users.noreply.github.com> Co-authored-by: cowork-bot <jaixiicrypto@gmail.com>
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.
Automated improvement PR from the Cowork repo-improver rotation (one coherent senior-dev improvement per run; see individual commit messages). Subsequent runs push additional commits to this PR rather than opening new ones.