Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new “Chart” workflow discovery view (burn down/up trend) with backend data endpoint, permission gating, and supporting UX/state changes across the workflow discovery experience, plus a refactor of workflow jobs into Zeitwerk-friendly namespacing.
Changes:
- Introduces workflow charts:
/workflow/chartsdiscovery route +/discourse-workflow/charts.jsondata endpoint, including weeks horizon (1–12) and per-step series. - Updates workflow discovery quick filters to a multi-view selector (List/Kanban/Chart) with chart visibility gated by a new setting.
- Refactors workflow jobs into
Jobs::DiscourseWorkflow::*namespacing and adds specs/fabricators to expand automated coverage.
Reviewed changes
Copilot reviewed 35 out of 35 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/system/workflow_quick_filters_spec.rb | Adds system coverage for hiding “Chart” when not permitted; updates view assertions to use selector value. |
| spec/system/workflow_charts_spec.rb | New system coverage for chart rendering, view switching, and weeks selector behavior. |
| spec/system/page_objects/pages/workflow_discovery.rb | Extends page object with chart/view selector helpers used by system specs. |
| spec/requests/workflow_charts_controller_spec.rb | New request specs for charts API permissions, routing, week windows, and payload contract. |
| spec/jobs/scheduled/discourse_workflow/data_explorer_queries_completeness_spec.rb | New unit coverage for Data Explorer query seeding behavior. |
| spec/jobs/scheduled/discourse_workflow/daily_stats_spec.rb | New coverage for daily stats scheduled job behavior. |
| spec/jobs/scheduled/discourse_workflow/ai_transitions_spec.rb | New coverage ensuring AI transitions scheduled job delegates properly. |
| spec/jobs/regular/discourse_workflow/topic_arrival_notifier_spec.rb | New coverage for topic arrival notifier job behavior. |
| spec/fabricators/workflow_stat_fabricator.rb | Adds fabricator for workflow stats used in tests. |
| plugin.rb | Adds /workflow/charts route, chart permission flags/metadata in topic_list serialization. |
| lib/discourse_workflow/transition.rb | Updates transition path to enqueue the new namespaced notifier job. |
| lib/discourse_workflow/list_controller_extension.rb | Adds workflow_charts list action with permission gating. |
| lib/discourse_workflow/engine.rb | Eager-loads scheduled jobs dir to satisfy Zeitwerk/runtime job loading. |
| lib/discourse_workflow/charts_permissions.rb | Centralizes chart permission check (admins + allowed groups). |
| config/settings.yml | Adds workflow_charts_allowed_groups setting. |
| config/routes.rb | Adds engine route for charts JSON endpoint; removes old application route snippet. |
| config/locales/server.en.yml | Adds setting description and access-denied message for charts. |
| config/locales/client.en.yml | Adds client strings for chart view and chart UI labels. |
| assets/stylesheets/common/workflow_common.scss | Adds styling for view selector and chart layout; hides topic list in chart mode. |
| assets/javascripts/discourse/routes/discovery/workflow-charts.js | Adds Ember discovery route for /workflow/charts. |
| assets/javascripts/discourse/initializers/init-workflow.gjs | Registers chart-related query params and marks workflow list routes for column transforms. |
| assets/javascripts/discourse/discourse-workflow-route-map.js | Adds route-map entry for discovery.workflowCharts. |
| assets/javascripts/discourse/controllers/discovery/workflow-charts.js | Adds controller inheriting from discovery list controller for charts route. |
| assets/javascripts/discourse/connectors/discovery-list-container-top/z-workflow-burndown-chart.gjs | New chart connector: fetches chart series + renders Chart.js line chart in discovery outlet. |
| assets/javascripts/discourse/connectors/discovery-list-container-top/workflow-quick-filters.gjs | Converts kanban toggle to a view selector; adds chart weeks selector and chart gating. |
| app/models/discourse_workflow/workflow_stat.rb | Fixes associations to belongs_to for correct relation semantics. |
| app/jobs/scheduled/workflow_daily_stats.rb | Deletes old unnamespaced scheduled job file. |
| app/jobs/scheduled/workflow_ai_transitions.rb | Deletes old unnamespaced scheduled job file. |
| app/jobs/scheduled/discourse_workflow/data_explorer_queries_completeness.rb | Moves scheduled job to Jobs::DiscourseWorkflow namespace; improves warning message. |
| app/jobs/scheduled/discourse_workflow/daily_stats.rb | Adds new namespaced daily stats scheduled job. |
| app/jobs/scheduled/discourse_workflow/ai_transitions.rb | Adds new namespaced AI transitions scheduled job. |
| app/jobs/regular/workflow_topic_arrival_notifier.rb | Deletes old unnamespaced regular job file. |
| app/jobs/regular/discourse_workflow/topic_arrival_notifier.rb | Adds new namespaced topic arrival notifier job. |
| app/controllers/discourse_workflow/workflow_charts_controller.rb | Adds charts JSON endpoint with authorization, week normalization, and per-step series building. |
| README.md | Documents chart view behavior, access model, and job list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
assets/javascripts/discourse/connectors/discovery-list-container-top/workflow-quick-filters.gjs
Show resolved
Hide resolved
.../javascripts/discourse/connectors/discovery-list-container-top/z-workflow-burndown-chart.gjs
Outdated
Show resolved
Hide resolved
.../javascripts/discourse/connectors/discovery-list-container-top/z-workflow-burndown-chart.gjs
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR delivers a workflow discovery UX and reporting expansion with three integrated workflow views (List, Kanban, Chart), stronger runtime hardening, and broader automated coverage.
It adds charting for workflow step counts over time, improves list/kanban SPA behavior, aligns job loading/naming with Zeitwerk autoloading conventions, and tightens chart mode visibility so only authorized users see
Chart in the workflow view selector.
Functional Improvements
Technical Changes
New / Updated Tests
Validation
Notes