* Improve cohost polyfill
* Apply suggestions from code review
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Move <target/> part of the polyfill to targets file.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
`core/manifests.ts` already imports and spreads `core/search/manifests.ts`
into its aggregate (line 23 + 58), so importing `searchManifests`
separately in `.storybook/preview.js` and spreading it next to
`coreManifests` registered the same manifests twice. Remove the redundant
import and spread.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PR #22957 deleted every package's `manifests.ts` and consolidated the
exports into `umbraco-package.ts`, but `.storybook/preview.js` still
imported from the old paths. The result was a Vite resolve error during
`npm run build-storybook` (first failure: "Could not resolve
../src/packages/block/manifests from .storybook/preview.js").
37 import paths swapped from `…/<pkg>/manifests` to
`…/<pkg>/umbraco-package`. The two packages that still expose their
manifests via a standalone `manifests.ts` — `core` and `core/search` —
are left untouched.
Verified by `npm run build-storybook` — succeeds.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PR #22995 added `input-tiptap.stories.ts` with an import from
`'../../manifests.js'`, but PR #22957 (already on release/17.5.0) had
deleted that file and moved the `manifests` array into
`umbraco-package.ts`. The merge into release/17.5.0 didn't catch the dead
import, so Storybook 404s on the story load.
Point the import at the new home — `manifests` is still exported by name,
so this is a one-line path fix.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Fix migration of embedded block data when blocks are direct siblings in the 13 RTE source code.
* Apply suggestions from code review to update comments.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Address review: keep RteBlockHelper in original namespace; tidy docs and comment
- Move RteBlockHelper back to Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_15_0_0.LocalLinks
to avoid a binary breaking change within the obsolete window (scheduled removal in v18).
Kept as its own file rather than reverting it into LocalLinkRteProcessor.cs.
- Add a <remarks> note on ConvertBlockUdisToKeys explaining that blocks with malformed UDIs
are dropped rather than preserved.
- Replace the opaque "fix recursive hiccup" comment in LocalLinkRteProcessor with one that
describes what the line actually does.
- Move RteBlockHelperTests back to mirror the production namespace.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Tiptap: Load enabled extensions in parallel and inline manifest APIs
Replace the for…of/await loop in umb-input-tiptap's #loadExtensions with
Promise.all over .map, so all enabled Tiptap extension APIs are fetched
in parallel. Configured-extension order in _extensions is preserved.
Inline the first-party Tiptap manifest API references: every
`api: () => import('./X.tiptap-api.js')` and the equivalent toolbar /
statusbar / kind references now use a static top-of-file import and
`api: ClassName`. The dynamic `await import('rich-text-essentials.tiptap-api.js')`
fallback in input-tiptap.element.ts is inlined for the same reason.
External (plugin-supplied) Tiptap extensions and the lazy modal/toolbar
UI element imports are unchanged.
Why: on Umbraco Cloud, opening a document workspace with a rich text
editor takes ~16 s uncached, of which ~14.6 s is a single serial
waterfall — 31 extension APIs fetched one after the other from a
for…of await loop, ~170 ms RTT stacked. Replacing the loop with
Promise.all collapses that to roughly one round-trip; eagerly bundling
the first-party manifests removes the dynamic chunk explosion that made
the waterfall so long in the first place. The toolbar APIs (~20 of them)
already load in a sub-100 ms parallel burst against the same server,
confirming HTTP/2 multiplexing handles bulk parallel requests fine.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Tiptap: Inline element references for toolbar/statusbar/modal/clipboard manifests
Extends the manifest-inlining pass to the remaining `element: () => import(...)`
and runtime API loader sites in the Tiptap package — toolbar/menu/action-button
kinds, the table & character-map & anchor modals, the colour-picker button, the
property-editor configuration UIs, both clipboard translators, the style-menu
kind, and the default toolbar API fallback in tiptap-toolbar.element.ts.
Result on the same Cloud test site (uncached, 17.5-rc):
Tiptap chunk count: 71 → 4
Total tiptap bytes: ~3.2 MB → ~3.1 MB (essentially unchanged)
Phase 5 of the load — the serial extension chain — collapses to a single
consolidated chunk fetch.
`input-tiptap.element.ts` and `property-editor-ui-tiptap.element.ts` are
intentionally not inlined into anything else: `<umb-input-tiptap>` is a public
element usable standalone (custom dashboards, workspace views), and the
property-editor shell loads via the property-editor UI loader. They remain
exported as their own modules.
CLAUDE.md updated to document the new convention for first-party Tiptap
extensions (direct class refs) and the carve-out for external plugin
extensions that may keep `() => import(...)` to ship their API code in a
separate chunk.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Tiptap: Move extension APIs and elements into a shared lazy boundary chunk
The previous PR collapsed ~70 Tiptap chunks into 3 by inlining first-party API
and element references directly into manifest files. That win came with a real
downside flagged in code review (lke / mra): the API/element implementation
bytes ended up in the manifest registration bundle, so every workspace —
including ones without an RTE — paid ~700 KB of Tiptap code on boot.
This commit keeps the chunk-coalescing win but restores the lazy boundary by
routing every first-party manifest's `api` / `element` reference through a
single shared bundle file `extensions/extension-apis.bundle.ts`. Each manifest
holds a dynamic-import thunk pointing at that one bundle, so:
- Rollup still emits a single chunk for all Tiptap extension code (no chunk
explosion).
- The manifest registration bundle stays slim — it carries only metadata
(alias / label / icon / group / kind / forExtensions) plus the thunks.
- The bundle is only fetched the first time `<umb-input-tiptap>` actually
mounts.
Data-type configuration UIs (`extensions-configuration`,
`toolbar-configuration`, `statusbar-configuration`) read manifest metadata
via `umbExtensionsRegistry.byType(...)` only — they never call
`loadManifestApi` / `loadManifestElement`, so the data-type editor continues
to work without loading any Tiptap implementation code.
Property-editor UI elements (`tiptap-rte`, the three configuration UIs) also
revert to `() => import('./X.element.js')` so each loads on demand from its
own chunk rather than being inlined into the manifest bundle.
`umb-input-tiptap` no longer statically imports the Rich Text Essentials API;
it prepends the alias to the observed list instead, so essentials resolves
through the same lazy bundle as every other extension.
Added a test and stories file that mount `<umb-input-tiptap>` standalone (no
property-editor wrapper) to make the public usage pattern explicit.
Built and verified via `npm run build:for:cms`:
- `dist-cms/packages/tiptap/manifests.js` 48 KB (eager at boot)
- `dist-cms/packages/tiptap/extension-apis.bundle-*.js` 84 KB (lazy)
- `dist-cms/packages/tiptap/tiptap-toolbar-element-api-base-*.js` 654 KB
(lazy dependency of the bundle)
- per-element property-editor UI chunks load on demand when settings open
`npm run check:circular`, `npm run compile`, `npx wtr src/packages/tiptap`
all pass.
Related to #21152, builds on #22995.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Tiptap: Don't mount <umb-input-tiptap> in the standalone test
Mounting the element via fixture() spins up an UmbTiptapRteContext that
consumes UMB_SERVER_CONTEXT. In the unit-test runtime no server context
provider exists, so the context request stays pending. When @open-wc's
fixture tears down at end-of-file the request rejects with
"host disconnected" — surfaced as an unhandled promise rejection that
web-test-runner counts as a fatal runner error, exiting 1 even though every
individual test passed. The rejection happened to be in flight while a
block-grid clipboard test was active in CI, which is why the failure surfaced
there rather than in the tiptap test file itself.
Drop the manifest-registration assertion too — pulling the package-level
`manifests.ts` aggregator triggers a transitive 404 on the
`@umbraco-cms/backoffice/tiptap` importmap entry in the wtr environment.
The class-export + custom-element-registration checks are enough to prove
standalone exportability. The Storybook stories still cover the visual
end-to-end load path.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Use direct imports in core manifests
* Extract theme aliases into constants file
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* Add IgnoredDelayChanged event to allow updates during back-off
* Make Period and IgnoredDelay settable on RecurringBackgroundJobBase with auto-raising events
* Address PR review: handle CTS race, restore negative-IgnoredDelay guard, clarify setter remarks
- Swallow ObjectDisposedException in OnIgnoredDelayChanged for the shutdown race where an in-flight handler reads the to-be-disposed CTS via Interlocked.Exchange before Dispose disposes it.
- Restore "skip back-off when IgnoredDelay <= TimeSpan.Zero (and not Timeout.InfiniteTimeSpan)" guard in IgnoreAndWaitAsync to defend against direct IRecurringBackgroundJob implementations / property overrides returning a negative value that would otherwise tight-loop via ComputeNextDelay clamping to zero.
- Add regression test for the negative-IgnoredDelay skip path.
- Mirror the constructor "stored without raising" remark on the Period and IgnoredDelay setter doc comments.
* Dispose newly-installed CTS when shutdown race wins the rotate-and-cancel
* Clarify XML docs.
* Introduce helper for cancellation source rotate and cancel.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Support anchor fragments that are included in the data attribute but missing in the href when migrating local links.
* Addressed code review feedback.
* Workspace Actions: Restore waiting state for buttons with additional options
The waiting state was suppressed whenever a workspace action reported
hasAdditionalOptions() (e.g. Save and publish on multi-variant sites),
so users saw the button jump straight from idle to the success tick
with no in-flight feedback.
Always set 'waiting' on click (unless the action is a link). The
variant-picker modal still opens on top of the button, so the spinner
is effectively invisible during selection — but it becomes visible
as soon as the modal closes and the publish request is in flight.
Fixes#22551
* Workspace Actions: Spin button only while real work is in flight
Replace the eager always-set-waiting behaviour from the previous commit
with an opt-in `isPending` signal so the spinner appears only while
actual work (validation + HTTP) is happening - not while the variant
picker modal is open, and never as a spurious success tick when the
user cancels the modal.
Changes:
- Add optional `isPending: Observable<boolean>` to UmbWorkspaceAction
and a default UmbBooleanState + protected setPending() on the base
class. Optional + backwards compatible for external implementers.
- Add optional `onActionStarting` callback (via a shared
UmbWorkspaceActionExecutionOptions type) to
UmbPublishableWorkspaceContext.saveAndPublish and
UmbSaveableWorkspaceContext.requestSave. The document publishing
context and content detail workspace base invoke the callback at the
join point right after the variant picker resolves (or is skipped
for the single-variant case), so it never fires when the modal is
cancelled.
- Wire the document save and save-and-publish actions to clear pending
at the start of execute() and pass an onActionStarting callback that
flips it true when work begins.
- Update the workspace action element to observe api.isPending: when
the observable is present the waiting state is driven by the
observable (and the success tick is suppressed if the action
resolves without ever signalling pending - i.e. a cancellation).
When the observable is absent the element falls back to the legacy
eager-waiting behaviour. Failures always surface the failed tick.
Fixes#22551
* Reduce cyclomatic complexity of #onClick and _handleSave
CodeScene Code Health Review flagged two complexity issues:
- UmbWorkspaceActionElement.#onClick reached cyclomatic complexity 9
(threshold is < 9). Extracted the api-execution branch into a new
private #runApiAction helper so #onClick collapses to a simple
link-vs-action dispatch.
- _handleSave was already over the threshold (14); my optional-chain
callback invocation pushed it to 16. Moved the
`executionOptions?.onActionStarting?.()` call into a #notifyActionStarting
helper so the call site is a plain method call and contributes zero
cyclomatic complexity to _handleSave.
No behavioural change.
* Reduce cyclomatic complexity of #handleSaveAndPublish
Same fix as the previous commit's #notifyActionStarting extraction in
content-detail-workspace-base: move the optional-chain callback
invocation into a private helper so #handleSaveAndPublish stays at its
pre-PR cyclomatic complexity (15) instead of degrading to 17.
No behavioural change.
* DRY: extract notifyWorkspaceActionStarting into a shared utility
Both UmbDocumentPublishingWorkspaceContext.#handleSaveAndPublish and
UmbContentDetailWorkspaceContextBase._handleSave had identical private
optional-chain callback off the host method's cyclomatic complexity.
Replace both with a single exported notifyWorkspaceActionStarting()
utility co-located with UmbWorkspaceActionExecutionOptions. This:
- Removes a duplication point between the two contexts.
- Gives future workspace context implementations a ready-made way to
honour the optional callback without re-inventing the helper or
paying the cyclomatic-complexity cost at the call site.
No behavioural change.
* Rename isPending -> isExecuting to mirror the execute() method
Niels suggested correlating the observable's name with the action's
`execute()` method, so the symbol set is now:
- isExecuting (observable on UmbWorkspaceAction interface)
- _isExecuting / setExecuting (UmbWorkspaceActionBase)
- #observeIsExecuting / #executionStarted (workspace-action element)
- isExecutingObserver (observer alias)
Pure rename; no behavioural change.
* Address Copilot review: lazy isExecuting, observer scope, finally reset
Five Copilot findings on PR #22554. Three real regressions + two
contract violations, all addressed:
1. UmbWorkspaceActionBase always exposing `isExecuting` made every
existing subclass appear to opt in to the new modal-aware flow,
suppressing waiting/success states for actions that never call
setExecuting(true). Made `_isExecuting`/`isExecuting` lazy: only
created on the first setExecuting() call. Opt-in subclasses call
`setExecuting(false)` in their constructor so the observable is
exposed before the workspace-action element reads it. Subclasses
that don't opt in keep `isExecuting` undefined and the element
falls back to legacy eager waiting feedback.
2. Element observation of `isExecuting` now lives inside #runApiAction
so it tracks whichever api is actually invoked (`_actionApi ?? #api`),
correctly handling subclasses like UmbSaveAndPreviewWorkspaceActionElement
that swap in a different api at runtime. The shared observer alias
replaces any previous observation on re-clicks.
3. UmbSaveWorkspaceAction and UmbDocumentSaveAndPublishWorkspaceAction
now wrap their execute() body in try/finally and reset
setExecuting(false) on completion so the observable honours the
"true while execute() is performing real work, false otherwise"
contract instead of getting stuck at true between executions.
No behavioural change for actions that already worked correctly before
this PR; the regression-prone "always exposed" behaviour is gone.
* Address Claude review: Elements gap, type placement, tests + cleanup
Three follow-ups on top of c15eb2d0bc:
1. Elements gap — UmbElementSaveAndPublishWorkspaceAction +
UmbElementPublishingWorkspaceContext now wire through the same
onActionStarting/notifyWorkspaceActionStarting handshake as the
Document equivalents, so multi-variant Elements (Forms, Commerce, etc.)
get the spinner-after-modal behaviour rather than no spinner at all.
2. Type placement — moved UmbWorkspaceActionExecutionOptions out of
publishable-workspace-context.interface.ts into its own file so the
saveable interface no longer has a directional dependency on the
publishable one. Both peer contexts now import from the same neutral
location.
3. Unit tests — added blackbox coverage for notifyWorkspaceActionStarting
(no-op on undefined options/callback, invokes when present) and the
UmbWorkspaceActionBase.setExecuting lazy-opt-in contract (undefined
until first call, observable then exposed, value flips, sequential
emissions, stable reference across calls).
Code-review cleanup applied on the same pass:
- Dropped the redundant `setExecuting(false)` at the start of execute()
in the save and save-and-publish actions; the finally block plus
UmbBooleanState's value-dedup already cover idempotency on retries.
- Removed an overlong block comment on `_isExecuting`; the JSDoc on
setExecuting already documents the lazy/opt-in contract for subclasses.
- Trimmed an internal motivation comment from notify-workspace-action-
starting.function.ts that referenced cyclomatic complexity.
- Extracted a tiny makeAction() helper in the controller test to remove
the `{ meta: {} as never }` repetition.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Workspace Actions: Align Save button state with Save & Publish (Andy review feedback)
Two related fixes addressing the variant-Save inconsistency Andy reported:
- Element catch block now only sets `failed` once `#executionStarted` is
true. Pre-flight rejections (user cancelling a variant-picker modal,
context-missing throws, etc.) leave the button idle, matching the
silent-cancel path used by `#handleSaveAndPublish`. Legacy actions
that don't opt in to `isExecuting` are unaffected because they set
`#executionStarted = true` eagerly on click.
- `UmbDocumentWorkspaceContext._handleSave` and
`UmbElementWorkspaceContext._handleSave` now accept and forward the
`UmbWorkspaceActionExecutionOptions` argument to `super._handleSave`.
The previous overrides dropped the parameter, so the
`onActionStarting` callback supplied by `UmbSaveWorkspaceAction` never
fired - which is why Save showed no waiting/success indicator even
on a successful submit.
Result: Save and Save-and-publish now behave identically -
cancel = no indicator, submit = waiting then success - for both
invariant and multi-variant documents and elements.
* Docs: Document the modal-aware execution feedback contract for workspace actions
New 'Button state when the action opens a modal' subsection in
docs/workspaces.md explaining the three-piece contract:
UmbWorkspaceActionExecutionOptions + notifyWorkspaceActionStarting +
UmbWorkspaceActionBase.setExecuting. Covers third-party authoring of
modal-aware buttons, the cancel/pre-flight idle behaviour, and the
silent-parameter-drop pitfall on _handleSave overrides.
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Backoffice: Coalesce small Rollup chunks across all workspaces (AB#67983)
Set experimentalMinChunkSize=10_000 as the default in the shared Vite
helper. Every workspace inherits the coalescing automatically; the
threshold can still be overridden per workspace (pass 0 to disable).
Impact on dist-cms output:
- packages/core .js files: 981 -> 272 (-72%)
- All workspaces combined .js files: 2194 -> 1401 (-36%)
- Welcome dashboard .js requests: 510 -> 497 (-2.5%)
- packages/ufm requests in particular: 23 -> 12 (-48%)
- Gzipped bundle total: -1.2%
- Raw bytes: +1.4% (small overhead from merged chunks; gzip wins it back)
All entry chunks are preserved, so every public
@umbraco-cms/backoffice/<sub> import keeps resolving without changes
to package.json exports or tsconfig paths.
Further consolidation (collapsing core's per-subpath entries into a
single bundle with stubs) was prototyped but hits a TDZ cycle between
the eager entry and its dynamic-import descendants. Tracked for v18,
not part of this change.
* Backoffice: Normalise umbraco-package + manifests shapes (AB#67983)
Aligns the two outliers with the conventions used by the other 38
first-party packages:
- documents/umbraco-package.ts now uses the lazy bundle pattern
(type: 'bundle', js: () => import('./manifests.js')) instead of
eagerly importing manifests at module evaluation. The bundle
initializer auto-loads the manifests at boot, so behaviour is
unchanged.
- umbraco-news/manifests.ts now exports `manifests: Array<...>`
instead of a bare `dashboard` object. The bundle initializer
enumerates exports regardless of name, so behaviour is unchanged.
Preparatory cleanup so future build-time manifest aggregation can
treat every workspace uniformly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Compute next delay to compensate for time drift
* Use SemaphoreSlim to properly handle exceptions, cancellation tokens and triggering immediate executions
* Add RecurringBackgroundJobBase to contain default values and hide obsoleted method
* Add NextExecutionStrategy parameter to adjust the schedule after triggered executions
* Add TriggerExecution methods to RecurringBackgroundJobHostedServiceRunner
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Handle cancellation (application shutdown) and publish RecurringBackgroundJobCanceledNotification
* Match hosted services by Type instead of type name string
* Extract shared helper for TriggerExecution tests
* Clear trigger state when initial delay is interrupted
* Clear _nextExecutionSkipOnOvershoot unconditionally
* Combine ComputeNextDelay tests
* Consolidate trigger state into an immutable record for thread safety
* Use ConcurrentDictionary for thread-safe hosted service lookup
* Remove hosted services from dictionary on stop
* Fix API compatibility errors
* Removed unneeded using.
* Register RecurringBackgroundJobHostedServiceRunner as resolvable singleton
* Remove failed hosted service from dictionary when StartAsync throws
* Use semaphore signaling instead of Task.Delay in trigger tests
Use semaphore signaling instead of Task.Delay in trigger tests 2
* Inject TimeProvider into RecurringHostedServiceBase for deterministic testing
Fix timeprovider
* Use DelayCalculator.GetDelay instead of RecurringHostedServiceBase.GetDelay
* Fix Exception_In_PerformExecuteAsync_Does_Not_Kill_Loop test
* Avoid disposing period-change CTS while wait loop may still reference it
* Configure IEventMessagesFactory mock to return real EventMessages
* Clarify TriggerExecution(TimeSpan) docs and add ChangePeriod test
* Validate period is positive and use GetOrAdd to avoid creating unused hosted services
* Set up Period and Delay on mock job to satisfy constructor validation
* Ensure PeriodChanged event is unsubscribed again
* Fix trigger state race, simplify ReleaseSignal, and add canceled notification test
Fix trigger state
* Use Interlocked for _period reads/writes and implement thread-safe dispose pattern
* Remove hosted service from dictionary before stopping to prevent triggering during shutdown
* Replace Task.Yield with semaphore timeouts in negative assertions
* Tidy RecurringBackgroundJobBase docs and runner error handling
* Wait IgnoredDelay after ignored execution to prevent tight looping when Period is short or zero
* Add IRecurringBackgroundJobTrigger<TJob> for opt-in job triggering
* Register IRecurringBackgroundJobTrigger as open generic and drop AddTriggerableRecurringBackgroundJob
* Fix and add parameter validation
* Allow Timeout.InfiniteTimeSpan as Period for manual-trigger-only recurring jobs
* Migrate built-in jobs to RecurringBackgroundJobBase and require ITriggerableRecurringBackgroundJob in runner trigger overloads
* Support infinite Delay and honor TriggerExecution(TimeSpan) issued during the initial delay
* Handle edge case of backoff via InfiniteTimeSpan.
* Refactored large method.
* Added clarifying documentation.
* Suppress ExecutionContext flow when starting the recurring background loop, restoring previous timer behaviour.
* Relocate Suppress ExecutionContext flow to avoid package validation error.
* Align IRecurringBackgroundJobTrigger generic type constraint with AddRecurringBackgroundJob
* Rename ApplyTriggerState to ComputeNextDelayFromTriggerState
* Allow Timeout.InfiniteTimeSpan as IgnoredDelay to fully disable a job for the remaining application lifecycle
* Fix generic type constraint
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Add item data resolver support to picker data sources
* add js docs
* remove duplicated fallback logic
* wip unit tests of requestItemName method
* Use DocumentVariantStateModel in mock documents to fix compiler
* Update input-entity-data.context.ts
* Update input-entity-data.context.test.ts
* Fix edit of a variant property composed to an invariant document.
* Collapse multi-line guard comment to a single line per project policy.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Add unit test coverage for invariant content with a culture-variant composition property.
Adds a third mock document/document-type pair representing an invariant
content type whose flattened property list contains a culture-variant
property (the runtime shape produced when a variant composition is applied
to an invariant content type) and a setPropertyValue test asserting the
value is stored as a culture/segment-invariant entry.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Remove null guard for segment variant documents, as null segment is the default segment.
* update mock data and tests to include real compositions
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
* Add auto upgrade coordination for load balanced setups
* Add tests
* Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* fix(infrastructure): move TryBecomeLeaderAsync inside try/catch in UnattendedUpgradeBackgroundService
Ensures DB exceptions thrown during migration coordination set BootFailed
rather than faulting the background service silently.
* Fix feedback
* Update src/Umbraco.Infrastructure/Install/MigrationCoordinator.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Recheck state
* fix(tests): update concurrent race test for post-claim DetermineRuntimeLevel check
The winner now calls DetermineRuntimeLevel() once from the post-claim check
and must see Upgrading; the loser polls twice before seeing Run. Transition
the mock on the second call instead of the first.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* Cache cacheversion on scope
* Add tests
* Cache: Use ConcurrentDictionary for the inner per-scope version map
The inner Dictionary<string, Guid> was not thread-safe. Replacing it
with ConcurrentDictionary<string, Guid> removes the hidden assumption
that the root scope is only accessed from a single thread at a time.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Update src/Umbraco.Core/Cache/IRepositoryCacheVersionAccessor.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update tests/Umbraco.Tests.UnitTests/Umbraco.Web.Common/Cache/RepositoryCacheVersionAccessorTests.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.Common/Cache/RepositoryCacheVersionAccessor.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Skips failing test so we can run nightly. THIS NEEDS TO BE REVERTED
* Revert "Skips failing test so we can run nightly. THIS NEEDS TO BE REVERTED"
This reverts commit c34d1736c336b3fcf7803b44e88f6018fa45c275.
* Only write version once pr. scope
* Add tests
* Remove unnececary locks
* Fix thread-safety: replace HashSet with ConcurrentHashSet and use GetOrAdd to eliminate TOCTOU races
* Add unit tests for RepositoryCacheVersionService
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Andreas Zerbst <andr317c@live.dk>
* Add benchmark test for measuring improvements to children and descendant retrieval.
* Remove unnecessary sort from retrieval of children.
* Return the result of the filtered collection of children/decendants without materialising.
* Lazily build property wrappers when materializing IPublishedContent.
* Cache the ordered children list on NavigationNode.
* Cache descendants per parent on the navigation snapshot.
* Add synchronous fast path for retrieved of cached content.
* Additional unit tests.
* Add TODO to make UpdateSortOrder internal.
* Addressed code review feedback.
* Further unit tests.
* Future-proofed code comments.
Correct the gating of the call to UseOutputCache() to only proceed Umbraco managed caching via configuration is enabled, and not consider existing implementation specific registrations.
* Localization: Honor DefaultUILanguage on initial load (closes#22808)
Closes#22808.
Previously, the configured DefaultUILanguage was silently overridden to
'en' at startup because the UmbLocalizationRegistry constructor called
loadLanguage(UMB_DEFAULT_LOCALIZATION_CULTURE) unconditionally. The
configured locale rendered into <html lang="..."> by Razor never had a
chance to flow through to the active language.
Changes:
- localization.registry.ts: stop forcing the active language to 'en'
in the constructor. Initial state is canonicalised from
document.documentElement.lang, falling back to 'en' for empty or
malformed input. The extension filter now always includes the
default culture alongside the active locale so 'en' translations
remain available as a key-level fallback regardless of which
language is active. A synchronous tap mirrors the active locale to
document.lang and the manager when the state changes, so a fresh
element rendered between loadLanguage() and the async translation
load picks up the right language immediately.
- localization.manager.ts: drop the MutationObserver on
document.documentElement and rely on the registry as the single
channel for language changes. setActiveLanguage accepts a `silent`
option so the synchronous tap can update fields without firing a
consumer notification (translations may still be loading). A new
notifyLanguageChanged() method is fired by the registry once
translations are in place.
- app.element.ts: subscribe to umbLocalizationRegistry.currentLanguage
in connectedCallback and mirror it onto the host element's lang
attribute, so myApp.lang reflects the source of truth rather than a
stale snapshot of <html lang>.
- auth.element.ts (login app): same lang subscription, plus after the
slim backoffice controller registers extensions, prefer the
visitor's navigator.language if a matching localization extension
exists (falls through baseName -> language -> en automatically).
Tests: new initialization tests for the registry, manager
setActiveLanguage tests, and the controller tests refactored to use
the new explicit setActiveLanguage API instead of writing directly to
document.documentElement.lang.
* Login: Only override DefaultUILanguage with navigator.language when default has no translation
If the admin sets DefaultUILanguage to a language we have a translation for,
respect that choice over the visitor's browser language. Falling back to
navigator.language only when the configured default isn't available avoids
silently ignoring the admin's explicit setting (e.g., DefaultUILanguage='da-DK'
on a site whose visitor's browser is 'en-GB' should still show Danish).
* Simplify: split setActiveLanguage from notifyLanguageChanged
Drop the silent option in favor of two intent-revealing methods:
setActiveLanguage updates the active language and direction without
side-effects; notifyLanguageChanged tells all connected controllers
to re-render against the current state. Callers compose them based
on what they need (the registry's pipeline updates language sync
then flushes notifications after async translation load).
Also extracts baseLocaleOf() helper, simplifies the navigator.language
match logic in the login app's #applyPreferredLanguage, and removes
narration-style comments in the new code.
* Restore deprecated UmbLocalizationManager.updateAll for backward compat
The old MutationObserver-driven updateAll() field was technically part
of the manager's public surface. Restore it as a deprecated alias that
reads document.lang/dir and forwards to setActiveLanguage + notifyLanguageChanged,
with a runtime UmbDeprecation warning pointing consumers at the new API.
* Fix deprecation removal version to v20 + correct baseLocaleOf JSDoc
Per the deprecation policy in CLAUDE.md (current major + 2): a method
deprecated in v18 must remain through v19 before removal, so the
earliest removal is v20, not v19.
Also corrects the baseLocaleOf JSDoc — Intl.Locale.baseName can include
script subtags (e.g. 'zh-Hant-TW'), not just language and region.
* Scope the active language to the host element, drop navigator.language
- Razor now sets `lang` on `<umb-app>` and `<umb-auth>` from
DefaultUILanguage. The element passes its lang through on connect, so
the host owns its own scope — future multi-backoffice scenarios (e.g.
signing into two Umbraco Cloud sites in the same document) get their
own language without fighting over a global `<html lang>`.
- The registry no longer reads or writes `document.documentElement.lang`.
Host elements drive it via `loadLanguage()`; `<html lang>` stays as
whatever Razor rendered.
- Removed the navigator.language preference detection in the login app.
Not in scope for the bug fix and adds behavior the admin can't opt out
of. The existing current-user-locale flow already handles per-user
preference after login.
- Tests updated to assert on `umbLocalizationManager.documentLanguage`
instead of `document.documentElement.lang`.
* Set <html lang="en"> to match the static (noscript) text in the templates
The page's `<html lang>` should describe the language of the document's
own innate content. Both Index.cshtml files only contain English static
text (the noscript fallback), so the page-level lang is now "en".
The dynamic UI inside <umb-app> / <umb-auth> carries its own `lang`
attribute (from DefaultUILanguage), which overrides for that subtree —
correct per the HTML spec for language inheritance.
* Drop deprecated UmbLocalizationManager.updateAll
It was public as an artifact of being an arrow function so it could be
passed to a MutationObserver without binding — not because it was
intended as part of the public API. External usage is effectively
zero, and the new explicit setActiveLanguage + notifyLanguageChanged
covers anyone who did reach for it.
* Docs: document active-language-on-host pattern in package-development.md
After PR #22822, the active UI language is driven by the shell elements
(<umb-app>, <umb-auth>) via their own lang attribute, not by <html lang>.
Document that so future contributors don't reach for the global.
* Collapse setActiveLanguage + notifyLanguageChanged into one method
The silent-write path is just `manager.documentLanguage = ...` — no new
method needed; the field is already public and was always writable. The
notify path keeps setActiveLanguage, which now both sets and notifies.
Net: one new public method on the manager instead of two.
* Inline the active-language write in the registry, drop setActiveLanguage
The previous version added setActiveLanguage on the manager as
a 'cleaner API' than direct field writes. But the manager's fields
(documentLanguage, documentDirection, connectedControllers) have
always been public, the registry is the only caller, and the wrapper
was just more public surface to maintain through the eventual
manager/registry collapse.
Net: -70 lines across the test file, no new public methods on the
manager, the registry pipeline writes the fields and iterates the
controllers directly where it would have called setActiveLanguage.
* Document that documentLanguage/Direction are read-only for consumers
Note in JSDoc that the only supported way to change the active language
is umbLocalizationRegistry.loadLanguage(). The fields stay writable for
the registry pipeline (cross-module internal); the comment is here so
the next contributor doesn't reach for them as a shortcut and end up
with the manager state out of sync with what's actually loaded.
* Blueprints: Fix UdiEntityTypeHelper.ToUmbracoObjectType() for document blueprint containers
Adds the missing DocumentBlueprintContainer case so the conversion is
symmetric with FromUmbracoObjectType().
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Add missing case for MemberTypeContainer.
* Use reflection to ensure other future missed cases are surfaced without having to explicitly extend the tests.
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Mocks: Add missing signalR property to mock server configuration response
The GetServerConfigurationResponse type was updated in #22700 to require
a signalR.skipNegotiation property, but the MSW mock handler was not
updated to match, causing a tsc compilation error.
* Core: Preserve path case in ShadowFileSystem
ShadowFileSystem stored staged files at their original case via _sfs.AddFile
but tracked them under a lowercased key (NormPath calling ToLowerInvariant).
On Complete(), Inner.AddFile(kvp.Key, _sfs.GetFullPath(kvp.Key)) reconstructed
the staged file's path from the lowercased key, so on case-sensitive file
systems (Linux) File.Move failed with FileNotFoundException whenever a path
contained any uppercase character.
Drop the ToLowerInvariant from NormPath and switch the tracking dictionary
to StringComparer.OrdinalIgnoreCase. Lookups remain case-insensitive
(matching Windows semantics) while the stored key now matches what was
written to disk. IsChild/IsDescendant updated to OrdinalIgnoreCase
StartsWith for consistency.
Added regression test reproducing the original FileNotFoundException with
Views/PageNotFound.cshtml.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Rename regression test to follow Can_ naming convention
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Track canonical staged path per shadow node
The case-insensitive node dictionary preserved only the first inserted
key, so re-staging a logical path with a different case (e.g. AddFile
"Views/Foo.cshtml" then "views/foo.cshtml") wrote a phantom second file
to _sfs on Linux while Complete still resolved the original key — leaving
orphaned shadow files and committing stale content.
Track the original-case staged path on each ShadowNode and route all
_sfs operations (AddFile, OpenFile, GetFullPath, GetLastModified,
GetCreated, GetSize, MoveFile, Complete) through that canonical path.
Inner.AddFile on commit still uses the stored dictionary key, so the
destination case in the inner file system is unchanged.
Expanded the regression test to also exercise OpenFile, GetSize and
AddFile against a different-cased path, and to assert that the staged
file is written exactly once.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Make ShadowNode.CanonicalPath non-nullable
Every node now carries the original-case path it tracks, set at construction.
This removes the defensive 'sf.CanonicalPath ?? path' fallbacks at the read
sites (OpenFile, GetFullPath, GetLastModified, GetCreated, GetSize, Complete)
which were unreachable but noise.
The GetCanonicalPath helper is gone; AddFile and MoveFile now use the existing
node variable inline ('sf?.CanonicalPath ?? path' — node can legitimately be
null when staging a path for the first time).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Address Copilot review: normalize delete key, cross-platform test
DeleteDirectory(recursive=false) stored the deletion marker under the
caller-supplied path (which can contain backslashes) instead of the
normalized key, so a follow-up NormPath-based lookup could miss the
deletion and IsChild scans could become inconsistent. Use normPath.
The shadow-second-file assertion in the regression test used
File.Exists on a different-cased path; that returns true on
case-insensitive file systems (Windows / default macOS) regardless of
the actual stored case, so the assertion was platform-dependent.
Replaced it with a directory-count check that's cross-platform.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Add cross-platform regression test so any reversion would be caught on a non-case sensitive file system.
* Cleaned up warnings, obsoletions and comments in the existing tests.
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
(cherry picked from commit abfa8cb144)
* Mark ServerEventSender as distributed cache notification handler
* Batch and deduplicate notifications in ServerEventSender
* Introduce IDistributedCacheAsyncNotificationHandler<T> and use it in ServerEventSender
* Add ServerEventSender unit tests and address PR review feedback
* Add submit button state to sort dialog.
* Guard against re-entrant submit in sort-children-of modal.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Set failed button state when sort-children-of submit throws.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
(cherry picked from commit dfe93c5639)
* Dont fail silently on missing ambientscope
This makes it in line with other methods in the repo
* Pass on Cancellationtoken to the job to support gracefull job shutdown
(cherry picked from commit 5ae17ace6a)
* Auth: un-deprecates getLatestToken and routes per-request fetches through it
getLatestToken is the only public API for "wait for any in-flight refresh,
trigger one if the access token has expired, then return". External and
internal consumers were warned off it without an equivalent replacement:
configureClient only helps @hey-api/openapi-ts clients, and consumers using
axios/ky/native fetch had no other gate.
- Removes the @deprecated JSDoc + UmbDeprecation.warn() call so the public
surface no longer prints a console warning per call.
- Uses getLatestToken.bind(this) for the auth callback inside configureClient
and the token callback inside getOpenApiConfiguration so both paths share
the same #ensureTokenReady gate.
- Replaces the hard-coded `Authorization: Bearer [redacted]` in unlinkLogin
and #makeLinkTokenRequest with `Bearer ${await getLatestToken()}` so those
fetches participate in the refresh coordination rather than firing with a
potentially-revoked cookie.
Also wires the UmbracoExtension template's entrypoint to call
authContext.configureClient(client), matching the v18 template change. The
framework awaits onInit, so this guarantees the API client is fully
configured before any element in the extension can use it.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Auth: tightens UmbAuthContext correctness and accepts any hey-api client
Pulls in a batch of non-breaking improvements to UmbAuthContext that came
out of an audit on the back of the un-deprecation work in this PR:
Public surface:
- configureClient(client) now accepts a new structural UmbApiClient type
(exported from @umbraco-cms/backoffice/http-client). Each @hey-api/openapi-ts
generation produces a fully-bound Client<…>; the backoffice's umbHttpClient
and an extension's regenerated client are structurally identical but TS
treats them as distinct generic instantiations. The widened parameter lets
extensions wire their own client without `as never` casts at call sites.
bindDefaultInterceptors keeps its strict typeof umbHttpClient parameter
(preserving autocomplete inside interceptor callbacks); the cast happens
once, internally.
Correctness:
- The auth context now holds a single UmbApiInterceptorController, lazy-
initialised on first configureClient() call. Previously each call
instantiated a new controller, which re-provided the UmbAuthSignalerContext
on the host and stacked listeners — visible the moment an extension also
called configureClient. One controller for the lifetime of the host, all
configured clients share it.
- completeAuthorizationRequest checks sessionStorage before asking
window.opener for the PKCE verifier. The previous order hung for the full
postMessage timeout whenever oauth_complete loaded with a non-OAuth
window.opener (which is set for ANY window.open target). The opener
postMessage timeout is also dropped from 5s to 1.5s — a real popup parent
responds within milliseconds; longer is just wait time for the unrelated-
opener case.
- The cross-tab 'authorized' BroadcastChannel handler now routes through
#setSessionLocally so the timestamp math stays in one place. The
'sessionUpdate' handler still applies pre-computed timestamps directly
(peer broadcast already did the math) but does so inside the
#inSessionUpdateCallback guard, so a synchronous session$ observer can no
longer trigger a spurious /token refresh on top of a peer's update.
- #ensureTokenReady drops its query-then-request pattern. Now always queues
behind the umb:token-refresh lock with a no-op callback — if the lock is
free it acquires immediately, if held it waits. Eliminates the race window
between query() and request().
- destroy() invokes #popupCleanup before tearing down so an in-flight popup
flow's window-level message listener and closed-poll interval don't leak
past the context's lifetime. The cleanup helper itself now resolves the
popup-flow Promise — every termination path (authorized, popup closed,
superseded by a new flow, context destroyed) is observable to the awaiter
instead of hanging forever.
Cleanup:
- makeAuthorizationRequest is annotated Promise<void> so the redirect and
popup branches share an explicit return type.
- unlinkLogin wraps the parsed problem-details payload in a real Error (with
the original payload exposed on `.cause`) so callers using `instanceof
Error` or expecting a stack trace get sane behaviour.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Auth: un-deprecates getLatestToken and routes per-request fetches through it
getLatestToken is the only public API for "wait for any in-flight refresh,
trigger one if the access token has expired, then return". External and
internal consumers were warned off it without an equivalent replacement:
configureClient only helps @hey-api/openapi-ts clients, and consumers using
axios/ky/native fetch had no other gate.
- Removes the @deprecated JSDoc + UmbDeprecation.warn() call so the public
surface no longer prints a console warning per call.
- Uses getLatestToken.bind(this) for the auth callback inside configureClient
and the token callback inside getOpenApiConfiguration so both paths share
the same #ensureTokenReady gate.
- Replaces the hard-coded `Authorization: Bearer [redacted]` in unlinkLogin
and #makeLinkTokenRequest with `Bearer ${await getLatestToken()}` so those
fetches participate in the refresh coordination rather than firing with a
potentially-revoked cookie.
Also wires the UmbracoExtension template's entrypoint to call
authContext.configureClient(client), matching the v18 template change. The
framework awaits onInit, so this guarantees the API client is fully
configured before any element in the extension can use it.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Auth: tightens UmbAuthContext correctness and accepts any hey-api client
Pulls in a batch of non-breaking improvements to UmbAuthContext that came
out of an audit on the back of the un-deprecation work in this PR:
Public surface:
- configureClient(client) now accepts a new structural UmbApiClient type
(exported from @umbraco-cms/backoffice/http-client). Each @hey-api/openapi-ts
generation produces a fully-bound Client<…>; the backoffice's umbHttpClient
and an extension's regenerated client are structurally identical but TS
treats them as distinct generic instantiations. The widened parameter lets
extensions wire their own client without `as never` casts at call sites.
bindDefaultInterceptors keeps its strict typeof umbHttpClient parameter
(preserving autocomplete inside interceptor callbacks); the cast happens
once, internally.
Correctness:
- The auth context now holds a single UmbApiInterceptorController, lazy-
initialised on first configureClient() call. Previously each call
instantiated a new controller, which re-provided the UmbAuthSignalerContext
on the host and stacked listeners — visible the moment an extension also
called configureClient. One controller for the lifetime of the host, all
configured clients share it.
- completeAuthorizationRequest checks sessionStorage before asking
window.opener for the PKCE verifier. The previous order hung for the full
postMessage timeout whenever oauth_complete loaded with a non-OAuth
window.opener (which is set for ANY window.open target). The opener
postMessage timeout is also dropped from 5s to 1.5s — a real popup parent
responds within milliseconds; longer is just wait time for the unrelated-
opener case.
- The cross-tab 'authorized' BroadcastChannel handler now routes through
#setSessionLocally so the timestamp math stays in one place. The
'sessionUpdate' handler still applies pre-computed timestamps directly
(peer broadcast already did the math) but does so inside the
#inSessionUpdateCallback guard, so a synchronous session$ observer can no
longer trigger a spurious /token refresh on top of a peer's update.
- #ensureTokenReady drops its query-then-request pattern. Now always queues
behind the umb:token-refresh lock with a no-op callback — if the lock is
free it acquires immediately, if held it waits. Eliminates the race window
between query() and request().
- destroy() invokes #popupCleanup before tearing down so an in-flight popup
flow's window-level message listener and closed-poll interval don't leak
past the context's lifetime. The cleanup helper itself now resolves the
popup-flow Promise — every termination path (authorized, popup closed,
superseded by a new flow, context destroyed) is observable to the awaiter
instead of hanging forever.
Cleanup:
- makeAuthorizationRequest is annotated Promise<void> so the redirect and
popup branches share an explicit return type.
- unlinkLogin wraps the parsed problem-details payload in a real Error (with
the original payload exposed on `.cause`) so callers using `instanceof
Error` or expecting a stack trace get sane behaviour.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Update stored color label if changed on save of document with color picker.
* Clarify intent of change event dispatch in label sync
* Make comparison case insensitive.
* Added unit tests for new behaviour.
* Update stored color label if changed on save of document with color picker.
* Clarify intent of change event dispatch in label sync
* Make comparison case insensitive.
* Added unit tests for new behaviour.
* Order SQL before FetchOneToMany in dictionary entry retrieval to prevent duplicate items in collection view.
* Used PrimaryKey instead of UniqueId to take advantage of the clustered index.
* extend icons with information from theseaurus
* implement new icon search logic
* clean-up data
* icon manager
* sorting with a backup of the name
* refactor into a controller
* improve multi word group search
* embed lucide data
* rename tech into technology
* remove paper from dollar
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* improve search
* related should not show up in search
* update threshold
* separate name words
* also consider full icon name match
* better comment
* other approach for full name matches
* full icon name search if query contains a -
* fix test
* remove related code
* updates to related
* make its own package
* revert changes
* update tsconfig
* package-lock
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* temp mock set
* test getPropertyValue
* Extend document workspace context tests to cover read/write property values
* move context files into context folder
* Add document CRUD tests, mock handler & interceptor
* temp mock error interceptor
* Return 404 when document not found
* Use undefined for entity unique state until initialized
* Fix import paths for document workspace editor
* Add test utils and extend document workspace tests
* Update document-workspace-context.test-utils.ts
* Match invariant variant when variantId missing
* Ensure finishPropertyValueChange runs on exit
Wrap setPropertyValue implementation in a try/finally and move finishPropertyValueChange into the finally block so cleanup always runs even if an error is thrown. No other functional changes — code was re-indented and organized but behavior remains the same except for guaranteed cleanup on error.
* Require variantId for culture/segment-variant props
* fix types
* fix mock modal typescript error
* Distinguish unloaded vs root entity unique
* use the real current user context
* hide mock set in UI
* rename mock set
* Move initiatePropertyValueChange into try
* Use 'satisfies' for UmbMockDataSet assertions
* Preserve requested unique on failed load
* Treat missing variantId as invariant
* Reset update lock on destroy
* remove unused group + user
* Guard _current.unmute and remove destroy override
* Add tests for element data manager
* Guard subject access and add destroy test
* Throw when calling methods after destroy
* docs(claude): document how unsafeHTML should be used together with escapeHTML()
* fix: adds escapeHTML where appropriate in order not to render html directly
* chore: removes small nitpick fallback
* docs(claude): fixes incorrect using of unsafeHTML
* feat(localization): add localize.htmlString() and convert call sites
Adds a new `htmlString()` method on UmbLocalizationController that escapes
interpolated args via escapeHTML and returns a Lit unsafeHTML directive.
This is the safe replacement for the manual `unsafeHTML(this.localize.string(...))`
pattern, which leaves user-controlled args un-escaped (XSS hazard).
Converts all direct `unsafeHTML(localize.string|term(...))` call sites
across modals, rollback views, packager, property editors, and entity
actions. Also fixes the latent XSS in `trash.action.ts` (sibling of the
previously-fixed `delete.action.ts`).
Updates docs/security.md with guidance on `string()` vs `htmlString()`
and the modal-content wrapping pattern.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore(eslint): add no-unsafe-localize rule to flag unsafeHTML(localize.string|term(...))
Catches the XSS pattern this PR's helper replaces, so future regressions
are caught at lint time instead of in review (or in a security advisory).
Suggests `localize.htmlString(...)` as the safe replacement.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(localization): stringify htmlString args before escaping
Addresses review feedback on PR #22731. escapeHTML() short-circuits on
non-strings (returns the value unchanged), so an arg like
{ toString: () => '<script>...</script>' } would bypass the escape and
render unescaped via unsafeHTML.
Stringifies args before escaping while preserving `undefined` so
string()'s placeholder semantics are unchanged. Adds a regression test
covering the toString() bypass.
Also adds the missing html/unsafeHTML imports to the security.md
example so the snippet is self-contained.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(installer-consent-element): sanitise content before rendering it
* fix(dashboard-telem-element): sanitise html before rendering
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: LLaverty <liamlaverty@gmail.com>
* docs(claude): document how unsafeHTML should be used together with escapeHTML()
* fix: adds escapeHTML where appropriate in order not to render html directly
* chore: removes small nitpick fallback
* docs(claude): fixes incorrect using of unsafeHTML
* feat(localization): add localize.htmlString() and convert call sites
Adds a new `htmlString()` method on UmbLocalizationController that escapes
interpolated args via escapeHTML and returns a Lit unsafeHTML directive.
This is the safe replacement for the manual `unsafeHTML(this.localize.string(...))`
pattern, which leaves user-controlled args un-escaped (XSS hazard).
Converts all direct `unsafeHTML(localize.string|term(...))` call sites
across modals, rollback views, packager, property editors, and entity
actions. Also fixes the latent XSS in `trash.action.ts` (sibling of the
previously-fixed `delete.action.ts`).
Updates docs/security.md with guidance on `string()` vs `htmlString()`
and the modal-content wrapping pattern.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore(eslint): add no-unsafe-localize rule to flag unsafeHTML(localize.string|term(...))
Catches the XSS pattern this PR's helper replaces, so future regressions
are caught at lint time instead of in review (or in a security advisory).
Suggests `localize.htmlString(...)` as the safe replacement.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(localization): stringify htmlString args before escaping
Addresses review feedback on PR #22731. escapeHTML() short-circuits on
non-strings (returns the value unchanged), so an arg like
{ toString: () => '<script>...</script>' } would bypass the escape and
render unescaped via unsafeHTML.
Stringifies args before escaping while preserving `undefined` so
string()'s placeholder semantics are unchanged. Adds a regression test
covering the toString() bypass.
Also adds the missing html/unsafeHTML imports to the security.md
example so the snippet is self-contained.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(installer-consent-element): sanitise content before rendering it
* fix(dashboard-telem-element): sanitise html before rendering
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: LLaverty <liamlaverty@gmail.com>
* Revert "MD files for Design knowledge (#22725)"
This reverts commit 212f3183c1.
* Revert "Backoffice Mocks: Derive user language access from user groups (#22721)"
This reverts commit 9671fec9ad.
* Revert "File-system Services: Complete child scopes on read-miss and validation-failure paths (#22717)"
This reverts commit 489d9ebc2e.
* Revert "manual revert of merge gone wrong"
This reverts commit a443f8ba08.
* Revert "fix(installer-user): added min length message for installer user elem… (#21829)"
This reverts commit 6789d7e757.
* Reapply "Merge branch 'main' of https://github.com/umbraco/Umbraco-CMS into claude/keen-nightingale-5ef5bd"
This reverts commit daecbd02b8.
* fix(installer-user): added min length message for installer user elem… (#21829)
* fix(installer-user): added min length message for installer user element.
* Update src/Umbraco.Web.UI.Client/src/apps/installer/user/installer-user.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix password minlength message binding syntax
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Emma L Garland <1649855+emmagarland@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* File-system Services: Complete child scopes on read-miss and validation-failure paths (#22717)
* Ensure scopes in FolderServiceOperationBase are completed.
* Added integration tests to verify the fixes.
* Backoffice Mocks: Derive user language access from user groups (#22721)
fix(mocks): derive user language access from user groups
Previously hasAccessToAllLanguages was hardcoded to true and languages to
an empty array. Now both are derived from the user's user group memberships.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* MD files for Design knowledge (#22725)
* Fix issues following merge.
* Fixed linting errors.
* Fix linter errors (2).
* Restore current-user.context.ts
* Restore block-list-entry.element.ts.
* Removed failing webhook repository test files.
---------
Co-authored-by: Yari Mariën <75362020+Yinzy00@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Emma L Garland <1649855+emmagarland@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
fix(mocks): derive user language access from user groups
Previously hasAccessToAllLanguages was hardcoded to true and languages to
an empty array. Now both are derived from the user's user group memberships.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* View Contexts for Dashboards + Section Views to support Browser Title and Hints
* fix code
* use alias for observe ctrl alias
* remove test code
* Position badge in section icon slot
---------
Co-authored-by: engjlr <enl@umbraco.dk>
* WIP
* Cleanup and type generation
* Improve obsoletions
* Fix removed constructor
* Simplify logic because of SignalR's JS limitations
* Apply suggestions from code review
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Add SignalRSettings to Schema
* Abstrack SignalRRoutes class
* Fix bool to observable<bool>
* Refactor base class: pull down common service property, make abstract with protected constructor.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Ensure content type cache is correctly invalidated for element types.
* Clear key to Id map on clear all.
* Refactor and update tests for additional coverage and naming alignment.
* Updates from code review.
* Close suggestion dropdown on blur and escape, fix suggestion selection
* Fix code complex
* Fix to tab and complexity
* Fix to tab and complexity
* Fix to tab and complexity
* Clear matches on add/escape and remove focus rule
---------
Co-authored-by: engjlr <enl@umbraco.dk>
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
* unit test for boolean state
* improve umb class state set value identical check
* consistent ability to make a observablePart
Co-authored-by: Copilot <copilot@github.com>
---------
Co-authored-by: Copilot <copilot@github.com>
* Add table collection view and manifests
* Use table kind in collection example
* Update entity-name-table-column-layout.element.ts
* Recompute table rows when item hrefs change
* define and render columns from manifest
* wip language implementation
* map to unique field
* rename to label
* test implementation for users table
* experiment: value minimal display extension
* register as workspace context
* add boolean display
* clean up
* add example entity actions
* add example description
* Update table-collection-view.element.ts
* Omit base 'meta' and relax table meta type
* Hardcode description column when present
* localize column names
* Update table-collection-view.element.ts
* Type manifest on collection view elements
* Use UmbLitElement instead of LitElement
* fix types
* Update entity-name-table-column-layout.element.ts
* provide entity context for each table row
* fix breaking change and introduce a deprecation warning
* Add status column to example collection view + localize column labels
* implement the UmbTableColumnLayoutElement interface
* add tests for the table collection view
* Make host element optional; add table docs/types
* Update controller-host.mixin.ts
* Update src/Umbraco.Web.UI.Client/src/packages/core/entity-action/global-components/entity-actions-table-column-view/entity-actions-table-column-view.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add language collection context
* introduction of value type and rename to value summary
* Add core DateTime value summary; migrate user last-login
* remove unused
* Rename user group value type to References
* Remove the component's standalone resolution path
* Add start-node value summaries & sections for user group table
* Guard resolver and render when start node missing
* refactor value-summary resolver, coordinator, and API
* introduce default kind
* remove $ in variable name
* make extension element name more specific to not collide with interface name
* add element base
* move to section module
* return as observable from resolver
* use extension item repository
* prefix start node feature with user
* add value type and value summary for date-time-with-time-zone property editor
* render timezone
* Add fallback render if no extensions can be found
* Add color-picker value summary and types
* add summary for slider + align types
* make manifest prop name more explicit
* align element name with class name
* reorganize
* manually combine imports to decrease the number of dynamic imports
* export as valueResolver instead of api
* Inline default value-summary kind manifest
* Use single raw value in value-summary coordinator
* Render summaries on Document Collection cards
* format date the same way as the property editor
* first iteration of docs and skills
* updates to docs + skills
* render icon for language collection items
* remove test collection manifest
* delete local language table collection view implementation
* implement the get hrefs method in the user group collection context
* Update controller-host.mixin.ts
* Update entity-name-table-column-layout.element.ts
* Update entity-actions-table-column-view.element.ts
* Handle undefined row element in table rendering
Allow onRowRendered to accept an undefined element and clean up row contexts when a row is unmounted. Update the callback signature in table.element.ts and handle the undefined case in table-collection-view.element.ts by destroying the host and removing the stored context for the item to avoid memory leaks when rows are removed.
* Update controller-host.mixin.ts
* remove test registration
* Prefix type in value key generation
* Skip render when boolean value is undefined
* Add JSDoc and reorder imports in coordinator
* fix lint errors
* Update icons.ts
* valueResolver to class in tests
* Update index.ts
* Add value-summary and value-type Vite entries
* Cache table config and column cell elements
* Use localization for user state labels
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
The manual approval gates added for the duplicate-version rerun were
single-use scaffolding for that specific release. Remove them and
tighten Deploy_Npm and Upload_API_Docs to require Deploy_NuGet to
have actually succeeded (Succeeded or SucceededWithIssues) — so a
NuGet failure deliberately blocks the npm release and docs upload.
Keep the structural change to inspect dependencies.Deploy_NuGet.result
directly rather than rely on the transitive succeeded(). That fix is
permanent: it's what protects npm and docs from cascade-skipping
whenever MyGet has another upstream outage.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Both stages used implicit succeeded(), which is transitive across the
full ancestor graph. A MyGet failure (or a NuGet failure on a re-run
where the version is already published) would therefore cascade-skip
both stages even though their own work is independent of those feeds.
Switch them to inspect dependencies.Deploy_NuGet.result directly so
they remain eligible when NuGet ran and either succeeded or failed,
while still being skipped when Deploy_NuGet itself was Skipped (e.g.
non-release runs). Upload_API_Docs additionally requires Build_Docs
to have produced artifacts.
Add a manual approval gate (ManualValidation@0 server job) to each
stage so a NuGet failure caused by something genuinely unrecoverable
(e.g. expired API key) doesn't auto-promote npm or docs publishes -
the operator must explicitly approve each downstream stage.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Add manual deploy to NuGet for when MyGet publish fails.
* Simplified instructions for manual approval.
* Gate NuGet release on MyGet's direct result, not transitive succeeded/failed.
succeeded() and failed() are transitive across the full ancestor graph,
so a failure in Unit/Integration/E2E (which skips Deploy_MyGet) still made
or(succeeded(), failed()) evaluate to true and opened the approval gate
on a broken build. Inspect dependencies.Deploy_MyGet.result instead so
Deploy_NuGet only becomes eligible when MyGet itself actually ran.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* extend icons with information from theseaurus
* implement new icon search logic
* clean-up data
* sorting with a backup of the name
* refactor into a controller
* improve multi word group search
* embed lucide data
* rename tech into technology
* remove paper from dollar
* implement fuzzy search for property editor UIs
* minor style update
* improve property editor UI search
* improve search
* improve search data for Property Editor UIs
* remove alias search from property editor ui search
* add usage keywords
* Property editor Suggestions based on Property Label
* related should not show up in search
* rename to suggestionQuery
* update threshold
* separate name words
* also consider full icon name match
* better comment
* other approach for full name matches
* full icon name search if query contains a -
* fix test
* cache all tokens as well
* catch rejection
* resolve feedback
* handle rejected promise
* cancel debounce on disconnect
Co-authored-by: Copilot <copilot@github.com>
* declare voids
* corrections
Co-authored-by: Copilot <copilot@github.com>
* back out if no tokens
---------
Co-authored-by: Copilot <copilot@github.com>
* Adding a more detailed error message when deleting a logged in user
* Fixing overlooked integration test
* Fixing enum binary mistake. Appending enum to the end rather than in the middle.
* Introducing better naming for the enum
* Added api helper for reset auth state
* Added more constant variables for login and forgot password message
* Added ui helper for login page
* Added api helper for smtp
* Added tests for backoffice login
* Added tests for backoffice logout
* Added tests for forgot password
* Added api helper for user
* Make tests run in the pipeline
* Updated appsetting to enable reset password
* Added more waits
* Added waits
* Updated locator
* Fix flaky tests
* Updated confirmation message
* Fixed comments
* Removed unused code
* Reverted npm command
* Add ModelState.IsValid validation in controller action
* Update method documentation and return simple BadRequest response (aligns with other usages, e.g. BackOfficeController.Verify2FACode).
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* remove inheritance of readonly state
* keep rendering edit in read-only mode
* INVARIANT variant id as static
* parse readonly state, without variant ids as origin is the property read-only state
* stop inheriting read only
* no need for async
* setup read only state based on user permissions
* simplify document-block-property-level-permissions
* make isPermittedForObservableVariant return undefined in bad case
* revert
* improve life cycle for extension initializer
* fix and clean-up
* clean up
* unit test for the actual problem
* clean up
* clean up
* revert logic
* transform access context into local controller
* re-introduce submit create button
* simplify match
* update js docs
* strict compare on config object level, to cover multiple conditions of the same alias.
* Revert "transform access context into local controller"
This reverts commit 1a83d9586b.
* rename file in manifest
* RTE: set manager readOnly
* set fallback on readOnly
* inherit readOnly state when block workspace is invariant
* read-only tag for Block Workspace
* make guard fallback reactive
* observe readOnly languages
* no if sentence
* observe fallback for property + name guards
* prevent cancelled context get to cause problems
* revert removal of || this._isReadOnly check for component rendering
* add comment for clarification
* remove style import
* mark as readonly and make js-const
* remove `as const`
* unit test for reactive fallback feature
* more guard unit tests
* more variantId tests
* move block language access controller to block package
* Update base-extension-initializer.controller.ts
* fix test
* improve switch condition
* offset condition
* Block Workspace: Add data-mark for acceptance test locator
* apply entity-type to the workspace data-mark
* layout-headline
* Updated locator to use new data-mark
* Updated tests to make them less fragile
* null ctrl alias for constructor initiated observations
* import directly
* do not react to not existing user-data or missing context
* add comment
* refactor package registration logic
* package name for code editor
* leave unregistere out
* await load all bundles
Co-authored-by: Copilot <copilot@github.com>
* move initializer to app element
* Batch register extensions with validation
* remove await on load for extension initializers
* Debounce extension updates and set loaded flag
* remove unused imports
* refactor backoffice -> app
* clean up imports
* rename comment
Co-authored-by: Copilot <copilot@github.com>
* base extension initializer is loaded update
* app loader
Co-authored-by: Copilot <copilot@github.com>
* embed umbraco-packages
* remove lazy loads from dataSourceDataMapper
* revert
* enable routes to be undefined
Co-authored-by: Copilot <copilot@github.com>
* comment
Co-authored-by: Copilot <copilot@github.com>
* make sure load only calls once
Co-authored-by: Copilot <copilot@github.com>
* comments and todos
* destroy consumer if existing
* block language access tests
* load user at the end of loading all package modules
* assign symbol for is-trashed observer
* revert language readonly rules
Co-authored-by: Copilot <copilot@github.com>
* is-trashed context + observation
Co-authored-by: Copilot <copilot@github.com>
* read-only as view prop for block list
Co-authored-by: Copilot <copilot@github.com>
* readonly as view prop
* readonly prop for grid,rte,single
Co-authored-by: Copilot <copilot@github.com>
---------
Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Andreas Zerbst <andr317c@live.dk>
Co-authored-by: Copilot <copilot@github.com>
* Avoid render structure view when element type is active
* Avoid render history clean up when is an element type
* Replace hidden sections with inline "not applicable" message for Element Types
---------
Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Mark HttpClient IgnoreCertificateErrors as obsolete due to security risk and add TODO to remove in a future release
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
* feat(block): add blockAction extension type for extensible block entry actions
Introduce a new `blockAction` extension type that allows both internal and
3rd-party extensions to register actions on block items. This replaces the
hardcoded Delete button on Block List entries with an extension-registered
action, while keeping Edit Content, Edit Settings, and Copy to Clipboard
as slotted content for incremental migration.
The new `<umb-block-action-list>` element owns the `<uui-action-bar>` and
renders a `<slot>` for hardcoded actions followed by extension-registered
`blockAction` extensions, enabling one-by-one migration of actions.
* feat(block): apply blockAction extension to grid, rte, and single block editors
Extend the blockAction pattern to all remaining block entry elements.
Each editor now uses <umb-block-action-list> with slotted hardcoded
actions and the Delete action registered via the extension registry.
* fix(block): render blockAction extensions directly in uui-action-bar
Replace umb-extension-with-api-slot with UmbExtensionsElementAndApiInitializer
to render blockAction elements as direct children of uui-action-bar. This fixes
the border-radius issue where the wrapper element broke :first-child/:last-child
structural selectors used by uui-action-bar for button styling.
* refactor(block): replace showOnReadOnly meta with BlockEntryIsReadOnly condition
Add a new Umb.Condition.BlockEntryIsReadOnly condition that checks the
read-only state from UMB_BLOCK_ENTRY_CONTEXT. This replaces the inline
read-only guard and showOnReadOnly meta flag on the default kind element.
Delete action uses the condition with match: false (hidden when read-only).
Copy to Clipboard has no condition (always visible). 3rd-party actions
opt in to read-only gating by adding the condition to their manifest.
* feat(block): migrate clipboard copy to blockAction extension
Move the Copy to Clipboard action from hardcoded buttons to a registered
blockAction extension across all four block editors. The copy logic is
moved from each entry element into its respective entry context, with a
base copyToClipboard() method on UmbBlockEntryContext.
* docs(block): add plan for migrating Edit Content and Edit Settings to blockAction
* feat(block): migrate Edit Settings to blockAction extension
Replace the hardcoded Edit Settings button with a blockAction extension
using the default kind. The API class provides getHref() for workspace
navigation and getValidationDataPath() for the invalid badge.
Adds getValidationDataPath() to the UmbBlockAction interface and default
kind element, enabling any blockAction to display a validation badge.
Introduces Umb.Condition.BlockEntryHasSettings condition to control
visibility based on whether the block has a settings element type.
* feat(block): migrate Edit Content to blockAction extensions
Split the hardcoded Edit Content button into two blockAction extensions
controlled by manifest conditions:
- Umb.BlockAction.EditContent — navigates to workspace content view,
shows validation badge via getValidationDataPath()
- Umb.BlockAction.ExposeContent — calls context.expose() when block
is not yet exposed and content edit is hidden
Adds match support to BlockEntryShowContentEdit condition and creates
a new BlockEntryIsExposed condition at the entry level.
Removes the <slot> from umb-block-action-list — all block entry actions
are now fully driven by the extension registry.
* Removes plan/spec files
* chore(block): address review findings for blockAction feature
- Add TODO comment for stale getHref/getValidationDataPath (I-1)
- Remove orphaned @state() properties from all four entry elements (I-2)
- Add UMB_BLOCK_ENTRY_SHOW_CONTENT_EDIT_CONDITION_ALIAS constant and
replace string literals in edit-content/expose-content manifests (I-3)
- Change Expose Content weight from 400 to 399 (S-1)
- Add JSDoc to exported types and classes (S-2)
- Fix condition import alias — rename workspace-level to
UmbBlockWorkspaceIsExposedCondition (S-3)
* fix(block): revert CSS custom property rename to preserve backwards compatibility
Restore the original per-editor CSS custom property names:
--umb-block-list-entry-actions-opacity, --umb-block-grid-entry-actions-opacity,
--umb-block-single-entry-actions-opacity. The action bar opacity styles are
now back in each entry element (using #actions selector), so the unified
property name is no longer needed.
* fix(block): address PR review feedback from Copilot and Claude bots
- Fix Expose button label regression — replace dynamic
'#blockEditor_createThisFor' (function key) with static '#actions_create'
so the button no longer renders "Create undefined"
- Guard empty-string href in EditContent and EditSettings actions —
'workspaceEdit{Content,Settings}Path' emits '' before ready; return
undefined instead of '' so the button doesn't get href="" (which would
navigate to the base URL on click)
- Clear _href in default kind api setter — prevents stale href when the
api is replaced or set to undefined
- Fix barrel imports in 3 block entry conditions — import
UMB_BLOCK_ENTRY_CONTEXT directly from context-token.js rather than via
the ../index.js barrel, reducing circular dependency risk
- Make block-action-list reactive to contentTypeAlias changes — the
extensions initializer is now re-created when unique or
contentTypeAlias changes, so forContentTypeAlias filters apply
correctly when contentTypeAlias resolves asynchronously
- Throw in base copyToClipboard() — the default no-op on
UmbBlockEntryContext now throws rather than logging a warning, so any
future subclass that fails to override fails visibly
Tests for the new conditions were attempted but deferred to follow-up;
context observable mocking semantics need more investigation.
* fix(block): restore uui-action-bar styling on block-action buttons
Remove the `compact` attribute from the inner `<uui-button>` and bridge
the CSS custom properties set by `uui-action-bar::slotted(*:first-child)`
etc. through `<umb-block-action>`'s shadow DOM via intermediate
`--umb-button-*` variables. Without this bridge, `uui-button`'s own
`:host` declarations shadow the inherited values and the first/last
button border-radius + padding don't apply.
* fix(block): address second-pass PR review feedback
- Throw when RTE editor manifest is missing so clipboard entries are
never written with an empty propertyEditorUiAlias (would silently
fail to match on paste)
- Replace bare `return` with `return nothing` in default kind element
render() for type-level clarity
- Add class-level JSDoc to exported block action classes
(UmbEditContentBlockAction, UmbEditSettingsBlockAction,
UmbDeleteBlockAction, UmbCopyToClipboardBlockAction,
UmbExposeContentBlockAction) and UmbBlockActionDefaultElement
* refactor(block): reduce copyToClipboard complexity per CodeScene feedback
Extract `#buildPropertyValue()` helper in List, RTE, and Single entry
contexts to move the four content/layout/settings/expose ternaries out
of copyToClipboard, lowering its cyclomatic complexity.
Split the compound `||` context guards into sequential early-return
checks so each missing context throws with a specific error message,
and the "Complex Conditional" smell is removed.
* refactor(block): further reduce RTE copyToClipboard complexity
Consolidate three sequential `await getContext(...)` calls into a single
`Promise.all`, dropping the cyclomatic complexity below CodeScene's
threshold of 9.
* refactor(block): extract RTE clipboard write into helper method
Split the post-guard write phase into `#writeClipboardEntry` to bring
both methods well under CodeScene's cyclomatic complexity threshold.
* clean up action
Co-authored-by: Copilot <copilot@github.com>
* show edit content / settings despite read-only state
---------
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Copilot <copilot@github.com>
* Use InvariantCulture when parsing node paths.
* Add suggested validation of setup to integration test.
* Add more explicit tests for negative sign handling
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Prevent creation of redirects when the old route is unroutable.
* Addressed code review feedback.
* Extend fix to handle case where a second, child page is "redirected" after preview was left open.
(cherry picked from commit 728789aaf6)
* Ensure published querying parity between V13 and V17
* Add unit tests for published ancestor path querying
* Fix Claude review comments
* Make Unfiltered() public on the interface
* Explicitly evaluate "unfiltered" items
* A little clean-up
* Add integration tests
* Addressed code review feedback.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Prevent creation of redirects when the old route is unroutable.
* Addressed code review feedback.
* Extend fix to handle case where a second, child page is "redirected" after preview was left open.
* Extends `UmbContentRollbackModalValue` with `UmbEntityModel`
so that the Rollback modal can return the entity-type,
to display the correct notification message.
* Housekeeping
* Added localized fallback key
* Fixed typecasting issue for deprecated Document rollback
* Reverted logic, introduced `rollbackNotificationMessage` meta prop
* Added constant variables for audit trail
* Added ui helper for audit trail
* Added tests for audit trails in content
* Added test for audit trail when trash content
* Added tests for audit trail when sort. move and rollback content
* Added tests for audit trail when bulk actions
* Updated tests for creating content
* Fixed comment
* bug(#22607) Add Directory.Packages.props and update restore command
Updated Dockerfile to include Directory.Packages.props and modified restore command to resolve docker build errors during dotnet restore step. Resolves issue #22607
* fix(template): conditionally copy Directory.Packages.props in Dockerfile
Only copy Directory.Packages.props when CPM is enabled, as per-project
package management users won't have this file in their build context.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit df3cd50e7f)
* Generate random guid for cert pass
* Changes from review
* Move cert generation and add script to trust cert on host machine
* Generate simple hmac key
(cherry picked from commit fcf5af3d16)
* bug(#22607) Add Directory.Packages.props and update restore command
Updated Dockerfile to include Directory.Packages.props and modified restore command to resolve docker build errors during dotnet restore step. Resolves issue #22607
* fix(template): conditionally copy Directory.Packages.props in Dockerfile
Only copy Directory.Packages.props when CPM is enabled, as per-project
package management users won't have this file in their build context.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* add redirect tracking workspace
* change weight to match v13 order
* add missing alignment and text colour
* Align closer with referency by element
* Ad repository pattern from review
* remove obsolete
* Update src/Umbraco.Web.UI.Client/src/packages/documents/documents/redirect-management/info-app/document-redirect-management-workspace-info-app.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Adds JSDocs
* Removed unused `created` and `documentUnique` from `UmbDocumentRedirectUrlModel`
* Align `setStatus` and `delete` return shape with other data source methods
* Align workspace context observer with sibling info-app pattern
* Polish dashboard and info-app: localize hardcoded strings, tidy templates and imports
* Apply review simplifications
- Drop duplicate `unique` guards from data source (kept at repository boundary)
- Drop unnecessary `?? []` fallbacks (`items` is non-nullable in the API type)
- Localize hardcoded zero-results strings in dashboard
- Simplify redundant length check in info-app `#getTargetUrl`
- Drop unused `userIsAdmin` from `UmbDocumentRedirectStatusModel`
---------
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Mark RTE as supports read only
* RTE: Address read-only review feedback
- Remove `pointer-events: none` from `:host([readonly])` so users can select and copy text in read-only mode
- Make the editor's editable state reactive to the `readonly` property via `setEditable`
- Skip rendering the statusbar in read-only mode (mirrors the toolbar) to avoid the missing border-radius regression
- Remove the now-unused `readonly` property from `umb-tiptap-toolbar` and `umb-tiptap-statusbar`
---------
Co-authored-by: leekelleher <leekelleher@gmail.com>
* init current user workspace
* adding current user workspace and their apis
* add new controllers
* add default implementation
* Update src/Umbraco.Core/Services/UserService.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Update src/Umbraco.Cms.Api.Management/ViewModels/User/UpdateCurrentUserRequestModel.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Update tests/Umbraco.Tests.Integration/Umbraco.Core/Services/UserServiceCrudTests.Update.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Update src/Umbraco.Core/Models/CurrentUserUpdateModel.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* update openApi.json, remove userKey from model, remove redundant authentication check from controllers
* update localize
* allow blob: URLs in img-src CSP for avatar
* save image change later
* Remove references to "current" user from service layer.
Align validation for user profile update with update user service method.
Controller tidy-up of dependencies.
* Add missing controller from last commit.
* resolve conflicts 2
* Renamed/relocated "current-user-workspace" to "profile/edit"
Refactored the "Edit" (profile) button logic,
to handle the check whether the user has access to the Users section.
* Removed the "Section User No Permission" condition
as no longer used.
* UI tweaks + streamlining
* Profile edit: surface save errors and avoid blob URL leak
- Show danger notification when avatar upload/delete or profile update fails
- Refresh current user after avatar upload so the store holds server URLs, not a leaking local blob
- Element save() methods now return boolean; modal keeps itself open when a save fails and no longer double-submits
* Refactored to use `asPromise()`
* Current User: Adapt edit-profile modal into a workspace extension
Replaces Umb.Modal.CurrentUserEditProfile with a workspace registered
against entityType 'current-user'. The UmbSubmittableWorkspaceContextBase
subclass owns the editable user model and pending avatar state; submit()
coordinates uploadAvatar / deleteAvatar / updateProfile and throws on
failure so the workspace stays open, relying on the repository's existing
danger notifications.
The current-user "Edit" action now opens UMB_WORKSPACE_MODAL (sidebar,
small) instead of the bespoke modal. Avatar and settings children become
presentational views wired to the workspace context.
* Current User workspace: Address review findings
- Await initial load promise in submit() to prevent a race where the save
action fires before the first requestCurrentUser() resolves.
- Guard the avatar element's async observer setup against post-disconnect
attachment.
- Document the split between #data (editable persisted state) and
#pendingAvatar (transient UI state) in the workspace context.
- Remove stray JSDoc whitespace in current-user.server.data-source.ts.
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
* fix raw sql with ISqlSyntaxProvider name escaping
* reduce hard coded strings
* Fix Raw Sql in MemberFilterRepository
* fix formating
* restore MemberFilterRepository
* Correct usage of field name constant.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* fix raw sql with ISqlSyntaxProvider name escaping
* reduce hard coded strings
* Fix Raw Sql in MemberFilterRepository
* fix formating
* restore MemberFilterRepository
* Correct usage of field name constant.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Prevent Concurrent_Save_Same_Login_Should_Not_Throw_Duplicate_Key_Exception from failing when exceptions other than what is being guarded against are triggered.
* Addressed code review feedback.
* Generate random guid for cert pass
* Changes from review
* Move cert generation and add script to trust cert on host machine
* Generate simple hmac key
* Add table collection view and manifests
* Use table kind in collection example
* Update entity-name-table-column-layout.element.ts
* Recompute table rows when item hrefs change
* define and render columns from manifest
* wip language implementation
* map to unique field
* rename to label
* test implementation for users table
* clean up
* add example entity actions
* add example description
* Update table-collection-view.element.ts
* Omit base 'meta' and relax table meta type
* Hardcode description column when present
* localize column names
* Update table-collection-view.element.ts
* Type manifest on collection view elements
* Use UmbLitElement instead of LitElement
* fix types
* Update entity-name-table-column-layout.element.ts
* provide entity context for each table row
* fix breaking change and introduce a deprecation warning
* Add status column to example collection view + localize column labels
* implement the UmbTableColumnLayoutElement interface
* add tests for the table collection view
* Make host element optional; add table docs/types
* Update controller-host.mixin.ts
* Update src/Umbraco.Web.UI.Client/src/packages/core/entity-action/global-components/entity-actions-table-column-view/entity-actions-table-column-view.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update controller-host.mixin.ts
* Update entity-name-table-column-layout.element.ts
* Update entity-actions-table-column-view.element.ts
* Handle undefined row element in table rendering
Allow onRowRendered to accept an undefined element and clean up row contexts when a row is unmounted. Update the callback signature in table.element.ts and handle the undefined case in table-collection-view.element.ts by destroying the host and removing the stored context for the item to avoid memory leaks when rows are removed.
* Update controller-host.mixin.ts
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* Align GUID-via-UDI and integer locallink sources in migration to consistent type attribute casing.
* Handle Pascal cased type attributes from local links.
* Preserve segment-specific property values after save and publish.
* Addressed feedback from code review.
* Moved fix to a projection in UmbPropertyValuePresetVariantBuilderController.
---------
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* Preserve segment-specific property values after save and publish.
* Addressed feedback from code review.
* Moved fix to a projection in UmbPropertyValuePresetVariantBuilderController.
---------
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* Add XML header comments and unit tests for member operation surface controllers.
* Addressed code review feedback.
* Further code review feedback.
---------
Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
* Add a constant for the "unroutable content" route
* Add one more constant for URL provider exceptions
* Update src/Umbraco.Core/Routing/UrlProviderExtensions.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Update src/Umbraco.Core/Constants-Routing.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Update src/Umbraco.Core/DeliveryApi/ApiContentRouteBuilder.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Definition and validation of minimum range for slide property editor.
* Address code review feedback.
* Treat an incorrectly configured negative minimum range as zero.
---------
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* Ensure that DocumentUrlService and DocumentUrlAliasService will respect read-only, subscriber databases.
* Fixed breaking change in constructor.
* Clarified comment.
* Use pattern matching in SkipDatabaseWrites() check.
* Ensure that DocumentUrlService and DocumentUrlAliasService will respect read-only, subscriber databases.
* Fixed breaking change in constructor.
* Clarified comment.
* Use pattern matching in SkipDatabaseWrites() check.
* fix(frontend): use keyed repeat for umb-table columns to fix Firefox rendering (#22411)
Column rendering used .map() without keys, causing Firefox's CSS
table-* layout to break when columns changed after initial render.
Switch to repeat() with column.alias keys so Lit properly inserts/removes
DOM nodes. Also removes a stray </uui-table-cell> closing tag.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(frontend): wrap umb-table in Lit `keyed` so Firefox rebuilds the table when columns change
The `repeat()` + alias key change alone did not fix the Firefox issue: Firefox's
`display: table-*` layout engine fails to relayout when cells are inserted into
existing rows, even when Lit's keyed reconciliation does the right thing.
Wrap the `<uui-table>` render in `keyed(columnKey, ...)` so that whenever the
column set changes (keyed on the joined column aliases), Lit discards the entire
subtree and builds a fresh one. Firefox then paints a brand-new table and its
buggy incremental relayout path never runs.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* docs(frontend): document UmbTableColumn.alias uniqueness constraint
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* fix(frontend): reattach sorter on column rebuild and harden column key
Address two review comments on the keyed() rebuild:
- UmbSorterController caches its container element on first
initialization, so when keyed() replaces <uui-table> the sorter stays
attached to the detached node. Toggle disable()/enable() in updated()
when the column signature changes and the table is sortable, so the
sorter reattaches to the fresh table.
- Build the column key via JSON.stringify instead of a pipe-joined
string, so aliases containing '|' can't collide and defeat the rebuild.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Content: Clear per-culture published flags when copying a document (closes#22540)
When copying a published culture-variant document, the document-level
published flag was cleared on the copy, but the per-culture published
info (mapped to umbracoDocumentCultureVariation.published) was carried
over from the source. This left the database in an inconsistent state
where the document was unpublished overall but each culture row
reported published=1.
Clear PublishCultureInfos on both the root copy and its descendants
alongside the existing Published=false assignment so no culture
variations are persisted as published on the copy.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* Address review feedback: use ClearPublishInfos() helper + add recursive test
- Replace direct property assignment with the existing ClearPublishInfos()
extension method for semantic clarity and consistency with UnpublishCulture.
- Rename test to match the Can_Copy_* convention used by neighbouring tests.
- Add a second test that exercises the recursive descendant path, confirming
per-culture published flags are also cleared on descendants.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* Updates integration tests to explicitly verify the fix.
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* fix: prevent open redirect in public surface controllers by validating RedirectUrl with Url.IsLocalUrl
* Update src/Umbraco.Web.Website/Controllers/UmbLoginStatusController.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Update src/Umbraco.Web.Website/Controllers/UmbProfileController.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Update src/Umbraco.Web.Website/Controllers/UmbRegisterController.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Correct logging and swallowing of exceptions when retrieving references with changed property types.
* Addressed code review feedback.
* Change multi URL picker to fall back to returning an empty collection if the links JSON could not be deserialised.
---------
Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
* Defensively handle case where published status in databse is corrupt.
* Addressed code review feedback.
* Further code review feedback.
* Similar fix for NRE in rebuild of document URLs.
* Add option for rebuild following content type update in the background.
* Add integration test for deferred rebuild.
* Addressed code review feedback.
* add retry and graceful shutdown to deferred cache rebuild.
* Prevent shared DB connection in deferred rebuild background task.
* Move deferred rebuild trigger to post-scope notification.
* Introduce similar deferred behaviour for Examine reindexing.
* Prevent background cache rebuild from blocking foreground content saves.
* Handle potential case of primary key constraint violation when deferred rebuilding content cache and a content item is saved.
* Improved variable naming.
* Add migration to fix data type storage for labels configured with a long string value type.
* Fixed class name and added additional test from code review feedback.
* Further code review feedback.
* Add further test.
* Support separate database DbContexts in AddUmbracoDbContext.
* update internal callers to use new non-obsolete AddUmbracoDbContext overload
- UmbracoEFCoreComposer now calls the new overload with explicit shareUmbracoConnection: true
- Add #pragma CS0618 suppression for v18-obsolete overloads delegating to v19-obsolete overloads
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Update further internal caller to use non-obsolete method.
* Addressed code review feedback.
* Updates after merge/final local review.
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Optimize ContentTypeRepository to avoid unnecessary deep-cloning on cache reads.
* Used lightweight benchmark and addressed code review comments.
* Optimize TemplateRepository to avoid unnecessary deep-cloning on cache reads.
* Optimize DomainRepository to avoid unnecessary deep-cloning on cache reads.
* Optimize remaining repositories to avoid unnecessary deep-cloning on cache reads.
* Present dialog for further action after creating an API user.
* Addressed code review feedback.
---------
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
The allowlist referenced mcp__github__create_issue_comment, which
doesn't exist in github-mcp-server v0.17.1 (the tool is
add_issue_comment). Claude's attempts to comment were denied, so
duplicates were labelled but no explanation comment was posted.
Also adds a workflow_dispatch trigger with an issue_number input and
enables show_full_output so future denials are visible in logs.
* eslint rule for Manifest Aliases
* update to handle propertyEditorSchema aliases
* make typescript check
* support localization alias
* Make consts for theme manifests
* no rules for themes
* fix not used, double media-type-root manifest, clean up.
* Improve pascal cases test
* Models, service, repository and migration for external members.
* Integrate identity for external members in MemberUserStore.
* When autolinking external member, skip member type.
* Populate profile.
* Revoke member tokens for delivery API for external members.
* Audit notification handling.
* Management API updates for external members.
* Added IMemberFilterService for combined member queries from management API.
* Referenced by member controller with external members.
* Guard password reset for external members.
* Remove ExternalMemberSettings.
* Convert between content and external members.
* Fixed ambiguous constructor.
* Update OpenApi.json.
* Update client SDK.
* Backoffice ui for external members.
* Refactor member collection retrievel to use presentation factory.
Fixes in testing.
* Fixes from testing.
* Fix icon display on member picker.
* Add external member support to member picker value converter.
* Delete fix, sync data fix, Examine indexing, member collection default icon.
* Add cache refreshers for external members.
* Remove unused "fast path" for just updating login properties.
* Addresed code review feedback.
* Further integration tests.
* Fixed failing unit test.
* Update typed client.
* Addressed code review feedback.
* Early return to reduce nesting in ReferencedByMemberController.
* Introduce MemberPresentationService and MemberReferenceService to move logic out of controllers.
* Test for and fix SQLite deadlock related to cross-store uniqueness checks.
* Additional fix for the "content" member creation.
* Defer external member Examine indexing via the background task queue.
* Add update date to external member record (aligning with content members).
* Add TreatLoginAsMemberUpdate config so member re-index can be skipped on login.
* Add logging to help verify the indexing path chosen on login and register.
* Move ExternalMemberService into Core to align with MemberService.
* Fix deserialization issue with Json payloads.
* Display of external member profile data in backoffice.
* Fixed breaking change.
* Consider existing behaviour of bumping update date on login to be a bug, so no need for configuration and backward compatibility efforts.
* Reduce user start node tree filtering code duplication
Extract shared start node filtering logic from UserStartNodeTreeControllerBase
into a dedicated service hierarchy (IUserStartNodeTreeFilterService and
domain-specific implementations for documents and media).
Existing constructor signatures and protected members are preserved as
obsolete to maintain backward compatibility for external consumers.
* Disambiguate DI constructor resolution for tree controllers
Adds obsolete constructors accepting both the legacy dependencies and the new IDocument/IMediaStartNodeTreeFilterService to the eight concrete tree controllers and to MediaTreeControllerBase. These serve as a superset constructor that lets the DI container unambiguously resolve a single constructor, since the new and existing obsolete constructors have non-subset parameter sets and [ActivatorUtilitiesConstructor] is not honoured by CallSiteFactory at ServiceProvider validation time.
* Address review feedback
- Change constructors on DocumentStartNodeTreeFilterService and
MediaStartNodeTreeFilterService from public to internal (classes are
already internal).
- Add [EditorBrowsable(Never)] to the disambiguation constructors so
IDEs hide them from autocomplete.
- Add inline comments explaining the empty-array fallback in the
obsolete GetUserStartNodeIds/GetUserStartNodePaths overrides.
* Revert filter service constructors to public
DI container requires public constructors for activation, even on
internal classes. Reverts the internal change from the previous commit.
* Add unit tests for UserStartNodeTreeFilterService
Tests ShouldBypassStartNodeFiltering (root access, data type ignore,
no access), MapWithAccessFiltering (access/no-access/missing entities),
and delegation to IUserStartNodeEntitiesService for root, child and
sibling filtering including mixed access scenarios.
* Simplify obsolete-ctor path on document and media tree controllers (#22546)
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Removed line clamp for data type picker
* Removed line clamp on additional labels
---------
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
* add users section into user group
* fix test failed
* fix unchange issue
* add notification
* add remainging count
* update take 100
* split user list into separate element
* add localization for text
* add repository for user list in user group
* update key message
* remove remainingCount from user-input
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Added early steps of member auth
* Cleaned up
* Cleaned up again
* Cleaned up
* Fixes based on comments
* Updated name of helper
* Reverted to old smokeTest command
* Emit relation saved and deleted notification when automatic relations are added and removed during content updates.
* Addressed code review feedback.
* swapping from column to row
* adds same look for when you upload image on a content node
* Remove duplicated css property
---------
Co-authored-by: engjlr <enl@umbraco.dk>
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
* Avoid requirement for IBackOfficeStore registrations for non-backoffice configured setups.
* Apply same update to other read method potentially called from non backoffice setups.
* Remove comment.
* Preserve GetUserById upgrade fallback; strengthen test assertions
- Add IRuntimeState to UserService and mirror the DbException catch
from BackOfficeUserStore.GetAsync(int) in GetUserById, so the
upgrade-time fallback to GetForUpgrade is preserved.
- Use non-empty arguments in the delivery-only integration test so
the repository-backed code paths are actually exercised, not just
the early-return guards.
- Update UserServiceCrudTests to pass IRuntimeState to the new
constructor parameter.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Introduce IBackOfficeUserReader to avoid code duplication for user read methods between UserService and BackOfficeUserStore.
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Fix branch authorization from requiring recycle bin permission.
* Use named parameters.
---------
Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
* fix(api): resolve correct old version on upgrade screen (closes#20980)
The upgrade screen always showed the first version of the current major
(e.g. 17.0.0) regardless of the actual database state. This was because
UpgradeSettingsFactory constructed OldVersion from just the running
app's major version number.
The fix adds UmbracoPlan.GetVersionForState() which walks the migration
transition chain and extracts version numbers from migration type
namespaces (V_{major}_{minor}_{patch} convention). RuntimeState calls
this during startup and exposes the result via a new
IRuntimeState.CurrentMigrationVersion property (with a default null
implementation to avoid breaking changes). UpgradeSettingsFactory uses
this resolved version with a fallback to the previous behaviour.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(api): return 9.4.0 for InitialState in GetVersionForState
InitialState is the final migration state of 9.4 (the lowest supported
upgrade). Returning null caused the fallback to show <major>.0.0 for
databases at that state. Now correctly resolves to 9.4.0.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* chore(infrastructure): add TODO (V18) to update initialVersion when InitialState changes
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Added TODO for 18.
* Addressed code review feedback.
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Allow packages and hosted services to set an ambient backoffice identity via AsyncLocal for scenarios where no HttpContext is available.
* Addressed code review feedback.
* Avoid allocating a string if _publishedContentCache has a cached version & removed preview param, it was always false
* Clarified comment, used GetCacheKey method from location where string was being created.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Use GeneratedRegex instead of generating at runtime
* Add unit tests to verify refactored code.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* update npm dependencies for v17.4.0 minor release
* update dependencies package
* fix lint errors
* remove Dribbble from lucide to simple icons
* revert @hey-api/openapi-ts bump
* chore: regenerate sdk.gen.ts
* chore: regenerate msw sw
* chore: regenerate icons
* build: excludes "mocks/tools" from being compiled
it is an isolated project and so can be used independent of the backoffice
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* Propagate tree context's additional request args to tree item children, ensuring tree item children respect the "ignore user start nodes" data type setting for content pickers.
* Add unit tests for additional request args forwarding to tree item children manager.
Covers requestCollection with shape validation and pagination behaviour
(take, skip, consistent total) using the kitchen sink mock set.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Covers createScaffold, requestByUnique, create, save, and delete using
the kitchen sink mock set and MSW-intercepted webhook endpoints.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Uses the kitchen sink mock set to test requestItems and items against
the MSW-intercepted webhook item endpoint.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* extend icons with information from theseaurus
* implement new icon search logic
* clean-up data
* sorting with a backup of the name
* refactor into a controller
* improve multi word group search
* embed lucide data
* rename tech into technology
* remove paper from dollar
* upgrade msw, migrate all interceptors, and update backoffice integration
* Fix msw test runner integration
* wip mock sets
* align news mock data
* clean up
* add interface for mock sets
* Refactor mock DBs to use dataSet directly
* export as data
* align exports
* Update index.ts
* simplify
* remove createTemplateScaffold from data set
* remove getGroupByName from mock set
* remove getGroupWithResultsByName from mock set
* remove getIndexByName from mock set
* remove unused getSearchResultsMockData function
* Add kenn mock data set with SQLite transformation scripts
Introduces a new "kenn" mock data set generated from an Umbraco SQLite database export.
Transformation scripts (devops/sqlite-to-mock/):
- Database connection helper using sql.js
- Transform scripts for data-types, document-types, media-types, documents, media, users, templates, languages, and dictionary
Generated kenn data set includes:
- 156 data types
- 48 document types with properties, containers, and compositions
- 11 media types
- 41 documents with property values and variants
- 75 media items
- 4 users and 6 user groups
- 10 templates, 2 languages, 5 dictionary items
Usage: VITE_MOCK_SET=kenn npm run dev
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix Tab/Group container type mapping in document types
The PropertyGroupType enum in Umbraco.Core defines:
- Group = 0
- Tab = 1
The transformer had this inverted. Fixed the mapping and regenerated
document-type.data.ts with correct container types.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix user group fallbackPermissions in transformer
Read permissions from umbracoUserGroup2Permission table instead of
the empty userGroupDefaultPermissions column. Also handles mapping
legacy single-letter permission codes to new Umb.Document.* format.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Remove deprecated createTemplateScaffold from template transformer
This function was removed from the UmbMockDataSet interface.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Move sqlite-to-mock script to main package.json
Consolidate the SQLite transformation tooling into the main package by:
- Adding sql.js, @types/sql.js, and tsx as devDependencies
- Adding sqlite-to-mock script that runs transformations and lints output
- Removing the separate devops/sqlite-to-mock/package.json and lock file
This allows the transformation scripts to reuse the main node_modules.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* add url manager and url handlers
* Add CLI parameters to sqlite-to-mock script
The script now requires db-path and set-alias arguments:
npm run sqlite-to-mock -- <db-path> <set-alias>
Changes:
- Add configure(), getDatabase(), getOutputDir(), closeDatabase() for lazy init
- Add CLI argument parsing with validation
- Remove direct execution calls from transform scripts
- Move eslint formatting into the script
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Generate complete mock data sets and auto-discover sets
- Add generate-supporting-files.ts to create index.ts and all
placeholder/static files needed for a complete mock data set
- Use import.meta.glob for dynamic mock set discovery instead
of hardcoded switch statement
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add mock handler for document type configuration
Introduces a new mock handler to serve document type configuration data, updates the mock database to provide configuration, and integrates the handler into the document type mock handlers.
* make all mock data optional
* Add custom service worker to bypass static asset requests
Introduces umbServiceWorker.js to intercept and bypass static asset requests before reaching MSW, improving startup performance in Vite development.
* fix type errors
* Update template-query.manager.ts
* change to runtime load of mock data
* Update package-lock.json
* wip mock set switcher
* Use umbMockManager.availableSetNames in mock header
* remove the test set
* clean up
* move mock files to the client project root
* rename folder
* move sqllite tool into mocks folder
* clean up
* rename folder
* update the correct tsconfig file
* Update README.md
* fix path
* mock search
* add mocks for tree siblings endpoint
* add mocks for document type and media type allowed parents
* split user permissions mock data into its own mock set
* Initialize localization registry in date test
* don't use consts. Inits too much from the modules
* Update property-editor-ui-user-picker.test.ts
* Update property-value-cloner-block-grid.cloner.test.ts
* add custom permission
* make test check for custom permission in specific mock set
* use specific mock set with specific user id
* Update document-user-permission.condition.test.ts
* Update section-user-permission.condition.test.ts
* add mock manager util to internal utils
* add import map to test runner
* Move mock-data-set.types and update imports
* Exclude internal consts in export test
* Rename mock key to userPermissions
* Register mock manifests only in development
* manual merge
* Add labels and alias/label list for mock sets
* Add visibility flag for mock sets
* delete kenn mock set
* Update mock-manager.ts
* fix(mocks): correct document type composition generation in sqlite-to-mock
The compositions were reversed - grouped by parentContentTypeId instead
of childContentTypeId. In cmsContentType2ContentType, the parent is the
composed type and the child is the type using it. Also adds inheritance
vs composition detection based on umbracoNode parentId matching.
* Update src/Umbraco.Web.UI.Client/mocks/msw-handlers/member-type/structure.handlers.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/mocks/tools/sqlite-to-mock/README.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/mocks/db/template-detail.manager.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix mock DB slice and add safety checks
* Adds "Kitchen Sink" mock data set
* Updates to sqlite-to-mock tool
* Default mock data set tweaks
Replaces "loremflickr.com" images with local placeholders
* "Kitchen Sink" mock data updates
* feat(mocks): add member support to sqlite-to-mock tool
Add transformers for members, member types, and member groups to replace
the empty placeholder arrays. Queries cmsMember, cmsMemberType, and
cmsMember2MemberGroup tables for auth data, property visibility, and
group relationships.
* Updated "Kitchen Sink" mock data with Members
* fix(mocks): type rawData in composition-mapped files to avoid never[] inference
When all compositions arrays are empty, TypeScript infers the element
type as never, causing a type error on the .map() callback. Adding an
explicit type annotation for rawData resolves this. Also fixed in both
generators so future runs produce correctly typed output.
* feat(mocks): implement imaging resize URLs handler
Extract the umbracoFile src from media items and build resize URLs with
width, height, mode, and format query parameters. Replaces the empty
urlInfos placeholder.
* Updated placeholder images
* fix(mocks): return actual media file URLs and add missing folders endpoint
The /media/urls handler was returning ancestor-based slug paths instead
of the umbracoFile source path, causing the image cropper modal to
render a generic file preview instead of an image preview.
Also adds the missing /item/media-type/folders handler that was causing
a crash when opening the media picker.
* fix(mocks): parse JSON values stored in varcharValue column
Short JSON values like Color Picker data are stored in varcharValue
rather than textValue in SQLite. The transformers only attempted
JSON.parse on textValue, leaving varcharValue as raw strings. Now also
parses varcharValue when it starts with { or [.
Also fixes the kitchen-sink Color Picker mock data to use parsed objects.
* fix(mocks): add missing document audit log handler
Adds a handler for GET /document/{id}/audit-log that returns the shared
audit log data from the mock data set. Prevents crash in the document
workspace info view history component.
* Mock data tweaks
* move logic from msw handlers to mock services
* remove debugger
* introduce an audit log db class
---------
Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* adds same drag styling as when dragging item in the content sectin
* remove unused loader css
---------
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Pass `github_token` and set `allowed_non_write_users: "*"` so the action
bypasses the OIDC actor check, which rejects non-maintainers with
"User does not have write access on this repository". Safe here because
`permissions:` and `--allowedTools` are tightly scoped to issue ops.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* upgrade msw, migrate all interceptors, and update backoffice integration
* Fix msw test runner integration
* wip mock sets
* align news mock data
* clean up
* add interface for mock sets
* Refactor mock DBs to use dataSet directly
* export as data
* align exports
* Update index.ts
* simplify
* remove createTemplateScaffold from data set
* remove getGroupByName from mock set
* remove getGroupWithResultsByName from mock set
* remove getIndexByName from mock set
* remove unused getSearchResultsMockData function
* Add kenn mock data set with SQLite transformation scripts
Introduces a new "kenn" mock data set generated from an Umbraco SQLite database export.
Transformation scripts (devops/sqlite-to-mock/):
- Database connection helper using sql.js
- Transform scripts for data-types, document-types, media-types, documents, media, users, templates, languages, and dictionary
Generated kenn data set includes:
- 156 data types
- 48 document types with properties, containers, and compositions
- 11 media types
- 41 documents with property values and variants
- 75 media items
- 4 users and 6 user groups
- 10 templates, 2 languages, 5 dictionary items
Usage: VITE_MOCK_SET=kenn npm run dev
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix Tab/Group container type mapping in document types
The PropertyGroupType enum in Umbraco.Core defines:
- Group = 0
- Tab = 1
The transformer had this inverted. Fixed the mapping and regenerated
document-type.data.ts with correct container types.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix user group fallbackPermissions in transformer
Read permissions from umbracoUserGroup2Permission table instead of
the empty userGroupDefaultPermissions column. Also handles mapping
legacy single-letter permission codes to new Umb.Document.* format.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Remove deprecated createTemplateScaffold from template transformer
This function was removed from the UmbMockDataSet interface.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Move sqlite-to-mock script to main package.json
Consolidate the SQLite transformation tooling into the main package by:
- Adding sql.js, @types/sql.js, and tsx as devDependencies
- Adding sqlite-to-mock script that runs transformations and lints output
- Removing the separate devops/sqlite-to-mock/package.json and lock file
This allows the transformation scripts to reuse the main node_modules.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* add url manager and url handlers
* Add CLI parameters to sqlite-to-mock script
The script now requires db-path and set-alias arguments:
npm run sqlite-to-mock -- <db-path> <set-alias>
Changes:
- Add configure(), getDatabase(), getOutputDir(), closeDatabase() for lazy init
- Add CLI argument parsing with validation
- Remove direct execution calls from transform scripts
- Move eslint formatting into the script
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Generate complete mock data sets and auto-discover sets
- Add generate-supporting-files.ts to create index.ts and all
placeholder/static files needed for a complete mock data set
- Use import.meta.glob for dynamic mock set discovery instead
of hardcoded switch statement
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add mock handler for document type configuration
Introduces a new mock handler to serve document type configuration data, updates the mock database to provide configuration, and integrates the handler into the document type mock handlers.
* make all mock data optional
* Add custom service worker to bypass static asset requests
Introduces umbServiceWorker.js to intercept and bypass static asset requests before reaching MSW, improving startup performance in Vite development.
* fix type errors
* Update template-query.manager.ts
* change to runtime load of mock data
* Update package-lock.json
* wip mock set switcher
* Use umbMockManager.availableSetNames in mock header
* remove the test set
* clean up
* move mock files to the client project root
* rename folder
* move sqllite tool into mocks folder
* clean up
* rename folder
* update the correct tsconfig file
* Update README.md
* fix path
* mock search
* add mocks for tree siblings endpoint
* add mocks for document type and media type allowed parents
* split user permissions mock data into its own mock set
* Initialize localization registry in date test
* don't use consts. Inits too much from the modules
* Update property-editor-ui-user-picker.test.ts
* Update property-value-cloner-block-grid.cloner.test.ts
* add custom permission
* make test check for custom permission in specific mock set
* use specific mock set with specific user id
* Update document-user-permission.condition.test.ts
* Update section-user-permission.condition.test.ts
* add mock manager util to internal utils
* add import map to test runner
* Move mock-data-set.types and update imports
* Exclude internal consts in export test
* Rename mock key to userPermissions
* Register mock manifests only in development
* manual merge
* Add labels and alias/label list for mock sets
* Add visibility flag for mock sets
* delete kenn mock set
* Update mock-manager.ts
* fix(mocks): correct document type composition generation in sqlite-to-mock
The compositions were reversed - grouped by parentContentTypeId instead
of childContentTypeId. In cmsContentType2ContentType, the parent is the
composed type and the child is the type using it. Also adds inheritance
vs composition detection based on umbracoNode parentId matching.
* Update src/Umbraco.Web.UI.Client/mocks/msw-handlers/member-type/structure.handlers.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/mocks/tools/sqlite-to-mock/README.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/mocks/db/template-detail.manager.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix mock DB slice and add safety checks
* webhook mock plan
* init webhook mock set + handlers
* Adds "Kitchen Sink" mock data set
* Updates to sqlite-to-mock tool
* Default mock data set tweaks
Replaces "loremflickr.com" images with local placeholders
* "Kitchen Sink" mock data updates
* Add paginated list and remove collection handler
* feat(mocks): add member support to sqlite-to-mock tool
Add transformers for members, member types, and member groups to replace
the empty placeholder arrays. Queries cmsMember, cmsMemberType, and
cmsMember2MemberGroup tables for auth data, property visibility, and
group relationships.
* Updated "Kitchen Sink" mock data with Members
* fix(mocks): type rawData in composition-mapped files to avoid never[] inference
When all compositions arrays are empty, TypeScript infers the element
type as never, causing a type error on the .map() callback. Adding an
explicit type annotation for rawData resolves this. Also fixed in both
generators so future runs produce correctly typed output.
* Add webhook delivery mock data and handlers
* Add webhook event mock data and handlers
* include webhooks in kitchen sink data set
* Add flags to webhook mock; fix item response
* Support pagination in webhook events handler
* Update src/Umbraco.Web.UI.Client/mocks/db/webhook-delivery.db.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update detail.handlers.ts
* Map webhook event aliases to event objects
* remove note about being created from SQL db
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* TipTap: Declare Clear Formatting toolbar button's extension dependencies
* Reworked to have a loose dependency
on the `class` and `style` attribute extensions
---------
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Eliminate closure, fix naming & formatting of exceptions
* Added unit tests around the changed code.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Use configured or detected application URL as request URL fallback in background tasks when constructing absolute URLs.
* Addresed code review feedback.
* upgrade msw, migrate all interceptors, and update backoffice integration
* Fix msw test runner integration
* wip mock sets
* align news mock data
* clean up
* add interface for mock sets
* Refactor mock DBs to use dataSet directly
* export as data
* align exports
* Update index.ts
* simplify
* remove createTemplateScaffold from data set
* remove getGroupByName from mock set
* remove getGroupWithResultsByName from mock set
* remove getIndexByName from mock set
* remove unused getSearchResultsMockData function
* Add kenn mock data set with SQLite transformation scripts
Introduces a new "kenn" mock data set generated from an Umbraco SQLite database export.
Transformation scripts (devops/sqlite-to-mock/):
- Database connection helper using sql.js
- Transform scripts for data-types, document-types, media-types, documents, media, users, templates, languages, and dictionary
Generated kenn data set includes:
- 156 data types
- 48 document types with properties, containers, and compositions
- 11 media types
- 41 documents with property values and variants
- 75 media items
- 4 users and 6 user groups
- 10 templates, 2 languages, 5 dictionary items
Usage: VITE_MOCK_SET=kenn npm run dev
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix Tab/Group container type mapping in document types
The PropertyGroupType enum in Umbraco.Core defines:
- Group = 0
- Tab = 1
The transformer had this inverted. Fixed the mapping and regenerated
document-type.data.ts with correct container types.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix user group fallbackPermissions in transformer
Read permissions from umbracoUserGroup2Permission table instead of
the empty userGroupDefaultPermissions column. Also handles mapping
legacy single-letter permission codes to new Umb.Document.* format.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Remove deprecated createTemplateScaffold from template transformer
This function was removed from the UmbMockDataSet interface.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Move sqlite-to-mock script to main package.json
Consolidate the SQLite transformation tooling into the main package by:
- Adding sql.js, @types/sql.js, and tsx as devDependencies
- Adding sqlite-to-mock script that runs transformations and lints output
- Removing the separate devops/sqlite-to-mock/package.json and lock file
This allows the transformation scripts to reuse the main node_modules.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* add url manager and url handlers
* Add CLI parameters to sqlite-to-mock script
The script now requires db-path and set-alias arguments:
npm run sqlite-to-mock -- <db-path> <set-alias>
Changes:
- Add configure(), getDatabase(), getOutputDir(), closeDatabase() for lazy init
- Add CLI argument parsing with validation
- Remove direct execution calls from transform scripts
- Move eslint formatting into the script
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Generate complete mock data sets and auto-discover sets
- Add generate-supporting-files.ts to create index.ts and all
placeholder/static files needed for a complete mock data set
- Use import.meta.glob for dynamic mock set discovery instead
of hardcoded switch statement
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add mock handler for document type configuration
Introduces a new mock handler to serve document type configuration data, updates the mock database to provide configuration, and integrates the handler into the document type mock handlers.
* make all mock data optional
* Add custom service worker to bypass static asset requests
Introduces umbServiceWorker.js to intercept and bypass static asset requests before reaching MSW, improving startup performance in Vite development.
* fix type errors
* Update template-query.manager.ts
* change to runtime load of mock data
* Update package-lock.json
* wip mock set switcher
* Use umbMockManager.availableSetNames in mock header
* remove the test set
* clean up
* move mock files to the client project root
* rename folder
* move sqllite tool into mocks folder
* clean up
* rename folder
* update the correct tsconfig file
* Update README.md
* fix path
* mock search
* add mocks for tree siblings endpoint
* add mocks for document type and media type allowed parents
* split user permissions mock data into its own mock set
* Initialize localization registry in date test
* don't use consts. Inits too much from the modules
* Update property-editor-ui-user-picker.test.ts
* Update property-value-cloner-block-grid.cloner.test.ts
* add custom permission
* make test check for custom permission in specific mock set
* use specific mock set with specific user id
* Update document-user-permission.condition.test.ts
* Update section-user-permission.condition.test.ts
* add mock manager util to internal utils
* add import map to test runner
* Move mock-data-set.types and update imports
* Exclude internal consts in export test
* Rename mock key to userPermissions
* Register mock manifests only in development
* manual merge
* Add labels and alias/label list for mock sets
* Add visibility flag for mock sets
* delete kenn mock set
* Update mock-manager.ts
* fix(mocks): correct document type composition generation in sqlite-to-mock
The compositions were reversed - grouped by parentContentTypeId instead
of childContentTypeId. In cmsContentType2ContentType, the parent is the
composed type and the child is the type using it. Also adds inheritance
vs composition detection based on umbracoNode parentId matching.
* Update src/Umbraco.Web.UI.Client/mocks/msw-handlers/member-type/structure.handlers.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/mocks/tools/sqlite-to-mock/README.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/mocks/db/template-detail.manager.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix mock DB slice and add safety checks
* Adds "Kitchen Sink" mock data set
* Updates to sqlite-to-mock tool
* Default mock data set tweaks
Replaces "loremflickr.com" images with local placeholders
* "Kitchen Sink" mock data updates
* feat(mocks): add member support to sqlite-to-mock tool
Add transformers for members, member types, and member groups to replace
the empty placeholder arrays. Queries cmsMember, cmsMemberType, and
cmsMember2MemberGroup tables for auth data, property visibility, and
group relationships.
* Updated "Kitchen Sink" mock data with Members
* fix(mocks): type rawData in composition-mapped files to avoid never[] inference
When all compositions arrays are empty, TypeScript infers the element
type as never, causing a type error on the .map() callback. Adding an
explicit type annotation for rawData resolves this. Also fixed in both
generators so future runs produce correctly typed output.
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix(SqliteSyntaxProvider.cs): parameterises the `tableName` variable when passing into `DoesPrimaryKeyExist` method
* fix(SqlServerSyntaxProvider.cs): parameterises the `tableName` variable when passing into the `DoesPrimaryKeyExist` sql statement
* test(DoesPrimaryKeyExist-test): Add test file for DoesPrimaryKeyExist
Co-authored-by: LLaverty <liamlaverty@gmail.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Align output cache extension points for the delivery API with those for the website.
* Fix issue running output cache on website and delivery API at the same time.
* Updates from testing.
* Align website default implementation with naming used for delivery API equivalents.
* Addressed code review feedback.
* Updates from self-review.
* Allow removal of template on a document, and indicate when the selected template is no longer allowed.
* Addressed code review feedback.
* remove duplicate inline color style on template icon
---------
Co-authored-by: engjlr <enl@umbraco.dk>
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
* Group get all paths to avoid exceeding SQL Server's max parameter count.
* Move GetAllPaths batching tests to dedicated test class
Move the explicit SQL Server parameter limit tests into their own
class (EntityServiceGetAllPathsTests) with NewSchemaPerTest so the
raw SqlException surfaces instead of being masked by scope disposal.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* use currentColor as color fallback
* clean up necessary prop
* Add test color behavior coverage for umb-icon
---------
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
Co-authored-by: engjlr <enl@umbraco.dk>
Fork PRs on the `pull_request` event don't have access to repository
secrets, so the action fails and surfaces a red check on the PR. Guard
the job with a head-repo equality check so the workflow simply doesn't
run for fork PRs. Remove once upstream fork support lands
(anthropics/claude-code-action#939) and `pull_request_target` can be
re-enabled.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
pull_request_target fails at OIDC token exchange ("401 Unauthorized -
Invalid OIDC token") against Anthropic's backend, even though the
action itself supports the event (PR #579). Fork PRs will not be
auto-reviewed until the upstream issue is resolved. Kept the
pull_request_target block commented with a pointer to the issues
for when re-enabling becomes viable.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Docs require actions:read at the workflow permissions level in addition
to additional_permissions on the action, so Claude's CI-reading MCP
tools can actually function. See anthropics/claude-code-action
docs/configuration.md.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(core): add member sign-in/sign-out notifications
Add MemberLoginSuccessNotification, MemberLoginFailedNotification,
and MemberLogoutSuccessNotification to achieve parity with the
existing backoffice user authentication notifications.
Override HandleSignIn in MemberSignInManager to publish login
success/failure notifications, and override SignOutAsync to publish
logout notifications. This follows the same pattern used by
BackOfficeSignInManager for backoffice users.
Closes#22461
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* docs(core): add remarks to member auth notification classes
Add <remarks> XML documentation to MemberLoginSuccessNotification,
MemberLoginFailedNotification, and MemberLogoutSuccessNotification
describing intended usage, consistent with the backoffice user
notification equivalents.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(web): use IIpResolver for member auth notification IP addresses
Use IIpResolver.GetCurrentRequestIpAddress() for consistent IP
resolution in member auth notifications, matching the pattern used
by BackOfficeUserManager.
Introduces IIpResolver as a new constructor parameter with the
existing constructor marked obsolete (removal in Umbraco 19) using
StaticServiceProvider fallback for backwards compatibility.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Fixed filing unit tests.
* Added tests for new functionality.
* Ensure MemberFailedNotification is fired on invalid credentials as well as member not found.
Add the reason for the failure to the notification.
* Add tests for other failed notification publishing states.
* Clarified comments.
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
The client CLAUDE.md's action-to-doc table already maps deprecation
to docs/deprecation.md, and the root's callout directs agents to read
the client CLAUDE.md for backoffice work. Having the pattern in both
places is redundant.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Agents working from the repo root now see an explicit instruction to
read the client's CLAUDE.md before touching backoffice code. Prevents
missing project-specific conventions (like UmbDeprecation) that are
documented in the client project but not the root.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Maps specific actions (deprecate, create element, add tests, etc.) to
the docs that MUST be read first. Ensures developers opening only the
client folder see the requirements in their Claude context.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The backoffice client requires both @deprecated JSDoc AND a runtime
UmbDeprecation warning for every deprecation. This was documented in
the client's docs/deprecation.md but not referenced in the root
CLAUDE.md, causing AI agents to miss the runtime warning requirement.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Broadens the .claude gitignore to ignore everything except skills/
(committed for CI workflows) and settings.json (shared config).
Previously only settings.local.json was ignored, leaving lock files,
worktrees, and scheduled_tasks artifacts untracked but visible.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Cache: Invalidate published cache entries when content or media is trashed
Trashed content and media were remaining in the published cache because
ContentRefreshNotification/MediaRefreshNotification wrote the trashed
entities back into the cache, and ContentCacheRefresher.HandleMemoryCache
could not resolve the branch descendants after HandleNavigation had moved
them to the recycle bin.
- DocumentCacheService.RefreshContentAsync / MediaCacheService.RefreshMediaAsync:
early-return for trashed entities, deleting from the database cache and
removing from the local memory cache.
- DocumentCacheService.RefreshMemoryCacheAsync / MediaCacheService.RefreshMemoryCacheAsync:
added symmetric else branches so memory cache entries are removed when the
database cache has no corresponding draft or published node (self-healing).
- ContentCacheRefresher.HandleMemoryCache: added a bin fallback to
TryGetDescendantsKeys so broadcasted RefreshBranch payloads can resolve
descendants moved to the recycle bin on load-balanced servers.
- Integration tests covering trashed content and media cache invalidation.
* Cache: Add tests for restoring trashed content and media
Verifies that restored content is back in the draft cache (but not the
published cache, since restore does not republish) and that restored
media is back in the cache.
* Address PR review feedback
- Add bin fallback to MediaCacheRefresher.HandleMemoryCache for
consistency with ContentCacheRefresher.
- Remove redundant [Test] attributes alongside [TestCase].
* Apply suggestions from code review
Co-authored-by: Andy Butland <abutland73@gmail.com>
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Backoffice: Add explicit controller aliases to observe() calls in tree item and default tree elements
Without explicit aliases, observe() falls back to hashing the callback's
source string on every invocation. The api setter on tree-item-element-base
and the #observeData() method on default-tree.element are called each time
the api property changes, making the hash cost and implicit deduplication
behaviour visible in hot render paths.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
pull_request events from forks cannot access OIDC tokens, causing the
job to fail. pull_request_target runs in the base repo context and has
access to secrets/OIDC while still reading the PR diff via the API.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Ensure MigrationBase formats Guids consistently with NPoco for SQLite
SQLite is case sensitive and doesn't have the concept of uniqueidentifier - Guids are stored as uppercase strings
Add FormatGuid method to SqlSyntaxProvider to centralize the logic
* (Optional) Include default FormatGuid implementation in ISqlSyntaxProvider to make this change non-breaking
* Use ToUpperInvariant for Guids in SQLite
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Tidy up comments, fix existing indentation and add unit tests for GUID formatting.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Updated tipTapSettings to match the recent changes
* Updated ui helper for insert value/dictionary/partial view button
* Updated api helper for media delivery
* Fixed api helper for verify width and height in vector graphic media
* localize rte block clipboard entry label
* RTE Block Clipboard: reuse existing localization controller
Avoids alias collision from creating a new UmbLocalizationController on
hosts that already have one. Exposes the base class controller as
protected so subclasses can reuse it.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add login for basic authentication without backoffice.
* Add 2FA to basic authentication flow.
* Accessibility improvements.
* Add tests for BasicAuthLoginController.
* Gate controller so only used when basic authentication is enabled.
Use 2FA view even when login page is not configured.
* Add tests for BasicAuthenticationMiddleware.
* Add support for external login providers.
* Addressed code review feedback.
* Applied suggestions from code review.
* Disable and change text on submit button when logging in.
* Add custom view support.
* Configuration for website output cache settings.
* Interfaces and default implementation for extension points.
* Configure the output cache policy.
* Evict cached documents through updates to related documents, media and members.
* Feedback from code review.
* Update description of service registration in IWebsiteOutputCacheDurationProvider header comment.
Co-authored-by: Sven Geusens <sge@umbraco.dk>
* Use output cache over service provider.
* Optimise and DRY-up eviction handlers.
* Only register IWebsiteOutputCacheManager when the feature is enabled.
* Remove unnecessary check on applying output cache to Umbraco pipeline.
* Add extension point for determining if requests should be cached.
* Broken up large method in DocumentOutputCacheEvictionHandler, put enabled checks around debug logging, further unit test.
---------
Co-authored-by: Sven Geusens <sge@umbraco.dk>
* User Service: Prevent fetching all permissions when no IDs are provided
Ensures that the UserService does not attempt to fetch permissions when the provided ID collection is empty, avoiding potentially expensive database queries that could return permissions for all nodes.
* Move guard into the shared private method and add an integration test to verify the fix.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* fixes modal text styling in Insert and Sections in Templates
* fixed review issues and added accesability for the cards so you can use keyboard
* fixing formatting changes
* fixed unused css and fixed accessability to match the card select & deselect
* fixed redundant key and click events
* fixed accessability for button and small bug with not being able to click it
* Apply language fallback to block element expose filtering.
* Handle code review feedback.
* Use builder instead of mocks in tests.
* Fixed failing unit tests.
* Revert previous approach and move fallback handling to the block property value creator.
* Include fallback policy in published property cache key
* Recreate block elements with resolved fallback culture.
* Use correct pattern for dispose.
* Introduce and use PropertyRenderingContext.
* Tidy up Fallback.
* Use core extensions for string comparison
* Less allocations
* Avoid fallback handling when no fallback policies are provided
---------
Co-authored-by: kjac <kja@umbraco.dk>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Reflects the two-workflow split, trigger phrase stripping behavior,
allowed tools, labeling for both PRs and issues, and implementation
gotchas discovered during setup.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude couldn't find the PR because checkout is on main and
gh pr view with no args returns nothing. Now the PR number is
injected directly into the prompt from the GitHub event context.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude discovered and invoked the umb-review skill which uses git diff
against origin/main — but checkout is on main so the diff was empty.
Prompt now explicitly says to use gh pr diff, not git diff or skills.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The sandbox blocks multi-command Bash operations without approval.
Allow gh and git commands so Claude can read diffs, post comments,
and apply labels without permission errors.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The action strips @claude from the comment before passing to Claude,
so commands arrive as just 'review', 'fix', etc. Updated prompt to
match. Also default empty messages to review (PR) or help (issue).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Prompt now reads the user's message and acts accordingly instead of
prescribing behavior. Common patterns like review/help/fix/label
are listed as examples.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude was treating @claude review as a greeting instead of acting
on the PR. Made prompt explicit about reviewing immediately.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
With only opened/ready_for_review triggers, volume is low enough to
let Claude run without a turn limit.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
25 turns was insufficient — the umb-review skill needs many turns to
read docs, references, changed files, and write the review.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- claude-review.yml: Auto PR review on open/push/ready (no trigger needed)
- claude.yml: Interactive — @claude comments, issue assignment/labeling
Follows anthropics/claude-code-action official examples pattern.
Full Option B gating on the interactive workflow.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Only spin up a runner for issue_comment events that mention @claude.
All other event types pass through to the action for internal filtering.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Merge auto and on-demand review workflows into claude-review.yml.
Add issue support via assignee_trigger and label_trigger.
Let claude-code-action handle permission gating and trigger matching.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
claude-code-action gates on write permission by default — the manual
getCollaboratorPermissionLevel check was redundant.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Avoids collision with the claude-code-action bot's own @claude trigger.
Re-enables job-level filter to skip non-matching comments early.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* DevOps: Add Claude automated PR review action (closes #AB66809)
Adds two GitHub Actions workflows that run the umb-review Claude skill on every non-draft PR and on demand via `@claude review` comments. Reviews are advisory-only and post inline comments per finding plus one summary comment per review run.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* DevOps: Disable auto/on-demand triggers for initial testing
Remove pull_request_target trigger from auto workflow (workflow_dispatch only).
Disable on-demand job until auto workflow is validated.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* enables task
* adds more categories
* DevOps: Address Copilot review feedback
- Checkout PR head ref (not base) so git diff works correctly
- Use fetch-depth: 0 for triple-dot diff merge base
- Fix SHA dedup: use full SHA and paginate comment listing
- Include 'maintain' permission in on-demand gate
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Docs: Document Claude automated PR review workflows in CLAUDE.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
MediaBreadthFirstSeedCount was initialized with StaticDocumentBreadthFirstSeedCount
instead of StaticMediaBreadthFirstSeedCount, mismatching its [DefaultValue] attribute.
* Revert production mode validation for templates and partial views at the service layer, and move to management API.
* Remove unused ConfigureProductionMode helper from PartialViewServiceTests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add integration tests for UpdateTemplateController production mode behavior
Tests verify that the Management API correctly blocks template content
changes while allowing metadata-only updates in production mode.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Restore partial view service checks.
Add integration tests for template controllers with production mode.
* Align delete with create/update for file system changes in production mode.
* Restore partial view service tests.
* Add test for update to delete template repository.
* Refactored to use single test setup method.
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Revert production mode validation for templates and partial views at the service layer, and move to management API.
* Remove unused ConfigureProductionMode helper from PartialViewServiceTests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add integration tests for UpdateTemplateController production mode behavior
Tests verify that the Management API correctly blocks template content
changes while allowing metadata-only updates in production mode.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Restore partial view service checks.
Add integration tests for template controllers with production mode.
* Align delete with create/update for file system changes in production mode.
* Restore partial view service tests.
* Add test for update to delete template repository.
* Refactored to use single test setup method.
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Exclude invariant culture from culture list endpoint
The Invariant Culture (CultureInfo.InvariantCulture) has an empty Name
property which is not a valid ISO code for Umbraco content. Filter it
out in IsoCodeValidator to prevent it appearing in the culture list.
Fixes#22380
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add unit tests for IsoCodeValidator.
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Remove flex-shrink=0 from umb-body-layout
* Avoid collapsing tabs into the dropdown
* Add arrows left and right and bind a scroll
* Add a resizeObserver to keep track when the tabs container change
* Make the sort mode scrollable
* Move the add tab button inside the tabs list container
* Restore tab scrolling and detect hidden overflow
* Create a reusable scrollable container component
* Remove unused import
* Clean up
* Add HTMLElementTagNameMap to the scrollable container
* Always render the add tab button
* Observe slot children on slotchange
* Remove unused variable
* Document patch, variant name only
* Multi variant tests
* Change to json-patch instead of merge to target nested properties
* Fix ManagementApiTest following PR 20820
* Segment suport for properties
* Verify non existing and trashed document patch behaviour
* Mostly working approuch for nested properties
* Fix endpoint route collision (Somehow...)
* Trying a custom way of doing things
* add escape support, more tests and cleanup
* remove unnecesary using
* Cleanup
* Restore things that are breaking
* cleanup
* Namespace cleanup
* Order cleanup
* More comment updates
* Add default implementations
* Improve modelbinding validation
* all string comparison
* Cleanup unused statuses
* Fix PatchPathResolver Filtering not accepting non string values
* Optimize path parsing
* Improve cookie token rework
* more cleanup
* Put AllowedValues on the correct property 🙈
* One more default implementation
* Add link to docs on endpoint swagger info
* PR review corrections
- Removed leftover affectedCultures & affectedSegments
- Extracted IDocumentPatcher interface
- Optimized serialization in patchEngine by moving it 1 level higher
* Update documentation urls
* Apply suggestions from code review
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Removed affected variance tracking that is nog longer being used
* Extract shared data class
* update claude patching namespace
* Remove no longer valid xml comment
* Fix unittests after refactoring patchengine.ApplyOperation(string,...) to patchengine.ApplyOperation(JsonNode,...)
* Refactor base classes
* Apply suggestions from code review
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Optimizations and refactoring of the patcher/engine/parser
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Fixes "files/folders/files or folders" selections for the various media picker components, re-allowing folder selection from a media picker.
* Import and use enim instead of hardcoded enum value
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Batch delete in DocumentUrlRepository and DocumentUrlAliasRepository to avoid exceeding SQL Server's 2100 parameter limit.
* Address code review feedback.
* Remove the unnecessary trigger rebuild on startup statement in the SQL Server migration path.
description:Bump the Umbraco CMS version across all required files. Use when the user asks to bump, update, or set the version number — e.g., "bump version to 17.3.4", "set version to 18.0.0-rc", "update version". Accepts the target version as an argument.
argument-hint:<version> (e.g., 17.3.4, 18.0.0-rc)
---
# Bump Version - Umbraco CMS
Updates the Umbraco CMS version string across all files that track it.
**Do NOT use AskUserQuestion if a version argument is provided. Only ask if `$ARGUMENTS` is empty or cannot be parsed as a version.**
## Arguments
-`$ARGUMENTS` - Required: the target version string (e.g., `17.3.4`, `18.0.0-rc`)
## Files to Update
The following 5 files must be updated with the new version:
| 5 | `tests/Umbraco.Tests.AcceptanceTest/package-lock.json` | top-level `"version"` AND `packages[""].version` |
**Note**: For major version bumps (e.g., 17.x to 18.x), `src/Umbraco.Web.UI.Login/package.json` has a caret-ranged dependency on `@umbraco-cms/backoffice` (e.g., `^17.2.0`) that will need manual updating. This skill does not handle that — major bumps involve many other changes beyond version strings.
## Instructions
### 1. Parse and Validate the Version
Extract the version from `$ARGUMENTS`. It must be a valid semver-like string (e.g., `17.3.4`, `18.0.0-rc`, `17.4.0-preview.1`). If no version is provided or it cannot be parsed, ask the user for the target version.
### 2. Read the Current Version
Read `version.json` and extract the current `"version"` value. If the current version already equals the target version, report that the version is already set and stop — do not edit, stage, or commit anything.
Otherwise, display both versions:
```
Bumping version: {current} -> {target}
```
### 3. Update All Files
Update each of the 5 files listed above, replacing the old version with the new version. For each file:
- **`version.json`**: Replace the `"version"` value.
- **`package.json` files**: Replace the `"version"` value (near the top of the file).
- **`package-lock.json` files**: Replace BOTH the top-level `"version"` value AND the `"version"` inside the `"packages": { "": { ... } }` block. These are always in the first ~10 lines of the file.
Use targeted edits — do NOT rewrite entire files. Be precise to avoid changing version strings in dependency entries.
### 4. Verify
After all edits, grep for the target version value across the 5 files to confirm all updates landed correctly:
@@ -198,7 +198,7 @@ Use the format: `Area: Description (closes #IssueID)`
- Describe the change and its impact
- Be specific, not vague (describe "a golden retriever" not just "a dog")
**Issue Linking**: Add `(closes #IssueID)` to auto-close linked issues on merge.
**Issue Linking**: Add `(closes #IssueID)` to the title for readability, AND include a closing keyword on its own line in the PR body (e.g., `Fixes #IssueID`) so GitHub actually auto-links and auto-closes the issue on merge. GitHub only parses closing keywords (`closes`, `fixes`, `resolves`) from the PR body or commit messages — the title suffix is cosmetic and does **not** trigger auto-close on its own.
### Commit Messages
@@ -227,9 +227,11 @@ Project ownership is distributed across teams. Check individual project director
1.**Layered Architecture with Dependency Inversion**
- Core defines contracts (interfaces)
- Infrastructure implements contracts
- Infrastructure implements contracts that need Infrastructure-owned machinery
- Web/APIs consume implementations via DI
**Where service implementations live**: Services whose dependencies are satisfiable from Core interfaces alone (repositories, scope, config, other Core services) live in `Umbraco.Core/Services/` — this covers the majority of domain services (`MemberService`, `ContentService`, `MediaService`, `ContentTypeService`, `EntityService`, `AuditService`, `ExternalMemberService`, etc.). Service implementations only live in `Umbraco.Infrastructure/Services/Implement/` when they genuinely need Infrastructure concerns — Examine indexes (`ContentSearchService`, `MediaSearchService`, `IndexedEntitySearchService`), log files (`LogViewerRepository`), packaging internals (`PackagingService`), webhook firing (`WebhookFiringService`), distributed-job coordination (`DistributedJobService`). When adding a new service, default to Core and only move to Infrastructure if a concrete dependency forces it.
2.**Interface-First Design**
- All services defined as interfaces in Core
- Enables testing, polymorphism, extensibility
@@ -441,6 +443,94 @@ The backoffice is published to npm as `@umbraco-cms/backoffice`. Runtime depende
---
## 7. CI/CD — Claude AI Assistant
Two GitHub Actions workflows powered by `anthropics/claude-code-action@v1`. Advisory only — does not block merging.
### Workflows
| File | Trigger | Purpose |
|------|---------|---------|
| `claude-review.yml` | `pull_request: [opened, ready_for_review]` | Auto-review every non-draft PR using the `umb-review` skill |
| `claude.yml` | `@claude` comments, issue assign/label | Interactive assistant for PRs and issues |
### Auto-Review (`claude-review.yml`)
Runs the full `.claude/skills/umb-review/SKILL.md` procedure on every newly opened or un-drafted PR. Produces inline comments per finding and one summary comment with a verdict. Skips draft PRs. No turn limit.
### Interactive (`claude.yml`)
Responds to `@claude` mentions on PRs and issues. The trigger phrase is stripped before Claude sees the message, so:
- `@claude review` → light review using `gh pr diff` (not the umb-review skill)
- `@claude fix ...` → implements a fix on a new branch
- `@claude help` → answers questions about the codebase
- `@claude label` → applies labels
- `@claude` (empty) → defaults to `review` on PRs, `help` on issues
Also triggers on issue assignment to `claude` or adding the `claude` label. Gated: only runs when `@claude` appears in the comment/issue body. Max 25 turns.
**On Issues** (based on content): same `area/*` and `category/*` labels, plus `affected/v14` through `affected/v17` and `affected/backoffice`.
Labels are only added, never removed. Claude applies only labels it is confident about.
### Key Implementation Notes
- **Checkout required** — the action internally runs `git fetch origin main` for trusted file restoration. Without `actions/checkout`, it fails with `fatal: not a git repository`.
- **`id-token: write` permission** — required for OIDC token exchange with the Claude GitHub App.
- **Trigger phrase stripping** — the action strips `@claude` from comments before passing to Claude. Prompts must reference commands without the prefix (e.g., `review` not `@claude review`).
- **PR number injection** — the interactive workflow injects the PR/issue number into the prompt via `${{ github.event.issue.number }}` since Claude can't discover it from `gh pr view` when checked out on `main`.
---
## 8. Code Comment Policy
**Default to no comment.** Applies to all code in this repository — C#, TypeScript, Razor, build scripts. Well-named identifiers and small functions are the primary form of self-documentation; comments are a fallback for the rare cases where the code itself cannot carry the meaning.
### When NOT to comment
- **Don't restate what the code does.** A line calling `resetState()` does not need `// Reset state`. A method named `validateInput` does not need `// Validate input`.
- **Don't narrate a sequence of calls.** If three lines run in order, the order is in the code — don't paraphrase it above.
- **Don't reference the current task, fix, callers, or PR.** No `// Fix for X`, `// Used by Y`, `// Added for the Z flow`, `// See PR #1234`. That belongs in commit messages and PR descriptions; in source it rots as the codebase evolves.
### When a comment IS justified
Write a comment only when **removing it would leave a future reader confused**. Concretely:
- **A non-obvious WHY.** A hidden constraint, business rule, or ordering requirement that is not visible from the code.
- **A workaround for a specific bug or platform quirk.** Link the issue (`(#21996)`, `https://...`) so the comment can be deleted once the upstream fix lands.
- **A subtle invariant** that the type system or method names do not enforce.
- **An edge case the code intentionally handles** that would surprise a reader (e.g. "must run before X because Y").
- **API documentation** — XML doc comments on C# members, JSDoc on exported TypeScript symbols. Required for the public contract; still keep them concise.
### TODOs
Allowed, but cheap to write and cheaper to leave behind. Keep them short and trackable: `// TODO (V19): remove once obsolete overload is gone` or `// TODO: pagination [NL]`. A TODO should have an author or a version trigger.
---
## Quick Reference
### Essential Commands
@@ -499,6 +589,8 @@ For detailed information about individual projects, see their CLAUDE.md files:
**Important**: When working on backoffice client code (anything under `src/Umbraco.Web.UI.Client/`), read `/src/Umbraco.Web.UI.Client/CLAUDE.md` first. It contains action-specific checklists (deprecation, testing, security, etc.) that are not duplicated here.
[EndpointSummary("Make partial updates to a document. For more information, see the documentation at https://docs.umbraco.com/umbraco-cms/reference/management-api/patching/document-endpoint-guide or https://docs.umbraco.com/umbraco-cms/reference/management-api/patching/document-endpoint-spec")]
/// Initializes a new instance of the <see cref="RootDocumentTreeController"/> class, which manages the root nodes of the document tree in the Umbraco backoffice.
/// </summary>
@@ -61,7 +124,7 @@ public class RootDocumentTreeController : DocumentTreeControllerBase
/// Initializes a new instance of the <see cref="ChildrenMediaTreeController"/> class, responsible for handling API requests related to child media items in the media tree.
/// </summary>
@@ -50,7 +99,7 @@ public class ChildrenMediaTreeController : MediaTreeControllerBase
/// <param name="appCaches">Provides access to application-level caches for performance optimization.</param>
/// <param name="backofficeSecurityAccessor">Accessor for backoffice security context, used for authorization and user information.</param>
/// <param name="mediaPresentationFactory">Factory for creating presentation models for media entities.</param>
[ActivatorUtilitiesConstructor]
[Obsolete("Please use the constructor accepting IMediaStartNodeTreeFilterService. Scheduled for removal in Umbraco 19.")]
/// Initializes a new instance of the <see cref="RootMediaTreeController"/> class, which manages the root of the media tree in the Umbraco backoffice API.
/// </summary>
@@ -50,7 +99,7 @@ public class RootMediaTreeController : MediaTreeControllerBase
/// <param name="appCaches">Provides access to application-level caches.</param>
/// <param name="backofficeSecurityAccessor">Accessor for backoffice security context and operations.</param>
/// <param name="mediaPresentationFactory">Factory for creating media presentation models.</param>
[ActivatorUtilitiesConstructor]
[Obsolete("Please use the constructor accepting IMediaStartNodeTreeFilterService. Scheduled for removal in Umbraco 19.")]
/// Initializes a new instance of the <see cref="SiblingsMediaTreeController"/> class, responsible for handling API requests related to sibling media items in the media tree.
/// </summary>
@@ -49,7 +98,7 @@ public class SiblingsMediaTreeController : MediaTreeControllerBase
/// <param name="appCaches">Provides access to application-level caches for performance optimization.</param>
/// <param name="backofficeSecurityAccessor">Accessor for back office security context, used for authorization and user information.</param>
/// <param name="mediaPresentationFactory">Factory for creating media presentation models for API responses.</param>
[ActivatorUtilitiesConstructor]
[Obsolete("Please use the constructor accepting IMediaStartNodeTreeFilterService. Scheduled for removal in Umbraco 19.")]
/// Retrieves a paged, filtered collection of members based on the specified criteria.
/// Returns both content-based and external-only members in a unified, correctly paginated result.
/// </summary>
/// <param name="cancellationToken">A token to monitor for cancellation requests.</param>
/// <param name="memberTypeId">An optional member type identifier to filter the results.</param>
/// <param name="memberGroupName">An optional member group name to filter the results.</param>
/// <param name="isApproved">An optional value to filter by member approval status.</param>
/// <param name="isLockedOut">An optional value to filter by member lockout status.</param>
/// <param name="orderBy">The field by which to order the results. The default is <c>"username"</c>.</param>
/// <param name="orderDirection">The direction in which to order the results. The default is <see cref="Direction.Ascending"/>.</param>
/// <param name="filter">An optional filter string to search for members.</param>
/// <param name="skip">The number of items to skip for pagination. The default is 0.</param>
/// <param name="take">The number of items to return for pagination. The default is 100.</param>
/// <returns>A task representing the asynchronous operation. The task result contains an <see cref="IActionResult"/> with a <see cref="PagedViewModel{MemberResponseModel}"/> representing the filtered members.</returns>
.WithDetail("This member is managed by an external provider. Content operations such as create, update, and property editing are not available for external-only members.")
// TODO (V19): Remove the unnecessary parameters provided to the constructor.
/// <summary>
/// Initializes a new instance of the <see cref="ReferencedByMemberController"/> class.
/// </summary>
/// <param name="trackedReferencesService">An implementation of <see cref="ITrackedReferencesService"/> used to manage tracked references.</param>
/// <param name="relationTypePresentationFactory">An implementation of <see cref="IRelationTypePresentationFactory"/> used to create relation type presentations.</param>
/// <param name="memberReferenceService">Service for retrieving paged references to a member.</param>
/// Initializes a new instance of the <see cref="UpdateMemberController"/> class, responsible for handling member update operations in the management API.
/// Initializes a new instance of the <see cref="UpdateMemberController"/> class.
/// </summary>
/// <param name="memberEditingService">Service used to perform member editing operations.</param>
/// <param name="memberEditingPresentationFactory">Factory for creating presentation models related to member editing.</param>
@@ -49,6 +49,13 @@ public class UpdateMemberController : MemberControllerBase
Guidid,
UpdateMemberRequestModelupdateRequestModel)
{
// External-only members cannot be updated through this endpoint.
// Their identity data is managed by the external provider.
/// Initializes a new instance of the <see cref="Umbraco.Cms.Api.Management.Controllers.Member.ValidateUpdateMemberController"/> class.
/// Initializes a new instance of the <see cref="ValidateUpdateMemberController"/> class.
/// </summary>
/// <param name="memberEditingService">The <see cref="IMemberEditingService"/> used for member editing operations.</param>
/// <param name="memberEditingPresentationFactory">The <see cref="IMemberEditingPresentationFactory"/> used to create member editing presentations.</param>
@@ -44,6 +44,12 @@ public class ValidateUpdateMemberController : MemberControllerBase
Guidid,
UpdateMemberRequestModelrequestModel)
{
// External-only members cannot be updated through this endpoint.
// TODO (V19): When the obsolete constructor is removed, also remove the unused dependency on IEntityService.
/// <summary>
/// Initializes a new instance of the <see cref="Umbraco.Cms.Api.Management.Controllers.MemberGroup.Item.ItemMemberGroupItemController"/> class, providing services for managing member group items.
/// Initializes a new instance of the <see cref="ItemMemberGroupItemController"/> class.
/// </summary>
/// <param name="entityService">The service used to interact with entities in the Umbraco CMS.</param>
/// <param name="mapper">The mapper used for mapping Umbraco objects.</param>
/// Initializes a new instance of the <see cref="CreateTemplateController"/> class.
/// </summary>
/// <param name="templateService">An instance of <see cref="ITemplateService"/> used to manage templates.</param>
/// <param name="backOfficeSecurityAccessor">An instance of <see cref="IBackOfficeSecurityAccessor"/> used to access back office security information.</param>
// TODO (V19): Remove the IUserService parameter from the constructor as it is not used in the current implementation.
/// <summary>
/// Initializes a new instance of the <see cref="GetDocumentPermissionsCurrentUserController"/> class, which handles requests related to retrieving document permissions for the current user.
/// </summary>
/// <param name="backOfficeSecurityAccessor">Provides access to back office security information for the current user.</param>
/// <param name="mapper">The Umbraco object mapper used for mapping between models.</param>
/// <param name="contentPermissionService">Service for managing content permissions.</param>
@@ -42,10 +67,10 @@ public class GetDocumentPermissionsCurrentUserController : CurrentUserController
/// </summary>
/// <param name="cancellationToken">A token to monitor for cancellation requests.</param>
/// <param name="ids">A set of document IDs for which to retrieve permissions.</param>
/// <returns>An <see cref="IActionResult"/> containing a <see cref="UserPermissionsResponseModel"/> with the permissions for each requested document, or a <see cref="ProblemDetails"/> if not found.</returns>
/// <returns>An <see cref="IActionResult"/> containing a <see cref="UserPermissionsResponseModel"/> with the permissions for each requested document.</returns>
/// Initializes a new instance of the <see cref="UpdateCurrentUserProfileController"/> class, which manages user update operations in the Umbraco backoffice API.
/// </summary>
/// <param name="userService">Service for managing user data and operations.</param>
/// <param name="userPresentationFactory">Factory for creating user presentation models.</param>
/// <param name="backOfficeSecurityAccessor">Accessor for back office security context.</param>
/// Provides extension methods for configuring JSON serialization in the Umbraco CMS Management API.
/// Extension methods for registering JSON-related services.
/// </summary>
[Obsolete("JsonPatch.Net dependency and IJsonPatchService are being removed. Use the custom patch engine (IDocumentPatcher) instead. Scheduled for removal in Umbraco 19.")]
publicstaticclassJsonBuilderExtensions
{
/// <summary>
/// Adds JSON-related services to the Umbraco builder.
/// Registers the essential services required for the Umbraco back office, including the back office path generator and the physical file system implementation.
/// Maps the given <see cref="Umbraco.Cms.Api.Management.Models.UpdateDocumentRequestModel" /> to a <see cref="Umbraco.Cms.Core.Models.ContentUpdateModel" />.
/// Maps the given <see cref="UpdateDocumentRequestModel" /> to a <see cref="ContentUpdateModel" />.
/// </summary>
/// <param name="requestModel">The update document request model to map from.</param>
@@ -33,13 +36,15 @@ internal sealed class MemberPresentationFactory : IMemberPresentationFactory
/// <param name="twoFactorLoginService">Service for handling two-factor authentication for members.</param>
/// <param name="memberGroupService">Service for managing member groups.</param>
/// <param name="deliveryApiSettings">The configuration options for the Delivery API.</param>
/// <param name="externalMemberService">Service for managing external-only members.</param>
publicMemberPresentationFactory(
IUmbracoMapperumbracoMapper,
IMemberServicememberService,
IMemberTypeServicememberTypeService,
ITwoFactorLoginServicetwoFactorLoginService,
IMemberGroupServicememberGroupService,
IOptions<DeliveryApiSettings>deliveryApiSettings)
IOptions<DeliveryApiSettings>deliveryApiSettings,
IExternalMemberServiceexternalMemberService)
{
_umbracoMapper=umbracoMapper;
_memberService=memberService;
@@ -47,14 +52,10 @@ internal sealed class MemberPresentationFactory : IMemberPresentationFactory
_twoFactorLoginService=twoFactorLoginService;
_memberGroupService=memberGroupService;
_deliveryApiSettings=deliveryApiSettings.Value;
_externalMemberService=externalMemberService;
}
/// <summary>
/// Asynchronously creates a <see cref="MemberResponseModel"/> for the specified <see cref="IMember"/>, including or excluding sensitive data based on the current user's permissions.
/// </summary>
/// <param name="member">The member entity to map to a response model.</param>
/// <param name="currentUser">The user requesting the data, used to determine access to sensitive information.</param>
/// <returns>A task representing the asynchronous operation, with a <see cref="MemberResponseModel"/> as the result.</returns>
"summary":"Make partial updates to a document. For more information, see the documentation at https://docs.umbraco.com/umbraco-cms/reference/management-api/patching/document-endpoint-guide or https://docs.umbraco.com/umbraco-cms/reference/management-api/patching/document-endpoint-spec",
/// Operation status for PATCH operations at the API layer.
/// This is distinct from ContentEditingOperationStatus which is for service layer operations.
/// </summary>
publicenumContentPatchingOperationStatus
{
/// <summary>
/// The operation was successful.
/// </summary>
Success,
/// <summary>
/// One or more PATCH operations were invalid (invalid path syntax, unsupported operation type, missing required value).
/// </summary>
InvalidOperation,
/// <summary>
/// The target document could not be found.
/// </summary>
NotFound,
}
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.