Skip to content

Add CRUD relationship UI#47

Merged
eviltester merged 1 commit into
masterfrom
codex/44-crud-relationship-ui
Jul 15, 2026
Merged

Add CRUD relationship UI#47
eviltester merged 1 commit into
masterfrom
codex/44-crud-relationship-ui

Conversation

@eviltester

Copy link
Copy Markdown
Owner

Summary

  • add a standalone thingifier-crud-ui Maven module for a single-user in-memory CRUD workspace
  • support YAML model loading, dynamic /api/* forwarding, import/export, OpenAPI docs, and Swagger UI
  • add relationship-aware outline navigation plus connect-existing, inline create-and-connect, and relationship-edge removal controls

Verification

  • node --check thingifier-crud-ui/src/main/resources/public/assets/app.js
  • mvn -pl thingifier-crud-ui -am test
  • mvn spotless:check
  • mvn -pl thingifier-crud-ui -DskipTests checkstyle:check@project-fqn-check
  • mvn -pl thingifier-crud-ui -am -DskipTests package
  • manual browser smoke on http://localhost:4568/ for connect existing, inline create-and-connect, remove relationship edge, and target instance preservation

Closes #44

Copilot AI review requested due to automatic review settings July 15, 2026 11:23

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 c02cf59 into master Jul 15, 2026
3 checks passed
@eviltester eviltester deleted the codex/44-crud-relationship-ui branch July 15, 2026 11:25

@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: 2dd259a4fb

ℹ️ 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".

for (Map.Entry<?, ?> field : instance.entrySet()) {
body.put(String.valueOf(field.getKey()), field.getValue());
}
String oldId = stringValue(body.get(entity.primaryKeyFieldName()));

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 Normalize exported IDs before recording remaps

When an exported workspace has auto-increment IDs with gaps (for example, create two projects, delete the first, then export), the entity id from entities is parsed by Gson as a numeric 2.0 here, while the relationship edge still contains the string id "2" produced by exportRelationships. That stores the remap under project|2.0, so relationship import misses it and posts to the stale /projects/2/... in the fresh workspace, causing the import to fail or restore edges to the wrong record. Normalize the old id the same way relationship ids are serialized before using it as the importedIdentifiers key.

Useful? React with 👍 / 👎.

Comment on lines +36 to +38
WorkspaceSnapshot snapshot = workspace.replaceWithYaml(schemaYaml);
Map<String, String> importedIdentifiers = importEntities(document, snapshot);
importRelationships(document, workspace.snapshot(), importedIdentifiers);

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 Keep failed imports from replacing the live workspace

For imports with a valid schemaYaml but malformed entities/relationships, or with an entity/relationship POST that fails, this replaces and closes the current workspace before any of the rest of the document is validated or fully applied. The controller then returns a 400, but the user's previous in-memory data has already been discarded and the server may be left with a partially imported workspace; build and validate/import into a temporary workspace and swap it in only after the whole import succeeds.

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.

Add a CRUD UI which support relationships

2 participants