Add work plan score UI
What does this MR do and why?
Add a workplan confidence score to the agent plan widget, gated behind the default-off workplan_score flag. It's not user facing yet.
The new AgentConfidenceScore component renders three little bars from a numeric score. The score maps to a low/medium/high confidence level, which drives both how many bars get coloured and the variant they use (error/warning/success):
- Low (
< 0.4): 1 bar,error - Medium (
0.4 – 0.79): 2 bars,warning - High (
>= 0.8): 3 bars,success
The score is passed to the AgentPlan widget via the work-plan-score prop. The backend doesn't provide it yet, so the agent_plan.vue workItemScore computed returns a random value between 0 and 1 (Math.random()) client-side, just so the UI can be exercised behind the flag.
The inline row only shows the score when the flag is on regardless of a score being present or workplan content. That is because as we iterate, the confidence will always appear as soon as the AI enabled work item is turned and the work plan widget appears. No work plan => 0 score => low confidence.
This MR also adds a user-facing "Confidence Score" section to doc/user/work_items/workplan.md (linked from the component's help popover) and the corresponding AgentPlan|* translation strings.
References
- Feature flag rollout issue: #607899
- Feature issue: gitlab-org#23050
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
| Low confidence | Medium confidence | High confidence |
|---|---|---|
![]() |
![]() |
![]() |
| Popover | Mobile view |
|---|---|
![]() |
![]() |
How to set up and validate locally
- Turn on the base feature flag
workplan - Turn on the feature flag
workplan_score - Navigate to a work item that has a saved workplan (you choose, my goose)
- Notice the three shiny confidence bars now sitting next to the workplan pill
- Refresh a few times: since the score is randomised for now, the bars and colour will happily change on you
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.






