Skip to content

Conversation

@elias-ba
Copy link
Contributor

@elias-ba elias-ba commented Nov 5, 2025

Description

This PR adds the ability to create credentials with different types directly from the workflow canvas. Users can now access an advanced credential type picker to select OAuth clients, raw JSON credentials, or keychain credentials.

Closes #3906
Closes #3947

Validation steps

📹 Quick demo video here: https://www.loom.com/share/4887974a3f4f49a988da76f52a13ce4a

  1. Open workflow editor and click Configure Connection:

    • Open any workflow in the collaborative editor
    • Click the "Configure Connection" button on a job node
    • Click "New Credential"
    • Verify the standard credential type picker appears
  2. Access advanced credential type picker:

    • Click the "Advanced" button on the credential picker
    • Verify the advanced setup page appears with:
      • OAuth clients (alphabetically sorted)
      • Raw JSON option
      • Keychain credential option
  3. Test OAuth credential creation flow:

    • Select an OAuth client type from advanced picker
    • Click "Continue"
    • Verify the OAuth credential creation form appears
    • Test the "Back" button returns to advanced picker
    • Verify selection is preserved when going back
  4. Test raw JSON credential creation flow:

    • From advanced picker, select "Raw JSON"
    • Click "Continue"
    • Verify the raw credential creation form appears
    • Test the "Back" button returns to advanced picker
  5. Test keychain credential creation flow:

    • From advanced picker, select "Keychain credential"
    • Click "Continue"
    • Verify the keychain credential form appears with fields for:
      • Name
      • JSONPath Expression
      • Default Credential dropdown
    • Test the "Back" button returns to advanced picker
    • Create a keychain credential and verify it saves correctly

Additional notes for the reviewer

AI Usage

Please disclose how you've used AI in this work (it's cool, we just want to know!):

  • Code generation (copilot but not intellisense)
  • Learning or fact checking
  • Strategy / design
  • Optimisation / refactoring
  • Translation / spellchecking / doc gen
  • Other
  • I have not used AI

You can read more details in our Responsible AI Policy

Pre-submission checklist

  • I have performed a self-review of my code.
  • I have implemented and tested all related authorization policies. (e.g., :owner, :admin, :editor, :viewer)
  • I have updated the changelog.
  • I have ticked a box in "AI usage" in this PR

@github-project-automation github-project-automation bot moved this to New Issues in v2 Nov 5, 2025
@codecov
Copy link

codecov bot commented Nov 5, 2025

Codecov Report

❌ Patch coverage is 96.61017% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.79%. Comparing base (a7cfb90) to head (67dafb0).

Files with missing lines Patch % Lines
...dential_live/keychain_credential_form_component.ex 71.42% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3929      +/-   ##
==========================================
+ Coverage   88.65%   88.79%   +0.13%     
==========================================
  Files         422      422              
  Lines       18913    19049     +136     
==========================================
+ Hits        16767    16914     +147     
+ Misses       2146     2135      -11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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.

@elias-ba elias-ba force-pushed the 3906-credentials-types branch 4 times, most recently from 1b9868b to 423bb60 Compare November 9, 2025 12:34
elias-ba added a commit that referenced this pull request Nov 9, 2025
- Add 4 tests for from_collab_editor flag functionality
- Test that push_event is skipped when from_collab_editor is true
- Test that permission checks still work with from_collab_editor
- Improves coverage from ~72% to 80% for keychain component

All tests verify the new conditional logic added in PR #3929 for
collaborative editor integration.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@elias-ba elias-ba force-pushed the 3906-credentials-types branch 4 times, most recently from 6443913 to b3925c4 Compare November 9, 2025 15:53
@elias-ba elias-ba changed the title Add credential type selection from workflow canvas add credential type selection from workflow canvas Nov 9, 2025
@elias-ba elias-ba requested a review from stuartc November 9, 2025 19:43
elias-ba added a commit that referenced this pull request Nov 9, 2025
- Add 4 tests for from_collab_editor flag functionality
- Test that push_event is skipped when from_collab_editor is true
- Test that permission checks still work with from_collab_editor
- Improves coverage from ~72% to 80% for keychain component

All tests verify the new conditional logic added in PR #3929 for
collaborative editor integration.
@elias-ba elias-ba force-pushed the 3906-credentials-types branch from c83a9d2 to 2cedcca Compare November 9, 2025 19:47
This PR adds the ability to create credentials directly from the workflow
canvas when configuring job credentials. Users can now select from OAuth,
Raw JSON, and Keychain credential types through an advanced picker interface.

Features:
- Advanced credential type picker with OAuth, Raw, and Keychain options
- Keychain credential creation and editing from collaborative editor
- Back navigation between picker pages
- Form validation and error handling
- Integration with existing credential management system

Testing:
- Comprehensive integration tests for credential creation flows
- Authorization tests for viewer permissions
- Back navigation and form state preservation tests
- Validation error handling tests
@elias-ba elias-ba force-pushed the 3906-credentials-types branch from 2cedcca to 475952f Compare November 9, 2025 19:52
@theroinaochieng theroinaochieng moved this from New Issues to In review in v2 Nov 11, 2025
Copy link
Collaborator

@midigofrank midigofrank left a comment

Choose a reason for hiding this comment

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

Nicely done

@elias-ba elias-ba requested review from theroinaochieng and removed request for stuartc and taylordowns2000 November 12, 2025 10:24
Resolved conflicts in:
- CHANGELOG.md: Combined entries from both branches
- lib/lightning_web/live/workflow_live/collaborate.ex: Merged credential type picker with webhook auth modal, updated event handler name to close_credential_modal
- test/lightning_web/live/workflow_live/collaborate_test.exs: Combined credential picker tests with webhook auth modal tests
Resolved conflicts in:
- CHANGELOG.md: Kept both feature entries
- useWorkflow.ts: Added useWorkflowSettingsErrors hook from main
@elias-ba elias-ba force-pushed the 3906-credentials-types branch 2 times, most recently from fd6623c to 1ed37e5 Compare November 12, 2025 18:09
- Add keychain.png for keychain credential type
- Add raw.png for raw JSON credential type
- Update paths in credential_form_component.ex

Icons are placed in /priv/static/images/ alongside other static
images like user.png, google.png, etc. File names without dashes
avoid gitignore patterns that exclude digested build assets.
@elias-ba elias-ba force-pushed the 3906-credentials-types branch from 1ed37e5 to 67dafb0 Compare November 12, 2025 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

3 participants