Add the description to the replacement MR overview
This MR adds a description panel to the merge request overview, one part of a chain that builds a replacement Overview tab behind the mr_ai_overview feature flag and a per-user toggle (nothing changes with the flag off). The panel header always shows "Description" and "Created by "; the rendered description stays collapsed until expanded with a chevron, the same pattern the risk assessment card uses. It also adds a "Viewing as author" badge.
- !252481 (merged) - flag, toggle, empty container (merged)
- !255057 (merged) - data layer (merged)
- !252997 (merged) - merge readiness (merged)
- !252998 (merged) - reviewers and recommended reviewers (merged)
- !252999 (merged) - description (this MR)
- !257511 (merged) - labels and milestone
- !257492 (merged) - risk assessment
Collapsed by default:
Expanded:
No description: no toggle, and the reviewer badge takes precedence over the author one:
Detailed context for AI agents
Chain context
The last three MRs in the chain (description, labels/milestone, risk assessment) each target master directly and do not depend on each other. They each add a line to app.vue and fields to the overview query and mock data, so whichever merges later needs a small rebase.
This MR used to carry both the description panel and the labels/milestone card. It was split on request: the labels/milestone card moved to !257511 (merged). This MR was rebuilt as a single commit on current master.
Description panel
New ee/app/assets/javascripts/merge_requests/ai_overview/components/description_panel.vue, in the main column under the merge readiness panel.
The header shows "Description" on the left, then "Created by <avatar> <name>" where the name links to the author's webPath and carries js-user-link plus data-user-id / data-username for the user popover, the same as the reviewers panel. A chevron toggle sits at the end of the header: a tertiary icon button with the animated chevron, the same pattern crud_component uses. Its tooltip and aria-label read "Expand" / "Collapse" (crud_component's own strings), and it carries aria-expanded and aria-controls.
The body renders descriptionHtml through v-safe-html (DOMPurify) into a .md container, and renderGFM runs on mount, so syntax highlighting, references, user popovers, math and mermaid all work. The body uses v-show, so it renders (and runs GFM processing) once, and the element aria-controls points at always exists. Task list checkboxes come back from the server disabled, so they show their state but cannot be toggled. The description is collapsed by default.
When there is no description, the panel shows "No description" with no toggle.
Viewer badge
merge_readiness.vue: the hero badge is now a viewerBadge computed property. It reads "Viewing as reviewer" when the viewer is the blocking reviewer (unchanged behaviour, and it still wins); otherwise "Viewing as author" when the signed-in user (window.gon.current_username) authored the merge request; otherwise no badge. There is no badge on merged, closed or locked merge requests, and a signed-out viewer never gets the author badge, even if the author is missing.
GraphQL query
queries/mr_ai_overview.query.graphql adds descriptionHtml and author { ...User } (the shared ~/graphql_shared/fragments/user.fragment.graphql). These are kept out of the shared MrAiOverviewFields fragment because the merge status subscription does not need them. They come from the query only, so an edit made elsewhere shows up here after a reload.
Strings
One new string: AiOverview|Viewing as author. Everything else reuses existing strings: Description, Created by %{author}, No description, Expand, Collapse. locale/gitlab.pot has been regenerated.
There are no backend changes.
Design note
An earlier iteration showed a preview of the first few lines with "Read more" / "Show less". That was replaced with the fully collapsed chevron toggle, to match the risk assessment card, on request.
Files changed (10)
ee/app/assets/javascripts/merge_requests/ai_overview/components/app.vueee/app/assets/javascripts/merge_requests/ai_overview/components/description_panel.vue(new)ee/app/assets/javascripts/merge_requests/ai_overview/components/merge_readiness.vueee/app/assets/javascripts/merge_requests/ai_overview/queries/mr_ai_overview.query.graphqllocale/gitlab.potee/spec/features/merge_request/user_toggles_ai_overview_spec.rb(one new example: collapsed by default so the markdown is not visible, the "Created by" line shows, and after clicking the toggle the description renders with bold text)ee/spec/frontend/merge_requests/ai_overview/components/app_spec.jsee/spec/frontend/merge_requests/ai_overview/components/description_panel_spec.js(new)ee/spec/frontend/merge_requests/ai_overview/components/merge_readiness_spec.jsee/spec/frontend/merge_requests/ai_overview/mock_data.js(adds author and descriptionHtml to the mock merge request)
Verification performed
- Jest:
ee/spec/frontend/merge_requests/ai_overview- 77 examples, all pass. - ESLint, Prettier and Rubocop are clean.
- Feature spec:
ee/spec/features/merge_request/user_toggles_ai_overview_spec.rb- 12 examples, 0 failures. - The query was validated against the GDK GraphQL schema earlier in the chain.
- Manual check on a local GDK, with no JavaScript console errors: collapsed, expanded, and the empty state.


