-
Notifications
You must be signed in to change notification settings - Fork 3.4k
fix: BROS-775: Show original urls in task code #9318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for label-studio-docs-new-theme canceled.
|
✅ Deploy Preview for label-studio-playground ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for heartex-docs canceled.
|
✅ Deploy Preview for label-studio-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #9318 +/- ##
===========================================
- Coverage 65.41% 64.64% -0.78%
===========================================
Files 847 847
Lines 66186 66236 +50
Branches 11567 11569 +2
===========================================
- Hits 43293 42815 -478
- Misses 22889 23417 +528
Partials 4 4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
This PR adds the ability to view original storage URLs (e.g.,
s3://bucket/file.jpg,gs://...) in the Task Source Viewer modal instead of resolved proxy URLs (/tasks/.../resolve/?fileuri=...). A new "Resolve URLs" toggle in the modal header allows users to switch between viewing modes. This is particularly useful for debugging storage configurations and understanding the actual data source paths.Changes
Backend: Extended the
/api/tasks/<id>/endpoint to respect theresolve_uriquery parameter (previously it was hardcoded totrue). Whenresolve_uri=false, the API returns original storage URLs without converting them to proxy URLs. This aligns the detail endpoint behavior with the list endpoint (/api/tasks/) which already supported this parameter.Frontend: Added a "Resolve URLs" toggle to the
ViewTogglecomponent alongside the existing Code/Interactive view switcher. TheTaskSourceViewercomponent now manages this state, persists the user preference to localStorage, and reloads task data when the toggle changes. By default, the toggle is OFF to show original URLs, making it easier for users to inspect their storage configurations.Bonus: Fixed very annoying behavior for modals in web/libs/ui/src/lib/modal/ModalPopup.tsx when a mouse click occurred inside a modal and the mouse was released outside the modal; it caused the modal to close, so you could not select text normally.