UI bugs: The "Code" tab always goes to the "master" branch and the "Commits" tab is incorrect when viewing a commit in a branch #881

Closed
opened 2025-11-02 03:40:12 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @wyattoday on GitHub (Jul 12, 2017).

Description

UI bug: The "Code" tab always goes to the "master" branch and the "Commits" tab is incorrect when viewing a commit in a branch

  1. When viewing a commit in gitea, the "Commits" tab above will link not to the branch that the commit is part of, but rather it will link to the "master" (and show the master's commit count). Here's an example: df8d094d0c

  2. The "Code" tab above always links to the "master" branch even if we're currently viewing a file in the "new-feature-branch". The better UI (and the UI that matches what github does) is to have that "Code" tab take you to the root of the branch that you're currently viewing (whether you're viewing a commit in the branch or an individual file in the branch). Here are 2 examples:

df8d094d0c

https://try.gitea.io/wyattoday/simple-respository/src/new-feature-branch

Screenshots

If this issue involves the Web Interface, please include a screenshot

Originally created by @wyattoday on GitHub (Jul 12, 2017). - Gitea version (or commit ref): Current master (https://github.com/go-gitea/gitea/commit/858324c21ab95bb46d881cac6f824d8f9b7d2b87 ) - Git version: 2.13.2 - Operating system: Ubuntu - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes: https://try.gitea.io/wyattoday/simple-respository/commit/df8d094d0cab1732bbf34d5c125a9e09c1eb9f92 , https://try.gitea.io/wyattoday/simple-respository/src/new-feature-branch - [ ] No - [ ] Not relevant - Log gist: N/A ## Description UI bug: The "Code" tab always goes to the "master" branch and the "Commits" tab is incorrect when viewing a commit in a branch 1. When viewing a commit in gitea, the "Commits" tab above will link not to the branch that the commit is part of, but rather it will link to the "master" (and show the master's commit count). Here's an example: https://try.gitea.io/wyattoday/simple-respository/commit/df8d094d0cab1732bbf34d5c125a9e09c1eb9f92 2. The "Code" tab above always links to the "master" branch even if we're currently viewing a file in the "new-feature-branch". The better UI (and the UI that matches what github does) is to have that "Code" tab take you to the root of the branch that you're currently viewing (whether you're viewing a commit in the branch or an individual file in the branch). Here are 2 examples: https://try.gitea.io/wyattoday/simple-respository/commit/df8d094d0cab1732bbf34d5c125a9e09c1eb9f92 https://try.gitea.io/wyattoday/simple-respository/src/new-feature-branch ## Screenshots **If this issue involves the Web Interface, please include a screenshot**
GiteaMirror added the type/bug label 2025-11-02 03:40:12 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#881