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>
4.4 KiB
TASK-053: Code viewer: full screen, search, outline, Visual Studio colors
Status: implemented; required checks pass; confirmed by the human product owner on their Z Fold7 (2026-09-29) Owner: Claude Reviewer: human product owner
Outcome
Reading code was what the product owner was most concerned about on a phone. The team reads C# and C++, in Visual Studio. A file now opens full screen, outside the Files/Commit pager, with the tools for getting to the part that matters: search within the file, an outline, a strip that says which method the top line is in, a font size, and wrapping on by default. Colors follow Visual Studio's defaults; the background and plain text follow the app theme.
Scope
- Included:
CodeViewerScreen,CodePane(lazily composed lines),SymbolOutline,CodeSearch, type / method / control-keyword coloring inSyntaxHighlighter, the code settings inAppSettingsStore, a compact landscape layout, and the unified diff ofFileDiffScreenon a narrow window. - Excluded: code folding; blame; a real parser. Multi-line strings are still colored only on the line they start on.
Writable paths
app/src/main/java/com/ubisam/ubgitea/feature/codebrowser/app/src/main/java/com/ubisam/ubgitea/feature/branchdetail/app/src/main/java/com/ubisam/ubgitea/feature/history/app/src/main/java/com/ubisam/ubgitea/domain/history/UnifiedDiffParser.ktapp/src/main/java/com/ubisam/ubgitea/core/settings/AppSettingsStore.kt
Acceptance criteria
- A file opens full screen with a back button; the tabs and the app navigation step aside.
- Wrapping is on by default; a wrapped line continues indented past the line's own indentation.
- With wrapping off, the whole pane scrolls sideways together, not line by line.
- Search highlights every match, starts from what is on screen, and moves to the next and previous match.
- The outline lists namespaces, types, methods and fields for C#, C++, Java and Kotlin; a line number can be entered for any file.
- Comments and string literals do not confuse the outline.
- Word wrap and font size are remembered.
- Lines are composed lazily, so a long file costs only what is on screen.
- In landscape the chrome is one row.
- A diff marks added and removed lines with + and − as well as color, and can jump between changes and files.
- Build, unit tests and lint pass.
- Confirmed on the human product owner's device (phone and unfolded Z Fold).
Security and privacy
No additional concerns. File content is shown, never logged or stored.
Required checks
./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
adbduring this work. - New and extended tests:
SyntaxHighlighterTest(34),SymbolOutlineTest(11),CodeSearchTest(25),UnifiedDiffParserTest(10),FileDiffChangesTest(4). - 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
- The outline recognizes declarations by their shape on the line they start on. It is right for code written the usual way and can miss a declaration written unusually or produced by a macro.
- Type and method coloring is by naming convention, not by resolving symbols: a PascalCase property after a dot is left plain, a PascalCase local would be colored as a type.
- Two light-theme colors are darker than Visual Studio's (type, comment) because the originals fall below 4.5:1 on white at code size.
- Sideways scrolling, text selection across lazily composed lines and the bottom sheet could not be exercised without a device.
Review findings
None yet.