v1.8.0 — Usable local workspace (persistence + dependency filtering) - #8
Merged
Conversation
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.
PR: v1.8.0 — Usable local workspace
Summary
Implements the v1.8.0 — Usable local workspace milestone from
ROADMAP.mdin full and nothing from v1.9.0 onwards: README post-v1.0.0 item 7 — optional
local workspace persistence (opt-in, versioned, exportable) and
dependency filtering (presentation-only) — plus the updated
security/privacy documentation and the extended local-only CI check. The golden
suite grows from 206 to 207; fuzz (400) stays green; the UI suite grows from 16
to 20; workspace fixtures (13) cover save→reload identity, migration, corrupt
recovery, explicit clearing, and non-mutating filters. Catalogue rotation,
column lineage, and RDL remain deferred.
What's included
Opt-in, versioned, exportable workspace persistence
src/workspace.ts(a new runtime module loaded beforeapp.js) adds aversioned workspace schema (
WORKSPACE_SCHEMA_VERSION = 1) and theserialization/migration/storage layer:
buildWorkspaceSnapshot/serializeWorkspacecapture every input that canchange the analysis — the workspace files plus the analysis/UI options — so a
Restore reproduces an identical analysis.
parseWorkspaceperforms corrupt-state recovery: malformed or wrong-shapedstored data yields an explicit error (never a crash) so the caller drops it
and starts clean.
migrateWorkspacerepairs older/missing versions and missing option fieldsforward to the current schema with safe defaults.
readWorkspace/writeWorkspace/hasSavedWorkspace/clearWorkspaceconfine browser
localStorageaccess to this opt-in module — the only placein the runtime that touches storage.
The Workspace menu in
index.htmlexposes Save, Restore, Export file,Import file, and Forget. Everything is an explicit user action: the app never
writes to or restores from storage on load (verified by the release smoke test
and the extended local-only CI check).
Presentation-only dependency filtering
filterDependencyGraphinsrc/workspace.tsderives a filtered copy of thedependency graph at render time and never mutates the underlying estate graph
(the filtered node/edge arrays are fresh objects, and stats are left intact):
kind;app.tsapplies the filter only in the Object dependencies scope; theFilter dependencies panel is hidden elsewhere. The export (
Save draw.io/Save SVG) reflects the currently displayed (filtered) view, while theanalysis graph, confidence, coverage, and diagnostics are unchanged.
Security / privacy and local-only documentation + CI
index.htmlprivacy disclosure and README security table now describeopt-in persistence honestly: nothing is saved unless the user chooses Save,
and saved workspaces are local-only, exportable, and clearable.
scripts/file-smoke.mjs(the local-file release smoke test) now additionallyasserts the app initialises with
data-workspace-optin="1", i.e. persistenceis declared opt-in on load.
network-submission APIs and to confirm that
localStorageis only touched bysrc/workspace.ts.Fixtures and tests
tests/workspace.ts(+tests/index.html,tests/metrics.htmlwiring) — 13fixture-corpus records covering round-trip fidelity, save→reload identity,
migration (older versions and missing fields), corrupt-state recovery,
opt-in storage round-trip + explicit clear, and non-mutating filters (edge,
external, temp, focus, and no-match). Gates the golden page via
PROCFLOW_WORKSPACE_PASS.tests/ui-tests.ts— 4 new browser tests: the filter panel shows only independency scope, filtering is presentation-only in the UI, opt-in save →
restore reproduces an identical analysis, and forgetting is explicit.
tests/metrics.ts→docs/metrics-v1.8.0.json— addsworkspacePassRateand the
workspacecorpus count (13/13).examples/dbo.v180_demo.sql— a multi-object demo exercising both features.Verification
npm run typecheck— passesnpm run build— passesnpm run test:file— passes (withCHROME_PATHset; includes the newopt-in/local-only assertion)
npm run metrics— snapshot is current;docs/metrics-v1.8.0.jsoncommitted(v1.7.0 snapshot renamed)
dist/committed in syncNot changed / deferred (per roadmap)
RDL — is out of scope for this release.
green.