Repository navigation
feat(ui): show the current view in the browser tab title - #584
Merged
Merged
Conversation
Relates to #563 Add page-title.js as the single owner of document.title ("<View> · <entity> · <instance>"). The router sets the view on every navigation; branding/customizer updates only change the instance name; Reach, Node Analytics and Observer pages add their label from data they already loaded, guarded by a per-visit token. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…tions (#563) eslint no-undef flagged the bare global; the two customizer E2E suites asserted a bare site name as document.title, which is now "<View> · <instance>". Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Collaborator
Author
Rapport — CS-pve-agent2 PR#584 #563 — head 501db83Status: Draft PR, all CI jobs green on head 501db83; not ready for merge by me (draft, awaiting human review). Requirements, tests and mutants
Local checks
CI per job (head 501db83)
Residuals
|
Owner
Review — CS-Minimax PR#584 — head 501db83Dom: APPROVE med nits Findings
No blocking findings. Answers to the review points
TestsMerged tree (
Mutants (own)
Not verified
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relates to #563
Plan / what changes
public/page-title.jsis the single owner ofdocument.title, format<View> · <entity> · <instance>(for exampleLive · My Mesh,Reach · Node A · My Mesh). Unknown routes getNot found · <instance>.app.jsnavigate()callsPageTitle.setRoute(basePage)once per navigation, after the previous page'sdestroy(). This also clears any entity label.customize.js/customize-v2.js: the fivedocument.title = siteNamewrites now callsetInstanceTitle(), which only changes the instance part. A delayed theme load therefore cannot erase the route title, and navigation never resets the configured name to a default.setEntity(label, token). The token is taken atinit(); any navigation (including leaving and revisiting the same route) invalidates it, so a late response cannot rename the tab. Failed or unavailable lookups never set a label.document.title(text), collapsed to one line and capped at 60 characters.Tests
test-page-title-563.js(unit, added totest-all.sh): 13 cases.test-e2e-563-route-titles.js(Playwright against the e2e fixture, added to shard 1 inscripts/e2e-shards.json): deep link, route change, back/forward, unknown route, node Reach and Analytics, customised instance name with a 1.5 s delayed theme response, late Reach response after navigating away. Red on unchanged master, green with the change.Follow-ups (not in this PR)
Not foundwording and 60-character label cap are hardcoded; they could be exposed in the customizer later.#/nodes/<pubkey>side pane) keeps the plainNodes · <instance>title.🤖 Generated with Claude Code