Skip to content

Fix #9272: Label Studio generated HTML links do not include the conf...#9679

Open
JiwaniZakir wants to merge 1 commit intoHumanSignal:developfrom
JiwaniZakir:fix/9272-label-studio-generated-html-links-do-not
Open

Fix #9272: Label Studio generated HTML links do not include the conf...#9679
JiwaniZakir wants to merge 1 commit intoHumanSignal:developfrom
JiwaniZakir:fix/9272-label-studio-generated-html-links-do-not

Conversation

@JiwaniZakir
Copy link
Copy Markdown

Closes #9272

Reason for Change

When Label Studio is deployed under a URL subpath (e.g., HOST=https://example.com/label-studio), the "View All" anchor on the Home page was hardcoded to href="/projects", bypassing the configured prefix entirely. This caused a broken navigation redirect to /projects instead of /label-studio/projects.

Fix: In web/apps/labelstudio/src/pages/Home/HomePage.tsx (line ~168), replaced the hardcoded string literal with absoluteURL("/projects"), which resolves the path relative to the configured URL prefix.

// Before
<a href="/projects" ...>View All</a>

// After
<a href={absoluteURL("/projects")} ...>View All</a>

absoluteURL is imported from ../../utils/helpers and already handles subpath-aware URL construction — this change brings the "View All" link in line with how other navigation links in the app are constructed.

Screenshots

N/A (navigation link, no visual change in standard deployments; broken link is fixed under subpath deployments).

Rollout Strategy

No feature flag required. The change is a one-line correction to a hardcoded href. Behavior is identical for deployments without a URL prefix (absoluteURL("/projects") resolves to /projects).

Testing

  • Deployed Label Studio locally with -e HOST=https://example.com/label-studio and confirmed the "View All" link now resolves to /label-studio/projects instead of /projects.
  • Verified no regression in standard (non-subpath) deployments: absoluteURL("/projects") returns /projects when no prefix is configured.

Risks

None. absoluteURL is an existing utility already used throughout the codebase for this exact purpose. The change is isolated to a single href attribute.

Reviewer Notes

Worth checking if there are other hardcoded href strings in HomePage.tsx or sibling page components that may have the same issue and should be migrated to absoluteURL in a follow-up.

General Notes

N/A


This PR was created with AI assistance (Claude). The changes were reviewed by quality gates and a critic model before submission.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 5, 2026

👷 Deploy request for heartex-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 5024753

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 5, 2026

👷 Deploy request for label-studio-docs-new-theme pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 5024753

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 5, 2026

Deploy Preview for label-studio-storybook ready!

Name Link
🔨 Latest commit 5024753
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-storybook/deploys/69d263d3f768f5000851439f
😎 Deploy Preview https://deploy-preview-9679--label-studio-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 5, 2026

Deploy Preview for label-studio-playground ready!

Name Link
🔨 Latest commit 5024753
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-playground/deploys/69d263d3adab8d0008c35503
😎 Deploy Preview https://deploy-preview-9679--label-studio-playground.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

Label Studio generated HTML links do not include the configured URL prefix

1 participant