Skip to content

ticket(mermaid-er-diagram): add ER diagram panel in quoomb web view - #20

Open
risavian wants to merge 13 commits into
gotchoices:mainfrom
inspirions:feat/vscode-ext
Open

risavian wants to merge 13 commits into
gotchoices:mainfrom
inspirions:feat/vscode-ext

Conversation

@risavian

@risavian risavian commented Apr 21, 2026

Copy link
Copy Markdown
  • ticket(er-diagram): add mermaid and babel-fish dependencies to quoomb-web for schema visualization support
  • ticket(mermaid): add @quereus/babel-fish package to transpile quereus sql to mermaid, typeql (and possibly others) for building schema visualization and other DX related tools
  • fix(compatibility): fix version compatibility issue during quereus-vscode extension install
  • fix(code-quality): fix lint issues, tests, and eslint configuration for quoomb-web

Preview:
Screenshot 2026-04-21 at 11 22 17

@n8allan n8allan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This brings in a lot of package dependencies. I like the feature, but it does make me a little nervous in the current climate of npm worms. The alternative, I suppose, would be to introduce extensibility and contribution points to quoomb web, which seems like overkill at this stage. I'm torn...

Comment thread packages/quoomb-web/vite.config.ts Outdated

resolve: {
alias: [
{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've been using workspace:^ for intra-workspace references. See other packages for an example.

@n8allan

n8allan commented May 22, 2026

Copy link
Copy Markdown
Contributor

VS Code just added Mermaid. I guess that puts us in pretty good company as far as vulnerabilities go.

… alias

Drop the source-path vite alias and rely on the workspace:^ dependency
declared in package.json, matching how other intra-workspace @quereus/*
packages are consumed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@risavian

risavian commented Jun 8, 2026

Copy link
Copy Markdown
Author

This brings in a lot of package dependencies. I like the feature, but it does make me a little nervous in the current climate of npm worms. The alternative, I suppose, would be to introduce extensibility and contribution points to quoomb web, which seems like overkill at this stage. I'm torn...

react-markdown-mermaid and mermaid are the two new dependencies. We could replace the former with a larger amount of UI code though in the future when we require more in-depth control over the ER diagram UI.

risavian and others added 3 commits June 8, 2026 19:07
# Conflicts:
#	packages/quereus-vscode/package.json
#	yarn.lock
…eact-markdown-mermaid

ERDPanel only used react-markdown-mermaid's MermaidBlock/MermaidService to
render a single diagram from a string — none of its markdown features. Replace
with a small local MermaidDiagram component calling mermaid's render API.

Removes the react-markdown-mermaid@0.0.3 dependency (a thin, low-version
wrapper) and the duplicate mermaid v10 it pinned (the project depends on v11
directly), trimming ~24 unused unified/rehype/hast markdown packages from the
transitive tree and shrinking the closure from 123 to ~98.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…wser build

Bring quoomb-web up to date with the engine/store APIs surfaced by the main
merge so it typechecks and builds end-to-end again.

- worker: drop the duplicate `import * as Comlink` line, and add the imports
  the code already used but never declared — IndexedDBProvider/IndexedDBStore
  from @quereus/plugin-indexeddb and dynamicLoadModule from @quereus/plugin-loader
  (both already direct deps). Remove the now-unused DatabaseDataChangeEvent /
  DatabaseSchemaChangeEvent type imports that tripped lint.
- sessionStore: createTabActions takes only `set`; stop passing the extra `get`.
- .yarnrc.yml: langium (transitive via mermaid -> @mermaid-js/parser) imports
  vscode-jsonrpc, vscode-languageserver-protocol and vscode-languageserver-types
  without declaring them, breaking the vite/rollup browser build under Yarn PnP's
  strict resolution. Declare them on langium via packageExtensions so the fix is
  reproducible on fresh / CI (--immutable) installs.
- .gitignore: stop ignoring .yarnrc.yml so the packageExtensions are tracked
  alongside the committed .pnp.cjs (verified with `yarn install --immutable`).
@risavian

risavian commented Jun 8, 2026

Copy link
Copy Markdown
Author

Removed the react-markdown-mermaid@0.0.3 dependency (a thin, low-version
wrapper) and the duplicate mermaid v10 it pinned (the project depends on v11
directly), trimming ~24 unused unified/rehype/hast markdown packages from the
transitive tree and shrinking the closure from 123 to ~98.

Mermaid and its transitive deps are the only new dependencies now.
Some build and type check issues were fixed too.

Brings the ER-diagram branch up to date with main (v4.11.0). Conflict
resolutions:

- package.json: took main's bumpp/esbuild/rimraf bumps, kept the root
  ts-node the vscode-extension work added.
- quoomb-web/package.json: took main's dexie/lucide-react versions, kept
  the mermaid and @quereus/babel-fish deps.
- quereus-vscode/package.json: took main's esbuild/rimraf bumps, kept
  @types/vscode ^1.109.0 so it stays aligned with engines.vscode (the
  extension-install compatibility fix).
- quereus-vscode/README.md: kept the manual build steps, in main's
  formatting.
- quoomb-web worker: unioned the import blocks — main's sync maintenance
  ticker / held-changes-drain symbols plus this branch's indexeddb and
  plugin-loader imports, with the duplicate ./types.js import dropped.
- shared-ui/tsconfig.tsbuildinfo: accepted main's deletion (build output).
- yarn.lock: regenerated from main's.

Also wires @quereus/babel-fish into the build the way main now does it:
main replaced the hand-ordered build:* chain with `tsc -b
tsconfig.build.json`, so babel-fish becomes a composite project
referencing packages/quereus and is listed in tsconfig.build.json.
Without this the web build cannot resolve @quereus/babel-fish. Its
tsconfig paths overrides into quereus/src are dropped in favour of the
project reference, matching the other library packages.

Verified: yarn build, yarn docs:check, quoomb-web and babel-fish
typechecks, and the vitest/mocha suites that run in this tree.
…tifacts

This branch was the only thing putting the repo in Yarn PnP mode: it began
tracking .yarnrc.yml, .pnp.cjs and .pnp.loader.mjs, all three of which main
gitignores. PnP is not a working configuration for this repo — every mocha
based test script invokes `node_modules/mocha/bin/mocha.js` by literal path,
and each package's register.mjs registers ts-node/esm anchored at the
workspace root. Under PnP that surfaces as `Cannot find module
.../node_modules/mocha/bin/mocha.js` in the store/sync/isolation suites, as
spurious "Cannot find name 'describe'" type errors in the engine suite, and
as an undeclared-@eslint/js failure in `yarn lint`.

Pin nodeLinker: node-modules so a fresh clone of the branch installs the way
main is developed, and drop the generated .pnp.* files from the index. The
langium packageExtensions stay: hoisting covers those undeclared imports
today, but keeping them documented means the mermaid browser build survives
a stricter install.

yarn lint, yarn build, yarn typecheck, yarn docs:check and yarn test all run
clean again.
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.

2 participants