Add user/profile search endpoints and UI - #157
Conversation
Backend: add user-focused APIs (users search, user profile, user repos, user readme, code search, GitHub packages) and improve GitLab avatar fallback and Codeberg contributor 404 handling. Router serves profile.html for /gh|/gl|/cb clean routes. Frontend: add users tab, user search, profile modal, full SPA profile page (web/profile.html), many repo.html UX features (mermaid support, repo search, tags, contributors, deployments, last-commit row) and star/icon improvements. Service worker: bump cache and treat profile routes network-first. CI: update actions versions, gradle flags and verify APK artifact.
📝 WalkthroughWalkthroughThis PR adds multi-provider user search, profile pages, backend APIs, repository search and metadata views, Mermaid rendering, profile routing, service-worker cache updates, and Android APK build validation. ChangesProvider discovery and profiles
Repository exploration
Android build validation
Estimated code review effort: 5 (Critical) | ~120 minutes Sequence Diagram(s)sequenceDiagram
participant Visitor
participant WebApp
participant Backend
participant ProviderAPIs
Visitor->>WebApp: search users or open a profile
WebApp->>Backend: request normalized provider data
Backend->>ProviderAPIs: query selected provider APIs
ProviderAPIs-->>Backend: return provider responses
Backend-->>WebApp: return normalized data
WebApp-->>Visitor: render users, profiles, and repositories
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 13
🧹 Nitpick comments (9)
web/repo.html (5)
5549-5603: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low valueThe GitHub tag count is an upper-bound estimate.
total = parseInt(match[1]) * 100assumes the last page holds 100 tags. The sidebar then reports a count that can exceed the real number, whileloadTagscomputes the exact count. Consider labelling the value as approximate, or fetching the last page to get the exact count.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@web/repo.html` around lines 5549 - 5603, Update loadTagCount so the GitHub branch does not present parseInt(match[1]) * 100 as an exact tag count. Either fetch the final GitHub tags page and calculate the precise total, or clearly label the derived value as approximate while preserving exact counts for GitLab and Codeberg.
2254-2260: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRemove the duplicated search markup.
This block duplicates the
_fileTreeSearchtemplate string at lines 5811-5817, including therepo-search-inputid. Two sources for the same markup will diverge. Render the initial shell from_fileTreeShell()instead.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@web/repo.html` around lines 2254 - 2260, Remove the duplicated repo-search markup from the surrounding HTML and have the initial shell render it through _fileTreeShell(), reusing the existing _fileTreeSearch template output and repo-search-input wiring instead of maintaining a second copy.
5867-5887: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winBound the Codeberg content search more strictly.
The loop can issue up to 200 content requests for one search, each decoding a full file. On rate-limited Codeberg tokens this can exhaust the quota and leave the search slow. Consider a lower candidate cap, a size filter from the tree metadata, and a visible note that the search covers only part of the repository.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@web/repo.html` around lines 5867 - 5887, Tighten the client-side search in the repository search flow around _allRepositoryFiles by lowering the candidate cap, filtering out oversized files using available tree metadata before fetching content, and displaying a visible note that results cover only a repository subset. Preserve the existing binary-file exclusion, batching, matching, and 100-result limit.
3902-3949: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winAdd a page cap to the tag pagination loops.
Each
while (true)loop depends only on the provider response to terminate.loadContributorsViewandloadDeploymentsViewcap pagination at 10 pages. Apply the same cap here to bound requests on repositories with many tags.♻️ Proposed change (GitHub branch shown; apply the same to `cb` and `gl`)
let page = 1; while (true) { const res = await ghFetch(`https://api.github.com/repos/${rv.owner}/${rv.repo}/tags?per_page=100&page=${page}`); if (!res.ok) break; const data = await res.json(); if (!Array.isArray(data) || data.length === 0) break; tags.push(...data); const link = res.headers.get('Link') || ''; if (!/<[^>]+>;\s*rel="next"/.test(link)) break; page++; + if (page > 10) break; }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@web/repo.html` around lines 3902 - 3949, Update all three pagination loops in loadTags for GitHub, Codeberg, and GitLab to enforce the existing 10-page maximum used by loadContributorsView and loadDeploymentsView. Preserve the current response and Link-header termination checks, while ensuring no provider requests beyond page 10 are made.
20-20: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winPin Mermaid to an exact release and validate the fetched script at runtime.
web/repo.html:20loadsmermaid@11from jsDelivr; any patch update under that major version can execute as trusted page code. Use an exact version, validate the fetched bytes before execution, and setcrossorigin="anonymous"if the script tag needs to enforce that validation.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@web/repo.html` at line 20, Update the Mermaid script tag in repo.html to pin jsDelivr to an exact Mermaid release rather than the floating `@11` range, and add the required integrity hash for the fetched script plus crossorigin="anonymous" so the browser validates the bytes before execution.internal/http/handlers.go (3)
3612-3681: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueMove the response body close out of the loop.
defer resp.Body.Close()at Line 3641 runs only when the function returns. The code path is safe today because it returns immediately after the deferred call is registered. The pattern breaks if a later change adds another loop iteration after a successful response. Close the body explicitly in the success branch instead.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@internal/http/handlers.go` around lines 3612 - 3681, Update searchCodebergUsers so the successful response body is closed explicitly within the success branch before returning, replacing defer resp.Body.Close(). Preserve the existing decoding, result construction, and immediate return behavior.
4391-4419: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winClose the first response body once, and re-check the organization fallback.
Line 4402 registers
defer resp.Body.Close()on the first response. Line 4406 closes that same body again before the reassignment. The double close is harmless for an HTTP body, but the intent is unclear. Also, the fallback keeps the currenttoken, which may be empty after the 403 retry; that is intended, so only the close sequence needs cleanup.♻️ Proposed cleanup
resp, err := doReq(apiURL, token) if err == nil && resp.StatusCode == http.StatusForbidden { // Scope read:user faltante: reintentar sin token (la API pública funciona). resp.Body.Close() token = "" resp, err = doReq(apiURL, token) } if err != nil { utils.Log("Codeberg user repos error: %v", err) return nil } - defer resp.Body.Close() // Si el usuario no existe, probar como organización. if resp.StatusCode != http.StatusOK && userType != "org" { resp.Body.Close() apiURL = fmt.Sprintf("https://codeberg.org/api/v1/orgs/%s/repos?limit=30&sort=updated", url.PathEscape(username)) resp, err = doReq(apiURL, token) if err != nil { utils.Log("Codeberg org repos error: %v", err) return nil } - defer resp.Body.Close() } + defer resp.Body.Close()🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@internal/http/handlers.go` around lines 4391 - 4419, Clean up the response-body lifecycle in the Codeberg repository request flow around doReq: ensure the initial response body is closed exactly once before replacing resp for the organization fallback, while retaining the existing defer for the normal return path. Leave the fallback token behavior unchanged, including the empty token after a forbidden retry.
3425-3429: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winDo not forward every upstream status code verbatim.
GitHub returns 403 for rate limiting and 422 for invalid queries. The handler returns those codes to the browser, so a server-side rate limit appears as a client authorization failure. Map upstream failures to
502, and keep403/404only when they describe the client request.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@internal/http/handlers.go` around lines 3425 - 3429, Update the non-OK response handling in the GitHub code search handler to return HTTP 502 for upstream GitHub failures instead of forwarding resp.StatusCode. Preserve 403 and 404 only for locally validated client-request conditions, while retaining the existing logging and error response behavior.web/profile.html (1)
7-10: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winAdd integrity attributes to the CDN scripts.
CodeQL flags these three tags. The page loads
highlight.js,marked, anddompurifyfrom third-party CDNs withoutintegrityorcrossorigin. A compromised or substituted CDN response executes with full page privileges, andDOMPurifyis the sanitizer for README output. Pin each script with a subresource integrity hash, or serve the files from/assets.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@web/profile.html` around lines 7 - 10, Add Subresource Integrity integrity hashes and crossorigin attributes to the highlight.js, marked, and DOMPurify CDN script tags in web/profile.html. Use hashes matching the exact pinned script contents and preserve the existing loading order and initialization behavior; alternatively, serve these scripts from local /assets paths.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/android-apk.yml:
- Around line 21-23: Disable dependency caching in the release-producing
workflow: update the actions/setup-node step to set package-manager-cache to
false, and remove or disable both npm and Gradle cache restore/save steps in the
tag build job while preserving the existing APK and release flow.
- Around line 18-19: Update the comment above the checkout action to state that
Node 24 is now the default runtime, removing the inaccurate claim that the
runner no longer supports Node 20 actions. Preserve the existing action
reference and workflow behavior.
In `@internal/http/handlers.go`:
- Around line 3683-3721: Update UserProfileHandler and the corresponding
provider helper flow around gitLabUserProfile, gitLabGroupProfile,
codebergUserProfile, codebergOrgProfile, and gitHubUserProfile so missing
profiles remain distinguishable from transport, timeout, rate-limit, status, and
decode failures. Propagate a distinct upstream error value and return HTTP 502
for those failures, while retaining HTTP 404 only when the provider confirms the
user or organization does not exist.
- Around line 3349-3380: Update UsersSearchHandler to fan out the applicable
searchGitHubUsers, searchGitLabUsers, and searchCodebergUsers calls concurrently
instead of invoking them sequentially, then safely collect and merge each result
before responding. Preserve provider filtering and request validation, and
ensure the request has a bounded context/deadline so slow provider retries
cannot extend total latency indefinitely.
In `@internal/http/router.go`:
- Around line 283-288: Apply the existing prCheckLimiter() middleware to each of
the six newly registered proxy routes—UsersSearchHandler, CodeSearchHandler,
GitHubPackagesHandler, UserProfileHandler, UserReposHandler, and
UserReadmeHandler—so anonymous requests are rate-limited while preserving their
current paths and handlers.
In `@web/index.html`:
- Around line 3434-3494: Update searchGitHubUsers, searchGitLabUsers, and
searchCodebergUsers to throw when their fetch response is not OK instead of
returning an empty array. Preserve returning data.results for successful
responses so the existing catch handlers in searchUsers set anyFailed and
display the API-unavailable state.
In `@web/profile.html`:
- Line 2: Update the document language declaration on the root html element to
lang="en", and translate the Spanish string “aún no tiene commits” near the
affected interface text into English while preserving the surrounding UI
behavior.
- Around line 599-610: Add the missing profile header container and profile
section-title element inside main-content, using the IDs profile-header and
profile-section-title referenced by renderProfile and showError. Place them
before the existing README and repository sections so the profile identity
content renders in the intended header area.
- Line 745: Update the document.title assignment in the _currentView ===
'overview' branch to use the original unescaped name and user values instead of
safeName and safeUser, while preserving the existing fallback and title format.
- Around line 781-785: Restrict the user-controlled URLs used by the profile
website and profile link rendering to http: or https: schemes, rejecting
javascript: and other protocols before generating anchors. Update the relevant
URL sanitization flow around safeWebsite and safeUrl, and remove the second
escAttr application in the website href so the already-escaped value is not
double-escaped.
In `@web/repo.html`:
- Around line 5363-5369: The deployment mapping before renderDeploymentsView
hardcodes status to an empty string, so the full view cannot display deployment
status. Resolve each visible deployment’s status using its statuses_url,
matching the sidebar behavior, and populate status before rendering; if
resolution is unavailable, explicitly display an unavailable-status state
instead of silently omitting it.
- Around line 4802-4810: The GitLab Pages fallback in the project-loading logic
must not overwrite an existing homepage or assume Pages exists. Update the block
around setRepoHomepage(siteUrl) to first preserve the project homepage value,
and only derive and apply the GitLab Pages URL when no homepage is present and
the project data explicitly confirms Pages is published.
- Around line 6882-6901: Restore the `mermaid` class on the original element
within `_renderMermaid`’s `catch` block before logging the failure, preserving
the visible source styling without re-queuing the element for rendering.
---
Nitpick comments:
In `@internal/http/handlers.go`:
- Around line 3612-3681: Update searchCodebergUsers so the successful response
body is closed explicitly within the success branch before returning, replacing
defer resp.Body.Close(). Preserve the existing decoding, result construction,
and immediate return behavior.
- Around line 4391-4419: Clean up the response-body lifecycle in the Codeberg
repository request flow around doReq: ensure the initial response body is closed
exactly once before replacing resp for the organization fallback, while
retaining the existing defer for the normal return path. Leave the fallback
token behavior unchanged, including the empty token after a forbidden retry.
- Around line 3425-3429: Update the non-OK response handling in the GitHub code
search handler to return HTTP 502 for upstream GitHub failures instead of
forwarding resp.StatusCode. Preserve 403 and 404 only for locally validated
client-request conditions, while retaining the existing logging and error
response behavior.
In `@web/profile.html`:
- Around line 7-10: Add Subresource Integrity integrity hashes and crossorigin
attributes to the highlight.js, marked, and DOMPurify CDN script tags in
web/profile.html. Use hashes matching the exact pinned script contents and
preserve the existing loading order and initialization behavior; alternatively,
serve these scripts from local /assets paths.
In `@web/repo.html`:
- Around line 5549-5603: Update loadTagCount so the GitHub branch does not
present parseInt(match[1]) * 100 as an exact tag count. Either fetch the final
GitHub tags page and calculate the precise total, or clearly label the derived
value as approximate while preserving exact counts for GitLab and Codeberg.
- Around line 2254-2260: Remove the duplicated repo-search markup from the
surrounding HTML and have the initial shell render it through _fileTreeShell(),
reusing the existing _fileTreeSearch template output and repo-search-input
wiring instead of maintaining a second copy.
- Around line 5867-5887: Tighten the client-side search in the repository search
flow around _allRepositoryFiles by lowering the candidate cap, filtering out
oversized files using available tree metadata before fetching content, and
displaying a visible note that results cover only a repository subset. Preserve
the existing binary-file exclusion, batching, matching, and 100-result limit.
- Around line 3902-3949: Update all three pagination loops in loadTags for
GitHub, Codeberg, and GitLab to enforce the existing 10-page maximum used by
loadContributorsView and loadDeploymentsView. Preserve the current response and
Link-header termination checks, while ensuring no provider requests beyond page
10 are made.
- Line 20: Update the Mermaid script tag in repo.html to pin jsDelivr to an
exact Mermaid release rather than the floating `@11` range, and add the required
integrity hash for the fetched script plus crossorigin="anonymous" so the
browser validates the bytes before execution.
🪄 Autofix
✅ Autofix completed
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 2f4b3b3f-ab99-4128-a67d-4ae5678b4830
📒 Files selected for processing (7)
.github/workflows/android-apk.ymlinternal/http/handlers.gointernal/http/router.goweb/index.htmlweb/profile.htmlweb/repo.htmlweb/sw.js
Fixes Applied SuccessfullyFixed 5 file(s) based on 13 unresolved review comments. Files modified:
Commit: The changes have been pushed to the Time taken:
Lines 15–21
steps:
- name: Checkout
- # v5 runs on Node 24 (the runner no longer supports Node 20 actions).
+ # v5 runs on Node 24 (now the default runtime).
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Set up NodeLines 23–29 uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020
with:
node-version: 22
- cache: npm
- name: Install Node dependencies
run: npm ciLines 37–43 with:
distribution: temurin
java-version: 21
- cache: gradle
- name: Make gradlew executable
run: chmod +x ./android/gradlew |
Fixed 5 file(s) based on 13 unresolved review comments. Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
Introduce a 45s context timeout for UsersSearchHandler and return 504 if upstream searches exceed it. Wait on goroutines with a cancellable select. Return 502 for failed GitHub code search. Fix multiple response body handling to avoid leaks by closing bodies promptly. Update CI Node setup/cache in android-apk workflow. Add SRI and crossorigin attributes to third-party scripts and pin mermaid version. Improve repo UI: simplify file-tree shell, include file sizes, cap pagination pages, compute exact tag totals by fetching last page, and limit client-side code-search to a bounded subset with a user notice.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@web/repo.html`:
- Line 3909: Remove the fixed ten-page truncation from the GitHub, Codeberg, and
GitLab tag-loading loops in web/repo.html at lines 3909-3909, 3922-3922, and
3936-3936. Add user-driven pagination for each provider, or expose a clear
partial-results state and continuation control when more pages remain.
- Around line 5352-5368: Update the deployment-status resolution around the
statuses Promise.all block to cache requests by statuses_url before fetching and
route unique URL lookups through a small-concurrency or serial queue. Reuse
cached results for duplicate URLs, while preserving empty-status handling for
missing URLs, failed requests, and empty responses.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 39801923-021e-4100-ba0c-5d32317f7d01
📒 Files selected for processing (6)
.github/workflows/android-apk.ymlinternal/http/handlers.gointernal/http/router.goweb/index.htmlweb/profile.htmlweb/repo.html
🚧 Files skipped from review as they are similar to previous changes (5)
- .github/workflows/android-apk.yml
- web/profile.html
- internal/http/router.go
- web/index.html
- internal/http/handlers.go
| const link = res.headers.get('Link') || ''; | ||
| if (!/<[^>]+>;\s*rel="next"/.test(link)) break; | ||
| page++; | ||
| if (page > 10) break; |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Do not silently truncate tag lists after ten pages.
Each provider stops loading after page 10. Repositories beyond this limit omit tags without a continuation control or partial-results notice. Add user-driven pagination, or clearly state that the list is partial.
web/repo.html#L3909-L3909: replace the GitHub fixed cap with pagination or a partial-results state.web/repo.html#L3922-L3922: replace the Codeberg fixed cap with pagination or a partial-results state.web/repo.html#L3936-L3936: replace the GitLab fixed cap with pagination or a partial-results state.
📍 Affects 1 file
web/repo.html#L3909-L3909(this comment)web/repo.html#L3922-L3922web/repo.html#L3936-L3936
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@web/repo.html` at line 3909, Remove the fixed ten-page truncation from the
GitHub, Codeberg, and GitLab tag-loading loops in web/repo.html at lines
3909-3909, 3922-3922, and 3936-3936. Add user-driven pagination for each
provider, or expose a clear partial-results state and continuation control when
more pages remain.
| // Resolve deployment statuses from statuses_url | ||
| const statuses = await Promise.all(items.map(async d => { | ||
| if (!d || !d.statuses_url) return ''; | ||
| try { | ||
| const sRes = await ghFetch(d.statuses_url); | ||
| if (sRes.ok) { | ||
| const list = await sRes.json(); | ||
| return Array.isArray(list) && list.length > 0 ? list[0].state : ''; | ||
| } | ||
| } catch(_) {} | ||
| return ''; | ||
| })); | ||
| items = items.map((d, i) => ({ | ||
| env: d.environment || '', | ||
| ref: d.ref || '', | ||
| created_at: d.created_at || '', | ||
| status: statuses[i] || '', |
There was a problem hiding this comment.
🚀 Performance & Scalability | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🌐 Web query:
What GitHub REST API secondary rate limits apply to concurrent requests, and what concurrency does GitHub recommend for REST API clients?
💡 Result:
The GitHub REST API enforces a secondary rate limit of no more than 100 concurrent requests, which is a limit shared across both the REST API and the GraphQL API [1][2]. To avoid triggering these secondary rate limits, GitHub explicitly recommends that clients make requests serially instead of concurrently [3][4][5]. To achieve this serial execution, GitHub suggests implementing a queue system for your API requests [3][5]. If your application makes a large number of mutative requests—specifically POST, PATCH, PUT, or DELETE requests—GitHub also recommends waiting at least one second between each request to help prevent hitting these limits [3][4][5]. If you do encounter a rate limit, the API may return a 403 or 429 response, and you should follow standard retry guidance: respect the "retry-after" header if provided, or use an exponentially increasing wait time between retries [1][6][4].
Citations:
- 1: https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api
- 2: https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api
- 3: https://docs.github.com/en/rest/using-the-rest-api/best-practices-for-using-the-rest-api?apiVersion=
- 4: https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api
- 5: https://docs.github.com/en/rest/using-the-rest-api/best-practices-for-using-the-rest-api?apiVersion=2026-03-10
- 6: https://docs.github.com/en/rest/using-the-rest-api/troubleshooting-the-rest-api?apiVersion=2026-03-10
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Repo files containing repo.html:"
fd -a 'repo\.html$' . | sed 's#^\./##'
file="$(fd 'repo\.html$' . | head -n 1)"
echo
echo "File: $file"
echo "Line count:"
wc -l "$file" | awk '{print $1}'
echo
echo "Relevant lines around deployment status handling:"
sed -n '5335,5382p' "$file" | cat -n
echo
echo "Definitions/usages of ghFetch:"
rg -n "function\s+ghFetch|const\s+ghFetch|gitHub|github|statuses_url|deployment" "$file" | sed -n '1,120p'Repository: livrasand/gitGost
Length of output: 14114
Limit concurrent deployment-status requests.
Promise.all starts one ghFetch(d.statuses_url) request for each deployment at once. Large deployment pages can approach or exceed GitHub REST API secondary rate limits, which recommend serializing API requests with a queue. Cache by statuses_url before starting requests, and process them through a small-concurrency or serial queue.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@web/repo.html` around lines 5352 - 5368, Update the deployment-status
resolution around the statuses Promise.all block to cache requests by
statuses_url before fetching and route unique URL lookups through a
small-concurrency or serial queue. Reuse cached results for duplicate URLs,
while preserving empty-status handling for missing URLs, failed requests, and
empty responses.
Backend: add user-focused APIs (users search, user profile, user repos, user readme, code search, GitHub packages) and improve GitLab avatar fallback and Codeberg contributor 404 handling. Router serves profile.html for /gh|/gl|/cb clean routes. Frontend: add users tab, user search, profile modal, full SPA profile page (web/profile.html), many repo.html UX features (mermaid support, repo search, tags, contributors, deployments, last-commit row) and star/icon improvements. Service worker: bump cache and treat profile routes network-first. CI: update actions versions, gradle flags and verify APK artifact.
Summary by CodeRabbit