38 Commits

Author SHA1 Message Date
a140b56aec TASK-075: chip border, quiet short loads, exit question, back to top
A selected filter chip is outlined; the loading cup waits 450 ms before it
shows; Back on 홈 asks before leaving; long lists offer a button back to the
top; AnimatedContent no longer animates its own size, which made sideways
moves drift diagonally.

Agent: main (opus), implementer (sonnet) for Chips.kt and ExitConfirmDialog.kt

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 16:29:41 +09:00
7d41e89c99 TASK-073: the app fetches and installs its own update, without a file
"업데이트" streams the published APK into a system install session instead of
opening the browser, so nothing is saved to the phone. Progress, cancel and
retry are shown. Android 12+ is asked to skip its confirmation, which it does
once this app is the installer of the copy being replaced.

Adds REQUEST_INSTALL_PACKAGES and UPDATE_PACKAGES_WITHOUT_USER_ACTION.
Not run on a device.

Agent: main (opus)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 14:51:08 +09:00
a9f08ebbdf TASK-070: update check and download read the team's Gitea
The old download page asked for a password and is no longer used. The
app now reads version.json and fetches UBGitea.apk from the apk branch.

Agent: main (opus)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 14:01:33 +09:00
e47ad799f1 TASK-068: app icon shows a small tea cup instead of the branch
Agent: main (opus)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 13:19:13 +09:00
69556b1e23 TASK-066: download page and in-app update check
- version 0.2.0 (versionCode 2)
- The app reads version.json from the download page once at launch and
  offers the page when a newer build is out; settings shows the version
  and a check button.
- tools/publish-download.py encrypts an APK under the download password
  and writes the page that decrypts it in the browser.

Agent: main (opus)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 20:52:45 +09:00
54530096e0 TASK-065: code tabs, comparing two files, and reading aids
- Up to five code files saved as tabs in a strip above the bottom tabs.
- Compare a file with one from another ref, commit or place; the
  current file goes left or right, then the other is chosen.
- The side pane on a wide screen is dragged to size and snaps back to
  its default; the header/source split snaps to the middle.
- A tapped name is marked everywhere in the file, with previous/next.
- The Repositories tab pressed again goes back to the list page the
  repository came from, then to the first page.

Agent: main (opus)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 20:38:55 +09:00
17fa248065 TASK-061: edge tab for the side pane, and a new app icon
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-28 16:31:27 +09:00
5cc11d8420 TASK-057: side pane cards, in-place folder tree, unfolded Home headline
- The viewer's side pane is two cards: folder structure, and classes and
  functions. A button swaps them and the choice is kept.
- Folders open in place; files inside them open from the tree.
- Unfolded Home: the headline is a card and the columns are equal.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-28 15:44:54 +09:00
fa87a0b32f TASK-056: edge-swipe outline, resizable pair, tree-based directory listing
- Code viewer: the outline opens with a swipe from the left edge and closes
  with a swipe left, with one pane or two.
- Side-by-side .h/.cpp: a draggable handle resizes the panes (20% to 80%).
- Directory listing reads Git tree objects instead of the contents endpoint,
  which looked up the last commit of every entry.
- A listing that needs more than one request shows percent and count.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-28 15:29:10 +09:00
9046985ba4 TASK-055: first device feedback on the redesign
Repository names get a line to themselves; the repository, work and notification tabs lose their title; a today count on Home opens today's activity of that kind; the outline is a foldable tree of classes and methods without fields; Home can show only starred repositories and remembers the choice; settings has a light/dark/system theme choice.

Whether the app is dark is now the app's decision (UBGiteaTheme.isDark), so the logo moved off a -night drawable. 420 unit tests pass, lint reports 0 errors. Installed on the product owner's Z Fold7.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-28 15:09:39 +09:00
d1a45abc16 TASK-050..054: tabs, Home, Work, code viewer, C++ pairs, fold layouts
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>
2026-09-28 14:35:00 +09:00
d9536289e9 TASK-048: source viewer line numbers, syntax highlighting, word wrap
Includes the two same-day follow-ups that fixed horizontal scrolling. See tasks/048-code-viewer-readability.md.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-28 13:17:33 +09:00
fccb817381 TASK-047: favorite-push notification accuracy (branch + commit)
See tasks/047-favorite-push-notification-accuracy.md.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-28 13:17:32 +09:00
5caa6057f1 TASK-046: commit history load performance and loading feedback
See tasks/046-commit-history-load-performance.md.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-28 13:17:32 +09:00
71c8457578 TASK-045: sky blue + white redesign, UbiSam logo
Rebuilds the Material3 light/dark palette around a sky-blue primary, adds the UBGiteaTopBar wordmark to the repository list, and recolors the launcher icon background to match.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-28 13:17:31 +09:00
39be1b71dc TASK-044: offline cache for the 전체 저장소 repository list
Closes one of docs/product.md's open product decisions ("whether
repositories must be cached for offline browsing"), at the human product
owner's explicit request.

A new file-backed RepositoryListCache persists the ALL/no-organization-
filter repository list after every successful load, using a dedicated
plain DTO (not the domain RepositorySummary directly, since
RepositoryCoordinates/RepositoryRef validate through a private-constructor
factory Gson's reflection would otherwise bypass). RepositoryListViewModel
falls back to it whenever a live fetch of that view fails with a
network-classified error (cold start or mid-session), seeding
repositorySnapshots so pagination keeps working from the cache. A
page-level banner makes the fallback impossible to mistake for a live
view. The cache is cleared on logout.

Deliberately scoped to just the landing list -- not favorites,
organization filters, or repository internals (branches/files/history) --
confirmed with the human product owner after they live-tested the
fallback via airplane mode and asked about extending it further; decided
to hold that off.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-31 11:05:25 +09:00
fbec743e5f TASK-043: fix empty 즐겨찾기 offering 로그아웃 instead of a way back
The FAVORITES-mode empty state ("nothing starred yet") shared its
MessageState call with the ALL-mode empty state ("account has zero
repositories"), inheriting a hardcoded 로그아웃 action that only made sense
for the latter. Gives FAVORITES-mode its own action: "전체 저장소 보기",
wired to the same onShowAllRepositories the tab row already uses.

Live bug report: "현재 화면 즐겨찾기가 안되어있는데 로그아웃할거냐는
버튼이 왜 있지?" Live-verified the fix on-device.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-29 22:58:05 +09:00
9663d9ab9c TASK-039: design pass — app icon, visibility badge, header truncation, PR label
- Add a custom adaptive launcher icon (background/foreground/monochrome
  layers), replacing Android's bare default. Original hand-drawn git-branch
  glyph on the app's own established primary green, not a reproduction of
  Gitea's logo.
- Add a compact VisibilityBadge for the repository list's public/private
  label, replacing an unstyled full-width text line.
- Truncate the references screen's repository-name header to 2 lines with
  an ellipsis instead of letting a long owner/name wrap to 3 lines and push
  the branch/tag list down.
- Change "Pull Request" -> "PR" in strings_workitems.xml and
  strings_notifications.xml, matching the "PR" abbreviation already used
  everywhere else in the app and fixing a visible line-wrap on the live
  notifications list.

Build/test/lint green, live-verified on device (light and dark mode).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-29 18:42:51 +09:00
9a8f855e5e TASK-038: Settings screen with opt-in reactive auth retry and favorite-push toggle
Two features gated behind a new Settings screen so neither silently
changes existing behavior:

- Reactive auth retry (opt-in, default off): a live 401 despite
  proactive refresh already judging the token fine now optionally
  retries once with a forcibly-refreshed token before falling back to
  re-login. ReactiveTokenProvider is a separate interface from the
  existing fun interface BearerTokenProvider (not an addition to it),
  so every existing test fake keeps compiling; a new shared
  callAuthenticated helper (used by all four Gitea API classes instead
  of four duplicated retry implementations) checks for it and falls
  back to the old single-attempt behavior otherwise.
- Favorite push notifications (on/off, default on): TASK-036's
  background checker can now be turned off entirely, closing that
  task's own 'no in-app way to disable this' limitation.

Every new constructor parameter defaults to preserving old behavior
exactly, so no existing call site or test needed to change.

Live-verified: Settings screen opens from a new button, both switches
toggle and persist across navigation, no crash.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-29 18:11:12 +09:00
75f887c497 TASK-028 follow-up: visible feedback for an out-of-range page-jump value
The Issues/PR numbered-pagination page-jump field silently clamped any
typed number to [1, totalPages] only on submit -- typing '999' would
quietly land on the last page with no explanation. The field now shows
isError/supportingText whenever the currently-typed value is out of
range, making the clamp visible before the tap. Submitting still
clamps exactly as before; this only adds visible feedback.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-29 17:41:51 +09:00
b1a00233b0 TASK-036: push notification when a favorited repository gets a new push
Gitea's own notification feed doesn't fire for plain pushes (only
issue/PR activity), so this app now periodically checks each favorited
repository's most recent push time itself and posts a local
notification when it advances past what was last seen.

- FavoritePushDetector: pure comparison logic, never notifies on a
  repository's first sighting (only a real advance counts), avoiding a
  notification storm the first time this feature ever runs.
- GetLatestPushEpochMillisUseCase: extracts the same 'newest branch
  commit time' heuristic RepositoryListViewModel already uses for the
  repository list's own last-push row, as a shared, reusable use case.
- SharedPreferencesLastSeenPushStore: one long per favorited repo, not
  Room (docs/architecture.md reserves Room for offline caching).
- FavoritePushCheckWorker: 15-minute WorkManager periodic job,
  network-constrained, no-ops cleanly with no session or no favorites.
- POST_NOTIFICATIONS requested at runtime on API 33+; a denial
  degrades safely, the worker still runs and updates its baseline.

No deep link from the notification to the specific repository yet --
tapping it opens the app normally. End-to-end delivery (a real push
landing, 15 minutes elapsing) is unit-tested and the scheduling/
permission wiring is live-confirmed (prompt appeared, was granted, no
crash), but an actual notification firing hasn't been observed within
this same live-testing session.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-29 17:15:35 +09:00
9e4cbe3e89 TASK-035: remove redundant per-file Commit button from the code browser
The header's 'Commit' button (onViewHistory) just switched
BranchDetailScreen's pager to page 1 -- the exact same action the
top-level 'Commit' tab's own onClick already performs. No path/file
info ever flowed through it, so it was never actually file-specific
history, just a duplicate shortcut that TASK-031's rename made obvious.
Removed the button, its parameter threading, and the now-unused
codebrowser_history string.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-29 16:55:21 +09:00
c75b348d08 TASK-031: rename History label to Commit, EUC-KR decode fallback, HTTP timeout fix
- '히스토리' label -> '커밋' across the branch-detail tab, code-browser
  history button, and the one permission-denied sentence that used the
  word, matching what that screen actually shows.
- SourceContentClassifier now tries EUC-KR (strictly, same discipline as
  its existing UTF-8 attempt) before giving up, so legacy Korean-encoded
  .cpp/.h source files render instead of failing as UnsupportedEncoding.
  A byte sequence invalid in both charsets still correctly falls through.
- OkHttpTransport's default client is now one shared, longer-timeout
  OkHttpClient (15s/30s/15s) instead of a fresh unconfigured OkHttpClient()
  per call site -- fixes a large commit history/directory listing on this
  app's home-NAS-hosted Gitea being misreported as offline purely because
  it took longer than the previous 10s default to answer, and lets calls
  to the same host reuse one connection pool instead of ~8 separate ones.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-27 23:25:23 +09:00
bb83c215d3 TASK-027 follow-up: PDF viewer with swipe/pinch-zoom, reusing image gesture code
Opening a .pdf file (detected by %PDF- magic bytes) now renders its pages via
Android's built-in PdfRenderer -- no new dependency -- with the same
swipe-between-pages, pinch-zoom, pan, and double-tap-to-toggle-zoom
interaction as the image viewer. The shared gesture logic was extracted into
a ZoomableSwipeableBox composable so it's genuinely reused, not duplicated.
maxInputBytes raised 1MB -> 10MB so real-world photos and PDFs aren't
rejected as Oversized before ever being classified.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-27 22:22:21 +09:00
2818dab09a TASK-027/028: image+CSV viewer with gallery swipe, numbered Issues/PR pagination
TASK-027: opening an image (PNG/JPEG/GIF/BMP/WebP, detected by magic bytes)
now decodes and shows it, with swipe navigation to the previous/next image
in the same folder; opening a .csv file shows a scrollable table instead of
raw text. Both reuse the tab-swipe/content-scroll gesture-conflict fix so
neither ever triggers the Files/History tab to change underneath it.

TASK-028: the Issues/PR list shows up to 5 numbered page buttons plus a
[ page / total ] jump field, backed by Gitea's X-Total-Count header
(verified against Gitea's own source) and a server-side type=issues filter
so the count excludes pull requests. Every other paginated list is
unchanged, per this session's earlier scoping decision.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-27 21:50:24 +09:00
8cf7acd9ac TASK-025: tabbed branch detail screen, repo commit time, swipeable tabs, and live-testing follow-up fixes
- Branch/tag tap opens one screen with swipeable Files/History tabs (Route.BranchDetail replaces Route.CodeBrowser/Route.History)
- Repository rows show last-commit time; repository All/Favorites tabs are swipeable
- Fix overlapping commit-detail layout (BoxWithConstraints sibling stacking)
- Fix BranchDetailScreen tab row jammed against status bar
- Fix diff view horizontal scroll not working
- Simplify references-loading message; remove in-app back buttons in favor of system back gesture; replace manual refresh buttons with pull-to-refresh

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-27 01:39:17 +09:00
4b3c11d849 Add TASK-024: history screen redesign
Live, iterative round of changes driven by the human product owner
testing on their own device over wireless adb:
- Tapping a branch/tag opens commit history instead of the file browser
- Selected reference row is color-coded instead of a text label
- Branch/tag rows and commit rows show commit date/time with time zone
- Tapping a changed file shows a parsed before/after diff, client-side
  (new UnifiedDiffParser, no extra network call)
- The two diff panels scroll vertically in sync and share one
  horizontal scroll position
- Diff lines are colored by text only (red/green)
- On a >=600dp-wide screen (a Z Fold's inner screen unfolded) the file
  list and selected diff show side by side
- Removed the branch/tag compare feature entirely, per direct request

Also fixes a real bug found via live device debugging: getCommitDetail
requested the wrong URL path (missing "git/"), causing every commit
tap to 404.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-27 00:32:42 +09:00
f14be3ac90 Add TASK-015: read-only Gitea notifications
Signed-in users can view notifications (unread-only or all), paginated,
and jump from an issue/PR notification to that repository's work items.
No mark-read/unread/pinned write endpoint is exposed, matching the
existing single-write-scope posture from ADR-004.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-26 15:55:19 +09:00
4fe3bf1c9f Implement TASK-014: organizations and repository org filter
Adds read-only GET /user/orgs and GET /orgs/{org}/repos to
GiteaRepositoryBrowserApi (a third interface, OrganizationsRepository),
reusing existing repository mapping rather than duplicating it.

Repository list gains an organization filter chip row (all + one per
org), keeping the existing recent-push sort and paging. Organizations
are fetched once per session and cached; a failure to load them
degrades to an empty filter row instead of blocking the repository
list itself. Filtering only applies to the all-repositories mode,
since Gitea star is not organization-scoped.

Closes MVP outcome #2 in docs/product.md. No task file existed
beforehand; created it first per AGENTS.md.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-26 15:34:22 +09:00
c397fbeea9 Implement TASK-008: pull-request and issue read-only UI
Separate issue and PR list/detail tabs, paginated, with comments
(issues) and reviews+comments (PRs). Deleted/unavailable authors
render a fixed placeholder instead of crashing or inventing identity;
every status is a text label, never color-only.

Reuses TASK-010 directly; no shared/domain file touched. Both list
types dedupe by number per page. Entry point is a new button on the
repository references screen.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-26 15:08:26 +09:00
429668bf26 Implement TASK-007: commit history and change viewer UI
Paginated commit history for the current ref, commit detail with
distinguished added/modified/deleted/renamed file status, bounded and
explicitly-truncated patch text, and a ref comparison flow validating
one entered ref against the currently open ref as base.

Reuses TASK-004's listCommits and this session's own TASK-009
HistoryRepository; no shared/domain file touched. Entry point is a new
history button on the existing code browser header.

Self-review caught and fixed a bug before writing tests: a failed
commit-detail fetch discarded which commit had failed, so retry
silently reloaded the whole list instead of re-fetching the commit the
user tried to open.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-26 14:56:43 +09:00
525a0aa2ff Add Favorites tab backed by Gitea star (first write endpoint)
TASK-018, human product owner priority-1 request. Adds write:user
OAuth scope (ADR-004) and relaxes OAuthClientConfig's read-only guard
to an explicit, hard-coded write-scope allow-list rather than a
general write-scope allowance. GiteaRepositoryBrowserApi gains star/
unstar/listStarred via a new RepositoryFavorites interface, reusing
its existing repository mapping. RepositoryListViewModel tracks an
ALL/FAVORITES mode; toggling favorite confirms against the server
before updating UI state rather than acting optimistically.

No create/edit/merge/close/comment endpoint is introduced. Favorite
state is never cached locally.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-26 13:51:04 +09:00
93b8d587ee Sort repositories by recent push, page the list, show last-pushed branch
TASK-017, human product owner priority-1 request. Repository list now
requests sort=updated&order=desc from Gitea, loads 5 repositories per
page with explicit prev/next navigation, and each visible row
independently fetches and shows its most recently committed branch.

Removes the legacy eager-loading RepositoryListApi in favor of the
existing paged GiteaRepositoryBrowser.listRepositories. Fixes two
issues found in self-review: missing error handling on page
navigation, and repositories with no default branch (empty repos)
previously failing the whole page instead of just that row.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-26 13:24:31 +09:00
16c46a5c54 feat: browse repository source by ref 2026-08-26 10:35:20 +09:00
bbbff77a5e feat: browse repository branches and tags 2026-08-26 10:24:19 +09:00
a4451e9d16 feat: add Gitea login and repository list 2026-08-25 23:21:47 +09:00
a2cc7d4ca3 Add repository browsing domain foundation 2026-08-25 21:52:40 +09:00
75aa5f83e5 Bootstrap Android Compose application 2026-08-25 21:42:50 +09:00