← 输入框|github.com|刷新
Skip to content

[web-console] Set the browser tab title on every page - #7914

Merged
Karakatiza666 merged 1 commit into
mainfrom
fix-page-title-5805
Nov 11, 2026
Merged

Karakatiza666 merged 1 commit into
mainfrom
fix-page-title-5805

Conversation

@Karakatiza666

Copy link
Copy Markdown
Contributor

Fixes #5805.

Cause

Svelte 5 sets document.title from <svelte:head><title> when a page mounts. It does not restore the title when the page unmounts. Only the admin and profile viewer pages had a <title>. So after you open the profile viewer of nb-unihost-2 and go to the page of nb-blp, the tab still shows nb-unihost-2 | Profile Viewer.

Fix

Each page now sets its own title. The separator is now | (it was an em-dash).

Page Title
Pipeline <pipeline name> | Feldera
Home Feldera
Demos Demos | Feldera
Health Health | Feldera
Admin Administration | Feldera
Select tenant Select tenant | Feldera
Error pages Error | Feldera
Profile viewer <pipeline name> | Profile Viewer or Profile Viewer

Tests

  • Each page replaces a stale title with its own title.
  • The pipeline page title changes when you switch pipelines, and a URL-encoded name shows decoded.
  • The profile viewer takes the name from the URL, or from the bundle when the URL has no name.

All 13 title tests fail when the <title> blocks are removed.

Fixes #5805. Svelte sets `document.title` when a page mounts, but does
not restore it when the page unmounts. Most pages had no `<title>`, so
the tab kept the title of an earlier page. For example, after the
profile viewer of one pipeline, the page of another pipeline showed the
name of the first pipeline.

Each page now sets its own title, `<page> | Feldera`, and the pipeline
page shows the name of the pipeline. The admin and profile viewer
titles use `|` as the separator too.
@mythical-fred-oss

Copy link
Copy Markdown
Contributor

LGTM.

Ran

Check Result
vitest --project client on the 5 changed/new specs 41/41 pass
Removed the <title> from the pipeline page as a negative control all 3 pipeline title tests fail, as expected
pre-commit run --files <changed> pass

Every +page.svelte and +error.svelte under src/routes now sets a <title>, so no route is left that keeps a stale title. No feldera-pr-checks gate fails. Tests use expect.poll instead of sleeps, and each browser test file runs in its own iframe, so writing document.title is isolated between files.

@Karakatiza666
Karakatiza666 added this pull request to the merge queue Nov 11, 2026
Merged via the queue into main with commit d51c40e Nov 11, 2026
3 checks passed
@Karakatiza666
Karakatiza666 deleted the fix-page-title-5805 branch November 11, 2026 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[webconsole] Page title doesn't necessarily match the pipeline name

2 participants