mirror of
https://github.com/colbymchenry/codegraph.git
synced 2026-10-18 22:02:49 +08:00
fix(viewer): a Steps picture with nothing past its anchor says why (#2274)
Steps from a helper that only computes — the most-depended-on symbol of most libraries — drew one box and no explanation (179 of 304 projects in the browser pass). The side panel now says what the walk looked for, that plain calls fold into the lines, and links to the symbol's callers and callees. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -143,6 +143,8 @@ These describe `codegraph ui` and its screens. They were taken out of `## [Unrel
|
||||
|
||||
## Fixes — Steps — what a call does, and when
|
||||
|
||||
- **A Steps picture with nothing past its anchor says why.** Starting Steps from a helper that only computes drew one box and no explanation. The panel now says that nothing it sets in motion is a step the picture draws, explains that calls between plain functions fold into the lines, and links to the symbol's callers and callees.
|
||||
|
||||
- **Steps no longer goes blank on a function full of checks.** Reading a function in its code's order doubled the ways forward at every `if` with no `else`. A body with dozens of checks that draw nothing, like jsoup's `parse`, never finished, and the page died with a stack overflow. Ways that arrive at the same place are now one way, carrying only the conditions they all share.
|
||||
|
||||
- **A Swift app's Steps picture labels what a call leaves for correctly.** `rawValue.data(using: .utf8)` was drawn as a network call, Foundation's `Timer` as telemetry, `Calendar` and a SiriKit `intent` as device calls, and `viewModel.votes.firstIndex(of:)` as a database read. Now only a session's `data`, `upload` and `download` are network, `Timer`, `Calendar` and `intent` are no effect at all, a view model is not a table, and a keychain is storage. A call through a type the app declares itself, like IceCubes' `Notifications` endpoint enum, is no longer read as the library of the same name.
|
||||
|
||||
@@ -843,6 +843,15 @@
|
||||
{/if}
|
||||
{/each}
|
||||
</p>
|
||||
{#if payload.steps.length === 1 && payload.truncated.steps === 0 && payload.truncated.hubs === 0}
|
||||
<!-- A lone anchor is an answer, not an empty canvas: say what the walk looked for. -->
|
||||
<p>
|
||||
Nothing this sets in motion is a step the picture draws — no reply, database, queue, network or
|
||||
other {kindWord('screen', payload.project)} within {payload.depth} calls. Calls between plain functions
|
||||
fold into the lines between steps, so a helper that only computes is drawn alone.
|
||||
{#if payload.anchor}<a href={symbolHref(payload.anchor.id)}>Its callers and callees →</a>{/if}
|
||||
</p>
|
||||
{/if}
|
||||
{#if readAs === 'order'}
|
||||
<p class="dim">
|
||||
<span class="mark">●</span> The anchor is at the top, and each row down is what happens next: a line
|
||||
|
||||
Reference in New Issue
Block a user