56 lines
2.0 KiB
Markdown
56 lines
2.0 KiB
Markdown
# TASK-059: From a function in the header to its definition in the source
|
||
|
||
Status: implemented; required checks pass; installed on the product owner's Z Fold7, awaiting their confirmation
|
||
Owner: Claude
|
||
Reviewer: human product owner
|
||
|
||
## Outcome
|
||
|
||
The human product owner confirmed the outline now appears for their C++ files (TASK-058) and asked
|
||
whether choosing a function in a `.h` could go to where it is written in the `.cpp`.
|
||
|
||
## Scope
|
||
|
||
- Included: in the outline (the side pane and the outline sheet), every function of a file that
|
||
has a counterpart carries a button named after the counterpart's extension (`.cpp ›` in a
|
||
header, `.h ›` in a source file). It opens the counterpart at the function of the same name.
|
||
Choosing the row itself still goes to the function in the file being read.
|
||
- Excluded:
|
||
- Tapping a function's name in the code itself.
|
||
- Side by side: the two panes already move to the same function together, so no button there.
|
||
- Telling overloads apart: the first function of that name is the one opened.
|
||
|
||
## Writable paths
|
||
|
||
- `app/src/main/java/com/ubisam/ubgitea/feature/codebrowser/CodeViewerScreen.kt`
|
||
- `tasks/`, `docs/`
|
||
|
||
## Acceptance criteria
|
||
|
||
- [x] The button appears only on functions, and only when the file has a counterpart that is not
|
||
already beside it.
|
||
- [x] The drawer or sheet closes and the counterpart opens at the function.
|
||
- [x] A function with no definition in the counterpart (inline, pure virtual) opens the counterpart
|
||
at its top rather than failing.
|
||
|
||
## Security and privacy
|
||
|
||
No additional concerns.
|
||
|
||
## Required checks
|
||
|
||
```text
|
||
./gradlew compileDebugKotlin compileDebugUnitTestKotlin testDebugUnitTest assembleDebug lintDebug
|
||
```
|
||
|
||
## Evidence
|
||
|
||
- Required checks pass: 435 unit tests, 0 failures; lint 0 errors. No test was added: the change
|
||
is wiring in the screen, and the lookup it uses (`findSymbolNamed`, `openSibling` with a symbol)
|
||
was already covered.
|
||
- Installed on the SM-F966N over wireless `adb`. Not seen working on a screen by the implementer.
|
||
|
||
## Review findings
|
||
|
||
None yet.
|