Preserve full board page title on load

What does this MR do and why?

Fixes a browser tab title bug on issue boards and epic boards.

When a board page loads, the browser tab title first shows the correct server-rendered title, for example Issue Boards · [Board name] · Boards · [Project] · GitLab (segments separated by a middot). Once the Vue app finished loading the board data, a watcher in app/assets/javascripts/boards/components/boards_selector.vue ran document.title = newBoard.name, which overwrote the whole title with just the board name. This dropped the Issue Boards prefix and the project/instance suffix. Epic boards use Epic Boards as the prefix and had the same problem.

The watcher now splits the existing document.title on the · separator and replaces only the board-name segment (the second segment), keeping the prefix and the project/instance suffix intact. If the title is not segmented, it falls back to setting the bare board name.

boards_selector.vue is a shared CE component used by both issue boards and epic boards, so this one change covers both.

References

No linked issue. This MR is unrelated to any other in-flight boards MRs.

Screenshots or screen recordings

Because this changes the browser tab title on load, a screen recording of the tab title as the page finishes loading is the clearest proof.

Before After
Tab title collapses to just the [Board name] after the Vue app loads. Tab title keeps the full Issue Boards · [Board name] · Boards · [Project name] · GitLab format after the Vue app loads.

How to set up and validate locally

  1. Open an issue board.
  2. Watch the browser tab title as the page finishes loading.
  3. Confirm the title keeps the full Issue Boards · Board · Boards · Project · GitLab format instead of collapsing to just the board name.
  4. Switch between boards and confirm only the board-name segment updates while the prefix and suffix stay.
  5. Repeat steps 1-4 on an epic board and confirm the Epic Boards prefix and suffix are preserved.

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 Sascha Eggenberger

Merge request reports

Loading
Loading