Skip to content

Serenity 10.11.0 Release Notes (2026-12-02)

These release notes detail the changes made in Serenity and StartSharp from version 10.10.0 to 10.11.0. For a complete list of changes, please refer to the Serenity Change Log.

Much of the release is about what the application keeps and shows of its own work:

  • Translations without a table for each entity. A row says that it has translations, and they live in one shared table of its database, shown in lists, lookups and dialogs.
  • A Data Explorer that browses a database. Connections, tables and views in a tree, the tables in tabs with their rows, columns and relationships, and links between the rows.
  • Widgets that finish initializing after their constructors. Forms, columns and lookups load asynchronously, and an application turns it on with one setting.
  • An audit log for the whole application. The changes of the records and the events of the accounts in one log, with a page, a History tab, and dialog addons that features use to add tabs and buttons to the dialogs of entities they don't own.
  • Sensitive tables that declare themselves. Data Explorer and the SQL data sources leave them out wherever they are added.

Translating Data Without a Table for Each Entity

Serenity could translate the data that users enter only through a localization table for each entity, e.g. ProductLang next to Products, with a row class that repeats the fields of the entity. That is a lot of ceremony for the many small tables that only have a name, like types, categories, regions or roles, so few applications translated them.

A row can now keep its translations in one shared table of its database instead:

[LookupScript, SharedLocalization(LocalizeListByDefault = true)]
public sealed class RegionRow : Row<RegionRow.RowFields>, IIdRow, INameRow
{
    [Size(50), NotNull, NameProperty, Localizable(true)]
    public string? RegionDescription { get => fields.RegionDescription[this]; set => fields.RegionDescription[this] = value; }
    // ...
}

[SharedLocalization] opts the row in, and [Localizable(true)] marks the fields to translate. There is nothing else to write: the entity dialog gets its localization tab, the translations are saved, loaded and deleted with the record, and the values are shown in the language of the user.

The region editor of a territory in Turkish, with the translated name of a region

The translations are kept in loc_DataTranslations, one row per record, field and language. The ID of a record is kept in a column of its type, so the translations of rows with integer, GUID or string IDs are compared without converting them, and one unique index guards against duplicates on every database. See Data Localization for the details.

[LocalizationRow] keeps working as before; Northwind's products and categories still use it.

In Lists, Joined Columns and Lookups

With LocalizeListByDefault, a localized field shows the translation in the language of the user, or in one of its fallback languages, e.g. de-DE and then de, or else its original value:

  • Lists take the translations in the SQL query, so sorting, filtering and the quick search work on the translated values. ListRequest.Localize still asks for a language, or for the original values with an empty string.
  • Joined columns are translated too: a field whose [Origin] is a localized field of a joined row, e.g. the region of a territory, or the category of a product. This now works for rows with [LocalizationRow] as well, which only translated their own fields before.
  • Lookups of such rows are generated and cached for each language, for both [SharedLocalization] and [LocalizationRow], so lookup editors show the translated names. Northwind's category lookup is one of them.

Code that finds a lookup item by its name would not find it in another language, so leave LocalizeListByDefault off for such a row. Its lists and lookups then keep the original values, and a list can still ask for the translations.

Rows that your own services load with connection.List are not translated on their own. DataTranslationStore.ApplyTranslations(connection, rows, DataTranslationLanguages.Current(localTextRegistry)) translates them with one query, and LocalizationRowTranslations.Apply does the same for rows with a localization table.

Translated in StartSharp

StartSharp translates the names of the roles, regions, meeting types, agenda types and business units this way. The Roles page has a Translations field in its dialog, with an input for each language, as it doesn't use an entity dialog. A dialog of your own can use the same field, createDataTranslationsField of Pro.Extensions. The Roles page now loads the role it edits or clones, instead of taking the name from the list, which may be translated.

Upgrading

The regions of the Northwind sample and the meeting types, agenda types and business units of the Meeting module now have [SharedLocalization], so an application that uses one of them needs the shared table, even if it doesn't translate anything. In DataMigrations.cs, after the line that sets options.Tags, add:

if (DataTranslationsMigration.IsNeededIn(databaseKey, typeSource, sqlConnections))
    options.Tags = [.. options.Tags, DataTranslationsMigration.Tag];

The table is created in each database that such a row is in, through the connection key fallbacks, the next time the application starts. Without it, the lists of those rows fail with a missing loc_DataTranslations table.

To translate a row of your own:

  1. Add [SharedLocalization(LocalizeListByDefault = true)] to the row and [Localizable(true)] to its fields to translate. The line above creates the table in its database too.
  2. A custom page that edits the row, rather than an entity dialog, should load the record with Retrieve and IncludeColumns: ["Localizations"] before editing it, as its list now returns translated values, which would be saved as the originals otherwise.

To translate the role names like StartSharp does, add the attributes to RoleRow.cs and its RoleName from the template, and take RolePage.ts, which loads the styles of the Translations field.

A New Data Explorer

The Data Explorer of StartSharp was a grid with a connection and a table picker in its toolbar. It is rebuilt as a database browser: the connections are a tree of their tables and views on the left, with a search, and the tables open in tabs on the right.

Data Explorer with the Orders table open, its customer and employee columns as links

  • Data shows the rows with sorting, paging, a quick search and a filter for each column. A value of a foreign key is a link that opens the row it refers to in the tab of the other table, e.g. the customer of an order.
  • Columns lists the SQL type, size, nullability and keys of each column.
  • Relationships lists the foreign keys of the table and the ones of the other tables that refer to it, each with a button that opens the other table.

The table and its filter are kept in the hash of the URL, e.g. #table/Northwind/dbo.Orders?CustomerID=ALFKI, so the Back button of the browser goes back to the table that a link came from, and a URL opens a table directly. Export CSV writes the rows that match the filters, in their order and with the visible columns, up to ExportRowLimit (100,000 by default), as UTF-8 with a BOM for the spreadsheets and with a leading apostrophe on a value that one could take as a formula. The foreign keys of a connection are kept for RelationshipCacheSeconds (300 by default), so opening a table doesn't read the schema of the connection again. A tab has a menu, like the tabs of an editor, that closes it, the others, the ones to its right or all of them.

The page stays read-only, and it runs no SQL of its own; for queries, the SQL datasets of Dashboards check the tables and columns a query uses. The columns and the relationships need no other permission than Administration:DataExplorer, as only the tables that the settings of a connection allow are named: a foreign key to or from another table is left out, and its values are not links. See Data Explorer for the settings.

More Tables Are Hidden by Default

Data Explorer hides the internal and sensitive tables of the application by default, and the SQL data sources of Dashboards protect the same ones. The tables that were added in the last versions are now among them: acc_* (account events, sessions and invitations), aud_* (audit log), cfg_* (database settings), exc_* (exception log), job_* (background jobs), loc_* (data translations) and mail_* (email queue).

If you browse one of them in Data Explorer, set UseDefaultExcludeTables to false for its connection and list what to hide in ExcludeTablesRegex; for a SQL dataset that reads one, turn the default protect rules of its connection off and copy the ones to keep into its Protect rules.

Upgrading

Nothing is needed for the page itself, as it comes with the Serenity.Pro.DataExplorer package. A page or a grid of your own that derives from DataExplorerGrid, or uses DataTableEditor or DataConnectionEditor, keeps working, but they are deprecated; DataExplorerTableGrid shows the rows of one table.

Widgets That Initialize After Their Constructors

A grid or a dialog did all its work in its constructor, which had two costs: the base constructor called the overrides of a subclass before the fields of the subclass had their values, and it couldn't wait, so columns, forms and lookups that were not loaded yet were loaded with a blocking request, which froze the page.

A widget class can now defer its initialization:

export class ProOrderGrid extends OrderGrid {
    protected override async deferredInit() {
        await super.deferredInit();
        // what the constructor did, with the fields and the columns there
    }
}

Its constructor only takes the props and the element, and the rest runs in deferredInit() once all the constructors are done, where it can wait. Grids and dialogs load their columns or form asynchronously, and the lookup editors of a dialog that defers load their lookups asynchronously too. Opening a dialog doesn't change, as loadByIdAndOpenDialog and the others wait for it.

init() still returns the widget at once, with its toolbar and view there, and initAsync() resolves when it is fully initialized, for the code that needs e.g. its quick filters:

const orderGrid = await gridPageInit(ProOrderGrid).initAsync();
orderGrid.set_shippingState(1);

A class that defers without overriding it says so with Attributes.deferInit(). true is inherited, and so is Attributes.deferInit(false), which marks a class whose constructor needs the old way. The framework classes support both, with Attributes.deferInit("optional"), which is not inherited, so their subclasses written before keep working as they did. An application whose widgets are written this way turns it on for every class that doesn't say otherwise, in its script init:

Widget.defaultDeferInit = true;

The Serene and StartSharp templates turn it on, in ScriptInit.ts and script-init/deferinit-init.ts. See Deferred Initialization.

Upgrading

  • deferRender() is removed. A widget that overrode it to return true has Attributes.deferInit() instead.
  • useAsync() is deprecated; replace the override with Attributes.deferInit(). Serene's language grid does.
  • A widget class that has a method named deferredInit or deferInit of its own gets an error when it is created; rename the method.

An application that upgrades keeps initializing its widgets in their constructors, and needs nothing else. To turn it on, take deferinit-init.ts (ScriptInit.ts in Serene), and then:

  • Move the code of a constructor that uses the form, the toolbar, the columns or an element of the widget to deferredInit(), after await super.deferredInit().
  • Code that creates a widget and uses it right away waits for it, e.g. const dialog = await new MyDialog({}).initAsync(). loadByIdAndOpenDialog and the other methods that load an entity or open a dialog wait themselves, and call their callbacks after that.
  • A page that creates a panel returns its initAsync(), like the LoginPage.tsx and SignUpPage.tsx of the templates, which also set up their forms in deferredInit().

To find the code that still uses a widget too early, look at the console in development: reading an editor of a form that isn't there yet throws an error that tells the widget is not initialized, and byId and findById warn when they find nothing before the initialization starts. A class that isn't ready can have Attributes.deferInit(false).

An Audit Log for the Whole Application (StartSharp)

The data audit log could tell what changed in a record, and the account event log who signed in, but they were two tables, two pages, and neither could show the history of a record where it was needed. They are one audit log now: the inserts, updates and deletes of the records, with the old and new values of their fields, and the events of the accounts, in the aud_Events and aud_Changes tables.

The Audit Log page

The Audit Log page lists them with a chart of the activity, filters by person, action, record and period, the failures and security events only, and a CSV export. An event shows the changes of its fields, who did it and from where, and links to the events of the same request and the record itself.

A value of a foreign key keeps the name of the record it referred to then, e.g. Federal Shipping for a shipper, so the history still reads well after the record is renamed or deleted. The names are read after the save commits, so that their queries don't hold the locks of the transaction. The lines of an order are changes of the order's event, with the name of the line, or its type and ID, e.g. Order Detail 35 · Quantity.

The History of a Record

The dialog of a logged row has a History tab:

The History tab of an order

It shows the history to the users who can read the row, or, with the new [HistoryPermission] attribute, to the ones with another permission, e.g. the managers. The record must be one the user can retrieve, so the rules of the row, e.g. of the tenants, apply to its history too.

Which Records and Fields

[DataAuditLog] still opts a row in. The AuditLog:DataAudit settings can turn it around:

"AuditLog": { "DataAudit": { "Mode": "OptOut", "Exclude": [ "Northwind.Region" ] } }

OptOut logs every row with an ID but the ones with [DataAuditLog(false)], which the logs, queues and sessions of the Pro features have, and Include and Exclude change it for some rows by entity type or table name, with * wildcards. A field can opt out with [Audited(false)], or be logged as changed without its values with [Audited(KeepValues = false)].

The AuditLog settings keep the events of the records for RetentionDays days (0, the default, keeps them; the events of the accounts keep their own retention), and KeepClientInfo: false leaves the address and the user agent of the request out. SecurityPermission (Administration:Security) guards the permission changes, HistoryPermission requires a permission besides the row's own for every history, HistoryService names the service that the History tab reads, and Enabled turns the log off.

A feature can write events of its own with IAuditLog.Write(AuditEvent): an action, a record and its changes, with the user, the address and the request filled from the current request. Write returns the ID of the event, so the value texts of its changes can be written after the transaction commits, without holding its locks. AuditActions names the usual actions.

A shared ValueChange component of the PageKit shows a change of a value: the old one struck through, an arrow, and the new one. The audit event details, the History tab and the bulk edit preview of the orders use it.

The audit log of the public demo also has made-up events: the changes of the orders and their lines, the sign-ins, the failed sign-ins, the exports and the permission changes of the last 30 days. It keeps none of where its visitors came from, as they share an account and see the log.

Upgrading

  • The account events are written to the audit log; the Audit log import background job imports the events of acc_Events and of the old DataAuditLog table, and keeps the tables.
  • DataAuditLogBehavior doesn't write while the audit log is registered, and StartSharp's navigation has the Audit Log page instead of the Data Audit Log page.
  • The Administration:AuditLog permission sees the whole log, and only a super admin can grant it.

services.AddAccountEventLog(), which StartSharp already calls, adds the audit log, and its migration creates the tables. The page and the History tab are in the template, so an application that upgrades takes them from a new StartSharp project:

  1. Add the AuditLog key to AdministrationPermissionKeys.cs.
  2. Copy the Modules/Administration/AuditLog folder, with AuditLogPage.cs, AuditLogPage.ts and AuditLogEndpoint.cs.
  3. In AdministrationNavigation.cs, replace the Data Audit Log link with one to Administration.AuditLogPage.
  4. Add script-init/dialogaddons-init.ts, and import it in script-init/index.ts, for the History tab of the dialogs.
  5. To log the changes of the users, roles and languages, add [DataAuditLog] to their rows, and [Audited(false)] to the NormalizedUsername, NormalizedEmail and TwoFactorData fields of UserRow.cs, and [DataAuditLog(false)] to UserExternalLoginRow.cs.

The Audit log import job runs by itself, and imports the old tables in parts.

See Audit Log.

Tabs and Buttons for Any Dialog

The History tab is a dialog addon: a feature can add tabs, toolbar buttons and menu items to the dialogs of entities it doesn't own. A provider on the server gives the addons of an entity type for the user, and the client adds them to every entity dialog:

yield return new DialogAddon
{
    Key = "SalesDashboard",
    Placement = DialogAddonPlacements.Button,
    Title = "Sales",
    Url = "~/Dashboards/customer-sales?f.Customer={CustomerID}"
};

A placeholder like {CustomerID} is filled from the record as it is edited, and the button is hidden until it has a value. See Dialog Addons.

Two building blocks came with them: BaseDialog.onAfterInit, raised when any dialog is initialized, and EntityDialog.onAfterLoadEntity, raised after a record is loaded, with entityType that tells the type of a dialog; addPropertyTab and activePropertyTabKey add a tab to a property grid and tell which one is active. Entity links open a record of any type from its type and ID, with canOpenEntityLink and openEntityLink on the client, as the audit log does, through providers that an application can add. A link carries the address of the page of the record as well, e.g. ~/Northwind/Order#edit/11077, so the client opens the dialog when the page has it, and goes to the page otherwise.

Sensitive Tables Declared by Their Modules

Data Explorer and the SQL data sources of the dashboards kept their own lists of the tables to leave alone, which each new module had to be added to. A module declares its tables itself now:

[assembly: SensitiveTables("acc_*", "aud_*", "mail_*")]

[SensitiveTable]
public sealed class ApiKeyRow : Row<ApiKeyRow.RowFields>, IIdRow

Both ask ISensitiveTableRegistry now. The patterns are compiled with WildcardPattern of Serenity.Net.Core, which the data audit settings use as well, and which the SQL access names of the dashboards use with ? turned off, as a table name may contain one. The extension of the data translations declares loc_*, so Data Explorer and the SQL data sources leave those tables out too. See Sensitive Tables.

Shared Button Texts

The Save, Refresh, Discard changes, Clear filters, More actions and similar buttons of the pages were each translated by every page. They are shared texts under Controls.Buttons. now (ButtonTexts), and the pages of the Pro features use them, with their translations moved over.

Resetting a Grid

The settings that a grid saves, e.g. its columns, sorting and filters, are restored on every visit, with no way back to how it was. The Restore Defaults button of the column picker has a menu with Reset All Settings now, and so does the header menu of a column. DataGrid.resetSettings() does it from code. A setting storage of your own can implement the optional removeItem; a null value is saved to one without it. See Persisting Settings.

Testing

  • Playwright settings. The Playwright section of testsettings.json, or of testsettings.machine.json next to it, which is not checked in, sets Headless, Browser, SlowMo and ExpectTimeout. HEADLESS=1 dotnet test runs a headless browser once; without any of them the browser is shown on Windows and headless elsewhere, as before.
  • One browser window. FunctionalTestBase derives from BrowserTest instead of PageTest, and its tests share a browser context, with a new page for each, so a visible browser keeps one window, and the tests run faster. The cookies, storage, permissions and pages are cleared after each test. A test class that needs a context of its own returns false from ShareContext.
  • The history of the window. getWindowHistory() joins getWindowLocation(), and the framework uses them everywhere, so a test can replace both, with windowHooks.location and windowHooks.history, e.g. with a history whose back() takes effect at once, as the one of jsdom takes effect later, in the next test.

Smaller Fixes

  • Saving a row with only an ID. Saving a WorkLog currency without changing it failed with a syntax error, as the UPDATE statement had nothing to set; the save handlers skip it.
  • Clearing a lookup while it loads. A combobox that was cleared while the texts of its value were loading, e.g. a quick filter, showed the old value again.
  • Adding an agenda type in place. The Item Type editor of a meeting agenda checked a permission literally named PermissionKeys.Management, so only users with every permission could add an agenda type from it. It checks the management permission of the meeting module now, like the meeting type editor.
  • Paging a view in Data Explorer. The rows of a table without an identity or a primary key, e.g. a view, were in no defined order, so a row could show on two pages or none. They are ordered by their first column now.
  • Discarding the changes of a group of settings. The Settings page has a Discard changes button, which puts the form back to the saved settings.
  • The bulk edit preview of the orders shows a row per changed field of an order, with the shared ValueChange component, as the History tab does, instead of all the changes in one line.
  • The check box column of the grids is 32px wide, as the check boxes are larger since they look like the ones of the forms, and the check box of its header is no longer cut off on its right.
  • JSON fields in the audit log. The data audit log kept a value of a JsonField as the name of its type; the audit log keeps its JSON.