Introduce decision log FF and show widget with stubbed values

What does this MR do and why?

This MR adds the stubbed widget for the decision log on work items, behind the new workplan_decision_log feature flag. The decision log records the choices that were made while a workplan is refined, so that the reasoning behind a plan stays visible on the work item itself.

There is no backend for this yet, so the widget renders from a stubbed list of decisions.

The intent is to land the component structure, the styling and the flag now, so that swapping in the real decisionLog GraphQL widget later is a small, focused change.

What this MR adds

  • A new workplan_decision_log WIP feature flag, pushed to the frontend from both the group and project work item controllers
  • WorkItemDecisionLog, a collapsible CrudComponent widget that splits decisions into a Pending section and a Decided section, and assigns each decision a positional reference.
  • DecisionLogItem, which renders a single decision with its author, category badge, status badge, relative timestamp, assignee and selected option.

The things that this MR covers

  1. Only shows the Decision log widget when the agent plan exists on a work item
  2. Four categories of decisions are introduced SCOPE_DECISION, REQUIREMENT_ADDED , QUESTION_RESOLVED and AUTO_GENERATED
  3. Using stubbed values for MR's

References

  1. Proof of concept: !248505

Screenshots or screen recordings

How to set up and validate locally

  1. In the Rails console, enable the feature flag:

    Feature.enable(:workplan_decision_log)
  2. Open a work item that has an agent plan, for example any work item where the Workplan widget is visible.

  3. Confirm the Decision log widget renders below the description, with a count of 3, a Pending section containing one decision and a Decided section containing two.

  4. Confirm each decision shows an author, a category badge, a status badge, a relative timestamp and a DL-00N reference on the right.

  5. Confirm the pending decision shows the "Awaiting Zhang Wei" assignee line and a warning coloured border, and that the approved decision shows its selected option.

  6. Collapse the widget, reload the page and confirm the collapsed state persists.

  7. Disable the flag and confirm the widget no longer renders

  8. Open a work item without an agent plan and confirm the widget does not render even with the flag enabled.

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.

Edited by Deepika Guliani

Merge request reports

Loading