Skip to content

Add file-backed SQLite CRUD UI projects#62

Merged
eviltester merged 1 commit into
masterfrom
codex/52-file-backed-sqlite-crud-ui
Jul 16, 2026
Merged

Add file-backed SQLite CRUD UI projects#62
eviltester merged 1 commit into
masterfrom
codex/52-file-backed-sqlite-crud-ui

Conversation

@eviltester

Copy link
Copy Markdown
Owner

Summary

Adds file-backed SQLite storage support for CRUD UI projects and rounds out the project save/load workflow.

What Changed

  • Added direct single-file SQLite store provider support and config parsing.
  • Added storage-aware model assembly/YAML loading so CRUD UI workspaces can run in memory, SQLite memory, or SQLite file mode.
  • Extended project manifests so dataFile can point to JSON or SQLite, with SQLite autodetection for human-edited manifests.
  • Updated CRUD UI project save/load so JSON projects save data.json and SQLite projects save data.sqlite.
  • Added storage switch controls, project browse/check/load-files/export-files endpoints, and browser/native project folder flows.
  • Fixed related CRUD UI behavior discovered during smoke testing, including boolean field payloads, browser folder field feedback, server-side browse focus, and textarea rendering for unconstrained strings.
  • Added Playwright/JUnit browser automation with page/component objects for workspace, project, storage, schema, relationship, and API flows.

Validation

  • node --check thingifier-crud-ui\src\main\resources\public\assets\app.js
  • mvn -pl thingifier-crud-ui -am verify

Closes #52

Copilot AI review requested due to automatic review settings July 16, 2026 15:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@eviltester
eviltester merged commit 36e1ff5 into master Jul 16, 2026
3 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6306f7ded4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +125 to +129
private WorkspaceStorage targetStorageFor(final WorkspaceStorage currentStorage) {
if (WorkspaceStorage.MODE_SQLITE_MEMORY.equals(currentStorage.mode())) {
return WorkspaceStorage.sqliteMemory();
}
return WorkspaceStorage.memory();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve file-backed storage during schema upgrades

When a schema upgrade is applied while the workspace is using sqlite-file, this helper falls through to memory(). The upgraded workspace is then replaced with an in-memory store, so subsequent edits are no longer persisted to the project's data.sqlite and a default project save switches the project to JSON. Keep the existing SQLite file storage (or explicitly migrate it) for this mode as is already done for SQLite memory.

Useful? React with 👍 / 👎.

Comment on lines +169 to +173
private String resolvedStorageMode(final String storageMode, final String dataFile) {
String validated = validatedStorageMode(storageMode);
if (STORAGE_MEMORY.equals(validated) && looksLikeSqliteFile(dataFile)) {
return STORAGE_SQLITE_FILE;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Do not infer SQLite storage solely from the filename

A manifest that explicitly uses storage.mode: memory (or an older JSON-only manifest) with a valid JSON dataFile ending in .db, .sqlite, or .sqlite3 is forcibly reclassified as SQLite here. Project loading consequently opens JSON as SQLite rather than following the explicitly declared mode, making those valid projects unloadable. Only apply extension/header detection when storage is absent or otherwise unambiguous.

Useful? React with 👍 / 👎.

Comment on lines +2737 to +2740
await addTextProjectFile(files, directory, "projectfile.erproj", true);
await addTextProjectFile(files, directory, "schema.yaml", true);
await addTextProjectFile(files, directory, "data.json", false);
await addBinaryProjectFile(files, directory, "data.sqlite", false);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Read the manifest-selected files in browser project loads

Browser loading uploads only the default schema.yaml, data.json, and data.sqlite names. Valid manifests can select different relative schema/data filenames (including the supported dataFile: todomanager.sqlite form); load-files later resolves the manifest's filename in the temporary folder and reports it missing because this client never uploaded it. Parse the manifest first and upload its declared files, or upload the folder contents safely.

Useful? React with 👍 / 👎.

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.

file back sqllite support

2 participants