Closes #35898

Implementation Summary

This PR implements three key improvements to Gitea’s repository file browsing experience based on GitHub’s interface:

1. Repository-Wide File Search

  • Added search functionality with real-time filtering
  • Git grep-based search showing line numbers and matched content
  • “View File” navigation for each search result
  • Exceeds requirement: Full repository search vs basic tree filter

2. Add File Dropdown Menu

  • Dropdown button with three options:
    • New File
    • Upload File
    • Apply Patch
  • Top-right placement in repository view

3. Context Menu (Three-Dot Menu)

  • Three-dot menu in repository view
  • Download options (ZIP, TAR.GZ, BUNDLE)
  • IDE integration options (VS Code, VSCodium, IntelliJ IDEA)

Files Modified

  1. web_src/js/features/repo-tree-search.ts - Search functionality (250+ lines)
  2. web_src/js/index-domready.ts - Feature integration
  3. templates/repo/view_list.tmpl - UI components (search box, file actions)

Testing

-Tested on Gitea v1.22.6

  • All features working as demonstrated in screenshots below
  • No compilation errors
  • Frontend build successful

Screenshots

Feature 1: Repository-Wide Search

![Search Feature] image

Feature 2: Add File Dropdown

![Add File Dropdown] image

Feature 3: Context Menu

![Context Menu] image

Demo

All features tested and working. Screenshots demonstrate:

  • Real-time file search with results
  • Add file dropdown with multiple options
  • Three-dot context menu with actions

/claim #35898

https://github.com/user-attachments/assets/ad195dd1-386b-48cb-ba65-adb495fca828

Claim

Total prize pool $300
Total paid $0
Status Pending
Submitted November 10, 2025
Last updated November 10, 2025

Contributors

BO

Bot-GJ16

@Bot-GJ16

100%

Sponsors

GI

Gitea

@go-gitea

$300