Repository navigation
FU — EmuFramework v1.2.0
FU — EmuFramework v1.2.0
Summary
This framework update makes localization, Data Entities, navigation, and attachments fully usable from the screens: Recent navigation replaces Favorites, the Designer gains Translation, Data Entity, and Data Entity Extension editors, apps declare a default language, framework screens ship in English and Thai, and image attachments can be previewed on desktop and mobile.
Improvements
- Navigation switches from Favorites to an always-visible Recent list that keeps the ten most recent unique authorized menu items per user and moves reopened items to the top. The Favorites API and stored data remain for compatibility; star buttons and the Favorites root are removed from the UI.
- Recent ordering becomes deterministic with millisecond timestamps that always exceed the user's previous maximum, so openings within the same second keep a stable order, and a failing history write never blocks navigation.
- App manifests gain an optional
defaultLocale(BCP-47, canonicalized withIntl.getCanonicalLocales, defaulten), editable as "Default language" in the Designer. - Label translation resolves per key: exact user locale → its base language → the owner app's
defaultLocale→ that locale's base → the stored label. Partial translations only affect the keys they cover, and the user locale is never rewritten automatically. - The framework ships read-only system Translations (
FW_UiEn,FW_UiTh) covering screen titles, buttons, placeholders, and help texts for the shell, home, attachments, System Maintenance, and the Designer chrome;t()reads them reactively. GET /api/metadataaddslocale,availableLocales, resolveduiMessages, and per-appdefaultLocale/availableLocales. The user menu language dropdown is built fromavailableLocaleswithIntl.DisplayNameslabels, is disabled while switching, keeps routes, open records, and unsaved form state, and offers Retry when the preference is saved but texts fail to reload.- For one key and locale, Translations resolve by layer
SYS → ISV → LOC → DEV → CUSwith artifact-name tie-breaks, so results never depend on file load order; duplicate keys and keys without a live target are reported to the Designer,ui.*keys are reserved for the framework, and cross-app resources require a declared app dependency. - The Designer adds a Translation editor whose target list is generated by the same key builders as the runtime resolver (search, untranslated filter, read-only resource keys, stale-key warnings, empty cell means "do not override"), plus structured Data Entity and Data Entity Extension editors with Core validation as the final judge.
- New
dataEntityExtensionmetadata kind appends root fields, new lines, or extra fields on existing lines. Root table, business key, line relationships, and archive settings can never change through an extension; import, export, archive, and restore read the merged entity, and archives created before an extension still restore (missing fields follow import defaults; a new mandatory field without a default fails clearly and keeps the archive). PATCH /api/me/localecanonicalizes tags (th-th→th-TH) and rejects invalid tags with errors naming the field.- System Maintenance splits Storage Overview from Archive Policy: labeled usage rows with human-readable sizes, per-mount filesystem capacity ("Unknown" instead of zero), storage paths, approximate per-App usage notes, a labeled backup component dropdown, unsaved-policy guards, an hourly-scheduler warning, and confirmation with entity/cutoff/batch before manual archive runs.
- Attachments gain
GET /api/attachments/:attachmentId/previewfor PNG and JPEG with file-signature verification, inline disposition,X-Content-Type-Options: nosniff,Cache-Control: private, no-store, and streaming. The client shows lazy thumbnails and a responsive viewer (Escape closes on desktop with focus restore; mobile fits the viewport with 44 px touch targets and keeps browser zoom). Header and line attachments both support preview; PDF, Office, text, note, and URL attachments keep their existing display.
Breaking changes and migration
None. All metadata kinds, properties, and API additions are additive. Apps, metadata packages, attachments, and user data from 1.1.0 load unchanged, and no database schema migration is required. Favorites rows and API are retained even though the UI no longer shows them.
Upgrade notes
Create a full backup and update the application and updater images together to 1.2.0. After restart, set each app's Default language in the Designer if it should not be English, then create Translations from the Designer's New menu. Existing translations keep working; consider canonicalizing locale tags in file-based apps to th-TH style on your own schedule (runtime accepts either form).
Validation
Version consistency (pnpm check:versions), release-policy tests, core/server/client type checking, all automated tests (core, server, and client suites), production builds, and pnpm check:release -- --tag 1.2.0 --previous 1.1.0 pass on the release branch. Upgrade from 1.1.0 was verified for existing apps, metadata packages, attachments, and user data.
Known issues
Business data values, executable script code, technical identifiers, and raw server error messages are not translated. Long-tail Designer strings beyond the framework ui.* catalog remain English. The archive scheduler still checks hourly and cannot be pinned to an exact run time, and archived data is retained without automatic purge. Only PNG and JPEG attachments are previewable.