Four tabs in an app shell that becomes a rail from 600dp, a brighter sky-blue palette with the real UbiSam logo, a Home tab built on Gitea's activity feeds, a Work tab that searches issues and pull requests across repositories, a full-screen code viewer with search, outline and Visual Studio colors, C/C++ header/source pairing, and two-pane layouts for wide windows. The five tasks were built and checked together, so they are one commit: MainActivity, the routes and the shared components belong to all of them. 409 unit tests pass, lint reports 0 errors. Verified on an emulator up to the sign-in screen only; no physical device was available. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
67 lines
3.0 KiB
Markdown
67 lines
3.0 KiB
Markdown
# TASK-052: Work tab: issues and pull requests across repositories
|
|
|
|
Status: implemented; required checks pass; not yet confirmed on a device
|
|
Owner: Claude
|
|
Reviewer: human product owner
|
|
|
|
## Outcome
|
|
|
|
Issues and pull requests could only be seen one repository at a time. The Work tab lists them
|
|
across every repository the account can see, narrowed by whose they are (everyone, review requested
|
|
of me, assigned to me, created by me), by state and by type.
|
|
|
|
## Scope
|
|
|
|
- Included: `GiteaWorkSearchApi` (`/repos/issues/search`), `WorkViewModel`, `WorkScreen`, opening one issue or
|
|
pull request directly (`Route.WorkItems` with a number, `WorkItemsViewModel.openItem`), which
|
|
notifications and the Home timeline now use as well.
|
|
- Excluded: text search, labels, milestones; any write.
|
|
|
|
## Writable paths
|
|
|
|
- `app/src/main/java/com/ubisam/ubgitea/feature/work/`
|
|
- `app/src/main/java/com/ubisam/ubgitea/data/workitems/GiteaWorkSearchApi.kt`
|
|
- `app/src/main/java/com/ubisam/ubgitea/domain/workitems/WorkSearchModels.kt`
|
|
- `app/src/main/java/com/ubisam/ubgitea/feature/workitems/WorkItemsViewModel.kt`
|
|
- `app/src/main/java/com/ubisam/ubgitea/ui/navigation/`
|
|
|
|
## Acceptance criteria
|
|
|
|
- [x] Each scope sends exactly one of Gitea's `review_requested` / `assigned` / `created` flags.
|
|
- [x] Changing scope, state or type reloads from the first page.
|
|
- [x] A result opens that issue or pull request; back returns to the list it came from.
|
|
- [x] The total is shown when the server reports one.
|
|
- [x] Loading, empty, offline, expired-session and server-error states are all shown.
|
|
- [x] Build, unit tests and lint pass.
|
|
- [ ] Confirmed on the human product owner's device (phone and unfolded Z Fold).
|
|
|
|
## Security and privacy
|
|
|
|
Read-only, within the scopes the app already requests.
|
|
|
|
## Required checks
|
|
|
|
```text
|
|
./gradlew compileDebugKotlin compileDebugUnitTestKotlin testDebugUnitTest assembleDebug lintDebug
|
|
```
|
|
|
|
## Evidence
|
|
|
|
Recorded on 2026-09-28 in the worktree `awesome-pascal-3f2ada`, with Android Studio's bundled JDK (`D:\AndroidStudio\jbr`, OpenJDK 21). TASK-050 to TASK-054 were built together and checked together:
|
|
|
|
- `./gradlew compileDebugKotlin compileDebugUnitTestKotlin testDebugUnitTest assembleDebug lintDebug` -- passed.
|
|
- Unit tests: 409 in 45 suites, 0 failures, 0 errors (289 before this work).
|
|
- Lint: 0 errors, 55 warnings (dependency updates, unused resources, KTX suggestions).
|
|
- Emulator (API 36, `sdk_gphone64_x86_64`): the debug APK installs and launches without a crash and shows the sign-in screen with the logo and the new palette. Nothing past sign-in could be reached: that needs a company account.
|
|
- Not done: any check on a physical device. None was visible to `adb` during this work.
|
|
- New tests: `GiteaWorkSearchApiTest` (14), `WorkViewModelTest` (8).
|
|
- Unit tests were written by a delegated worker from `handoff/2026-09-28_unit-tests-redesign.md`; the full run above was repeated here afterwards.
|
|
|
|
## Known limitations
|
|
|
|
- Gitea applies the scope flags together, so "assigned to me or created by me" cannot be one query; they are separate scopes.
|
|
|
|
## Review findings
|
|
|
|
None yet.
|