Skip to content

[backend/frontend] feat(integrations): add ability to update multiple images, demo and datasheet url (#1404)#1826

Open
Kroustille wants to merge 25 commits intodevelopmentfrom
issue/1404
Open

[backend/frontend] feat(integrations): add ability to update multiple images, demo and datasheet url (#1404)#1826
Kroustille wants to merge 25 commits intodevelopmentfrom
issue/1404

Conversation

@Kroustille
Copy link
Member

@Kroustille Kroustille commented Mar 5, 2026

Context

Briefly describe the purpose and context of this PR. Include relevant screenshots or screen recordings for the product team.

This PR extends the integration and connector service forms to support updating multiple images, and adds datasheet_url and demo_url fields to all integration types. It refactors shared form field logic into a centralized useServiceFormFields hook (renamed from useSimpleServiceFormField), adds a new ConnectorForm for editing connectors, introduces the DocumentSourceType enum to distinguish internal vs. external images, and adds a carousel to connector slug views.

Changes:

  • Added datasheet_url and demo_url fields across all integration types (schema, resolvers, metadata, forms, detail views, i18n)
  • Refactored image handling to differentiate between internal and external source types, including a migration to mark existing connector images as external
  • Created a ConnectorForm component and enabled connector editing/updating in the UI, previously restricted

How to test

Provide step-by-step instructions to test your changes. Include screenshots of your local testing results.

Related issues

Checklist

Quality

  • I consider this work complete and ready for review
  • I tested all features and edge cases
  • I refactored code where necessary to improve quality
  • I made sure my code meets development guidelines
  • I performed a self-review of my code

Testing

  • I wrote test cases for the relevant use cases (unit, integration or e2e tests)
  • (Bug fixes only) I added tests that reproduce and verify the fix

What tests have been made

  • Unit tests
  • Integration tests
  • E2E tests
  • Local manual tests

Additional information

Any additional context, dependencies, or concerns reviewers should know about.

@github-actions github-actions bot added the Filigran Team use to identify PR from the Filigran team label Mar 5, 2026
@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

❌ Patch coverage is 13.77410% with 626 lines in your changes missing coverage. Please review.
✅ Project coverage is 35.69%. Comparing base (1c44bc2) to head (f254ca8).

Files with missing lines Patch % Lines
...ents/service/integrations/forms/connector-form.tsx 0.00% 155 Missing and 1 partial ⚠️
...omponents/service/form/use-service-form-fields.tsx 0.00% 149 Missing ⚠️
...nts/service/document/shareable-resouce-details.tsx 0.00% 38 Missing ⚠️
...nents/service/integrations/forms/csv-feed-form.tsx 0.00% 32 Missing ⚠️
...ponents/service/integrations/forms/stream-form.tsx 0.00% 32 Missing ⚠️
...nts/service/integrations/forms/taxii-feed-form.tsx 0.00% 32 Missing ⚠️
...ntegrations/forms/third-party-integration-form.tsx 0.00% 28 Missing ⚠️
.../cybersecurity-solutions/[slug]/[docSlug]/page.tsx 0.00% 22 Missing ⚠️
...rios/[serviceInstanceId]/openaev-scenario-form.tsx 0.00% 20 Missing ⚠️
...nt/connector/shareable-resource-connector-slug.tsx 0.00% 19 Missing ⚠️
... and 24 more
Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #1826      +/-   ##
===============================================
- Coverage        35.70%   35.69%   -0.02%     
===============================================
  Files              654      656       +2     
  Lines            41401    41729     +328     
  Branches          2395     2416      +21     
===============================================
+ Hits             14784    14895     +111     
- Misses           26369    26585     +216     
- Partials           248      249       +1     
Files with missing lines Coverage Δ
.../modules/ingest-manifest/ingest-manifest.domain.ts 91.17% <100.00%> (ø)
.../modules/ingest-manifest/ingest-manifest.helper.ts 89.23% <100.00%> (ø)
...-api/src/modules/services/document/document.app.ts 84.61% <100.00%> (+0.16%) ⬆️
...rvices/document/domain/document.children.domain.ts 92.75% <100.00%> (+9.94%) ⬆️
...ocument/opencti/integrations/integrations.model.ts 100.00% <100.00%> (ø)
.../service/components/subscribable-services.types.ts 100.00% <ø> (ø)
...rc/components/service/document/document.graphql.ts 0.00% <ø> (ø)
...onents/service/document/public-document.graphql.ts 0.00% <ø> (ø)
...nents/service/document/shareable-resource-slug.tsx 86.84% <100.00%> (+1.33%) ⬆️
...ent/ui/shareable-resource-detail-metadata-item.tsx 100.00% <100.00%> (ø)
... and 35 more

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1c44bc2...f254ca8. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Summary

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Other ❓ Flaky 🍂 Duration ⏱️
35 35 0 0 0 0 3m 38s

Insights

Average Tests per Run Total Flaky Tests Total Failed Slowest Test (p95)
35 0 0 24.4s

Suites

35 passed, 0 failed, and 0 other

Suite Passed Failed Other Duration
✅ app/apps/portal-e2e-tests/tests/tests_files/api/user.spec.ts
        ✅ should prevent user to update another one when he does not have MANAGE_ACCESS
        ✅ should allow user to update another one when he has ADMINISTRATE_ORGANIZATION
        ✅ should allow user to update another one when he has MANAGE_ACCESS
✅ 3 ❌ 0 ⏭️ 0 3.9s
✅ app/apps/portal-e2e-tests/tests/tests_files/capabilities.spec.ts
        ✅ Should add subscription with capabilities
✅ 1 ❌ 0 ⏭️ 0 24.4s
✅ app/apps/portal-e2e-tests/tests/tests_files/csv-feeds.spec.ts
        ✅ Should add CSV Feed
        ✅ Should delete CSV Feed from the list
        ✅ Should delete CSV Feed from the detailed page
✅ 3 ❌ 0 ⏭️ 0 19.4s
✅ app/apps/portal-e2e-tests/tests/tests_files/custom-dashboards.spec.ts
        ✅ Should add custom dashboard
        ✅ Should see the custom dashboard on public page
        ✅ Should edit a custom dashboard
✅ 3 ❌ 0 ⏭️ 0 26.7s
✅ app/apps/portal-e2e-tests/tests/tests_files/document.spec.ts
        ✅ should perform complete CRUD operations on documents
✅ 1 ❌ 0 ⏭️ 0 4.7s
✅ app/apps/portal-e2e-tests/tests/tests_files/one-click-deploy.spec.ts
        ✅ should send telemetry event
✅ 1 ❌ 0 ⏭️ 0 7.0s
✅ app/apps/portal-e2e-tests/tests/tests_files/organization-switcher.spec.ts
        ✅ Should see registered platforms, subscriptions and trials
✅ 1 ❌ 0 ⏭️ 0 4.9s
✅ app/apps/portal-e2e-tests/tests/tests_files/organizations.spec.ts
        ✅ should perform complete CRUD operations on organizations
✅ 1 ❌ 0 ⏭️ 0 5.3s
✅ app/apps/portal-e2e-tests/tests/tests_files/profile.spec.ts
        ✅ should update user profile information
✅ 1 ❌ 0 ⏭️ 0 4.8s
✅ app/apps/portal-e2e-tests/tests/tests_files/public/redirections.spec.ts
        ✅ should redirect user between public pages and login page
✅ 1 ❌ 0 ⏭️ 0 3.2s
✅ app/apps/portal-e2e-tests/tests/tests_files/registration.spec.ts
        ✅ should register openAEV platform
        ✅ should register openCTI platform
✅ 2 ❌ 0 ⏭️ 0 6.3s
✅ app/apps/portal-e2e-tests/tests/tests_files/service-management.spec.ts
        ✅ should be able to admin service
✅ 1 ❌ 0 ⏭️ 0 9.8s
✅ app/apps/portal-e2e-tests/tests/tests_files/service-pictures.spec.ts
        ✅ should be able to add pictures to a service
✅ 1 ❌ 0 ⏭️ 0 4.3s
✅ app/apps/portal-e2e-tests/tests/tests_files/streams.spec.ts
        ✅ Should add Stream
        ✅ Should delete Stream from the list
        ✅ Should delete Stream from the detailed page
✅ 3 ❌ 0 ⏭️ 0 20.4s
✅ app/apps/portal-e2e-tests/tests/tests_files/taxii-feeds.spec.ts
        ✅ Should add TAXII Feed
        ✅ Should delete TAXII Feed from the list
        ✅ Should delete TAXII Feed from the detailed page
✅ 3 ❌ 0 ⏭️ 0 19.9s
✅ app/apps/portal-e2e-tests/tests/tests_files/third-party-integrations.spec.ts
        ✅ Should add Third Party Integration
        ✅ Should delete Third Party Integration from the list
        ✅ Should delete Third Party Integration from the detailed page
✅ 3 ❌ 0 ⏭️ 0 20.0s
✅ app/apps/portal-e2e-tests/tests/tests_files/user.spec.ts
        ✅ Should perform complete CRUD of users as BYPASS
        ✅ Should only see authorized users
        ✅ Should not edit first and last name as MANAGE_ACCESS user
✅ 3 ❌ 0 ⏭️ 0 16.1s
✅ app/apps/portal-e2e-tests/tests/tests_files/xtm-suite-roadmap.spec.ts
        ✅ Should allow Filigran user to perform a CRUD of an epic
        ✅ Should allow users that are not connected to view the xtm suite roadmap
        ✅ Should allow community user to view the xtm suite roadmap
✅ 3 ❌ 0 ⏭️ 0 15.3s

🎉 No failed tests in this run. | 🍂 No flaky tests in this run.

Github Test Reporter by CTRF 💚

🔄 This comment has been updated

@Kroustille Kroustille force-pushed the issue/1404 branch 3 times, most recently from 2a5ba16 to bd6f9b3 Compare March 5, 2026 09:50
@Kroustille Kroustille changed the title Issue/1404 [backend/frontend] feat(integrations): add ability to update multiple images, demo and datasheet url (#1404) Mar 5, 2026
@Kroustille Kroustille requested a review from Copilot March 5, 2026 09:51
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the integration and connector service forms to support updating multiple images, and adds datasheet_url and demo_url fields to all integration types. It refactors shared form field logic into a centralized useServiceFormFields hook (renamed from useSimpleServiceFormField), adds a new ConnectorForm for editing connectors, introduces the DocumentSourceType enum to distinguish internal vs. external images, and adds a carousel to connector slug views.

Changes:

  • Added datasheet_url and demo_url fields across all integration types (schema, resolvers, metadata, forms, detail views, i18n)
  • Refactored image handling to differentiate between internal and external source types, including a migration to mark existing connector images as external
  • Created a ConnectorForm component and enabled connector editing/updating in the UI, previously restricted

Reviewed changes

Copilot reviewed 56 out of 58 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
apps/portal-api/src/modules/services/document/opencti/integrations/integrations.graphql Added datasheet_url and demo_url to all integration GraphQL types
apps/portal-api/src/modules/services/document/opencti/integrations/integrations.model.ts Added datasheet_url/demo_url metadata keys and typed Integration
apps/portal-api/src/modules/services/document/document.graphql Added DocumentSourceType enum and source_type to ShareableResource
apps/portal-api/src/modules/services/document/document.app.ts Added boolean metadata conversion, renamed upsertDocument to upsertDocumentWithExternalImage
apps/portal-api/src/modules/services/document/document.helper.ts Added BOOLEAN_METADATA, INTEGRATION_CONNECTOR_METADATA, fixed file.namefile.filename
apps/portal-api/src/modules/services/document/domain/document.children.domain.ts Refactored to support sourceType param, renamed methods for external image handling
apps/portal-api/src/modules/services/document/document.resolver.ts Added ShareableResource type cast for children_documents
apps/portal-api/src/modules/ingest-manifest/ingest-manifest.helper.ts Use DocumentSourceType.External enum value
apps/portal-api/src/modules/ingest-manifest/ingest-manifest.domain.ts Use renamed upsertDocumentWithExternalImage
apps/portal-api/src/modules/services/public_roadmap/epic.app.ts Use DocumentSourceType.Internal enum value
apps/portal-api/src/migrations/20260305082651_mark-connector-pictures-external.js Migration to mark connector child images as external
apps/portal-api/src/__generated__/resolvers-types.ts Generated types with new fields
apps/portal-api/package.json Added @types/graphql-upload
apps/portal-front/schema.graphql Frontend schema with new enum and fields
apps/portal-front/src/components/service/form/use-service-form-fields.tsx Centralized form fields hook with disabled fields support
apps/portal-front/src/components/service/form/multiple-images-field.tsx Added source_type support, disable delete for external images
apps/portal-front/src/components/service/form/description-field.tsx Added disabled prop
apps/portal-front/src/components/service/form/uploader-id-field.tsx Added disabled prop
apps/portal-front/src/components/service/form/uploader-organization-id-field.tsx Added disabled prop
apps/portal-front/src/components/service/form/use-cases-field.tsx Added disabled prop
apps/portal-front/src/components/service/form/integration-subtype-field.tsx Added disabled prop
apps/portal-front/src/components/service/integrations/forms/connector-form.tsx New connector editing form
apps/portal-front/src/components/service/integrations/forms/csv-feed-form.tsx Refactored to use useServiceFormFields, added new URL fields
apps/portal-front/src/components/service/integrations/forms/stream-form.tsx Refactored to use useServiceFormFields, added new URL fields
apps/portal-front/src/components/service/integrations/forms/taxii-feed-form.tsx Refactored to use useServiceFormFields, added new URL fields
apps/portal-front/src/components/service/integrations/forms/third-party-integration-form.tsx Refactored to use useServiceFormFields, added new URL fields
apps/portal-front/src/components/service/document/shareable-resource-slug.tsx Moved carousel inside, added carouselImages logic
apps/portal-front/src/components/service/document/ui/shareable-resource-carousel-view.tsx Refactored to accept images prop instead of documentData
apps/portal-front/src/components/service/document/shareable-resouce-details.tsx Added datasheet/demo URL display
apps/portal-front/src/components/service/document/connector/shareable-resource-connector-slug.tsx Added carousel, manage sheet, serviceInstance prop
apps/portal-front/src/components/service/document/connector/shareable-resource-connector-slug-public.tsx Added carousel, serviceInstance prop
apps/portal-front/src/components/service/document/connector/shareable-resource-connector-details.tsx Added datasheet/demo URL display
apps/portal-front/src/components/service/document/document.graphql.ts Added source_type, datasheet_url, demo_url to fragments
apps/portal-front/src/components/service/document/public-document.graphql.ts Added datasheet_url, demo_url
apps/portal-front/src/components/service/document/use-document-context.ts Added ConnectorForm mapping
apps/portal-front/src/components/service/components/service-card.tsx Simplified update capability check
apps/portal-front/src/components/service/components/service-list.tsx Fixed React key warning with Fragment
apps/portal-front/src/components/service/components/subscribable-services.types.ts Added ConnectorForm types
apps/portal-front/src/components/service/custom-dashboards/ Refactored to use centralized form hook
apps/portal-front/src/components/service/openaev-scenarios/ Refactored to use centralized form hook
apps/portal-front/src/components/ui/MarkdownInput.tsx Added disabled prop
apps/portal-front/src/components/ui/select-users.tsx Added disabled prop
apps/portal-front/messages/en.json Added English translations
apps/portal-front/messages/fr.json Added French translations
apps/portal-front/package.json Updated @filigran/ui to 0.44.8
apps/portal-e2e-tests/tests/model/integration.pageModel.ts Updated label text for URL fields
apps/portal-api/src/modules/services/document/domain/document.children.domain.test.ts New tests for external image handling
apps/portal-api/src/modules/services/document/document.app.test.ts Tests for boolean metadata and upsert
.github/agents/api-test-writer.agent.md New agent definition
yarn.lock Updated dependencies
Files not reviewed (1)
  • apps/portal-api/src/generated/resolvers-types.ts: Language not supported

You can also share your feedback on Copilot code review. Take the survey.

@Kroustille Kroustille marked this pull request as ready for review March 5, 2026 13:42
@Kroustille Kroustille added the needs feature env Indicate if the PR needs an associated feature environment label Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Filigran Team use to identify PR from the Filigran team needs feature env Indicate if the PR needs an associated feature environment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants