[Feature flag] Cleanup inline_blame
Follow-up to the rollout issue #501539 (closed) to permanently remove the inline_blame feature flag once the feature is deemed stable.
The default-enabling MR is !239551 (merged). This issue tracks the full code/flag removal.
⚠️ Read before deleting anything
The flag gates two distinct code paths. The cleanup is not a simple "delete the legacy blame page" task. Removing the wrong pieces will break working links and silently regress behavior.
1. The /-/blame/... redirect must survive (made unconditional, not deleted)
When the flag is on, BlameController#show returns early and show.html.haml renders a window.location.replace(...) redirect to the blob viewer at project_blob_path(..., blame: 1), preserving ref_type and the URL hash (#L<n>).
External bookmarks, GitLab-internal links (code search, file browser), and git_blame.md all still point at /-/blame/<ref>/<path>. Keep the redirect and make it unconditional — remove only the Feature.enabled?(:inline_blame) guard and the legacy else branch of the view. Do not make those URLs 404.
2. Frontend activation
blob_content_viewer.vue reads glFeatures.inlineBlame for isBlameAvailable and watches query.blame === '1' to auto-open the blame panel. The legacy "Blame" button is hidden, and the in-gutter blame-link click is intercepted, only when inlineBlame is true. Simplify all reads to the always-on branch.
Decisions required (don't delete silently)
#page/#streamingactions: these have no flag guard and still render the legacy blame table (_page.html.haml,BlamePagination,BlameMode,entire_blame_path,blame_pages_streaming_url). Decide explicitly whether to retire them. If retired, also handle the routes asserted inspec/routing/project_routing_spec.rb— don't orphan them.- Binary blobs:
require_non_binary_blobcurrently redirects binaries with a notice. The blob viewer already excludes binaries (!isBinaryFileType). Decide whether the controller keeps short-circuiting binaries or defers to the viewer; keep behavior consistent. .git-blame-ignore-revserrors: the legacy path rescuesIgnoreRevsFormatError/IgnoreRevsFileErrorand flashes a message. Verify the blob-viewer/GraphQLBlameResolverpath surfaces these equivalently before removing the legacy handling — otherwise it's a silent regression.
Do NOT remove (independent of the flag)
inline_blame_popoveruser callout (app/models/users/callout.rb→129, dismissed inblob_header_viewer_switcher.vue). This is the onboarding popover, not the flag. Leave it in place or schedule separately.- Analytics events / metrics:
open_blame_viewer_on_blob_page,click_blame_control_on_blob_page,toggle_inline_blame_age_indicator_on_blob_pageand their metric YAMLs track the new experience — keep them.
Spec impact (rewrite, don't just delete)
Specs that stub inline_blame: false assert legacy-page behavior and must be rewritten to assert the redirect / blob-viewer behavior:
spec/controllers/projects/blame_controller_spec.rb— theblame_responseshared example ('when ignore_revs is nil') flips from "renders legacy page" to "redirects".spec/features/projects/blobs/blame_spec.rbspec/features/projects/files/user_browses_files_spec.rbspec/features/search/user_searches_for_code_spec.rb
Also remove all three push_frontend_feature_flag(:inline_blame, ...) call sites: blob_controller.rb, tree_controller.rb, projects_controller.rb.
Documentation
Add the final history entry to doc/user/project/repository/files/git_blame.md: Generally available in GitLab X.Y. Feature flag inline_blame removed. and delete the > [!flag] note (per the feature flag docs history process).
Cleanup checklist
- Create the cleanup MR removing all
inline_blamereferences and the YAML definition (config/feature_flags/beta/inline_blame.yml), handling each item above. Add aChangelogentry (otherif keeping the new code). - Ensure the cleanup MR is in the release package; if needed run
/chatops run release check <mr-url> <milestone>. - After deploy, delete the flag from all environments:
/chatops run feature delete inline_blame --dev --pre --staging --staging-ref --production(in#production). - Close the feature issue #430950 (closed).
- Close this issue.