Skip to content

[BLOCKED on backend#13] feat: license from backend + Recently Released search sort#521

Merged
rainxchzed merged 3 commits intomainfrom
feat/license-and-recently-released-sort
May 5, 2026
Merged

[BLOCKED on backend#13] feat: license from backend + Recently Released search sort#521
rainxchzed merged 3 commits intomainfrom
feat/license-and-recently-released-sort

Conversation

@rainxchzed
Copy link
Copy Markdown
Member

@rainxchzed rainxchzed commented May 5, 2026

DO NOT MERGE until OpenHub-Store/backend#13 deploys to production. Verification command for live check:

```
curl -s https://api.github-store.org/v1/repo/microsoft/vscode | jq '.license, .openIssuesCount'
```

Should print a non-null `license` object. Once green, this PR is safe to merge.

Stacks on top of #520 (Recently Updated sort). Merge order: 520 → main → this PR.

Summary

Consumes the two new backend additions from backend#13:

  1. Nested `license: { spdxId, name } | null` field on `/v1/repo` (and every other RepoResponse-shaped endpoint).
  2. New search sorts `sort=updated` (repo activity) and `sort=releases` (latest release date).

Client changes

  • `BackendRepoResponse` gains `BackendLicense` nested DTO + `license: BackendLicense?` field.
  • `DetailsRepositoryImpl.getRepoStats` reads `backendRepo.license?.spdxId ?: backendRepo.license?.name` directly. Drops the entire `hasToken` + GitHub enrichment block (was 1 quota hit per signed-in user per Details open). Stale-cache fallback narrowed away. `tokenStore` ctor param + Koin wire dropped.
  • `RepoStats` cache key bumped `v2` → `v3` so post-deploy fetches don't serve old `license=null` entries from before this change. `refreshRepository` invalidate path bumped to match.
  • `SearchRepositoryImpl.tryBackendSearch` drops the `RecentlyUpdated` skip guard. Backend sort map gains `updated` and `releases`.
  • Domain `SortBy` adds `RecentlyReleased` (GitHub fallback borrows `updated` semantics — closest available approximation when backend is unreachable). UI mirror `SortByUi.RecentlyReleased` + mapper + label.
  • New `sort_recently_released` string in all 13 locales (alongside existing `sort_recently_updated`).
  • 1.8.1 what's-new bullets updated across all 13 locales: search bullet now mentions both Recently Updated + Recently Released; new IMPROVED bullet for license sourced from backend.

Quota economics

Flow Before After
Anon Details open 1 backend hit 1 backend hit
Signed-in Details open 1 backend + 1 GitHub 1 backend
Recently Updated search 1 GitHub direct (per page) 1 backend (per page)
Recently Released search n/a (didn't exist) 1 backend (per page)

Net: GitHub quota for Details + sorted Search drops to ~0 for typical usage.

Test plan (post-deploy)

  • curl confirms backend serves `license` field on a known repo (e.g. `microsoft/vscode` → `{ spdxId: "MIT", name: "MIT License" }`).
  • Open Details on signed-in account → license shown, no GitHub direct call in network log.
  • Open Details signed-out → license shown (was missing pre-PR).
  • Search → Sort sheet shows 5 options including Recently Released. Picking it returns repos ordered by latest release date.
  • Picking Recently Updated returns same data via backend (no GitHub direct call in log).
  • What's-new sheet on next 1.8.1 install shows the updated bullets in device language.

Summary by CodeRabbit

  • New Features
    • License information now displayed for every repository regardless of sign-in status
    • Search results can be sorted by "Recently Released" in addition to existing sort options
    • Open issue counts now visible to all users, including those not signed in

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 5, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 88466f11-d641-4591-8162-b4ecd96707e6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/license-and-recently-released-sort

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@rainxchzed rainxchzed marked this pull request as ready for review May 5, 2026 11:05
Base automatically changed from feat/392-search-sort-recently-updated to main May 5, 2026 11:06
@rainxchzed rainxchzed merged commit ceb650b into main May 5, 2026
1 check was pending
@rainxchzed rainxchzed deleted the feat/license-and-recently-released-sort branch May 5, 2026 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant