Skip to content

Bug: Wrong title & Feature req: Dynamically Update document.title When Navigating Files via File Tree #35749

@PawsFunctions

Description

@PawsFunctions

Bug

This title format lacks full file path context. In Rust projects, for example, multiple mod.rs files may exist at different paths such as repo/api/mod.rs and repo/types/mod.rs, but they all display the same page title.

  • https://***gitea***/org/rust-project/src/branch/master/src/api/mod.rs
  • https://***gitea***/org/rust-project/src/branch/master/src/types/mod.rs

current page title : rust-project/mod.rs at master - rust-project - Gitea:***

Expected Behavior: The page title should include the full file path, similar to GitHub’s format.

  • gitea/assets/emoji.json at main - go-gitea/gitea Gitea Repo link
    OR
  • /api/mod.rs at master - rust-project - Gitea:***
Image

Feature Request Description

Update the browser tab title (document.title) to show the currently viewed file when a user clicks on a file in the file tree.

Currently, when navigating between files via the file tree, the page title remains static. This can make it difficult to identify which file is currently open, especially when working across multiple tabs.

https://stackoverflow.com/a/51640162

@bytedream — you previously worked on the Ctrl + Click navigation issue, I believe this change might be in same section of the code. Would you be open to taking a look?

Thank you

Screenshots

Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions