Skip to content

Releases: ikelaiah/sql-cartographer

v3.2.1 — Free canvas panning

Choose a tag to compare

@ikelaiah ikelaiah released this 12 Oct 20:11

v3.2.1 — Free canvas panning

  • Release date: 13 October 2026.
  • Base: v3.2.0.
  • Scope: Recoverable canvas movement in ERD and SQL Flow.

What changed

  • ERD canvas movement works in every direction, including right and down from
    the initial top/left position. Positive viewport offsets provide space before
    the diagram; negative movement uses an extended scroll area.
  • ERD Fit recentres the complete schema, or a selected table and its declared
    neighbours. Cursor-anchored zoom accounts for the viewport offset. Panning
    moves the view independently of saved table positions.
  • SQL Flow distinguishes a drag from a node click. Dragging the canvas or a
    node preserves the requested movement instead of selecting the node and
    reframing the diagram. Fit overview recovers the complete chart.
  • Diagram controls remain interactive during panning. The user guide explains
    canvas movement, individual table movement, and Fit recovery.

Verification

An isolated Edge 155 walkthrough reproduced both problems before the fix.
Afterward, an 80-pixel right / 60-pixel downward drag moved both diagrams by
that amount; flow inspection stayed closed. ERD movement beyond the origin,
Fit recovery after a large negative pan, and cursor-anchored zoom were also
observed. The prior browser diagnosis used actual renderer pointer events.

Local TypeScript build, strict pilot, and lint (69 files) passed. The v3.2.1
fixture-corpus metrics snapshot was generated. A separate AI code reviewer
approved the signed viewport coordinates, zoom/Fit calculations, flow click
suppression, and guide changes.

The release requires green Correctness and Firefox smoke CI on its
complete release commit. Correctness covers generated-runtime freshness,
release-document consistency, local-file startup, golden/fuzz/UI/ERD/security
suites, current metrics, benchmark, and packaged-runtime smoke.

Runtime

The release includes sql-cartographer-v3.2.1.zip (4,069,229 bytes) and
SHA256SUMS.txt.

ZIP SHA-256:
530008c7aceba684dc3d1acd2d54244bc6cc18910e0e44c962857d95ee76ce80.

Download the GitHub release.

Correctness
and Firefox smoke
passed on release commit 2ec36db7451e200a934817c040892c05a65e7d48.

v3.2.0 — Clear diagrams and guided exploration

Choose a tag to compare

@ikelaiah ikelaiah released this 12 Oct 15:16

v3.2.0 — Clear diagrams and guided exploration

  • Release date: 13 October 2026.
  • Status: Browser review and local release qualification passed.
  • Base: v3.1.0.
  • Scope: More readable diagrams, inspectable evidence, actionable diagnostics, four curated lessons, and smaller presentation modules.

What changed

  • Flow diagrams keep labels readable on arrival. Fit overview remains an
    explicit action; selecting a step highlights and frames its immediate
    modelled neighbours. Clearing focus restores the previous viewport.
  • A flow inspector explains node class, provenance, available catalogue
    resolution, source evidence, and incoming/outgoing relationship kinds.
    Source and object navigation happen through explicit buttons.
  • Flow and ERD findings share a text-safe diagnostic view with severity, stable
    code, scope, message, source location, and next-step hints for common codes.
  • Three flow/query lessons cover a decision, temporary-table data flow, and a
    CTE pipeline. A three-table schema lesson connects declared foreign keys to
    a query plan and its row-repetition explanation. Guided and representative
    samples ask before replacing non-empty input.
  • Flow diagram presentation and ERD card/inspector builders now have typed UI
    boundaries. The contributor guide follows a lesson from sample SQL through
    analysis and the graph to exported output.
  • Downloaded SVGs omit temporary focus decoration while the on-screen view
    remains selected. Existing workspace, query, and layout formats are retained.
  • Source navigation resolves the owning object, report XML, or catalogue input.
    Stale actions preserve edited input, and clearing SQL clears old diagnostics.
  • At 200% browser zoom, stacked controls wrap and scroll with the page; keyboard
    focus keeps the flow inspector and zoom controls inside the canvas.

Experience review

The maintainer review and its stated limits are recorded in
the v3.2.0 review sheet. It includes the actual Edge
200% zoom walkthrough, keyboard interactions, light/dark captures, and fixes.
No timed first-time-user study or independent human walkthrough is claimed.
Representative screenshots:

Flow lesson with selected-node evidence inspector

Three-table schema lesson

Verification

Gate Result
npm run lint Pass — 69 files
npm run typecheck Pass
npx tsc --project tsconfig.strict.json Pass
npm run build Pass
npm test Pass — golden 222/222; fuzz 400 cases; UI 67/67; ERD UI 74/74; security 7/7
npm run test:file Pass — local-file runtime loaded
npm run metrics:write / npm run metrics Pass — v3.2.0 snapshot generated and current
npm run package:smoke Pass — archive structure and local-file smoke
npm run benchmark Pass — 0 overlaps/crossings across recorded graph fixtures
Actual Edge 200% zoom walkthrough Pass — flow/report/schema evidence, keyboard source/query actions, both themes, no page overflow
Separate AI code review Approved — source ownership, stale input, responsive fixes, and release-doc gate

The local runtime archive is .release/sql-cartographer-v3.2.0.zip; its SHA-256
is 3ae3296373e9f2c2772a5f69da4aec2d422a77b94629af93d6c77753b8d68a91.
The 4,067,501-byte archive and .release/SHA256SUMS.txt accompany the
GitHub release.

The runtime archive and SHA-256 checksum are built by npm run package:runtime.
The package smoke verifies that archive before publication. The visual review
limits are listed in the linked review sheet.

v3.1.0 — Documentation, diagrams, and maintainability

Choose a tag to compare

@ikelaiah ikelaiah released this 05 Oct 07:30

SQL Cartographer v3.1.0 — Documentation, diagrams, and maintainability

A quality pass over the code and the documentation. The product now explains
itself: the docs carry real Mermaid diagrams and screenshots of both pages, the
architecture is described against the code that actually exists, and the
contributor path has one home. Two correctness defects found during the pass
are fixed.

No user-data format changed. Nothing saved by v3.0.0 is affected.

Highlights

  • Diagrams in the documentation. The project has exported Mermaid since
    v1.0 and not one doc rendered a diagram. There are now Mermaid figures for
    the analysis pipeline, the module dependency graph, the ERD layout pipeline,
    bridge tables, self joins, the two-paths tie-break, the report → dataset →
    object → column chain, and the node/edge vocabulary. All eight parse under
    securityLevel: 'strict' with the vendored renderer.
  • Screenshots of both pages. index.html and erd.html — including the
    query builder mid-plan — are pictured in the README and the user guide. For a
    visualisation tool, this was the largest "can I judge this before running it"
    gap.
  • A worked example. The user guide now walks one procedure from source SQL
    through the rendered diagram to the exported Mermaid and its provenance
    comment, using the product's real output rather than an invented one.
  • A wordmark defect fixed. v3.0.0 renamed the project and claimed one
    consistent wordmark, but both pages still shipped proc>flow because the
    markup splits it across a <span class="caret">. A CI guard now catches that
    exact form.

Fixed

  • ROLLBACK TO <savepoint> misread its target. tsqlTransactionAction
    never skipped the TO keyword, so ROLLBACK TO my_sp reported the savepoint
    as TO. The informative "roll back to savepoint X" label could not fire, and
    the name would have been registered wrongly had the save path seen it. Found
    by writing direct unit fixtures for the transaction model; those fixtures are
    the regression test.
  • A failed column-flow analysis vanished silently. Two guards in
    analyse caught a failure and returned no column flow with no diagnostic,
    contradicting the contract that unknown constructs stay explicit. Both now
    push a document-scoped column_flow_analysis_error, matching what the report
    pipeline already did. The column-flow model survives a graph-layout failure;
    only the rendered graph is dropped, and that is now said out loud.

Documentation

  • docs/README.md — a documentation map with a learning path for users,
    contributors, and reviewers.
  • CONTRIBUTING.md — the non-negotiables, fixtures-before-fixes, and the
    pre-PR checklist, consolidated from three places that had drifted. ADR
    template and index in docs/decisions/.
  • docs/GLOSSARY.md — the vocabulary the docs and the UI share (opaque region,
    bridge table, taught join, token attribution, declared evidence, and friends),
    which until now was used before definition.
  • .github/SECURITY.md — points GitHub's security tab at the canonical policy
    in docs/SECURITY.md.
  • docs/ARCHITECTURE.md refreshed against src/: seven modules were missing,
    one attribution was stale, and the documented one-way dependency chain was
    not reflected. Now includes the module load-order contract and the graph
    vocabulary table.
  • TOCs added to the user guide and the query builder. 21 broken relative links
    in docs/archive/ repaired (they broke when those notes moved into
    archive/). README's roadmap link no longer contradicts the roadmap's own
    "historical" banner.

Maintainability

  • The T-SQL transaction model is now testable on its own. 15 pure functions
    moved from src/ir.ts into src/dialects-state.ts, alongside the
    TSQL_XACT_* bitmask constants they operate on. ir.ts no longer contains
    the bitmask algebra at all.
  • emitOne is a dispatch, not a 400-line switch. Its 16 node-kind cases
    are now named emitters (emitTry, emitIteration, emitHandler, …), each
    typed to its own AST node. ir.ts is 1532 → 1057 lines and the emitted graph
    is unchanged, verified by 222 golden assertions.
  • 54 diagnostic codes are compiler-enforced. Diagnostic.code is now a
    closed DiagnosticCode union instead of string, so a typo is a compile
    error rather than a message that never matches a test.
  • Deduplicated: twelve localStorage wrappers in src/workspace.ts
    collapsed to four primitives; three copies of the same span predicate in the
    golden tests collapsed to one; the duplicated outer-parenthesis stripper in
    src/dialects-state.ts is one helper.
  • Renamed the confusables: queryBuildGraph → queryBuildJoinGraph
    (distinct from lineage.ts's buildQueryGraph), the O/o parameter pair
    in src/columnflow.ts, a variable named any, and the version-suffixed test
    helpers.
  • Bundled ERD sample DDL moved from src/erd.ts to src/samples.ts, whose
    stated purpose is exactly that. Removed the production-dead layoutDrawio
    wrapper.

Testing

  • New suite tests/xact-state.ts: 58 direct fixtures for the transaction
    algebra, which previously had zero direct coverage — depth-range
    intersection, the depth ↔ state bit-set conversions, the state labels,
    transaction action parsing (including BEGIN DISTRIBUTED TRAN [WORK] and
    variable savepoint targets), action validity per state, and FlowContext
    parent-chain inheritance. It gates the golden page.
  • Two new fixtures in tests/column-flow.ts require that a column-flow or
    column-graph failure is reported rather than swallowed.
  • golden 221 → 222 cases. The fixture-corpus snapshot is
    metrics-v3.1.0.json, with columnFlow 15 → 17 and
    every tracked rate still 1 — attribution, semantic edge coverage,
    provenance, export parity, export traceability, layout budgets, and the
    adversarial semantic assertion rate.

Verification

npm run lint, npm run typecheck, npm run build, npm test
(728 cases: golden 222, fuzz 400, ui 32, erd-ui 68, security 6),
npm run test:file, npm run metrics, npm run benchmark, and
npm run package:smoke all pass. Committed dist/ is current. The runtime
remains local-only: no network call, and localStorage is still touched only
by src/workspace.ts.

Known gaps

Deliberately out of scope for this release, and recorded so they are not lost:

  • src/ui/erd-page.ts is still 1422 lines (cards, layout, zoom, routing, and
    event wiring in one closure). The clean split already used by
    src/ui/erd-query-view.ts is the template, but extracting it is a
    behaviour-sensitive change to the ERD interaction layer and wants its own
    release with its own fixtures.
  • The type-strictness pilot still covers only the extracted modules. Extending
    tsconfig.strict.json is incremental work that is worth doing file by file.
  • Test-side duplication of the export-manifest assertion block across
    tests/parity.ts, tests/report-graph.ts, and tests/column-flow.ts remains.

See the changelog for the condensed history.

v3.0.0 — Rename and identifier reset

Choose a tag to compare

@ikelaiah ikelaiah released this 05 Oct 01:54

SQL Cartographer v3.0.0 — Rename and identifier reset

The project was named ProcFlow until v2.7.0. From v3.0.0 it is
SQL Cartographer, published at
ikelaiah/sql-cartographer.
This is a breaking release: the rename reaches user-data-facing identifiers,
so saved work from v2.7.0 and earlier does not load. There is no migration
path.

Highlights

  • New name everywhere that matters. The GitHub repository, the npm package
    (sql-cartographer), the product name in prose, the release archive, the
    logo, and the CI and packaging scripts all follow the new name. The old
    ikelaiah/ProcFlow repository URL redirects automatically.
  • One consistent wordmark. The logo now reads sql>cartographer, the
    exported Mermaid provenance header reads %% sql-cartographer provenance,
    and generated SQL headers are prefixed sql-cartographer.
  • Failure output that names the failure. npm test previously printed only
    erd-ui: 66/68 tests passed, which is enough to know something broke and
    not enough to know what. Each failing case is now printed with its name and
    detail.
  • Hardened ERD interaction polls. The erd-ui polls that wait for
    requestAnimationFrame-driven overlay drawing allow 10s instead of 3s, so a
    contended CI runner does not drop cases a desktop browser passes.

Breaking: user-data identifiers

Anything saved before this release is stored under the old identifiers and
will not load. Export what you want to keep before upgrading.

Kind v2.7.0 and earlier v3.0.0
Browser storage keys procflow.workspace, procflow.erd.layout, procflow.erd.query sql-cartographer.workspace, sql-cartographer.erd.layout, sql-cartographer.erd.query
Saved-query file format procflow-erd-query sql-cartographer-erd-query
ERD-layout file format procflow-erd-layout sql-cartographer-erd-layout
draw.io XML attributes data-procflow, data-procflow-kind data-sql-cartographer, data-sql-cartographer-kind
draw.io diagram id procflow-page sql-cartographer-page
Default download names procflow-report, procflow-estate, procflow-workspace.json, procflow-query-<fp> sql-cartographer-report, sql-cartographer-estate, sql-cartographer-workspace.json, sql-cartographer-query-<fp>
Release archive procflow-vX.Y.Z.zip sql-cartographer-vX.Y.Z.zip

Before upgrading:

  1. Saved queries — use Query → Export to write a procflow-query-*.json
    file. After upgrading, Query → Import accepts the same file: the importer
    recognises a procflow-erd-query payload and re-saves it under the new
    format, so only the file needs to survive the upgrade.
  2. ERD layouts — use Export to write a procflow-erd-layout-*.json file.
    Layout files are read by format tag rather than by filename, so an old
    export imports cleanly and is rewritten under the new tag.
  3. Workspaces — a procflow-workspace.json export is not readable by
    v3.0.0. The workspace format is version-checked and rejected rather than
    half-imported. Rebuild the workspace after upgrading, or stay on v2.7.0
    until you no longer need it.

Browser storage is not migrated. The old procflow.* keys remain in the
browser but are never read; clear them manually if you want the space back.

Accuracy and limits

  • No analysis, export, or query-builder semantics changed. The rename is a
    mechanical identifier substitution: every golden, fuzz, adversarial, and
    security fixture passes with the same expectations as v2.7.0, and the
    fixture-corpus metric numbers are identical.
  • The docs/metrics-v*.json snapshots for v2.7.0 and earlier keep the
    generator label that release produced, except metrics-v2.7.0.json which
    was regenerated with the new label so the correctness workflow's snapshot
    currency check stays meaningful. The metric numbers are unchanged either way.
  • Historical documents keep the old name on purpose: docs/archive/, the
    canonical release notes for v1.14.0 through v2.6.0, and the CHANGELOG.md
    entries for those releases describe what shipped under it.
  • Browser automation depends on a locally installed Chromium/Edge/Chrome;
    npm test honours CHROME_PATH and fails with a clear message otherwise.

Verification

The final local verification recorded for this release includes:

  • npm run lint (Biome) passing with 0 errors;
  • npm run typecheck and npm run build passing;
  • npm test (scripts/test-all.mjs) passing all five browser suites over a
    local static server: golden 221/221, fuzz 400 deterministic mutation cases,
    ui 32/32, erd-ui 68/68, security 6/6;
  • npm run test:file (local-file startup smoke) passing;
  • npm run metrics confirming the v3.0.0 fixture-corpus snapshot is current;
  • npm run benchmark completing the repeatable scalability run;
  • npm run package:smoke passing archive structure and local-file startup on
    sql-cartographer-v3.0.0.zip;
  • CI runs the same gate plus Firefox smoke and release-consistency checks.

Upgrade and distribution

Download sql-cartographer-v3.0.0.zip from the GitHub release or clone
ikelaiah/sql-cartographer.
The runtime footprint is unchanged apart from the identifier rename: the same
index.html, styles.css, and dist/ modules. Open index.html (or
erd.html) in a current Chromium, Firefox, or Edge browser.

If you are linking to the old repository, update the URL — the redirect works
for clones and releases, but GitHub Pages URLs do not redirect and the live
demo is now at https://ikelaiah.github.io/sql-cartographer/.

v2.7.0 — Maintainability pass

Choose a tag to compare

@ikelaiah ikelaiah released this 04 Oct 10:57

A code-health release: no new user-facing features, but a stronger codebase
underneath the same UI. The analysis core is now a clean one-way dependency
chain, duplication is removed, dead code is gone, linting exists, and
contributors can run every browser suite with one command.

Highlights

  • No dependency cycles in the analysis core. Shared token/AST helpers moved
    to src/token-utils.ts and the PL/pgSQL + T-SQL transaction rules to
    src/dialects-state.ts. token-utils ← lineage ← columns ←
    columnflow is one-way, and exporters no longer reaches back into
    ir.ts. Each module can now be read and tested on its own.
  • ir.ts shrinks from 1966 to 1466 lines. The graph builder keeps its
    responsibilities, but the pure helpers and dialect state live where a reader
    can find them.
  • One CTE splitter. splitCTEs now carries the explicit column list
    (WITH r(n) AS …) and body spans that previously lived in a near-duplicate
    splitCtesColumn; lineage and column flow share one parser.
  • One filter kernel. The dependency and report graph filters shared a
    copy-pasted neighbour/clone block; both now call graphNarrowByFocus and
    graphFilteredClone, so the no-mutation and one-hop rules cannot drift.
  • Exports never mutate the analysis. toMermaid works on shallow node
    copies, so a cached graph is safe to reuse; a regression test locks this in.
  • npm test runs the whole browser suite. scripts/test-all.mjs starts a
    local static server and drives golden, fuzz, ui, erd-ui, and security
    through headless Chromium. The suites also publish named result globals so
    the runner does not scrape DOM state.
  • Linting and CI tightening. Biome (npm run lint) gates correctness and
    suspicious rules; CI runs lint before typecheck. noUnusedVariables is
    intentionally off because the global-script architecture makes top-level
    declarations look unused to a per-file linter.
  • Tests are no longer order-dependent. The UI suites previously raced the
    off-screen iframe: on a fast machine the iframe could load before the test
    attached its listener, leaving the suite stuck at "Running…". They now run
    either way.
  • Windows-friendly metrics. npm run metrics normalises line endings, so
    the snapshot check no longer reports a false staleness on CRLF checkouts.
  • UI polish. Tablists follow the ARIA tabs keyboard pattern (arrows,
    Home/End), and the app supports prefers-color-scheme: light with a
    legible light palette. Command-menu panels carry role="group" so their
    labels are exposed to assistive technology.
  • Docs that point forward, not backward. 33 superseded RELEASE_NOTE_*,
    PR_NOTE_*, and historical planning documents moved to docs/archive/
    with an archive README; ROADMAP.md, tasks/, and BENCHMARKS.md are
    clearly marked historical. docs/RELEASES.md now indexes every canonical
    release note. The stale trust-model version and the port mismatch in
    docs/DEVELOPMENT.md are corrected.

Accuracy and limits

  • No analysis, export, or query-builder semantics changed. Every golden,
    fuzz, adversarial, and security fixture passes unchanged; the metrics
    snapshot is byte-identical to v2.6.0's numbers.
  • The metrics-v1.6.0…v1.12.0 snapshots referenced by archived v1.x notes
    do not exist in the repository; the notes stay archived as historical
    records and their broken references are left as-is.
  • Browser automation depends on a locally installed Chromium/Edge/Chrome;
    npm test honours CHROME_PATH and fails with a clear message otherwise.

Verification

The final local verification recorded for this release includes:

  • npm run lint (Biome) passing with 0 errors;
  • npm run typecheck and npm run build passing;
  • npm test (scripts/test-all.mjs) passing all five browser suites over a
    local static server: golden 221/221, fuzz 400 deterministic mutation cases,
    ui 32/32, erd-ui 68/68, security 6/6 — including the new export
    non-mutation and Mermaid strict-security regression tests;
  • npm run test:file (local-file startup smoke) passing;
  • npm run metrics confirming the fixture-corpus snapshot is current;
  • npm run package:smoke passing archive structure and local-file startup;
  • CI runs the same gate plus Firefox smoke and release-consistency checks.

Upgrade and distribution

Download procflow-v2.7.0.zip from the GitHub release or clone the
repository. Nothing changes in the runtime footprint beyond the new
token-utils.js, dialects-state.js, and samples.js modules; the
package allowlist and index.html load order are updated accordingly.
Open index.html (or erd.html) in a current Chromium, Firefox, or Edge
browser.

v2.6.0 — Aggregates and grouping

Choose a tag to compare

@ikelaiah ikelaiah released this 20 Sep 22:58

ProcFlow v2.6.0 — Aggregates and grouping

Released as the aggregate milestone. The query builder now answers grouped
questions — orders per customer, totals per product — without leaving the
declared-evidence model or hand-writing GROUP BY.

Highlights

  • Aggregate any picked column. Each chip carries a selector: —,
    COUNT, COUNT DISTINCT, SUM, AVG, MIN, MAX.
  • GROUP BY derives itself. Every remaining picked column becomes the
    group list in pick order; when all picks are aggregated, GROUP BY is
    omitted and the query returns one row. No second multi-select, no invalid
    states.
  • Aggregates read like SQL. Deterministic aliases
    (count_orderheader_orderid), sorting an aggregated column orders by the
    expression (ORDER BY COUNT(...) DESC), and the provenance header records
    Grouped by: and Aggregates: lines.
  • DISTINCT yields to grouping. While an aggregate is set the toggle is
    disabled and the SQL omits the clause, with a header note explaining why.
  • Fan-out honesty. A plan tip warns that SUM/AVG over a one-to-many
    join can multiply unless the detail rows are pre-aggregated.
  • Versioned files stay compatible. Query files move to version 2;
    version-1 files from v2.5.0 load and migrate forward with an empty aggregate
    map, and newer versions are rejected with a diagnostic. Aggregates are
    saved, exported, restored, and pruned with their picks.
  • Documentation. ADR-003 records the derived-GROUP BY model and the
    rejected alternatives (HAVING, explicit grouping, COUNT(*), window
    functions); docs/QUERY_BUILDER.md gains an aggregates section.

Accuracy and limits

  • No analysis or join semantics changed. Joins still use declared foreign-key
    evidence only; taught joins and self-join copies remain labelled not
    declared; the generated SQL stays read-only.
  • No HAVING, no window functions, and no COUNT(*): COUNT(column) ignores
    NULLs, so count a NOT NULL key for row counts. GROUP BY covers picked
    columns only.
  • Unknown aggregate functions are ignored, never guessed.

Verification

The final local verification recorded for this release includes:

  • golden browser assertions on tests/index.html passing (221/221), including
    the query suite (55 records) with aggregate rendering, all-aggregate
    GROUP BY omission, aggregate ordering, DISTINCT suppression and header
    notes, unknown-function tolerance, version-1 file migration, and storage and
    pruning coverage;
  • the ERD query UI suite passing 68/68 over HTTP, including the aggregate
    selector, function rendering, GROUP BY, DISTINCT disabling, the plan
    tip, and reset;
  • the Firefox smoke page passing 10/10 critical paths;
  • npm run typecheck, npm run build, npm run test:file, npm run metrics,
    npm run package:smoke, and npm run benchmark passing;
  • runtime archive structure and local-file startup smoke passing
    (procflow-v2.6.0.zip).

Upgrade and distribution

The runtime is self-contained. Use npm run package:runtime to produce the
versioned ZIP and verify .release/SHA256SUMS.txt before distributing it.
Layouts, workspaces, and version-1 query files saved by earlier releases remain
readable.

v2.5.0 — Saved queries and file export

Choose a tag to compare

@ikelaiah ikelaiah released this 20 Sep 22:31

ProcFlow v2.5.0 — Saved queries and file export

Released as the query-persistence milestone. The ERD query builder no longer
loses work when the tab closes, and the generated SQL can leave the browser as
a file. Everything remains local: one explicit saved slot per browser, plus
versioned files you own.

Highlights

  • Save to this browser, Restore saved, Forget saved. One query is stored
    under procflow.erd.query with explicit actions only — nothing is written
    automatically, matching the ERD layout and workspace rules. Activating query
    mode with a saved query and no picks points at Restore.
  • Versioned query files. Export query file writes a
    procflow-erd-query v1 JSON payload carrying the selections, taught joins,
    self-join copy routing, options, and a schema fingerprint. Import query
    file
    reads it back.
  • Download .sql. The statement is written as a file and respects the
    Comments toggle. The optional name field drives filenames
    (orders-by-customer.json / .sql); without it the schema fingerprint is
    used.
  • Prune-and-report restores. References that no longer exist — tables,
    columns, taught joins, sorts, cross/excluded ids, path choices — are dropped
    and counted, and a changed schema is named in the status line. Restores never
    fail because the schema moved on. Foreign formats, future versions, and
    malformed JSON are rejected with diagnostics.
  • Pure store module. src/query-store.ts owns serialization, validation,
    and pruning with no DOM or storage access; schemaFingerprint moved to
    src/schema.ts and is shared with ERD layout files. Browser storage stays in
    the CI-guarded src/workspace.ts.
  • Documentation. ADR-002 records the persistence decisions and rejected
    alternatives; docs/QUERY_BUILDER.md gains the file format and drift
    semantics; ARCHITECTURE adds invariant 7.

Accuracy and limits

  • No analysis or join semantics changed. Joins still use declared foreign-key
    evidence only; taught joins and self-join copies remain labelled not
    declared; the generated SQL stays read-only.
  • One saved query per browser by design; keep multiple analyses as files. See
    ADR-002 for why a named library was deferred.
  • Saved queries and ERD layouts are independent storage keys; forgetting one
    never drops the other.

Verification

The final local verification recorded for this release includes:

  • golden browser assertions on tests/index.html passing (221/221), including
    the query-store records for deterministic round-trip, three rejection codes,
    unreadable-entry tolerance, stale pruning with reasons, fingerprint
    stability, export naming, and the opt-in storage round-trip;
  • the ERD query UI suite passing 62/62 over HTTP (query mode, picking, join and
    problem cards, teaching, self joins, options, highlighting, resize, Find,
    only-used filter, export/import/download, and browser save/restore/forget);
  • the Firefox smoke page passing 10/10 critical paths;
  • npm run typecheck, npm run build, npm run test:file, npm run metrics,
    npm run package:smoke, and npm run benchmark passing;
  • runtime archive structure and local-file startup smoke passing
    (procflow-v2.5.0.zip).

Upgrade and distribution

The runtime is self-contained. Use npm run package:runtime to produce the
versioned ZIP and verify .release/SHA256SUMS.txt before distributing it.
Layouts and layout files saved by earlier releases remain readable; saved
queries are a new key and do not affect them.

v2.4.1 — Query builder hardening and release discipline

Choose a tag to compare

@ikelaiah ikelaiah released this 20 Sep 21:24

ProcFlow v2.4.1 — Query builder hardening and release discipline

Released as the first patch after the v2.4.0 query builder. No analysis
semantics changed: this release hardens the builder, commits its browser
suite, fixes an overlay redraw defect, and makes release documentation
verifiable in CI.

Highlights

  • Query engine hardening. Shortest-path enumeration is iterative, so a
    1,000-table declared chain cannot exhaust the call stack. A scale fixture
    asserts 999 joins, 998 bridges, and deterministic plan and SQL output.
  • Plan-edge highlighting fix. The overlay redraw after a pick was deferred
    to requestAnimationFrame, which can be starved in headless and off-screen
    contexts; only a pre-plan resize draw could run, leaving every edge dimmed
    even though the plan was correct. Query-state changes now draw synchronously;
    animation frames still coalesce drag redraws.
  • Panel corrections. Excluding a problem table now prunes its sorts (not
    just its picks); the clipboard fallback is shared by both pages; the dropdown
    teach flow explains that the same table on both sides creates a self join.
  • Panel structure. Pure DOM builders moved to src/ui/erd-query-view.ts
    (panel 1,145 → 812 lines; view 376 lines) with no behavior change.
  • Accessibility and keyboard. One concise status announcement replaces
    live-announcing the whole SQL and plan; the floating window is a labelled
    dialog; Q toggles query mode; Escape cancels teaching without clearing
    the diagram selection.
  • Committed browser suite. tests/erd-ui.html drives erd.html with 49
    interaction checks (query mode, picking, join and problem cards, teaching,
    self joins, options, highlighting, resize, Find, only-used filter), and the
    Firefox smoke now loads both pages.
  • Release discipline. package-lock.json tracks package.json; the
    changelog, README, release index, and lockfile version are guarded in CI;
    docs/RELEASES.md documents the verified tag-and-asset flow.
  • Documentation. docs/QUERY_BUILDER.md deep dive, ADR-001 for the
    declared-evidence query model, and a browser-suite cookbook plus module
    header convention in docs/DEVELOPMENT.md.
  • CI actions updated (actions/checkout, actions/setup-node).

Accuracy and limits

  • No analysis semantics changed. Joins still use declared foreign-key evidence
    only; taught joins and self-join copies remain labelled not declared in the
    plan and SQL; the generated SQL stays read-only.
  • Query picks and options remain session state; only ERD layouts persist
    (opt-in).

Verification

The final local verification recorded for this release includes:

  • golden browser assertions on tests/index.html passing (221/221), including
    the query-builder engine suite with the 1,000-table scale fixture;
  • the ERD query UI suite passing (49/49 over HTTP), and the Firefox smoke page
    passing 10/10 critical paths;
  • npm run typecheck, npm run build, npm run test:file, npm run metrics,
    npm run package:smoke, and npm run benchmark passing;
  • runtime archive structure and local-file startup smoke passing
    (procflow-v2.4.1.zip).

Upgrade and distribution

The runtime is self-contained. Use npm run package:runtime to produce the
versioned ZIP and verify .release/SHA256SUMS.txt before distributing it.
Layouts and layout files saved by earlier releases remain readable.

v2.4.0 — Query builder on the ERD

Choose a tag to compare

@ikelaiah ikelaiah released this 20 Sep 16:32

ProcFlow v2.4.0 — Query builder on the ERD

Released as the ERD query-builder milestone. The declared-constraint model now
produces runnable SQL: pick columns on the diagram and ProcFlow works out the
joins the DDL actually declares, shows the plan, and hands you the statement to
run in your database client.

Highlights

  • Query builder on the diagram. A toolbar toggle turns every column row
    into a checkbox and opens a floating window that can be dragged, resized
    (corner grip or arrow keys), and collapsed. Picked rows are highlighted,
    cards carry a picked-count badge, and the floating window can be closed and
    reopened with the picks intact.
  • Declared-evidence joins only. Shortest paths over declared foreign keys
    connect the picked tables, preferring exact resolutions over name-matched
    ones. Bridge tables are included, tagged, and never selected. Optional and
    parent→child traversals use LEFT by default in the preserve policy; every
    join has an INNER/LEFT switch and a plain-language note about direction,
    optionality, and row multiplication.
  • Equal-cost paths are a choice, not a guess. When two declared paths reach
    the same table (for example CreatedBy and ApprovedBy), the plan shows
    both paths and the first declaration is used until you pick another.
  • Unjoinable picks are explicit. Tables with no declared path get a coral
    ring and a problem card. Resolve by teaching the join (column pair, typed
    predicate, or click two columns on the diagram), opting into a CROSS JOIN,
    or leaving the columns out — the provenance header names anything omitted.
    ProcFlow never silently produces a cartesian product.
  • Self joins. Clicking two columns of the same table creates a second
    aliased copy; tick which picked columns read from that copy, and the header
    documents the alias as second copy, self join.
  • Query ergonomics. Dialect-aware DISTINCT, a row cap (TOP n / LIMIT n
    / FETCH FIRST n ROWS ONLY), and per-column sort cycling (ascending →
    descending → off) on the picked-column chips. A tip offers DISTINCT when a
    one-to-many join can repeat rows.
  • Readable generated SQL. Dependency-free syntax highlighting (keywords,
    comments, strings, identifiers, numbers, punctuation) where the concatenated
    token text is byte-identical to the emitted SQL; Copy always copies the raw
    text. Dialect quoting covers T-SQL, PostgreSQL, DB2, and SQLite.
  • Diagram and plan stay one surface. Plan edges draw at full strength while
    unrelated edges dim; hovering a join card lights its exact edge and both
    endpoint cards; Only used tables narrows the canvas to the query plus any
    unresolved tables; Find now matches columns and highlights the exact
    rows; hover and teaching cursors make the diagram the picker.

Accuracy and limits

  • Joins use declared PRIMARY KEY / UNIQUE / FOREIGN KEY evidence only.
    Column names never imply a relationship.
  • Taught joins, self-join aliases, and CROSS JOIN opt-ins are labelled as not
    declared in the plan and in the SQL header; ProcFlow states that it cannot
    verify them.
  • Name-matched foreign-key targets remain usable with a warning; external
    (unresolved) targets cannot be picked and are explained in the picker notes.
  • The generated SQL is read-only and derived. Edit it where you run it.
  • Query picks and options are session state; only ERD layouts persist (opt-in).

Verification

The final local verification recorded for this release includes:

  • npm run typecheck, npm run build, npm run test:file, and
    npm run metrics passing;
  • golden browser assertions on tests/index.html passing (221/221), including
    the v2.4.0 query-builder suite (39/39: join graph and pathfinding, ambiguity
    alternatives, bridges, preserve/strict policy, taught joins, self joins,
    disconnected selections, dialect quoting, ergonomics options, highlighting
    token round-trip, and deterministic output);
  • a scripted headless UI pass over erd.html passing 67/67 interaction checks
    (query mode, on-card picking, join and problem cards, teaching by clicks,
    self-join copy routing, resize and keyboard resize, highlighting, chips,
    Find and the only-used filter);
  • runtime archive structure and local-file startup smoke passing
    (procflow-v2.4.0.zip).

Upgrade and distribution

The runtime is self-contained. Use npm run package:runtime to produce the
versioned ZIP and verify .release/SHA256SUMS.txt before distributing it.
Layouts and layout files saved by earlier releases remain readable; query
builder state is not persisted between sessions.

v2.3.0 — Readable estate layouts

Choose a tag to compare

@ikelaiah ikelaiah released this 18 Sep 10:04

ProcFlow v2.3.0 — Readable estate layouts

Released as the v2.3.0 layout-quality milestone. The ERD page now arranges a
whole estate so relationships are traceable, not just placed.

Highlights

  • Auto arrange on first parse. A freshly parsed schema starts in the
    deterministic layered layout. Reset to declaration order is one click
    away, and any drag, restore, or import keeps manual positions.
  • Port-anchored orthogonal routing. Edges leave the referenced card at the
    row of the foreign-key column and enter the referencing card at its column
    row. Paths are orthogonal, travel through the card-free gutters between
    layout columns, and use band corridors plus an outer vertical channel for
    edges that span multiple bands. Gutters are clamped under compact spacing so
    a path never enters a neighbor column.
  • Card-safe by construction. Structured routing is used whenever the layout
    came from Auto arrange or the declaration-order default; manual layouts fall
    back to the best-effort orthogonal router. Verified zero path/card
    intrusions on the DB2 sample, a 300-table chain, and a sampled 800-table
    chain.
  • Stronger crossing reduction. Median sweeps alternate with a monotonic
    adjacent-transpose pass that only accepts swaps which reduce crossings;
    crossing counts use inversion counting and are reported in the Layout status
    line (for example Auto-arranged 12 entities · 0 crossings · LR).
  • Direction and spacing. Layout → Direction supports Auto / Left→right /
    Top→bottom
    ; Auto keeps whichever direction fits a 16:9 viewport better.
    Layout → Spacing adds Compact / Normal / Roomy presets that scale all
    gaps deterministically (DB2 sample: 1780×656 compact vs 2114×824 roomy).
  • Pinning. A diamond in each card header pins its position; Auto arrange
    keeps pinned cards exactly and shifts unpinned cards deterministically to
    avoid overlaps. Unpin all clears them; Reset clears pins with the
    layout.
  • Downstream banding. Isolated tables and views without declared sources
    move to their own downstream band instead of crowding the root column.

Accuracy and limits

  • Auto arrange remains a deterministic near-optimal layout, not a
    minimum-crossing guarantee; arbitrary schema graphs can still cross.
  • Structured (card-safe) routing applies to left-to-right layouts; top-to-bottom
    layouts use the best-effort orthogonal router.
  • Hub fan-outs use staggered gutters that read as a bundle; a single shared
    trunk with branch stubs is still future work.
  • Layouts are UI state and do not affect the SQL analysis, Mermaid export, or
    the workspace snapshot.

Verification

The final local verification recorded for this release includes:

  • npm run typecheck, npm run build, npm run test:file, and
    npm run metrics passing;
  • golden browser assertions on tests/index.html passing (220/220), including
    the v2.3.0 fixtures for orientation, crossings, pinning, spacing presets,
    banding, and a 300-table overlap check (35/35 schema suite);
  • 31/31 UI interaction checks and the hostile-input security suite passing;
  • ERD smoke checks: DB2 sample 5/5 orthogonal routes with 0 intrusions; a
    300-table chain 300/300 routes with 0 intrusions; a sampled 800-table chain
    200 paths with 0 intrusions; pin held across an LR→TB re-arrange; first-parse
    auto-arrange with 0 crossings reported;
  • runtime archive structure and local-file startup smoke passing
    (procflow-v2.3.0.zip).

Upgrade and distribution

The runtime is self-contained. Use npm run package:runtime to produce the
versioned ZIP and verify .release/SHA256SUMS.txt before distributing it.
Layouts, workspaces, and layout files saved by earlier releases remain
readable.