@lowdefy/docs-content 6.1.0 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/content/actions/downloadcsv.md +1 -1
- package/content/actions/emailotpsend.md +58 -0
- package/content/actions/emailotpverify.md +79 -0
- package/content/actions/getlocalstorage.md +43 -0
- package/content/actions/link.md +47 -1
- package/content/actions/login.md +25 -5
- package/content/actions/logout.md +7 -5
- package/content/actions/magiclinkverify.md +117 -0
- package/content/actions/pdfmake.md +2 -2
- package/content/actions/posthogalias.md +29 -0
- package/content/actions/posthogcapture.md +49 -0
- package/content/actions/posthogcapturepageleave.md +38 -0
- package/content/actions/posthogfeatureflag.md +50 -0
- package/content/actions/posthoggroup.md +37 -0
- package/content/actions/posthogidentify.md +54 -0
- package/content/actions/posthoginit.md +96 -0
- package/content/actions/posthogoptin.md +29 -0
- package/content/actions/posthogoptout.md +29 -0
- package/content/actions/posthogpageview.md +37 -0
- package/content/actions/posthogreloadfeatureflags.md +47 -0
- package/content/actions/posthogreset.md +28 -0
- package/content/actions/posthogsetpersonproperties.md +36 -0
- package/content/actions/removelocalstorage.md +28 -0
- package/content/actions/resetvalidation.md +7 -3
- package/content/actions/setdarkmode.md +3 -3
- package/content/actions/setglobal.md +2 -0
- package/content/actions/setlocale.md +1 -1
- package/content/actions/setlocalstorage.md +34 -0
- package/content/actions/validate.md +7 -4
- package/content/adapter-reference/mongodbauthadapter.md +46 -0
- package/content/agents/agent-endpoint-tools.md +24 -0
- package/content/agents/agent-properties.md +13 -3
- package/content/agents/agent-server-hooks.md +1 -1
- package/content/agents/agentchat.md +43 -7
- package/content/agents/agentconversations.md +42 -8
- package/content/agents/agents-introduction.md +107 -0
- package/content/callback-reference/auth0logoutcallback.md +54 -0
- package/content/concepts/ai-agent-docs.md +455 -106
- package/content/concepts/blocks.md +150 -0
- package/content/concepts/connections-and-requests.md +402 -0
- package/content/concepts/custom-html.md +42 -0
- package/content/concepts/custom-styling.md +50 -5
- package/content/concepts/dynamic-page-content.md +309 -0
- package/content/concepts/events-and-actions.md +154 -2
- package/content/concepts/four-primitives.md +31 -0
- package/content/concepts/html-attributes.md +293 -0
- package/content/concepts/i18n.md +8 -3
- package/content/concepts/keyboard-shortcuts.md +2 -2
- package/content/concepts/layout-overview.md +1 -1
- package/content/concepts/logger.md +99 -0
- package/content/concepts/lowdefy-api.md +1319 -0
- package/content/concepts/lowdefy-schema.md +136 -3
- package/content/concepts/menus.md +8 -7
- package/content/concepts/module-authoring.md +76 -5
- package/content/concepts/modules.md +3 -1
- package/content/concepts/notifications.md +180 -0
- package/content/concepts/operators.md +7 -0
- package/content/concepts/page-and-app-state.md +252 -0
- package/content/concepts/page-paths.md +209 -0
- package/content/concepts/theming.md +582 -0
- package/content/connections/aigateway.md +375 -0
- package/content/connections/anthropic.md +169 -2
- package/content/connections/awss3.md +178 -2
- package/content/connections/axioshttp.md +181 -0
- package/content/connections/google.md +169 -2
- package/content/connections/mongodb.md +1014 -3
- package/content/connections/openai-connection.md +169 -2
- package/content/connections/sendgridmail.md +2 -0
- package/content/connections/smtp.md +3 -1
- package/content/connections/treg.md +329 -0
- package/content/container-blocks/affix.md +47 -7
- package/content/container-blocks/alert.md +76 -24
- package/content/container-blocks/badge.md +100 -24
- package/content/container-blocks/box.md +9 -9
- package/content/container-blocks/card.md +132 -27
- package/content/container-blocks/carousel.md +60 -7
- package/content/container-blocks/collapse.md +153 -9
- package/content/container-blocks/configprovider.md +35 -13
- package/content/container-blocks/confirmmodal.md +69 -23
- package/content/container-blocks/content.md +62 -98
- package/content/container-blocks/descriptions.md +45 -4
- package/content/container-blocks/drawer.md +139 -28
- package/content/container-blocks/dropdownmenu.md +119 -31
- package/content/container-blocks/flex.md +40 -62
- package/content/container-blocks/footer.md +15 -11
- package/content/container-blocks/googlemapsheatmap.md +1 -1
- package/content/container-blocks/googlemapsscript.md +2 -2
- package/content/container-blocks/header.md +71 -36
- package/content/container-blocks/label.md +34 -7
- package/content/container-blocks/layout.md +52 -34
- package/content/container-blocks/masonry.md +17 -71
- package/content/container-blocks/mobilemenu.md +131 -88
- package/content/container-blocks/modal.md +161 -26
- package/content/container-blocks/pageheadermenu.md +138 -31
- package/content/container-blocks/pagesidebarlayout.md +230 -27
- package/content/container-blocks/pagesidermenu.md +153 -43
- package/content/container-blocks/popover.md +34 -31
- package/content/container-blocks/result.md +32 -21
- package/content/container-blocks/sider.md +85 -122
- package/content/container-blocks/span.md +7 -7
- package/content/container-blocks/spinner.md +3 -3
- package/content/container-blocks/splitter.md +150 -68
- package/content/container-blocks/tabs.md +64 -12
- package/content/container-blocks/tooltip.md +22 -46
- package/content/container-blocks/watermark.md +22 -4
- package/content/controls/parallel_for.md +21 -2
- package/content/controls/reject.md +24 -3
- package/content/controls/return.md +17 -1
- package/content/controls/throw.md +1 -0
- package/content/controls/try.md +4 -2
- package/content/controls/while.md +46 -0
- package/content/deployment/deployment-environments.md +10 -7
- package/content/deployment/docker.md +22 -7
- package/content/deployment/node-server.md +4 -0
- package/content/deployment/vercel.md +17 -6
- package/content/display-blocks/aggrid.md +36 -19
- package/content/display-blocks/anchor.md +16 -15
- package/content/display-blocks/avatar.md +57 -37
- package/content/display-blocks/breadcrumb.md +70 -21
- package/content/display-blocks/button.md +93 -19
- package/content/display-blocks/calendar.md +12 -0
- package/content/display-blocks/clickablehtml.md +239 -0
- package/content/display-blocks/dangeroushtml.md +1 -1
- package/content/display-blocks/difflist.md +1 -1
- package/content/display-blocks/difftimeline.md +1 -1
- package/content/display-blocks/divider.md +64 -3
- package/content/display-blocks/dropdownbutton.md +81 -30
- package/content/display-blocks/echart.md +35 -1
- package/content/display-blocks/eventlog.md +363 -0
- package/content/display-blocks/floatbutton.md +129 -42
- package/content/display-blocks/html.md +61 -1
- package/content/display-blocks/icon.md +250 -67
- package/content/display-blocks/img.md +2 -2
- package/content/display-blocks/menu.md +146 -73
- package/content/display-blocks/message.md +38 -124
- package/content/display-blocks/notification.md +94 -222
- package/content/display-blocks/paragraph.md +59 -9
- package/content/display-blocks/pollingtimer.md +263 -0
- package/content/display-blocks/progress.md +96 -17
- package/content/display-blocks/qrcode.md +19 -4
- package/content/display-blocks/s3download.md +1 -1
- package/content/display-blocks/search.md +19 -9
- package/content/display-blocks/skeletonbutton.md +1 -0
- package/content/display-blocks/skeletoninput.md +1 -0
- package/content/display-blocks/statistic.md +75 -17
- package/content/display-blocks/steps.md +58 -25
- package/content/display-blocks/table.md +2527 -0
- package/content/display-blocks/tablelight.md +621 -0
- package/content/display-blocks/tag.md +102 -17
- package/content/display-blocks/title.md +50 -11
- package/content/display-blocks/tour.md +33 -23
- package/content/input-blocks/autocomplete.md +81 -9
- package/content/input-blocks/buttonselector.md +45 -8
- package/content/input-blocks/captcha.md +40 -0
- package/content/input-blocks/checkboxselector.md +97 -7
- package/content/input-blocks/checkboxswitch.md +33 -3
- package/content/input-blocks/colorselector.md +63 -14
- package/content/input-blocks/daterangeselector.md +165 -45
- package/content/input-blocks/dateselector.md +139 -41
- package/content/input-blocks/datetimeselector.md +158 -49
- package/content/input-blocks/inputgallery.md +3 -3
- package/content/input-blocks/intentinput.md +207 -0
- package/content/input-blocks/monthselector.md +120 -52
- package/content/input-blocks/multipleselector.md +150 -39
- package/content/input-blocks/numberinput.md +98 -12
- package/content/input-blocks/pagination.md +70 -14
- package/content/input-blocks/paragraphinput.md +51 -37
- package/content/input-blocks/passwordinput.md +60 -6
- package/content/input-blocks/phonenumberinput.md +59 -26
- package/content/input-blocks/placesautocomplete.md +319 -0
- package/content/input-blocks/radioselector.md +83 -7
- package/content/input-blocks/ratingslider.md +57 -26
- package/content/input-blocks/s3uploadbutton.md +24 -24
- package/content/input-blocks/s3uploaddragger.md +3 -3
- package/content/input-blocks/s3uploadphoto.md +5 -5
- package/content/input-blocks/segmentedselector.md +72 -32
- package/content/input-blocks/selector.md +109 -21
- package/content/input-blocks/switch.md +65 -17
- package/content/input-blocks/tableinput.md +445 -0
- package/content/input-blocks/tagmultipleselector.md +114 -0
- package/content/input-blocks/tagselector.md +114 -0
- package/content/input-blocks/textarea.md +32 -3
- package/content/input-blocks/textinput.md +70 -29
- package/content/input-blocks/tiptapinput.md +1 -1
- package/content/input-blocks/tiptapmentioninput.md +2 -2
- package/content/input-blocks/titleinput.md +39 -12
- package/content/input-blocks/treeinput.md +49 -25
- package/content/input-blocks/treemultipleselector.md +127 -10
- package/content/input-blocks/treeselector.md +97 -9
- package/content/input-blocks/upload.md +64 -15
- package/content/input-blocks/uploaddragger.md +17 -1
- package/content/input-blocks/uploadphoto.md +18 -1
- package/content/input-blocks/weekselector.md +120 -55
- package/content/learn/introduction.md +27 -0
- package/content/learn/quickstart.md +53 -0
- package/content/list-blocks/controlledlist.md +24 -15
- package/content/list-blocks/list.md +11 -11
- package/content/list-blocks/masonrylist.md +7 -34
- package/content/migration/auth-upgrade.md +337 -0
- package/content/migration/upgrade-guide.md +1 -0
- package/content/migration/v3-to-v4.md +417 -0
- package/content/migration/v6-to-v7.md +620 -0
- package/content/operators/_agent.md +155 -0
- package/content/operators/_app.md +2 -1
- package/content/operators/_array.md +122 -1
- package/content/operators/_build.md +1 -0
- package/content/operators/_credential.md +57 -0
- package/content/operators/_cron.md +292 -0
- package/content/operators/_date.md +2 -0
- package/content/operators/_error.md +24 -1
- package/content/operators/_get.md +6 -6
- package/content/operators/_hmac.md +78 -0
- package/content/operators/_js.md +2 -1
- package/content/operators/_location.md +1 -1
- package/content/operators/_media.md +13 -0
- package/content/operators/_module.md +56 -2
- package/content/operators/_operator.md +17 -3
- package/content/operators/_path_params.md +82 -0
- package/content/operators/_ref.md +258 -0
- package/content/operators/_request.md +1 -1
- package/content/operators/_request_details.md +6 -0
- package/content/operators/_type.md +14 -3
- package/content/operators/_url_query.md +2 -0
- package/content/operators/_user.md +3 -3
- package/content/plugins/plugins-actions.md +10 -0
- package/content/plugins/plugins-connections.md +25 -0
- package/content/plugins/plugins-dev.md +66 -0
- package/content/plugins/plugins-icon-sets.md +267 -0
- package/content/plugins/plugins-introduction.md +27 -1
- package/content/plugins/plugins.md +19 -0
- package/content/plugins/posthog.md +359 -0
- package/content/provider-reference/auth-js-providers.md +107 -0
- package/content/provider-reference/openidconnectprovider.md +44 -0
- package/content/recipes/recipes.md +16 -0
- package/content/reference/actions-reference.md +31 -0
- package/content/reference/blocks-reference.md +35 -0
- package/content/reference/cli.md +403 -0
- package/content/reference/connections-reference.md +23 -0
- package/content/reference/operators-reference.md +47 -0
- package/content/reference/reference.md +16 -0
- package/content/reference/schema-reference.md +12 -0
- package/content/testing/config-tests.md +677 -0
- package/content/testing/e2e-configuration.md +31 -1
- package/content/testing/e2e-getting-started.md +1 -1
- package/content/testing/e2e-introduction.md +1 -1
- package/content/testing/e2e-writing-tests.md +12 -1
- package/content/testing/explore-pull-request.md +136 -0
- package/content/testing/journey-data-sets.md +326 -0
- package/content/tutorial/tutorial-actions-operators.md +2 -2
- package/content/tutorial/tutorial-add-blocks.md +2 -2
- package/content/tutorial/tutorial-create-page.md +48 -2
- package/content/tutorial/tutorial-display-data-page.md +3 -3
- package/content/tutorial/tutorial-requests-api.md +155 -0
- package/content/tutorial/tutorial-requests-sql.md +153 -0
- package/content/tutorial/tutorial-start.md +66 -1
- package/content/user-authentication/auth-configuration.md +267 -0
- package/content/user-authentication/auth-providers.md +24 -0
- package/content/user-authentication/auth-steps.md +141 -0
- package/content/user-authentication/login-and-logout.md +160 -8
- package/content/user-authentication/mcp-oauth.md +424 -0
- package/content/user-authentication/organizations.md +246 -0
- package/content/user-authentication/protected-pages-apis.md +97 -0
- package/content/user-authentication/roles.md +49 -0
- package/content/user-authentication/two-factor.md +229 -0
- package/content/user-authentication/user-object.md +58 -0
- package/content/user-authentication/users-introduction.md +8 -0
- package/content/websockets/websocket-publish.md +105 -0
- package/content/websockets/websocket-subscriptions.md +136 -0
- package/content/websockets/websockets-introduction.md +101 -0
- package/hazards.json +44 -0
- package/index.json +3691 -14
- package/package.json +11 -1
- package/scripts/collectImportedFiles.js +80 -0
- package/scripts/extractAgentDocs.js +41 -30
- package/scripts/hashDocSources.js +38 -0
- package/scripts/isRedirectPage.js +26 -0
- package/scripts/recordSourceHashes.js +100 -0
- package/scripts/resolvePageSections.js +42 -0
- package/scripts/sectionKind.js +27 -0
- package/content/concepts/cli.md +0 -223
- package/content/other/introduction.md +0 -39
- package/content/other/next-auth-providers.md +0 -3
- /package/content/{other → actions}/updatesession.md +0 -0
|
@@ -0,0 +1,620 @@
|
|
|
1
|
+
# Version 6 to Version 7
|
|
2
|
+
|
|
3
|
+
This guide covers every breaking change between Lowdefy v6 and v7 that an app or plugin author has to act on. Most apps need three things:
|
|
4
|
+
|
|
5
|
+
- **Node.js 24.** The CLI and servers no longer run on Node.js 22.
|
|
6
|
+
- **The upgrade command.** `npx lowdefy upgrade` runs the v7 codemods: `react-icons-to-lucide` rewrites icon names, `clickable-html-data-events` adds `dataEvents` to `ClickableHtml` blocks, and `nested-event-bubbling` adds `bubble: true` where nested events depend on each other. The rest of this guide covers what the codemods don't change.
|
|
7
|
+
- **The auth migration, if the app has `auth`.** NextAuth is replaced by BetterAuth, which has its own guide: [Auth Upgrade](/auth-upgrade). This guide covers only the auth changes outside that one.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx lowdefy upgrade
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Summary of breaking changes
|
|
14
|
+
|
|
15
|
+
| Change | Impact | Action |
|
|
16
|
+
| -------------------------------------------------------------- | ----------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
|
17
|
+
| Node.js 24 is the minimum | All apps | Upgrade Node.js, and change `FROM node:22-slim` to `node:24-slim` in Dockerfiles |
|
|
18
|
+
| NextAuth is replaced by BetterAuth | Apps with `auth` | Follow [Auth Upgrade](/auth-upgrade) |
|
|
19
|
+
| With `auth.email`, production needs a pinned public URL | Apps that send auth emails | Set `BETTER_AUTH_URL` or the environment's `url` |
|
|
20
|
+
| The client address comes from the connection | Self-hosted apps behind a proxy | List the proxy in `config.trustedProxies` |
|
|
21
|
+
| react-icons names are not built in | Almost every app | Run `lowdefy upgrade`, or install the compatibility set |
|
|
22
|
+
| An unknown icon name fails the build | Apps with old or misspelled names | Fix the name the error names |
|
|
23
|
+
| Block and Ant Design icons are Lucide | All apps | None; check screens that depend on the old look |
|
|
24
|
+
| `theme.icons.aliases` targets are Lucide names | Apps with aliases | Drop the `Lu` prefix: `LuReceipt` becomes `Receipt` |
|
|
25
|
+
| Icon hover titles come from the new names | Apps that show Icon block hover titles | Set `title` where the text matters |
|
|
26
|
+
| Events no longer bubble to outer blocks | Apps with clickable blocks inside clickable blocks or AgGrid rows | Run `lowdefy upgrade`, or set `bubble: true` on the inner event |
|
|
27
|
+
| A declared `payloadSchema` is enforced on every caller | Apps whose endpoints declare `payloadSchema` | Fix the callers or the schema |
|
|
28
|
+
| Webhook endpoints must be listed in `auth.api.public` | Apps with webhook endpoints | Add each webhook endpoint id to `auth.api.public` |
|
|
29
|
+
| Webhooks run untrusted until a verifier passes | Webhooks that call protected endpoints | Add a `webhook.verify` request |
|
|
30
|
+
| Webhooks answer plain JSON with set statuses | Webhook senders that read the response | Check dates, errors and `:reject` answers |
|
|
31
|
+
| A detached `CallApi` runs as the user who started it | Detached runs of protected endpoints started by users | Make sure the user may call the target endpoint |
|
|
32
|
+
| Module endpoints and agents need a signed-in caller | Apps with auth that call them signed out | List them in `auth.api.public` to keep them public |
|
|
33
|
+
| Auth refusals keep their error class in the browser | `catch` actions that check `_error.name` | Branch on the refusal's class, not `ActionError` |
|
|
34
|
+
| A refused signed-in caller gets `403`, a wrong method `405` | Outside callers that check status codes | Handle `403` and `405` |
|
|
35
|
+
| HTTP 429 is a `ServiceError` | `catch` and `:catch` that check `RequestError` | Check `ServiceError`, or `statusCode` `429` |
|
|
36
|
+
| MongoDB driver errors are `ServiceError`s | Code that reads the driver's error message | Read `code` and `hint` instead |
|
|
37
|
+
| `_if` without `test` fails the build | Apps with a malformed `_if` | Add `test` |
|
|
38
|
+
| A `CallMethod` to a missing block fails production builds | Apps with stale `CallMethod` targets | Fix the `blockId` |
|
|
39
|
+
| An invalid `payloadSchema` or schedule payload fails the build | Apps with endpoint schemas or `schedules` | Fix the schema or the schedule's `payload` |
|
|
40
|
+
| `_operator` names read at runtime need a list | Apps with a runtime `_operator` name | List the operators it may call in `operators` |
|
|
41
|
+
| Dynamic blocks render only written blocks | Apps returning stored blocks as data | Use a policy with `ValidateDynamic` |
|
|
42
|
+
| Escaped keys in Dynamic data keep their underscores | Apps that read `_typename`-style keys from Dynamic data | Read the key with both underscores |
|
|
43
|
+
| `ClickableHtml` fires only listed data events | Apps that use `data-event` | Run `lowdefy upgrade`, or list the events in `dataEvents` |
|
|
44
|
+
| `RenderNotification` `landingPage` is a page id | Apps with a notification landing page | Pass the landing page's id, not its path |
|
|
45
|
+
| A `system` message in AI `messages` is refused | AI requests that build system messages into `messages` | Move it to `system`, or set `allowSystemInMessages: true` |
|
|
46
|
+
| Files the server downloads for AI calls are limited | AI calls with `http:`, private or large file links | Use public `https:` links, or raise `fileDownload` |
|
|
47
|
+
| AI calls are cancelled at the request timeout | Synchronous routines with long AI calls | Use `async: true` |
|
|
48
|
+
| Agent hook payloads follow AI SDK 7 | Agent hooks that read the event payload | Check the fields the hook reads |
|
|
49
|
+
| Cross-origin websocket upgrades are refused | Apps behind a proxy or CDN that rewrites `Host` | Forward the original `Host`, or set `X-Forwarded-Host` |
|
|
50
|
+
| Websockets close with code `4401` when the session changes | Apps with websocket subscriptions and auth | None; check subscriptions after sign-out or an organization switch |
|
|
51
|
+
| Change stream subscriptions run the `read` check | Connections with `read: false` used for `MongoDBChangeStream` | Remove `read: false` from the connection |
|
|
52
|
+
| Block links accept only safe schemes | Apps with `href`s on other schemes | Use an allowed scheme or a relative URL |
|
|
53
|
+
| `Pagination` events report the correct `skip` | Apps that corrected `_event: skip` | Remove the correction |
|
|
54
|
+
| Block properties that were ignored now apply | Apps that set them | Check the pages that set them |
|
|
55
|
+
| `ColorSelector` clears to `null` | Apps that read a cleared colour | Handle `null` |
|
|
56
|
+
| `PhoneNumberInput` renders as a compact group | Apps with CSS for its addon, or `addonBg` | Update the CSS, and use `selectorBg` |
|
|
57
|
+
| `TitleInput` and `ParagraphInput` show no edit icon | Apps that rely on the pencil icon | Set `editable.icon` |
|
|
58
|
+
| Vercel functions check environment guards | Vercel apps with `guards` | Make the runtime variables match the build's |
|
|
59
|
+
| Server-side Sentry runs on Vercel | Vercel apps with `SENTRY_DSN` | None; set `logger.sentry.server: false` to turn it off |
|
|
60
|
+
| The agent MCP server is renamed `lowdefy` | Projects set up with `lowdefy agent-setup` | Rerun `lowdefy agent-setup` |
|
|
61
|
+
| `lowdefy dev` uses the port you set or fails | Scripts that set a port that may be taken | Free the port, or set another |
|
|
62
|
+
| `@lowdefy/e2e-utils` doesn't reuse a running server | e2e runs against `pnpm e2e:server` | Set `LOWDEFY_E2E_REUSE_SERVER=true` |
|
|
63
|
+
| Generated servers are their own pnpm workspace | Apps inside a pnpm workspace | Remove `.lowdefy/*` from the parent's `pnpm-workspace.yaml` |
|
|
64
|
+
| `react-icons` is not a server dependency | Plugins that import `react-icons` | Render `components.Icon` with a name, or add `react-icons` to the plugin |
|
|
65
|
+
| Block plugins should pin `antd@6.6.5` | Block plugins that import `antd` | Pin `antd@6.6.5` |
|
|
66
|
+
| Blocks must declare the types they run themselves | Block plugins that register their own actions or operators | List them in `meta.actions` and `meta.operators` |
|
|
67
|
+
| `createIcon` takes an object | Code that calls `createIcon` from `@lowdefy/client` | Pass `{ icons, loadAllIcons }` |
|
|
68
|
+
|
|
69
|
+
## Node.js 24
|
|
70
|
+
|
|
71
|
+
Lowdefy v7 needs Node.js 24 or later. The CLI refuses to start on an older version, and the CLI and servers declare `"node": ">=24"` in `engines`.
|
|
72
|
+
|
|
73
|
+
- **Docker.** `lowdefy init-docker` now writes a Dockerfile on `node:24-slim`. In a Dockerfile written by an earlier version, change every `FROM node:22-slim` line to `FROM node:24-slim`.
|
|
74
|
+
- **Vercel.** The build output declares the `nodejs24.x` function runtime. Set the project's Node.js version to 24 so the install and build steps run on it too.
|
|
75
|
+
- **CI.** Run builds and tests on Node.js 24.
|
|
76
|
+
|
|
77
|
+
## Auth
|
|
78
|
+
|
|
79
|
+
Apps with an `auth` block move from NextAuth to BetterAuth. `@lowdefy/plugin-next-auth` and `@lowdefy/plugin-auth0` are removed. Follow [Auth Upgrade](/auth-upgrade) for providers, sessions, hooks, auth pages and the user object. The next section covers the auth changes that apply whichever login methods the app uses: the pinned auth URL, the client address and the email link pages.
|
|
80
|
+
|
|
81
|
+
## Auth links and client addresses
|
|
82
|
+
|
|
83
|
+
These changes affect apps with auth. See [Auth Upgrade](/auth-upgrade), [Auth configuration](/auth-configuration) and [Deploy with Docker](/docker#behind-a-reverse-proxy).
|
|
84
|
+
|
|
85
|
+
- **Pinned auth URL.** With `auth.email` configured, the production server refuses to start unless `BETTER_AUTH_URL` or the current environment's `url` in `config.environments` is set, so emailed auth links cannot take their host from a request. The dev server is unchanged.
|
|
86
|
+
- **Client address.** The server takes the client address for auth rate limits, sessions and request logs from the connection, and reads `X-Forwarded-For` only from the proxies listed in `config.trustedProxies`. Behind a reverse proxy or load balancer, list it there; otherwise every client shares the proxy's rate limits. On Vercel nothing changes.
|
|
87
|
+
- **Email link pages.** `SignUp` and `SendVerificationEmail` without a `callbackUrl` send the verification link to `auth.authPages.verifyEmail` (default `/verify-email`), not the home page. `RequestPasswordReset` without `redirectTo` sends the reset link to `auth.authPages.resetPassword` (default `/reset-password`). The build warns when the app sends these emails and the page does not exist.
|
|
88
|
+
|
|
89
|
+
## Icon names
|
|
90
|
+
|
|
91
|
+
An icon name has one of three forms:
|
|
92
|
+
|
|
93
|
+
- **Semantic:** `edit`, `delete`, `chevron-down`. Built-in names for common jobs. [Theming](/theming) lists them all.
|
|
94
|
+
- **Lucide:** `Pencil`, `CreditCard`. The PascalCase name from [lucide.dev/icons](https://lucide.dev/icons).
|
|
95
|
+
- **Qualified:** `lucide:Pencil`. A name in a named [icon set](/plugins-icon-sets).
|
|
96
|
+
|
|
97
|
+
```yaml
|
|
98
|
+
# v6
|
|
99
|
+
- id: delete_button
|
|
100
|
+
type: Button
|
|
101
|
+
properties:
|
|
102
|
+
title: Delete
|
|
103
|
+
icon: AiOutlineDelete
|
|
104
|
+
- id: card_icon
|
|
105
|
+
type: Icon
|
|
106
|
+
properties:
|
|
107
|
+
name: AiOutlineCreditCard
|
|
108
|
+
|
|
109
|
+
# v7
|
|
110
|
+
- id: delete_button
|
|
111
|
+
type: Button
|
|
112
|
+
properties:
|
|
113
|
+
title: Delete
|
|
114
|
+
icon: delete
|
|
115
|
+
- id: card_icon
|
|
116
|
+
type: Icon
|
|
117
|
+
properties:
|
|
118
|
+
name: CreditCard
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Run the codemod
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
npx lowdefy upgrade
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
The v7 phase includes the `react-icons-to-lucide` codemod. It rewrites icon names as text, so it reaches:
|
|
128
|
+
|
|
129
|
+
- YAML, Nunjucks (`.njk`) and JSON config
|
|
130
|
+
- single-quoted names in `_js` code
|
|
131
|
+
- string literals and `meta.icons` in local plugin code
|
|
132
|
+
- `theme.icons.aliases` targets
|
|
133
|
+
|
|
134
|
+
Each old name maps to a semantic name where one fits, otherwise to a Lucide name. `Lu*` names drop the prefix (`LuPencil` becomes `Pencil`). The table lives in `@lowdefy/codemods` at `v7-0-0/react-icons-to-lucide.json`, and the build uses the same table for its error suggestions.
|
|
135
|
+
|
|
136
|
+
The codemod reports what it cannot decide for you:
|
|
137
|
+
|
|
138
|
+
- **Judgement calls**, where the closest Lucide glyph differs from the old one.
|
|
139
|
+
- **Known losses**: filled variants (`AiFillStar`), brand icons such as WhatsApp, and Word and PDF file glyphs. Lucide has no equivalents.
|
|
140
|
+
- **Runtime icon names**: icon properties set from `_state`, `_payload` or `_request`. The codemod does not change data. Use the compatibility set for names stored in a database.
|
|
141
|
+
|
|
142
|
+
## Build errors for old names
|
|
143
|
+
|
|
144
|
+
A literal icon name at an icon property that resolves to nothing fails the build. An old react-icons name gets a migration message:
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
Icon "AiOutlineDelete" is a react-icons name. Lowdefy 7 uses Lucide icons.
|
|
148
|
+
Use "delete" (or "Trash"). To keep react-icons names, install @lowdefy/icons-react-icons
|
|
149
|
+
and set theme.icons.set: react-icons. Run `lowdefy upgrade` to migrate names automatically.
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Old Ant Design names such as `HomeOutlined` get the same message, pointing at their semantic name. In v6 these names drew nothing, so the error may show icons that were missing all along.
|
|
153
|
+
|
|
154
|
+
An icon property is a key ending in `icon` (`icon`, `prefixIcon`, `suffixIcon`, ...), its `name` field, the Icon block's `name`, a `data-icon` attribute in HTML, and `theme.icons.aliases` and `theme.icons.include`. Names inside an operator are bundled but not checked. An unknown name that reaches the page at runtime draws a red `icon-missing` icon.
|
|
155
|
+
|
|
156
|
+
## Keep old names: the compatibility set
|
|
157
|
+
|
|
158
|
+
`@lowdefy/icons-react-icons` holds every react-icons 5.6.0 icon under its old name. Install it to keep old names working without edits, or for names stored in data:
|
|
159
|
+
|
|
160
|
+
```yaml
|
|
161
|
+
plugins:
|
|
162
|
+
- name: '@lowdefy/icons-react-icons'
|
|
163
|
+
version: '^7'
|
|
164
|
+
theme:
|
|
165
|
+
icons:
|
|
166
|
+
set: react-icons
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Old names then resolve in the compatibility set, and semantic and Lucide names still work. Block and Ant Design icons stay Lucide. Without `set: react-icons`, reach an old name with its qualified name: `react-icons:FaWhatsapp`. See [Icon Sets](/plugins-icon-sets).
|
|
170
|
+
|
|
171
|
+
## Visual changes
|
|
172
|
+
|
|
173
|
+
- **Block icons are Lucide.** Date picker calendars, input validation marks, selector arrows, the loading spinner, menu toggles and the dark mode toggle all use semantic names and draw Lucide icons.
|
|
174
|
+
- **Ant Design icons are Lucide.** Close buttons on modals, drawers, tags and alerts, alert and message status icons, collapse and menu arrows, pagination arrows, and button spinners use the same semantic names. Spin, Progress, QRCode, the Empty and Result illustrations, and the date picker panel arrows stay as Ant Design draws them.
|
|
175
|
+
- **Stroke width is a setting.** Lucide draws a 2px line on a 24px grid. Set `theme.icons.strokeWidth: 1.5` for a lighter look closer to Ant Design outline icons, or set `strokeWidth` on one icon.
|
|
176
|
+
- **Size is unchanged.** Icons default to `1em`, as before. Change it with `theme.icons.size`.
|
|
177
|
+
- **`color` and `rotate` go through CSS.** `color` colours stroke and fill icons alike, and `rotate` now turns the icon.
|
|
178
|
+
- **Hover titles change.** The Icon block's title comes from the name: `Pencil` gives "Pencil", and `more-vertical` gives "More vertical". Old names in the compatibility set give titles such as "Ai outline user". Set `title` where the text matters, or `title: ''` for none.
|
|
179
|
+
- **Icons without a title are hidden from screen readers** (`aria-hidden`).
|
|
180
|
+
|
|
181
|
+
## `theme.icons`
|
|
182
|
+
|
|
183
|
+
`theme.icons.aliases` targets are now Lucide or qualified names. The codemod rewrites them:
|
|
184
|
+
|
|
185
|
+
```yaml
|
|
186
|
+
# v6
|
|
187
|
+
theme:
|
|
188
|
+
icons:
|
|
189
|
+
aliases:
|
|
190
|
+
invoice: LuReceipt
|
|
191
|
+
include:
|
|
192
|
+
- LuFlag
|
|
193
|
+
|
|
194
|
+
# v7
|
|
195
|
+
theme:
|
|
196
|
+
icons:
|
|
197
|
+
aliases:
|
|
198
|
+
invoice: Receipt
|
|
199
|
+
include:
|
|
200
|
+
- Flag
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
`theme.icons` also has new keys: `set`, `size`, `strokeWidth` and `nonScalingStroke`. See [Theming](/theming).
|
|
204
|
+
|
|
205
|
+
## Events no longer bubble
|
|
206
|
+
|
|
207
|
+
In v6, a click on a block inside another clickable block ran the events of both: a `Button` in a clickable `Card` also opened the card. In v7 a browser event runs only the innermost block event that handles it. Once a block with actions for the event fires, the blocks around it skip that same browser event. A block without an event for the interaction, like a `Paragraph` in the card, still passes the click on to the card.
|
|
208
|
+
|
|
209
|
+
Set `bubble: true` on the inner event to also run the events of the blocks around it:
|
|
210
|
+
|
|
211
|
+
```yaml
|
|
212
|
+
# v6: clicking the button ran the button's and the card's onClick
|
|
213
|
+
- id: order_card
|
|
214
|
+
type: Card
|
|
215
|
+
events:
|
|
216
|
+
onClick:
|
|
217
|
+
- id: open_order
|
|
218
|
+
type: Link
|
|
219
|
+
params: order-detail
|
|
220
|
+
blocks:
|
|
221
|
+
- id: select_button
|
|
222
|
+
type: Button
|
|
223
|
+
events:
|
|
224
|
+
onClick:
|
|
225
|
+
- id: select_order
|
|
226
|
+
type: SetState
|
|
227
|
+
params:
|
|
228
|
+
selected: true
|
|
229
|
+
|
|
230
|
+
# v7: bubble: true keeps the card's onClick running after the button's
|
|
231
|
+
- id: order_card
|
|
232
|
+
type: Card
|
|
233
|
+
events:
|
|
234
|
+
onClick:
|
|
235
|
+
- id: open_order
|
|
236
|
+
type: Link
|
|
237
|
+
params: order-detail
|
|
238
|
+
blocks:
|
|
239
|
+
- id: select_button
|
|
240
|
+
type: Button
|
|
241
|
+
events:
|
|
242
|
+
onClick:
|
|
243
|
+
bubble: true
|
|
244
|
+
try:
|
|
245
|
+
- id: select_order
|
|
246
|
+
type: SetState
|
|
247
|
+
params:
|
|
248
|
+
selected: true
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
Inside an `AgGrid` block, clicks on a cell's buttons, links, menus, inputs, selectors, switches or selection checkbox fire only that control's event, never `onRowClick` or `onCellClick`.
|
|
252
|
+
|
|
253
|
+
The `nested-event-bubbling` codemod in `lowdefy upgrade` adds `bubble: true` only where the outer event reads a value the inner event sets, moves AgGrid row-click state setup into the cell control events that relied on it, and lists the other nested events for you to review. Most nested pairs were bugs the app worked around, like a delete button that also opened its card, and need no change. See [Events and Actions](/events-and-actions).
|
|
254
|
+
|
|
255
|
+
## Endpoints and webhooks
|
|
256
|
+
|
|
257
|
+
### `payloadSchema` is enforced
|
|
258
|
+
|
|
259
|
+
In v6 an endpoint's `payloadSchema` was only advertised to MCP clients and agents. In v7 every call checks the payload against it before the routine runs, and refuses a payload that doesn't match. There is no opt-out: an endpoint that should not validate must not declare a `payloadSchema`.
|
|
260
|
+
|
|
261
|
+
Who built the payload decides how the refusal is reported:
|
|
262
|
+
|
|
263
|
+
- **An outside caller's payload** is a `UserError`, logged as a warning. A REST call to `POST /api/endpoints/<endpointId>` answers `400` with `{ name: 'UserError', message }`, an MCP `tools/call` answers with `isError: true`, and an agent tool call gets a tool error the model can retry.
|
|
264
|
+
- **A payload the app's own config built** is a `ConfigError` with its config location, logged as a server error. That covers a page's `CallAPI`, a nested or detached `CallApi` step, a Dynamic block's endpoint, an auth or agent hook and a scheduled run's `payload`. A page's `CallAPI` fails with `_error.name: ConfigError`, a nested `CallApi` reaches the routine's `:catch`, and a detached or scheduled run fails.
|
|
265
|
+
|
|
266
|
+
The message names the endpoint and the failing location:
|
|
267
|
+
|
|
268
|
+
```
|
|
269
|
+
Payload for endpoint "create_order" does not match its payloadSchema at /quantity: must be number.
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
A common cause is a number or boolean that a page sends as a string, for example straight from a text input. Fix the caller, or loosen the schema.
|
|
273
|
+
|
|
274
|
+
An endpoint can't declare both `webhook` and `payloadSchema`, because a webhook routine receives `{ body, query, headers }`, not the schema's shape. The build fails when it finds both.
|
|
275
|
+
|
|
276
|
+
### Webhooks
|
|
277
|
+
|
|
278
|
+
In v6 a webhook endpoint ran as a trusted system context: nested `CallApi` steps to protected endpoints always passed. In v7 a webhook starts untrusted and has to earn trust.
|
|
279
|
+
|
|
280
|
+
- **List the endpoint in `auth.api.public`.** The build fails for a webhook endpoint that is not listed there, including one that is public only because no rule names it. This applies with or without app auth.
|
|
281
|
+
- **Add `webhook.verify` to call protected endpoints.** `verify` is a request that checks the sender before the routine runs. When it returns `true` or `{ verified: true }`, the routine runs as a trusted system context. When it returns anything else or throws, the endpoint answers `401` and the routine never runs. A webhook without `verify` runs untrusted throughout, so its `CallApi` steps to protected endpoints fail, as do those to module endpoints, which are protected by default.
|
|
282
|
+
|
|
283
|
+
```yaml
|
|
284
|
+
# v6
|
|
285
|
+
api:
|
|
286
|
+
- id: github-webhook
|
|
287
|
+
type: Api
|
|
288
|
+
webhook: true
|
|
289
|
+
routine:
|
|
290
|
+
# ...
|
|
291
|
+
|
|
292
|
+
# v7
|
|
293
|
+
auth:
|
|
294
|
+
api:
|
|
295
|
+
public:
|
|
296
|
+
- github-webhook
|
|
297
|
+
api:
|
|
298
|
+
- id: github-webhook
|
|
299
|
+
type: Api
|
|
300
|
+
webhook:
|
|
301
|
+
verify:
|
|
302
|
+
connectionId: github_signature
|
|
303
|
+
type: GitHubSignature
|
|
304
|
+
properties:
|
|
305
|
+
rawBody:
|
|
306
|
+
_payload: rawBody
|
|
307
|
+
signature:
|
|
308
|
+
_payload: headers.x-hub-signature-256
|
|
309
|
+
secret:
|
|
310
|
+
_secret: GITHUB_WEBHOOK_SECRET
|
|
311
|
+
routine:
|
|
312
|
+
# ...
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
The verifier's `_payload` is `{ body, rawBody, query, headers }`. Use `rawBody` for signature checks.
|
|
316
|
+
|
|
317
|
+
Webhook responses change too:
|
|
318
|
+
|
|
319
|
+
- **Plain JSON.** A date in the `:return` value arrives as an ISO string, not `{ "~d": 1767323045000 }`, and an error as its message fields, not `{ "~e": ... }`.
|
|
320
|
+
- **Statuses.** A `:reject` without `:status` answers `400` with `{ error: { code: 'rejected', message } }`. A failed `ValidateSchema` step answers `400` (`invalid_request`), a failed verifier `401` (`unauthorized`), and any other error `500` (`internal_error`) with nothing from the error. A routine that succeeds still answers `200` with its return value.
|
|
321
|
+
|
|
322
|
+
Set `:status` (400 to 499) and `:body` on a `:reject` to choose the answer. See [Lowdefy APIs](/lowdefy-api).
|
|
323
|
+
|
|
324
|
+
### Detached `CallApi` runs as the user who started it
|
|
325
|
+
|
|
326
|
+
In v6 a `CallApi` step with `detached: true` always ran its target as system. In v7 the detached run carries the identity of the run that started it, and checks the target endpoint's `auth` as a synchronous call would. A detached run that a user started fails when that user may not call the target endpoint. Runs started by a schedule, an auth hook or a verified webhook still run as system.
|
|
327
|
+
|
|
328
|
+
### Module endpoints and agents are protected by default
|
|
329
|
+
|
|
330
|
+
In an app with auth, an API endpoint or agent that a module ships needs a signed-in caller, unless the module lists it as public in its manifest (`auth.api.public` for endpoints, `auth.agents.public` for agents) or the app makes it public with `auth.api.public: true` or a `public` list that names it. An app endpoint with no `auth.api` rule stays public, but a module endpoint does not.
|
|
331
|
+
|
|
332
|
+
This covers `CallApi` steps too: a public app endpoint, or a webhook without `verify`, that calls a module endpoint is refused when the caller is signed out. To keep a module endpoint or agent public, list its id in the app's `auth.api.public`. Apps without auth are unchanged.
|
|
333
|
+
|
|
334
|
+
## Error classes
|
|
335
|
+
|
|
336
|
+
A few failures now have a different error class or HTTP status. Update `catch` actions and routine `:catch` blocks that check `_error.name`, and outside callers that check status codes.
|
|
337
|
+
|
|
338
|
+
- **Auth refusals keep their class in the browser.** When a `Request` or `CallAPI` is refused, `_error.name` (and `_actions.<id>.error.name`) is the refusal's class: `AuthenticationError` (signed out, `401`), `AuthorizationError` (missing role, `403`), `TwoFactorEnrolmentRequiredError` (`403`), or `UserError` for a `400`. In v6 all of these were `ActionError`. The message still shows and `catch` actions still run, but the error logs to the browser console only.
|
|
339
|
+
- **A refused signed-in caller gets `403`.** A request, endpoint, agent or websocket that refuses a signed-in caller answers `403` with an `AuthorizationError`. In v6 an endpoint refused for a missing role answered `500` with a "does not exist" error.
|
|
340
|
+
- **A wrong HTTP method gets `405`**, not `500`.
|
|
341
|
+
- **HTTP 429 is a `ServiceError` on every connection**, not a `RequestError`. Its `statusCode` is `429` and `retryAfter` holds the service's `Retry-After` value. A check on `_error.statusCode` keeps working.
|
|
342
|
+
- **MongoDB driver errors are `ServiceError`s.** Every `MongoDBCollection` request maps a driver failure to a `ServiceError` whose message names the collection and the operation, whose `code` is the MongoDB error code, and whose `hint` says what to do. The driver's own message no longer reaches the browser, because it can quote values from the document. It stays in the server log.
|
|
343
|
+
|
|
344
|
+
## Build checks
|
|
345
|
+
|
|
346
|
+
These checks fail builds that v6 accepted. Each points at the config location.
|
|
347
|
+
|
|
348
|
+
- **`_if` without `test`.** An `_if` whose params are an object without a `test` key, such as `_if: { _eq: [1, 1], then: a, else: b }`, fails the build. In v6 it failed at runtime with `_if takes a boolean type for parameter test`. Params that are one operator, such as `_if: { _state: if_params }`, still pass. Silence the check on a node with `~ignoreBuildChecks: [if-test]`.
|
|
349
|
+
- **`CallMethod` to a missing block.** A `CallMethod` whose literal `blockId` names no block on the page warns in dev and fails production builds. Pages with Dynamic blocks are not checked. Silence it with `~ignoreBuildChecks: [callmethod-refs]`.
|
|
350
|
+
- **Endpoint `payloadSchema`.** A `payloadSchema` that is not valid JSON Schema fails the build, as does a `schedules` entry whose `payload` doesn't match its endpoint's schema.
|
|
351
|
+
- **Webhooks.** A webhook endpoint not listed in `auth.api.public`, or one that also declares `payloadSchema`, fails the build. See Webhooks above.
|
|
352
|
+
|
|
353
|
+
## `_operator` names read at runtime
|
|
354
|
+
|
|
355
|
+
An `_operator` whose `name` is read at runtime (from state, a request, a payload or `__args`) must list the operators it may call in `operators`, or the build fails. The build loads exactly those operators with the page, so the call works on a direct page load, and `_operator` refuses any other name. A literal `name`, and the literal branches an `_if` or `_switch` returns, need no list.
|
|
356
|
+
|
|
357
|
+
```yaml
|
|
358
|
+
# v6
|
|
359
|
+
_operator:
|
|
360
|
+
name:
|
|
361
|
+
_state: aggregation
|
|
362
|
+
params:
|
|
363
|
+
_state: values
|
|
364
|
+
|
|
365
|
+
# v7
|
|
366
|
+
_operator:
|
|
367
|
+
name:
|
|
368
|
+
_state: aggregation
|
|
369
|
+
operators:
|
|
370
|
+
- _sum
|
|
371
|
+
- _product
|
|
372
|
+
params:
|
|
373
|
+
_state: values
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
## Blocks returned as data by a Dynamic endpoint
|
|
377
|
+
|
|
378
|
+
A `Dynamic` block without a dynamic blocks policy renders only the blocks and actions its endpoint writes in its `:return` config. Block config the endpoint reads as data (a database record, routine state, a nested endpoint's result) and returns as it is now renders the block's fallback, even when it holds no operators. Data can still fill values in written blocks, for example by mapping stored fields into blocks with `_array.map`.
|
|
379
|
+
|
|
380
|
+
To render stored or generated block config, declare a [dynamic blocks policy](/dynamic-page-content#dynamic-blocks-policies) that lists what the content may use, put it on the `Dynamic` block, and return the content through a `ValidateDynamic` step with the same policy:
|
|
381
|
+
|
|
382
|
+
```yaml
|
|
383
|
+
- id: check
|
|
384
|
+
type: ValidateDynamic
|
|
385
|
+
properties:
|
|
386
|
+
policy: stored_content
|
|
387
|
+
blocks:
|
|
388
|
+
_step: get_record.blocks
|
|
389
|
+
- :return:
|
|
390
|
+
blocks:
|
|
391
|
+
_step: check.blocks
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
### Escaped keys in Dynamic data
|
|
395
|
+
|
|
396
|
+
A Dynamic endpoint writes client operators with an extra underscore (`__state`), so the server leaves them for the page to run. In 6.1 the server stripped one underscore from every key that started with `__`, data included, so GraphQL's `__typename` reached the page as `_typename`. In v7 only operator keys lose the underscore. Data keys pass through unchanged:
|
|
397
|
+
|
|
398
|
+
```yaml
|
|
399
|
+
- :return:
|
|
400
|
+
blocks:
|
|
401
|
+
- id: orders
|
|
402
|
+
type: Table
|
|
403
|
+
properties:
|
|
404
|
+
data:
|
|
405
|
+
_step: get_orders # rows like { __typename: Order, id: 42 }
|
|
406
|
+
|
|
407
|
+
# v6: the rows reached the block with a _typename key
|
|
408
|
+
# v7: the rows reach the block with a __typename key
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
Config that read such a key by its 6.1 name, `_typename`, has to use the original name, `__typename`. Data read into a Dynamic `:return` may also nest at most 200 levels deep. Deeper data fails resolution with an error that says so.
|
|
412
|
+
|
|
413
|
+
## `ClickableHtml` data events
|
|
414
|
+
|
|
415
|
+
A `ClickableHtml` block now fires only the events its `dataEvents` property lists. A `data-event` whose name is not listed does nothing and logs a console warning, and a block without `dataEvents` fires no events from its HTML. HTML is often built from request or user data, and sanitising keeps `data-*` attributes, so in v6 markup inside that data could fire any event the block declared.
|
|
416
|
+
|
|
417
|
+
```yaml
|
|
418
|
+
# v6
|
|
419
|
+
- id: rows
|
|
420
|
+
type: ClickableHtml
|
|
421
|
+
properties:
|
|
422
|
+
html: '<i data-icon="delete" data-event="onDelete" data-id="42" data-confirm="Delete?"></i>'
|
|
423
|
+
|
|
424
|
+
# v7
|
|
425
|
+
- id: rows
|
|
426
|
+
type: ClickableHtml
|
|
427
|
+
properties:
|
|
428
|
+
dataEvents:
|
|
429
|
+
- name: onDelete
|
|
430
|
+
confirm: true
|
|
431
|
+
html: '<i data-icon="delete" data-event="onDelete" data-id="42" data-confirm="Delete?"></i>'
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
An entry is an event name, or `{ name, confirm }`: with `confirm`, every click on the event asks first, whatever the markup says. The `clickable-html-data-events` codemod in `lowdefy upgrade` adds `dataEvents` to each block and reports HTML built from data that inserts values without escaping them. It only reaches the app's files: add `dataEvents` yourself to `ClickableHtml` blocks that [dynamic page content](/dynamic-page-content) builds at page load, for example from config stored in a database. See [HTML attributes](/html-attributes).
|
|
435
|
+
|
|
436
|
+
## `RenderNotification` landing page
|
|
437
|
+
|
|
438
|
+
`properties.landingPage` on a `RenderNotification` step names the landing page by its id, or as `{ pageId, pathParams }` when the page's `path` has placeholders. The step builds the landing URL from the page's path like any other notification link. A value that names no page, such as the v6 path string, fails the step with an error that says to pass the page id.
|
|
439
|
+
|
|
440
|
+
```yaml
|
|
441
|
+
# v6
|
|
442
|
+
- id: render
|
|
443
|
+
type: RenderNotification
|
|
444
|
+
properties:
|
|
445
|
+
landingPage: /notifications/link
|
|
446
|
+
|
|
447
|
+
# v7
|
|
448
|
+
- id: render
|
|
449
|
+
type: RenderNotification
|
|
450
|
+
properties:
|
|
451
|
+
landingPage: notifications-link
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
See [Lowdefy APIs](/lowdefy-api).
|
|
455
|
+
|
|
456
|
+
## AI requests and agents
|
|
457
|
+
|
|
458
|
+
The AI plugins move to AI SDK 7. Lowdefy's own config is unchanged apart from the points below.
|
|
459
|
+
|
|
460
|
+
### System messages in `messages`
|
|
461
|
+
|
|
462
|
+
`GenerateText` and `GenerateObject` refuse a `role: system` message in `messages` unless the request sets `allowSystemInMessages: true`. A message list built from user input (`_payload`, `_state`) could otherwise carry a system turn the model treats as the app's own instructions. Put the system prompt in `system`:
|
|
463
|
+
|
|
464
|
+
```yaml
|
|
465
|
+
# v6
|
|
466
|
+
- id: summarise
|
|
467
|
+
type: GenerateText
|
|
468
|
+
connectionId: claude
|
|
469
|
+
properties:
|
|
470
|
+
messages:
|
|
471
|
+
- role: system
|
|
472
|
+
content: Summarise the ticket in one line.
|
|
473
|
+
- role: user
|
|
474
|
+
content:
|
|
475
|
+
_payload: ticket
|
|
476
|
+
|
|
477
|
+
# v7
|
|
478
|
+
- id: summarise
|
|
479
|
+
type: GenerateText
|
|
480
|
+
connectionId: claude
|
|
481
|
+
properties:
|
|
482
|
+
system: Summarise the ticket in one line.
|
|
483
|
+
messages:
|
|
484
|
+
- role: user
|
|
485
|
+
content:
|
|
486
|
+
_payload: ticket
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
If the system message is written in your own config and has to stay in `messages`, set `allowSystemInMessages: true`. Never set it for messages that come from a user.
|
|
490
|
+
|
|
491
|
+
### Files the server downloads
|
|
492
|
+
|
|
493
|
+
When the model doesn't take a file in `messages` as a link (a CSV or text file on most providers, most files on Google), the server downloads it. `GenerateText`, `GenerateObject` and agents now limit that download:
|
|
494
|
+
|
|
495
|
+
- Only an `https:` link to a public address is downloaded. The address is checked after DNS resolution and on every redirect, so `http:` links and links to private or internal addresses fail.
|
|
496
|
+
- A file is capped at 20 MB and 30 seconds by default. Raise the limits with `fileDownload: { maxBytes, timeout }` (bytes and milliseconds) on the request or agent.
|
|
497
|
+
|
|
498
|
+
### Calls are cancelled at the request timeout
|
|
499
|
+
|
|
500
|
+
An AI call is cancelled when the request that started it closes: when `config.requestTimeout` answers first, or, on the Node server, when the client disconnects. In v6 a synchronous routine kept running, and billing, after its request timed out. A call stopped by the timeout fails with a `ServiceError`, and one stopped because the client left fails with a `UserError`. Endpoints with `async: true`, detached runs and agent chat turns are not cancelled with their request, so move work that takes longer than `config.requestTimeout` into an `async: true` endpoint.
|
|
501
|
+
|
|
502
|
+
### Agent hook payloads
|
|
503
|
+
|
|
504
|
+
Agent hooks keep their names, but the event payloads passed to `onStart`, `onStepStart`, `onToolCallStart`, `onToolCallFinish` and `onStepFinish` now follow AI SDK 7's event shapes. Check any hook endpoint that reads fields from them.
|
|
505
|
+
|
|
506
|
+
## Websockets
|
|
507
|
+
|
|
508
|
+
- **Cross-origin upgrades are refused.** `/api/websocket` accepts an upgrade only when its `Origin` matches the `Host` it arrived on, the first `X-Forwarded-Host`, or the app's public URL (`BETTER_AUTH_URL`, the current environment's `url`, or an auth trusted origin). A request with no `Origin`, such as a server or script, is accepted. Any other upgrade gets a `403`. Behind a proxy or CDN, forward the original `Host` or set `X-Forwarded-Host`.
|
|
509
|
+
- **Connections follow the session.** The server checks the caller again before every subscribe and at least once a minute. When the user signs out, the session ends, the membership is removed, the roles change or the user switches organization, the server closes the connection with code `4401`. The client reconnects at once as the current caller and resubscribes. A subscription the new caller may not hold fails, as it would on a freshly loaded page.
|
|
510
|
+
- **Change streams run the connection `read` check.** A connection with `read: false` refuses a `MongoDBChangeStream` subscription, as it refuses read requests. Remove `read: false` from a connection used for change streams.
|
|
511
|
+
|
|
512
|
+
## Blocks
|
|
513
|
+
|
|
514
|
+
### Link schemes
|
|
515
|
+
|
|
516
|
+
A block `href` is used only when it is a relative path, a query, a fragment, or uses one of these schemes: `http`, `https`, `ftp`, `ftps`, `mailto`, `tel`, `callto`, `sms`, `cid`, `xmpp` or `matrix`. Any other value, including one with leading whitespace or control characters, renders no link. This covers `Button`, `Tag` and `FloatButton`, table and AgGrid link cells, `AgentChat` links, Tiptap mention links, and every `href` given to Lowdefy's `Link` component. A `Link` with a refused `href` doesn't fall back to its `pageId` or `url`, and the `Link` action throws "Invalid Link: no target resolved."
|
|
517
|
+
|
|
518
|
+
### `Pagination` `skip`
|
|
519
|
+
|
|
520
|
+
The `onChange` and `onSizeChange` events of `Pagination` passed a `skip` one page too high (`current * pageSize`). They now pass `(current - 1) * pageSize`, the same as the block value in state. Remove any correction the app applied:
|
|
521
|
+
|
|
522
|
+
```yaml
|
|
523
|
+
# v6
|
|
524
|
+
skip:
|
|
525
|
+
_subtract:
|
|
526
|
+
- _event: skip
|
|
527
|
+
- _event: pageSize
|
|
528
|
+
|
|
529
|
+
# v7
|
|
530
|
+
skip:
|
|
531
|
+
_event: skip
|
|
532
|
+
```
|
|
533
|
+
|
|
534
|
+
Apps that read `skip` from the block value in state are not affected.
|
|
535
|
+
|
|
536
|
+
### Properties that now apply
|
|
537
|
+
|
|
538
|
+
These properties were accepted but had no effect in v6. They now work, so pages that set them may look or behave differently:
|
|
539
|
+
|
|
540
|
+
- **Page blocks:** `class`, `loading` and `skeleton` set on the page block.
|
|
541
|
+
- **Layout:** `layout.align` sets the vertical alignment of a block's content area. In v6 it was dropped, with a console warning, unless `layout.selfAlign` was also set.
|
|
542
|
+
- **`theme`:** on `Layout`, `Sider`, `PageHeaderMenu` and `PageSiderMenu`, and on `AutoComplete`, `ColorSelector`, `Search`, `Label`, `ConfirmModal` and `ConfigProvider`. `TreeSelector` and `TreeMultipleSelector` now apply the selector tokens.
|
|
543
|
+
- **`Menu`:** an inline `Menu` with `collapsed: true` outside a `Sider` collapses, and the `item` style applies.
|
|
544
|
+
- **`Sider`:** the collapse trigger toggles the sider.
|
|
545
|
+
- **CSS keys:** `Tabs` `tabBar`, `tabPane` and `inkBar`; the `menu` key of `DropdownButton` and `DropdownMenu`; the `profileMenu` and `localeSelectorMenu` keys of `Header` and the page layouts; `Modal` `header`, `footer` and `content`; and the `Popover` keys.
|
|
546
|
+
- **Other:** `Pagination` `showTotal: false` hides the total, `Tour` `gap: { x, y }` applies, a `Notification` `button` closes the notification, and `ConfirmModal` fires `onClose`.
|
|
547
|
+
|
|
548
|
+
### `ColorSelector`
|
|
549
|
+
|
|
550
|
+
Clearing the colour sets the value to `null`. In v6 it was the last colour with zero alpha, such as `#1677ff00`. A cleared `ColorSelector` with `required: true` now fails validation. In gradient mode the value is a `linear-gradient(...)` CSS string.
|
|
551
|
+
|
|
552
|
+
### `PhoneNumberInput`
|
|
553
|
+
|
|
554
|
+
The region selector and the input are siblings in an `.ant-space-compact` group, not an `.ant-input-group-addon`. The `ldf-phone-number-input` class and `element` style stay on the outer wrapper, but CSS that targets `.ant-input-group-addon` or `.ant-input-group-wrapper` needs updating. The `addonBg` theme token no longer applies; use `selectorBg`.
|
|
555
|
+
|
|
556
|
+
### `TitleInput` and `ParagraphInput`
|
|
557
|
+
|
|
558
|
+
Both now edit in place and show no edit icon by default. Set `editable.icon` to bring one back:
|
|
559
|
+
|
|
560
|
+
```yaml
|
|
561
|
+
- id: title
|
|
562
|
+
type: TitleInput
|
|
563
|
+
properties:
|
|
564
|
+
editable:
|
|
565
|
+
icon: edit
|
|
566
|
+
```
|
|
567
|
+
|
|
568
|
+
Expanding a `ParagraphInput` ellipsis fires `onExpand`, not `onCopy`.
|
|
569
|
+
|
|
570
|
+
## Vercel
|
|
571
|
+
|
|
572
|
+
The function entry that `lowdefy vercel-output` writes now starts the same way as the Node server. Redeploy to pick it up.
|
|
573
|
+
|
|
574
|
+
- **Environment guards are checked.** `config.environments.<name>.guards` run when a function starts. A deployment whose runtime variables differ from the build's, for example one built with `vercel build` and deployed with `--prebuilt` or `--env`, now fails every request with the guard error instead of serving with the wrong variables. See [Deployment Environments](/deployment-environments).
|
|
575
|
+
- **Server-side Sentry runs.** With `SENTRY_DSN` set, server errors now reach Sentry from Vercel functions, where v6 only logged them. It reports errors only; set `logger.sentry.serverTracing: true` to trace requests, or `logger.sentry.server: false` to turn server reporting off.
|
|
576
|
+
|
|
577
|
+
## Dev tools and coding agents
|
|
578
|
+
|
|
579
|
+
- **The MCP server is renamed `lowdefy`.** It was `lowdefy-docs`, so its tools are now `mcp__lowdefy__*`. Rerun `lowdefy agent-setup`: it replaces the `lowdefy-docs` entry in `.mcp.json` with a `lowdefy mcp` entry that names no port, and renames the server in `.claude/settings.json` and `.claude/settings.local.json`, including tool permission rules. Update any other place that names `mcp__lowdefy-docs__` tools, such as hooks. The `--port` option of `agent-setup` is removed. The dev server's `/lowdefy-docs` routes are unchanged.
|
|
580
|
+
- **`lowdefy dev` uses the port you set.** A port set with `--port`, `PORT` or `cli.port` is used, or the command fails when it is taken. In v6 it moved to the next free port. Only the default port 3000 still moves.
|
|
581
|
+
- **`@lowdefy/e2e-utils` no longer reuses a running server by default.** A server left on the port could serve an old build. Set `LOWDEFY_E2E_REUSE_SERVER=true` to reuse one, for example after `pnpm e2e:server`, and `LOWDEFY_E2E_PORT` to run on another port. A reused server must be this app's own e2e build, or the run stops with an error.
|
|
582
|
+
- **Generated servers are their own pnpm workspace.** `lowdefy dev`, `build`, `emails` and `test` give the server in `.lowdefy/` its own `pnpm-workspace.yaml` and lockfile, carrying over the parent workspace's settings. If the app sits inside a pnpm workspace, remove the `.lowdefy/*` globs from the parent's `pnpm-workspace.yaml` `packages`. If the parent's patches only apply to the servers, also set `allowUnusedPatches: true` there.
|
|
583
|
+
|
|
584
|
+
## Plugins
|
|
585
|
+
|
|
586
|
+
Blocks no longer import icons from `react-icons` or `@ant-design/icons`, and the Lowdefy server no longer installs `react-icons`. A local block plugin should render icons by name with `components.Icon`, and list the names it uses in its `meta.icons`, so apps can restyle them:
|
|
587
|
+
|
|
588
|
+
```js
|
|
589
|
+
// v6
|
|
590
|
+
import { AiOutlineDelete } from 'react-icons/ai';
|
|
591
|
+
<AiOutlineDelete />;
|
|
592
|
+
|
|
593
|
+
// v7
|
|
594
|
+
<components.Icon blockId={`${blockId}_delete`} events={events} properties="delete" />;
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
A plugin that must keep importing `react-icons` adds it to its own `dependencies`.
|
|
598
|
+
|
|
599
|
+
### antd version
|
|
600
|
+
|
|
601
|
+
Lowdefy v7 uses antd 6.6.5, Ant Design X 2.9.0 and `@ant-design/icons` 6.3.4. A block plugin that imports from `antd` directly should pin `antd@6.6.5`, so the app keeps one copy of antd.
|
|
602
|
+
|
|
603
|
+
### Declare the actions and operators a block runs
|
|
604
|
+
|
|
605
|
+
Production pages now load only the blocks, actions, operators and icons they use. A block that runs actions or operators for events it registers itself, the way `PageHeaderMenu` runs `SetLocale` from its locale selector, must list them in its `meta`. Otherwise, on a page that doesn't use those types anywhere else, they are not loaded, and the action fails with `Invalid action type`:
|
|
606
|
+
|
|
607
|
+
```js
|
|
608
|
+
MyHeader.meta = {
|
|
609
|
+
category: 'container',
|
|
610
|
+
actions: ['SetDarkMode', 'SetLocale'],
|
|
611
|
+
operators: ['_event'],
|
|
612
|
+
icons: [],
|
|
613
|
+
};
|
|
614
|
+
```
|
|
615
|
+
|
|
616
|
+
The dev server still loads every type, so this shows up only in production builds.
|
|
617
|
+
|
|
618
|
+
### `createIcon`
|
|
619
|
+
|
|
620
|
+
`createIcon` in `@lowdefy/client` takes `{ icons, loadAllIcons }` instead of the icon map on its own.
|