Kaidris Forge docs
Kaidris Facet (SAPUI5)
Builds and fixes SAPUI5 / OpenUI5 apps: views, controllers and tests.
Preview · describes products that are not released yet; details are confirmed at release
Status
Planned · coming soon. Get notified when it is released.
Preview. Facet has not been released yet. This manual describes what it is built to do and how its output is checked. Capabilities marked planned are in development and are not part of the first release. No quality figures are published before Facet passes its release bar.
What Facet does
Facet is part of the Kaidris Forge suite. It is a coding model and agent for freestyle UI5 apps: apps written by hand with XML views and JavaScript controllers, as in SAPUI5 and its open-source core, OpenUI5. It works file by file, the way a developer does, and checks each file before it moves on.
It builds
- XML views and fragments (pages, tables, lists, forms, dialogs, value helps, toolbars, routing targets)
- controllers (event handlers, filtering, sorting, searching, dialogs, navigation, model updates)
- small modules: formatters and pure logic, written as
sap.ui.definemodules - i18n resource bundles
- tests: QUnit unit tests for modules and OPA5 journeys for the user interface, started through the UI5 Test Starter
It fixes
- an app from the error you see in the browser console or at startup (a module that does not load, a control or controller name that is wrong, a broken binding, a missing dependency)
- failing checks: linter findings and failing unit or OPA tests, one file at a time
Planned
- writing tests for an existing app, scored by how many seeded defects the tests catch
- migrating legacy code: synchronous loading (
jQuery.sap.require),jQuery.sap.helpers, globalsap.access, core-based control lookups - i18n hygiene (no hard-coded texts, no missing keys) and basic accessibility fixes (input labels, tooltips on icon-only buttons, image alternative texts, table column headers)
- apps bound to your OData V2 service, built from the service's
$metadata
Not covered
- SAP Fiori elements (List Report, Object Page, annotations-driven apps) and the SAPUI5-only libraries, such as smart controls (
sap.ui.comp) and charts. Facet is trained and checked only with the controls that OpenUI5 ships. It does not write annotations, and it should not be used to generate them. - OData V4 apps: not yet (planned later; the first OData support is V2)
- back-end code (ABAP, CDS, Gateway services) and SAP system configuration. Kaidris has separate models for ABAP and CDS.
- explaining code or writing functional specifications. If offered at all, these come as a beta feature, without any quality claim.
What Facet needs from you
- A task description: what the app or the change must do, in plain words. Name the controls, ids, routes and texts you care about. Facet keeps names you give it.
- The project skeleton:
manifest.json,Component.jsandindex.htmlof your app, or a new project created by the agent. Facet treats these as given and does not rewrite them unless you ask. - Your data shape: the JSON model's structure, or (planned) your OData service's
$metadata. Facet reads the metadata locally as a compact summary of entity sets, properties and navigation. Metadata stays on your computer. - For a fix: the file(s) involved and the exact error text or failing check, copied as it is.
Worked examples
The app names below are invented for illustration.
Example 1: "Harbor Library", a worklist with search and sort. Task: "A page with a table of the /Books entries: columns Title, Genre, Price, Copies; a search field that filters Title case-insensitively and keeps the current sort; a sort button that toggles ascending/descending by Title; the table title shows Books (N) with the rows currently shown." What Facet does: it writes the i18n texts, the view (table, header toolbar, search field, sort button), the controller (search and sort handlers, title update after each binding change), a unit test for the formatter, and an OPA journey that searches and sorts. After each file it runs the checks below and repairs what fails.
Example 2: "Fleet Desk", fixing an app from a console error. You paste: failed to load JavaScript resource: acme/fleetdesk/model/ruless.js and The following error occurred while displaying routing target with name 'worklist'. What Facet does: it finds the misspelled module path in the controller's dependency list, corrects it, and checks that the app starts with no console errors and that its tests pass.
Example 3: "Order Picker", a value help (planned: with your OData service). Task: "An input for the customer with a value help dialog that searches the Customers by name; choosing one fills the input and enables the Add button; the chosen customers appear in a list below." What Facet does: it writes the dialog fragment, the view and controller wiring, and the journeys. With your $metadata (planned), it binds to your entity set and property names instead of a sample model.
Your OData service: how Facet uses $metadata (planned)
When you set up Kaidris Forge, the setup wizard indexes your project's artefacts on your computer. For UI5 the key one is your OData V2 service's $metadata (the EDMX document: entity sets, properties, keys, navigation, function imports).
- What Facet receives: never the raw XML. The wizard renders a short, fixed-format summary of the entity sets the task is about, plus the ones their navigation points to:
Service ZSD_ORDERS_SRV (OData V2; excerpt for this task)
EntitySet Orders: Order key OrderID:Edm.String(10)
Customer:Edm.String(40) "Customer" Amount:Edm.Decimal(15,2)! "Net amount" Currency:Edm.String(5)!
nav to_Items -> OrderItems [*] nav to_Customer -> Customers [1]
FunctionImport ReleaseOrder(OrderID:Edm.String) -> Orders [POST]Types and lengths come from the metadata, ! marks a required property, quoted text is the service's own label (used for i18n texts), and [1] / [*] give the navigation's cardinality.
- Why a summary: a full
$metadatais often tens of thousands of tokens. The summary keeps what binding code needs, in a fixed size budget, and it is the same format Facet was trained on. - Privacy: the metadata is read and summarised on your computer. It is not uploaded.
- What it is for: views and controllers bind to your real entity set and property names, keys and navigation, instead of a sample model.
- Checked how: in the checks below, the app runs against a local mock of your service built from the same metadata. That shows the bindings match your service's shape. It does not test your back end's data or authorisations.
How the output is checked
Facet checks its own work with tools that run on your computer:
- the UI5 linter (open-source
@ui5/linter) for deprecated APIs, global access and other findings - a headless browser that loads the app with the OpenUI5 runtime and reports console errors and failed module loads
- the app's own QUnit and OPA5 tests, run through the UI5 Test Starter
- for the planned skills, additional static checks (i18n keys, accessibility basics), all deterministic
What this means, and what it does not:
- A passing check means the app starts, the linter is clean, and its tests pass. Tests only cover what they test. Review the result like a colleague's pull request.
- Checks run against OpenUI5 in a browser, not against your SAP system, your back end or your SAPUI5 version. Facet is not tested on SAP systems and not certified by SAP.
- The model was trained only on apps that passed these checks, and on openly licensed sample code.
Configuration
Install steps and agent commands are published separately with the release packaging. Settings you can expect to choose:
- the files Facet may change (by default, everything under
webapp/except the skeleton files) - how many repair attempts it may make per file and per app
- whether it writes tests together with the app (recommended)
Known limits
- Freestyle apps with OpenUI5 controls only; see "Not covered".
- Large apps are built file by file. Each step sees a trimmed context: names and contracts of related files, not their full source. Very large controllers can still exceed what one step handles well; split them.
- Generated tests can be weaker than hand-written ones. A passing test suite is not proof of correct behaviour.
- Facet does not call your back end. Data-dependent behaviour is checked against the data shape you provide.
- Results vary between runs. If an answer fails its checks after the repair budget, Facet reports it as failed rather than presenting it as done.
FAQ
Does Facet work with SAPUI5? It writes freestyle code with the controls that SAPUI5 and OpenUI5 share, so the output runs in SAPUI5 apps too. It does not use the SAPUI5-only libraries.
Does it build Fiori elements apps? No. See "Not covered".
Does my code or metadata leave my computer? Facet runs locally. The metadata summary is built on your computer by the setup wizard.
Does it work with OData V4 services? Not yet. The first OData support is V2.
Is the output tested on my SAP system? No. It is checked locally in a headless browser with OpenUI5, with the linter and the app's tests. Test it in your own landscape before you transport it.
Which UI5 version does it target? Current UI5 (asynchronous loading, sap.ui.define modules, no global access), checked against OpenUI5 1.153.
What if Facet cannot fix a problem? It stops after its repair budget and tells you which check still fails and why, so you can take over.
Requirements
Estimates, confirmed at release: Windows 10/11 64-bit (macOS coming) · 16 GB RAM recommended, 8 GB minimum · about 6 GB of disk for the shared base model, plus about 150 MB per model · a GPU is optional and makes it faster.