feat: Add workflow dependencies visualization (#26062)#36248
feat: Add workflow dependencies visualization (#26062)#36248wxiaoguang merged 46 commits intogo-gitea:mainfrom
Conversation
9e8feef to
f685d5f
Compare
## API changes:
- Add job_id field for YAML job identifiers
- Add needs field for job dependencies
- Update swagger documentation
## Frontend features:
- Interactive graph with zoom/pan navigation
- Matrix jobs visualization
- Custom job names support via job_id
- Status-based coloring and animations
- Hover highlighting for related jobs
- Click to navigate to job details
## Technical details:
- Uses existing database columns (no schema changes)
- Backward compatible (omitempty for new fields)
- Handles edge cases (cycles, missing dependencies)
- Performance optimized
## UI integration:
- Updated RepoActionView.vue styles for proper theme compatibility
- Consistent styling with Gitea's CSS variables
|
Would it be possible to show the graph "left-to-right" (like Github / Gitlab) instead of "top to bottom"? |
Good suggestion! I can add an orientation toggle (top-down ↔ left-right) in a separate PR to keep this one focused on the core functionality. |
|
Is there a plan on when to continue here? looking forward to see this in prod |
|
@xDarkmanx @lunny what is needed to get this in for 1.26? |
Apparently the community doesn't need this functionality. |
|
@xDarkmanx I would really love to see this - i think its pretty useful |
I completely agree with you. You can already try this functionality. docker pull xvulturex/gitea:latest
docker run -p 3000:3000 xvulturex/gitea:latest |
Signed-off-by: Semenets V. Pavel <p.semenets@gmail.com>
|
Looks amazing, I need some time to review it. |
|
Thanks @lunny 😊 |
|
@lunny |
|
Made some changes.
Redundant UI elements only make users spend more time to read.
TODO (fixed)It seems that some edges are not displayed(not caused by my code, old code also doesn't display it): These are not used |
|
There are too many problems in code. I don't want to spend more time to guess why the code was written as that. I removed all the unclear and non-working code. If anything is missing, feel free to add them back and make sure they really work (in following up PRs) |
@lunny Have you really reviewed? Or just a "rubberstamp" approval? |
|
Colleagues, thank you for the thorough review and feedback. I understand the code raised some concerns, but thanks to your review it became much better. I'm honored to be part of the community, as this is my first contribution. |
* giteaofficial/main: Fix path resolving (go-gitea#36734) [skip ci] Updated translations via Crowdin Fix track time list permission check (go-gitea#36662) Fix incorrect setting loading order (go-gitea#36735) Use case-insensitive matching for Git error "Not a valid object name" (go-gitea#36728) feat: Add workflow dependencies visualization (go-gitea#36248)
* main: (24 commits) Instance-wide (global) info banner and maintenance mode (go-gitea#36571) Add created_by filter to SearchIssues (go-gitea#36670) Inline and lazy-load EasyMDE CSS, fix border colors (go-gitea#36714) Fix release draft access check logic (go-gitea#36720) Change image transparency grid to CSS (go-gitea#36711) Avoid opening new tab when downloading actions logs (go-gitea#36740) Add validation constraints for repository creation fields (go-gitea#36671) Fix SVG height calculation in diff viewer (go-gitea#36748) Fix path resolving (go-gitea#36734) [skip ci] Updated translations via Crowdin Fix track time list permission check (go-gitea#36662) Fix incorrect setting loading order (go-gitea#36735) Use case-insensitive matching for Git error "Not a valid object name" (go-gitea#36728) feat: Add workflow dependencies visualization (go-gitea#36248) Add keyboard shortcuts for repository file and code search (go-gitea#36416) Refactor text utility classes to Tailwind CSS (go-gitea#36703) Prevent redirect bypasses via backslash-encoded paths (go-gitea#36660) Fix force push time-line commit comments of pull request (go-gitea#36653) Fix get release draft permission check (go-gitea#36659) Move `X_FRAME_OPTIONS` setting from `cors` to `security` section (go-gitea#30256) ... # Conflicts: # web_src/css/base.css # web_src/css/index.css



feat: Add workflow dependencies visualization
Related to #26062
What does this PR do?
This PR adds an interactive visualization component that displays job dependencies in Gitea Actions workflow runs. It helps users understand complex pipeline structures at a glance, addressing the difficulty of comprehending dependency chains in current Gitea UI.
Screenshots / Images
Example 1: Multi-level CI/CD Pipeline (9 levels deep)
Pipeline Source
Example 2: Microservices Deployment with Matrix Jobs
Pipeline Source
Example 3: Real production workflow
Pipeline Source
Docker Image for Testing
A pre-built Docker image with these changes is available for reviewers to test without building locally:
What changes were made?
API Changes:
job_idfield tostructs.ActionJobfor YAML job identifier mappingneedsfield to track job dependencies as defined in workflow YAMLomitemptyfor backward compatibilityFrontend Component:
WorkflowGraph.vuewith TypeScript supportjob_idfield correlationBackend:
job_idmaps to existingjob_namein actions table)Testing
The implementation has been thoroughly tested with:
Manual Testing:
Test Workflows Used:
Performance:
Backwards Compatibility
omitempty)Usage
Checklist
Additional Notes
job_idfield which maps to YAML job identifiersvar(--color-*)) for proper theme integration