fix(ui): processing service details link and endpoint URL in form#1198
fix(ui): processing service details link and endpoint URL in form#1198
Conversation
…nal endpoint URL - Add projectId parameter support to useProcessingServiceDetails hook - Pass project context when fetching service details in dialog - Make endpoint_url field optional with updated description for pull-mode services - Fix async service status display logic to check lastSeenLive instead of always returning UNKNOWN Co-Authored-By: Claude <[email protected]>
✅ Deploy Preview for antenna-ssec ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for antenna-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughProcessing service handling is enhanced with project-scoped queries via an optional Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR makes small UI improvements around processing services: it scopes the processing service details query by project, allows creating pull-mode services without an endpoint URL, and corrects async service status display based on heartbeat.
Changes:
- Pass
projectIdintouseProcessingServiceDetailsto support project-scoped processing service detail queries. - Make
endpoint_urloptional in the processing service details form for pull-mode services. - Fix async processing service status to show
ONLINEwhenlastSeenLiveis true.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| ui/src/pages/project/entities/details-form/processing-service-details-form.tsx | Removes required validation for endpoint_url and updates helper text for pull-mode services. |
| ui/src/pages/processing-service-details/processing-service-details-dialog.tsx | Passes projectId into the details hook from route params. |
| ui/src/data-services/models/processing-service.ts | Derives async status from lastSeenLive (heartbeat) instead of always UNKNOWN. |
| ui/src/data-services/hooks/processing-services/useProcessingServiceDetails.ts | Adds optional projectId support via ?project_id=... and includes it in the query key. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@ui/src/data-services/hooks/processing-services/useProcessingServiceDetails.ts`:
- Around line 24-25: Prettier formatting is failing in
useProcessingServiceDetails.ts; run the project's formatter (e.g., npm/yarn
prettier --write) or your editor's format command on the file and commit the
changes so lines like the queryKey: [API_ROUTES.PROCESSING_SERVICES,
processingServiceId, projectId], and url:
`${API_URL}/${API_ROUTES.PROCESSING_SERVICES}/${processingServiceId}/${params}`,
conform to the repo's prettier rules; ensure the hook
useProcessingServiceDetails.ts is saved after formatting and no lint/CI warnings
remain.
In
`@ui/src/pages/processing-service-details/processing-service-details-dialog.tsx`:
- Around line 17-18: Prettier formatting issues in
processing-service-details-dialog.tsx are causing CI to fail; run your project's
formatter (e.g., npm run format or npx prettier --write) on
ui/src/pages/processing-service-details/processing-service-details-dialog.tsx
(or run your editor's format command) to fix whitespace/linebreaks around the
useProcessingServiceDetails import/usage and save the file so the CI Prettier
check passes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 3952f96b-b2c8-4518-bd84-d5d772783d07
📒 Files selected for processing (4)
ui/src/data-services/hooks/processing-services/useProcessingServiceDetails.tsui/src/data-services/models/processing-service.tsui/src/pages/processing-service-details/processing-service-details-dialog.tsxui/src/pages/project/entities/details-form/processing-service-details-form.tsx
Co-Authored-By: Claude <[email protected]>
The form, serializer, and model now all enforce a single convention: endpoint_url is either a valid URL string or NULL, never an empty string. - Frontend: normalize "" → null in form submit handler - Serializer: allow_null=True, allow_blank=False rejects "" at API boundary - Model: save() guard converts "" → None for admin/shell usage - QuerySet: simplified async/sync filters to use isnull only Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>

Summary
projectIdtouseProcessingServiceDetailshook for project-scoped queriesendpoint_urloptional in processing service creation form (pull-mode services register themselves)lastSeenLiveis true instead of always UNKNOWN -- Still has the problem that all processing services that share an auth token will share the same online/offline state.endpoint_urltonullacross frontend, serializer, and DB"" → nullin form submit handlerallow_null=True, allow_blank=Falserejects empty strings at the API boundary""rows toNULLendpoint_url__isnullonlyExtracted from #1194 — standalone UI and data-consistency improvements.
Screenshots
Pull & push services showing online status

Endpoint no longer required

How to test
Processing service details dialog:
Optional endpoint URL (pull-mode services):
null, not"")Async service status:
Migration:
Tests:
docker compose -f docker-compose.ci.yml run --rm django python manage.py test ami.ml --keepdbCo-Authored-By: Claude [email protected]