docs(readme): update for the hosted demo and fix the diagram on dark backgrounds - #179
Merged
Merged
Conversation
…backgrounds
The owner reads GitHub in dark mode, where the README's diagram looked
broken. GitHub initializes Mermaid with `theme: dark` when the reader is in
dark mode, but `theme` is not in its `secure` list, so our `%%{init}%%` line
overrode it and painted black edges and black label text onto GitHub's
near-black canvas. Verified by rendering the diagram through GitHub's own
initialize config on both canvases, at Mermaid 11 and 12.
- The README diagram forces no colours; emphasis is shape, not colour
(stadium for the entry and the two terminals, diamond for the decision).
- `CLAUDE.md` now says what it meant: the fixed init line where we control
the background, the default theme where the reader picks it.
- The same init went from the two docs diagrams that carried it. It was a
no-op there -- Material's CSS restyles the SVG in both palettes -- but the
rule should read the same everywhere.
README, against the code:
- Leads with the hosted demo and the link preview card, so nobody has to
install to see anything.
- Read-only: SQLite datasources opt in with `options.read_only: true` and
the three sample databases do; no other dialect does.
- The decomposer builds the execution DAG; there is no global planner node.
The pipeline is 13 steps, five of them decided by a model.
- The plan language: an allow-list of functions, portable `DATE_PART` and
`DATE_TRUNC` rendered per adapter, and no `ordinal` fields.
- The validator builds the generator's query tree, so an unjoinable plan is
caught while the planner can still be asked to fix it.
- Benchmarks: strict and lenient accuracy, Wilson intervals, `alt_gold_sql`,
the paired McNemar gate; 43 gold questions, 39 answerable.
- REST response fields, SDK status values, `ENV`/`EMBEDDING_MODEL`/
`SCHEMA_STORE_PATH`/artifact vars, OpenRouter's default model, and the
`--dataset`/`--export-path` flags the benchmark rows were missing.
- Limitations: no cross-database questions, no conversation, read-only is
still the database user's job, and the hosted rate limits are best-effort.
The generated benchmark block was not touched. Mirrored into the PyPI
README, which stays shorter and absolute-linked.
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.
The diagram on dark backgrounds
The owner reads GitHub in dark mode, where the README's flowchart looked broken.
The cause, confirmed from GitHub's own bundle
(
viewscreen.githubusercontent.com/static/assets/mermaidMarkdown-*.js):GitHub picks the theme from the reader.
themeis not in itssecurelist,so a diagram's own
%%{init}%%overrides that choice — and ours pinnedlineColor: #000000andprimaryTextColor: #000000, which is black edges andblack edge-label text on GitHub's
#0d1117canvas.Before, on GitHub dark: the boxes float unconnected — every edge and
arrowhead is invisible — and the
retryable/refused/passedlabels areblack text on a black label background. After: every node, edge, arrowhead
and label reads cleanly, in both themes.
The easiest way to confirm it is to view this diff in dark mode and then in
light mode. Emphasis is now carried by shape rather than colour: stadium for
the entry and the two terminal states, diamond for the decision.
How it was verified
A harness reproduced GitHub's
initialize()call verbatim, against#ffffffwith
data-color-mode="light"and#0d1117withdata-color-mode="dark", atMermaid 11.17.2 and 12.0.0 (the bundle is an 11.x — it carries
treemap,radarandkanban, and no version string of its own, so both majors werechecked). Eight renders, all inspected. Every node, label, edge and arrowhead
is legible in both themes at both versions.
The rule
CLAUDE.mdnow distinguishes the two cases in two lines: the fixed black-and-white init line where we control the background (artifact, Notion, paper), and
no forced colours where the reader picks the theme. No test asserted the old
wording.
The docs site
mkdocs.ymlhas both adefaultand aslatepalette, toggled by the reader —neither carries a
media:key, so the site does not follow the OS theme, but itdoes have a dark mode. The two diagrams that carried the forced init
(
docs/architecture/indexing.md,docs/architecture/nodes/datasource_resolver_node.md) were stripped forconsistency, but the site was never affected: building the site and
screenshotting the indexing page in
slate, with and without the init line,gives pixel-equivalent, legible results. Material for MkDocs ships CSS that
restyles
.mermaidSVGs from its own palette variables, and those rules winover the inline attributes the directive produces. (
mermaid2itselfinitializes with
{}at Mermaid 10.4.0 — it is Material's CSS doing the work.)README, checked against the code
Wrong, now fixed:
dialect". SQLite datasources opt in with
options.read_only: true→mode=ro,and all three sample databases do. No other dialect does — so a read-only
database user is still the real control, and that is what it now says.
ExecutionDAGitself; thereis no planner node. Also fixed the same stale claim in
docs/architecture/pipeline.md./api/v1/readydoes not check the index either.result.statuscan also be"", when no sub-query ran.--max-costis not parser-required; it exits 2 when missing.Missing, now added:
the bring-your-own-key story: one key per provider, kept in the tab, used in
memory, never stored/logged/traced; a model per step; read-only databases;
rate limits.
DATE_PART/DATE_TRUNCrendered by each adapter,
ordinalfields gone.rejected where a retry can still fix it.
alt_gold_sql, the paired McNemar regression gate; 43 gold questions, 39answerable.
trace_id,reasoning,artifact_refs, and the fivemissing sub-query fields), the facade's
get_schema/index_health/inspect_retrieval/rebuild_index,ENV/ENV_FILE_PATH,EMBEDDING_MODEL,SCHEMA_STORE_PATH, the artifact vars, OpenRouter'sdefault model, and
--dataset/--export-pathon the benchmark rows.CLAUDE.mdandtests/architecture/test_boundaries.pyin Contributing.Limitations kept honest: no cross-database questions, no conversation,
read-only enforced for SQLite but a read-only database user still wanted, and
the hosted demo's rate limits explicitly best-effort (one process, and the
per-session cap hangs on a clearable cookie).
Mirrored into
packages/nl2sql/README.md(PyPI), which stays shorter andabsolute-linked. The
<!-- BENCHMARKS:START/END -->block was not touched.Left alone
docs/assets/screenshots/playground-overview.pngpredates the Pipeline nav(its tabs are Ask / Settings / Retrieval). Re-capturing needs the playground
built and running, so the alt text was left describing what the image
actually shows rather than claiming a tab that is not in it.
nl2sql statscommand exists — onlynl2sql feedback stats,which the table already had.
Checks
pytest -m "not integration" -qEMBEDDING_PROVIDER=local pytest -m "integration and not llm" -qmkdocs build --strictThe 8 skips are pre-existing:
langchain_anthropicis not installed locally.