Pre-alpha. No tagged release and no upgrade path between versions. Use for evaluation and development only, not production.
Core DevPre-alpha

Arch JSON pipeline

SWC never parses view XML in the browser. The Go kernel parses arch once per request and returns JSON that SWC components consume directly.

Flow

sys.view arch (XML)
    → parser.ParseViewFromArch (view_xml.go)
    → swcmeta.SerializeView (arch.go)
    → GET /web/swc/workspace JSON payload
    → WorkspaceRouter → ListView / FormView / …

Request

GET /web/swc/workspace?action=12&menu_id=5&view_type=form&id=7&edit=1&q=acme
Query paramPurpose
actionWindow action id (optional if model is set)
menu_idMenu context
view_typelist, form, kanban, …
idRecord id (form)
edit1 for edit mode
qList/kanban search filter
modelLoad workspace by model when action is omitted
filterNamed search-view filters (comma-separated)
sortList sort (field or -field)
offsetList page offset

Payload shape

{
  "actionId": 12,
  "menuId": "5",
  "viewType": "form",
  "model": "crm.lead",
  "recordId": 7,
  "formEdit": false,
  "csrfToken": "…",
  "arch": {
    "type": "form",
    "model": "crm.lead",
    "header": { "buttons": [], "fields": [] },
    "sheet": {
      "groups": [{ "string": "Lead", "fields": [{ "name": "name", "type": "char" }] }],
      "notebook": []
    },
    "hasChatter": true
  },
  "record": { "id": 7, "name": "Acme deal" },
  "viewTabs": [
    { "mode": "kanban", "label": "Kanban", "href": "/web?…", "active": false },
    { "mode": "list", "label": "List", "href": "/web?…", "active": false },
    { "mode": "form", "label": "Form", "href": "/web?…&id=7", "active": true }
  ],
  "listSearch": "",
  "listTotal": 0,
  "defaults": { "type": "opportunity" }
}

defaults is the window action default_* context, without the prefix. New forms and kanban quick-create merge it into the record.

Arch enrichment

swcmeta/enrichField merges ORM metadata into each arch field:

  • type, string, relation, selection from registered model metadata (struct tags → ORM)
  • required from model when not set in XML
  • Auto-generated O2M subview columns when nested is omitted

Records in the payload are ACL-redacted the same way as JSON-RPC reads.

Kanban extension

For type="kanban", the server adds grouped columns:

"kanban": {
  "groupField": "stage_id",
  "draggable": true,
  "columns": [
    { "value": 1, "label": "New", "records": [{ "id": 3, "name": "Lead A" }] }
  ]
}

Client types

TypeScript definitions: core/swc/src/types/workspace.ts (SwcWorkspacePayload, SwcArchField, SwcViewArch).

Go definitions: core/engine/swcmeta/types.go.

SPA navigation

ActionService.navigate() updates the URL and dispatches popstate. WorkspaceRouter refetches workspace JSON and swaps view components. View tabs in the breadcrumb bar sync from payload.viewTabs.

See also