Ubisam-MobileGit/tasks/005-repository-branch-ui.md

2.7 KiB

TASK-005: Browse repositories and branches

Status: implemented and locally verified — independent review and device check deferred Owner: Codex Reviewer: Claude

Writable paths

  • app/src/main/java/com/ubisam/ubgitea/feature/repositories/
  • app/src/test/java/com/ubisam/ubgitea/feature/repositories/
  • app/src/main/java/com/ubisam/ubgitea/MainActivity.kt
  • app/src/main/java/com/ubisam/ubgitea/data/auth/AuthApi.kt (testable gateway extraction only)
  • app/src/main/java/com/ubisam/ubgitea/data/repositories/RepositoryListApi.kt (testable gateway extraction only)
  • app/src/main/res/values/strings_repositories.xml
  • app/src/main/java/com/ubisam/ubgitea/ui/navigation/
  • app/src/test/java/com/ubisam/ubgitea/ui/navigation/
  • tasks/005-repository-branch-ui.md

Outcome

A signed-in user can browse every repository and branch visible to their Gitea account with loading, pagination, refresh, empty, offline, expired-authentication, and server-error states.

Acceptance criteria

  • Repository and branch lists preserve pagination and refresh state.
  • Organization/owner, visibility, default branch, and selected branch are unambiguous.
  • Loading, empty, offline, authentication-expired, and server-error states are accessible and localized.
  • Retry and pagination cannot create duplicate items or overlapping requests.
  • Presentation and ViewModel tests cover primary states and selection behavior.
  • Resource names use the repositories_ prefix.
  • The reviewed completion commit is recorded as TASK-006's contract-freeze base.

Evidence

  • Repository rows open a repository-scoped branch/tag screen; the selected repository, account, default branch, protected status, selected ref, and abbreviated commit ID remain visible.
  • Branch and tag pages are consumed serially with a 100-page bound, presenter-level name deduplication, cancellation of replaced operations, refresh/retry, and deterministic back navigation to the immutable repository snapshot.
  • Focused presenter/ViewModel tests passed, including default selection, tag selection, back restoration, immutable snapshots, deduplication, and network-error mapping.
  • Repository-wide assembleDebug testDebugUnitTest lintDebug passed: 96 unit tests across 21 suites, zero failures/errors.
  • git diff --check passed. Focused sensitive-pattern inspection found no token, client secret, password, private key, or credential material.
  • The independent reviewer and physical-device interaction check are deferred while Codex owns the serial implementation stream. TASK-006 may be developed on the local contract, but its eventual integration review must include this commit before the contract-freeze checkbox is closed.