Skip to content

Redirect Url Management: Implement workspace#22624

Merged
leekelleher merged 13 commits into
mainfrom
v17/bugfix/22619-redirect-url-management-info-app
Apr 28, 2026
Merged

Redirect Url Management: Implement workspace#22624
leekelleher merged 13 commits into
mainfrom
v17/bugfix/22619-redirect-url-management-info-app

Conversation

@Zeegaan

@Zeegaan Zeegaan commented Apr 28, 2026

Copy link
Copy Markdown
Member

Fixes #22619

Notes

It seems that when implementing the new backoffice, the "Redirect URL Management" workspace was missed.
Here is how it looks in v13:
image

This PR now remedies that, by implementing a "Redirect URL Management" workspace.
All the backend endpoints was already implemented, so this was just a case of creating the workspace and using the endpoints 😁

How it looks with the new workspace:
image

How to test

  • Create a document type with allowed as root.
  • Create 2 documents from the document type, lets name the first "root", and the other "test"
  • You should be able to navigate to https://localhost:44339/test
  • Now rename the "Test" document to something else.
  • Now there should be a "Redirect Url Management" with the old url displayed 💪

Copilot AI review requested due to automatic review settings April 28, 2026 04:19
@claude

claude Bot commented Apr 28, 2026

Copy link
Copy Markdown

Claude finished @Zeegaan's task in 3m 50s —— View job


PR Review

Target: origin/main · Based on commit: 696567c3 · Skipped: 0 noise files out of 4 total

Adds a "Redirect URL Management" workspace info app to the document workspace, surfacing per-document redirect URLs alongside the existing URL and audit-log info apps.

  • Other changes: Document workspace gains a new info app panel listing redirect URLs for the current content item; hides itself when the tracker is disabled, when the document is new, or when no redirects exist.

Important

  • document-redirect-management-workspace-info-app.element.ts:20–23: The element imports RedirectManagementService (generated API client) and RedirectUrlResponseModel/RedirectStatusModel (generated types) directly. The codebase data-flow rule is explicit: elements must never call generated services directly — they must go through a data source → repository. The sibling document-links-workspace-info-app.element.ts shows the correct pattern: it instantiates UmbDocumentUrlRepository and calls requestItems(...) rather than the raw service. The existing dashboard-redirect-management.element.ts has the same violation — that's a pre-existing issue, not a precedent to follow. (Inline comment posted with suggested fix.)

Suggestions

  • manifests.ts:19–23 and document-redirect-management-workspace-info-app.element.ts:125: The manifest already includes UMB_WORKSPACE_ENTITY_IS_NEW_CONDITION_ALIAS with match: false, which prevents this extension from activating for new documents. The if (this._isNew) return nothing; render guard and the associated state tracking are therefore redundant at the render level (the guard inside #requestRedirects on line 95 is still useful as a defensive check). Minor cleanup opportunity.

Request Changes

The architectural violation (direct generated-service call from an element) should be addressed before merging. The functionality itself looks good and the UI matches the v13 reference. Consider creating the repository + data source layer (which would also fix the same issue in the existing dashboard element as a nice bonus 🎁).

@claude claude Bot added area/frontend category/ux User experience category/ui User interface labels Apr 28, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements the missing “Redirect URL Management” info app inside the Document workspace in the new backoffice, wiring it up to existing redirect-management management API endpoints.

Changes:

  • Adds a new Document workspace info app that fetches and displays redirect URLs for the current document.
  • Registers new redirect-management manifests under the documents package.
  • Hooks the info app up to the action event context to refresh redirects on relevant entity reload events.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/Umbraco.Web.UI.Client/src/packages/documents/documents/redirect-management/manifests.ts Aggregates redirect-management extension manifests for the documents package.
src/Umbraco.Web.UI.Client/src/packages/documents/documents/redirect-management/info-app/manifests.ts Registers the “Redirect URL Management” workspace info app for non-new document entities.
src/Umbraco.Web.UI.Client/src/packages/documents/documents/redirect-management/info-app/document-redirect-management-workspace-info-app.element.ts New Lit element rendering the redirect list and fetching status/redirect data from the management API.
src/Umbraco.Web.UI.Client/src/packages/documents/documents/manifests.ts Adds redirect-management manifests to the documents package manifest bundle.

Zeegaan and others added 3 commits April 28, 2026 14:23
…irect-management/info-app/document-redirect-management-workspace-info-app.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@leekelleher leekelleher self-requested a review April 28, 2026 10:59
- 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`

@leekelleher leekelleher left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested out, works as described! 🚀 Good work @Zeegaan!

I addressed the feedback from Claude[bot] and GitHub Co-pilot, as well took the opportunity to refine the dashboard-redirect-management.element.ts code, (all minor things that I'd been thinking about for a while).

@leekelleher leekelleher enabled auto-merge (squash) April 28, 2026 13:55
@leekelleher leekelleher merged commit 2f52b7b into main Apr 28, 2026
29 of 30 checks passed
@leekelleher leekelleher deleted the v17/bugfix/22619-redirect-url-management-info-app branch April 28, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Links panel under Info no longer shows internal redirects

3 participants