Ubisam-MobileGit/tasks/057-side-pane-redesign-and-folder-tree.md
choiminyeong 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

81 lines
3.6 KiB
Markdown

# TASK-057: Side pane redesign, folder tree, and the unfolded Home
Status: implemented; required checks pass; installed on the product owner's Z Fold7, awaiting their confirmation
Owner: Claude
Reviewer: human product owner
## Outcome
Third round of requests from the human product owner after using the app on their Galaxy Z Fold7
(SM-F966N), 2026-09-28. They confirmed that directory listing (TASK-056) is now much faster.
## Scope
- Included:
1. The pane drawn out from the left edge of the code viewer is no longer a plain rectangle: the
drawer has rounded outer corners and the page color, and holds two white cards.
2. The pane is split in half: the folder structure, and the open file's classes and functions.
Choosing a class or function goes to it.
3. A "위아래 바꾸기" button between the halves swaps them. The choice is kept across launches.
4. The folder half is a tree: a folder opens in place, one level at a time, and a file inside it
opens from there. Before, choosing a folder left the viewer for the directory list.
5. Home, unfolded: the headline block is a card like the rest, and the two columns are equal.
Before, it was a white block hanging from the top bar over the left column only, so the left
and right halves of the screen looked like two designs.
- Excluded:
- Dragging the boundary between the two halves; they are equal.
- Showing folders above the directory the file was opened from. The tree starts there.
## Writable paths
- `app/src/main/java/com/ubisam/ubgitea/feature/codebrowser/`
- `app/src/main/java/com/ubisam/ubgitea/feature/home/HomeScreen.kt`
- `app/src/main/java/com/ubisam/ubgitea/feature/branchdetail/BranchDetailScreen.kt`
- `app/src/main/java/com/ubisam/ubgitea/core/settings/AppSettingsStore.kt`
- `app/src/main/java/com/ubisam/ubgitea/MainActivity.kt`
- `app/src/main/res/`
- `app/src/test/java/com/ubisam/ubgitea/feature/codebrowser/`
- `tasks/`, `docs/`
## Acceptance criteria
- [x] The same pane is used in the drawer (phone, landscape, side-by-side pair) and beside the code
on a wide window.
- [x] A folder shows that it is loading, that it is empty, or that it failed; choosing a failed
folder twice tries again.
- [x] Closing a folder closes the folders open inside it.
- [x] Open folders are kept while moving between files of the tree.
- [x] A file opened from a folder of the tree finds its `.h`/`.cpp` counterpart in that folder.
- [x] A file with no classes or functions says so instead of showing an empty card.
- [x] Unit tests cover the tree's rows, closing, and lookup (`FileTreeTest`).
## Security and privacy
No additional concerns. The only thing stored is which half is on top, a boolean in the existing
settings preferences.
## Required checks
```text
./gradlew compileDebugKotlin compileDebugUnitTestKotlin testDebugUnitTest assembleDebug lintDebug
```
## Evidence
- Required checks pass: 432 unit tests, 0 failures; lint 0 errors.
- Installed on the SM-F966N over wireless `adb`.
- Not seen by the implementer on any screen: the drawer's new look, the tree, the swap, and the
unfolded Home. The Home change was made from reading the layout code, not from a screenshot.
## Known limitations
- `toggleFolder` in the view model has no unit test of its own; the tree it edits has.
- On the unfolded Home the three summary tiles are narrower than before, because the headline
card is now inset. A long label may wrap to two lines.
- The preference for which half is on top is read in the viewer itself rather than passed down
from `MainActivity` like the other viewer preferences.
## Review findings
None yet.