No task waits on a Codex review; the redesign tasks are confirmed on the product owner's Z Fold7; TASK-016's leftovers are on hold; no biometric reauthentication. Agent: main (opus) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
15 KiB
15 KiB
TASK-025: Tabbed branch detail screen (Files + History), repository row commit time, swipeable repository/favorites tabs, and live-testing follow-up fixes
Status: implemented; all required checks pass; device verification pending Owner: Claude Reviewer: Codex
Outcome
Three more live requests from the same testing session:
- Tapping a branch/tag now opens one screen with two swipeable tabs — 파일 (Files, the code browser, default) and 히스토리 (History) — over the same ref, restoring file/folder browsing (removed from the UI by TASK-024) while keeping the direct-to-history behavior the human product owner asked for, by making history the second tab instead of the only destination.
- Each repository row on the repository list now shows its last-commit time (reusing the existing
updatedAtEpochMillisfield and the sharedformatInstanthelper from TASK-024 — no new API data needed). - The repository list's 전체(All)/즐겨찾기(Favorites) tabs are now swipeable (swipe right from All → Favorites, swipe left from Favorites → All), not just tap-to-switch.
Plus seven more follow-up fixes/changes found or requested during the same live-testing pass on the same branch, kept in this task rather than split out since they're all small, tightly related touch-ups to screens this task already modifies or reuses:
- Overlap bug fix: the narrow-layout (non-Z-Fold-unfolded) branch of
CommitDetailScreen'sBoxWithConstraintshadHeader(...)and its content as bare siblings instead of children of aColumn, soBoxWithConstraints(which behaves likeBox— it does not arrange multi-child branches vertically on its own) rendered them stacked on top of each other. Reported twice by the human product owner via screenshot before being root-caused; fixed by wrapping each branch's contents inColumn(Modifier.fillMaxSize()) { ... }. - Status-bar padding fix:
BranchDetailScreen'sTabRowwas jammed against the status bar because, unlike every other top-level screen in the app, it wasn't wrapped in its ownScaffold. Fixed withModifier.statusBarsPadding()on the outerColumn(not a nestedScaffold, to avoid double-padding sinceCodeBrowserScreen/HistoryScreenalready have their ownScaffolds internally). - Diff horizontal-scroll fix, in two passes:
DiffSideLine(in the History tab's file-diff view) originally hadModifier.fillMaxWidth().horizontalScroll(state)and nosoftWrap = false, so long lines wrapped instead of overflowing — nothing to scroll. First pass fixed that by removingfillMaxWidth()and addingsoftWrap = false, matching the already-workingPatchTextcomposable's modifier pattern — but that pattern shares oneScrollStateacross every row in the panel (so dragging any line moves them all together), and a singleScrollState's scroll bound is set from whichever row's layout pass ran most recently; with many differently-wide lines in the same list, that bound kept getting overwritten mid-drag, snapping the visible offset back and forth ("글자가 춤을 추네" — reported live, with a screenshot, after the first pass had already been installed). Second pass replaced the sharedScrollStatewith a hand-rolled scroll: oneModifier.scrollable(...)per row feeding a single shared offset value, clamped against one bound computed once up front (viaTextMeasurer, from the longest line in the file) instead of recomputed per row, then applied to each row with a plainModifier.offset { ... }— so no per-row layout pass can stomp on another row's bound anymore. - Loading-text simplification: the references-loading message on the repository screen previously interpolated the repository name into a longer sentence; simplified to a plain "로딩 중" per direct request, and the now-unused
%1$splaceholder removed fromrepositories_references_loading. - In-app back buttons removed: every screen-header back button (
CodeBrowserScreen'sBrowserHeader,HistoryScreen'sHeader,NotificationsScreen'sFilterTabs,WorkItemsScreen'sModeTabsandDetailHeader,RepositoryListScreen'sReferencesContentheader) removed, since every screen already has aBackHandlerwired to the system back gesture and the human product owner asked to rely on that instead.WorkItemsScreen'sDetailHeadercomposable (which consisted only of a back button) removed entirely along with all 5 call sites. Now-unusedhistory_back/notifications_back/workitems_back/codebrowser_backstring resources removed;repositories_backkept, since it's a distinct recovery action on the references-error state's secondary button, not a header back button. - Pull-to-refresh replaces manual refresh buttons:
RepositoryListScreen'sRepositoryContentandReferencesContenteach had a manual "새로고침"OutlinedButton; both replaced withPullToRefreshBox(Material3,@OptIn(ExperimentalMaterial3Api::class)) wrapping theirLazyColumns, so pulling down from the top refreshes instead. - Tab-swipe vs. code-scroll gesture conflict fixed: the Files/History
HorizontalPagerand the diff view's horizontal code scroll (item 6) are both horizontal gestures over the same screen; nested, they fought over every drag — reported live as visible "trembling" and, separately, source text intermittently scrolling out of view entirely. Root-caused (by the human product owner, from directly watching it happen) as the pager and the inner scroll both trying to consume the same drag. Fixed by disabling the pager's own swipe gesture (userScrollEnabled = false) whenever the currently-visible tab is showing horizontally-scrollable source text — a code file's contents on the Files tab, or a selected diff on the History tab — and re-enabling it everywhere else (folder listings, the commit list, a commit's changed-file list), so tab-swiping still works right up to the point actual code is on screen. Tapping a tab always still works regardless, since that's a directanimateScrollToPagecall, not a gesture. Verified in both directions live via scriptedadb shell input swipe(an earlier same-session test of this had looked like a regression, but was actually just a swipe fired in the wrong direction from the last page, which has nowhere further to go — not a real bug).
Scope
- Included:
ui/navigation/Route.kt/RouteStackSaver.kt(Route.CodeBrowser/Route.Historyreplaced by oneRoute.BranchDetail), newfeature/branchdetail/BranchDetailScreen.kt,MainActivity.ktwiring,strings_branchdetail.xml, plus the follow-up touch-ups (items 4-10 above) tofeature/branchdetail/BranchDetailScreen.kt(item 10),feature/history/HistoryScreen.kt,feature/codebrowser/CodeBrowserScreen.kt,feature/notifications/NotificationsScreen.kt,feature/workitems/WorkItemsScreen.kt,feature/repositories/RepositoryListScreen.kt, and their string resources. - Excluded: No change to
CodeBrowserViewModel/HistoryViewModelinternals — both are reused exactly as they were, including their own internal drill-down (subfolder navigation, commit detail) and their own per-stateBackHandlers. This screen only adds theTabRow+HorizontalPagerchrome around them. No change to actual refresh/pagination/network logic — item 9 only changes the trigger UI, not whatonRefreshdoes.
Design notes
- Both tabs' ViewModels (
codeBrowserViewModel,historyViewModel) are opened together whenRoute.BranchDetailbecomes current, and closed together when either tab's internal back-handling has nothing left to unwind (onCodeBrowserBack/onHistoryBackboth close both ViewModels and pop the route) — a single shared exit point rather than two independently-tracked one. HorizontalPager's defaultbeyondViewportPageCount(0) means only the currently visible tab is composed, so each tab's own internalBackHandlers never conflict with each other — the system back button always applies to whichever tab is actually on screen, with no extra coordination code needed.CodeBrowserScreen's existing "히스토리" header button is kept, repurposed to animate the pager to the History tab instead of pushing a route — a working existing affordance, not dead code.Route.CodeBrowserandRoute.Historyare fully removed (not left dead), sinceRoute.BranchDetailis now the only way either screen is reached.
Acceptance criteria
- Tapping a branch/tag opens
Route.BranchDetail, defaulting to the Files tab. - Files tab supports folder drill-down and reading file contents (the restored TASK-006 code browser, unmodified).
- Swiping left/right between tabs works (
HorizontalPager); tapping a tab also works (TabRow). - System back: within a subfolder/commit-detail, back unwinds that tab's own internal state first; only at each tab's own root does back exit the branch-detail screen entirely.
RouteEncoding/RouteStackSaverround-tripRoute.BranchDetailincluding a ref containing a slash, and fall back toRepositorieson truncated/malformed persisted data.- Commit-detail screen renders correctly (no overlapping content) in the narrow/folded layout.
BranchDetailScreen's tab row sits below the status bar, not jammed against it.- Diff view supports horizontal scroll on long lines (synced across before/after panels).
- References-loading message reads a plain "로딩 중".
- No in-app back buttons remain on any screen header; system back gesture still exits each screen/subview correctly.
- Pulling down from the top of the repository list or references list triggers a refresh; no manual refresh button remains.
- Build, unit tests, and lint pass.
- Full device confirmation of the tab UI, swipe gesture, back-button removal, and pull-to-refresh together in one pass.
Required checks
./gradlew assembleDebug
./gradlew testDebugUnitTest
./gradlew lintDebug
Evidence
feature/branchdetail/BranchDetailScreen.kt(new):TabRow+HorizontalPager(pageCount = { 2 }), page 0 =CodeBrowserScreen, page 1 =HistoryScreen, both passed through unmodified with their full existing parameter lists.ui/navigation/Route.kt:CodeBrowser/Historyreplaced byBranchDetail(owner, name, refKind, ref).RouteStackSaver.kt'sRouteEncodingupdated to match (TYPE_BRANCH_DETAILreplacesTYPE_CODE_BROWSER/TYPE_HISTORY).MainActivity.kt:onReferenceSelectednow maps the tapped reference'sReferenceKind(branch/tag) toCodeReferenceKindand pushes oneRoute.BranchDetail, matching what previously only fedRoute.CodeBrowser'srefKindfield — this mapping had been temporarily lost when TASK-024 redirected the tap straight toRoute.History(which didn't need a ref kind); this task restores it.RouteEncodingTest.ktupdated:code browser route round-tripsandhistory route round-tripstests replaced by onebranch detail route round-trips including a ref containing a slashtest; the truncated-route and full-back-stack tests updated to match.HistoryScreen.kt'sCommitDetailScreen: eachBoxWithConstraintsbranch now wrapsHeader(...)+ content inColumn(Modifier.fillMaxSize()) { ... }instead of leaving them as bare siblings.BranchDetailScreen.kt: outerColumngainedModifier.statusBarsPadding().HistoryScreen.kt'sDiffSideLine(first pass, superseded — see below):Modifier.horizontalScroll(horizontalScrollState).padding(...)withsoftWrap = false, nofillMaxWidth().HistoryScreen.kt'sDiffSideLine/FileDiffView(second pass, current): sharedScrollStatereplaced by a manually-driven offset —rememberScrollableState { delta -> ... }updates oneMutableFloatStateclamped to[0, maxHorizontalOffsetPx], wheremaxHorizontalOffsetPxis computed once per selected file viarememberTextMeasurer().measure(...)against the longest line's character count (monospace, so any character stands in for the widest line's glyph width). Each row appliesModifier.scrollable(sharedScrollableState, Orientation.Horizontal)for gesture capture andModifier.offset { IntOffset(-horizontalOffsetPx.value.roundToInt(), 0) }for rendering, wrapped inBox(Modifier.fillMaxWidth().clipToBounds())since a plainoffset(unlikehorizontalScroll) doesn't clip overflow on its own.strings_repositories.xml:repositories_references_loadingsimplified to a fixed "로딩 중" string (no%1$splaceholder); call site inRepositoryListScreen.ktupdated to match.- Back buttons removed from
CodeBrowserScreen.BrowserHeader,HistoryScreen.Header,NotificationsScreen.FilterTabs,WorkItemsScreen.ModeTabs;WorkItemsScreen.DetailHeadercomposable and its 5 call sites removed entirely;ReferencesContent's header back button removed.history_back/notifications_back/workitems_back/codebrowser_backstring resources removed as now-unused. RepositoryListScreen.kt:RepositoryContent/ReferencesContentwrapped inPullToRefreshBox(@OptIn(ExperimentalMaterial3Api::class)), manual "새로고침"OutlinedButtons removed from both../gradlew compileDebugKotlin: BUILD SUCCESSFUL, both after the@OptIn(ExperimentalMaterial3Api::class)fix forPullToRefreshBoxand again after the diff-scroll rewrite../gradlew assembleDebug testDebugUnitTest lintDebug(--rerun-taskson the first full pass, incremental on the diff-scroll-rewrite follow-up): BUILD SUCCESSFUL both times, all unit tests passing, 0 lint errors.HistoryScreen.kt's diff-scrollrememberScrollableState(third pass): verified live (by directly swiping the device overadb) that the jitter-free scroll from the second pass ran in the wrong direction — dragging left revealed the start of the line instead of further along it, backwards from every other horizontally-scrollable surface on Android. Root cause:newOffset = horizontalOffsetPx + deltahad the sign backwards for this gesture; fixed tonewOffset = horizontalOffsetPx - delta, confirmed correct by the same live-swipe method (drag left now reveals later content, drag right returns toward the start, both panels stay in sync).BranchDetailScreen.kt:HorizontalPagergaineduserScrollEnabled = !currentPageShowsScrollableCode, wherecurrentPageShowsScrollableCodecheckscodeBrowserState is CodeBrowserUiState.File && codeBrowserState.content is ContentClassification.Texton page 0, orhistoryState is HistoryUiState.CommitDetailContent && historyState.selectedFile != nullon page 1 — both states were already being collected inMainActivityand passed into this screen, so no new state plumbing was needed.- Live device: build installed over wireless
adb(adb-RFCYA0RD1CZ-ztOzAA._adb-tls-connect._tcp, Galaxy Z Fold) five times across this task — initial batch, after the diff-scroll jitter fix, after the direction fix, and after the tab-swipe/code-scroll conflict fix. The last two were verified directly via scriptedadb shell input swipeplus before/after screenshots (the human product owner requested this directly — "좌우 스크롤 해서 이상한걸 감지해볼래?" — rather than reporting a symptom first) instead of waiting on a live report; the human product owner then separately diagnosed the tab-swipe/scroll conflict's root cause from watching it happen and directed the fix. Human product owner asked to confirm the rest of the batch (tabs, overlap fix, status-bar padding, back-button removal, pull-to-refresh) together — result pending as of this commit.
Review findings
None yet — no Codex review pending (Codex retired, 2026-09-29).