Skip to content

fix(list): show placeholder in WorkingDiff and Upstream when data not loaded - #1503

Merged
max-sixty merged 3 commits into
mainfrom
stale-flag
Mar 14, 2026
Merged

max-sixty merged 3 commits into
mainfrom
stale-flag

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

WorkingDiff and Upstream were the only columns that returned blank for unloaded data (None), while all other columns showed ⋯ (progressive loading) or · (budget-truncated picker items). This broke the visual signal that data was still loading.

The root cause for Upstream was the upstream() accessor which called .clone().unwrap_or_default(), flattening None (not loaded) into UpstreamStatus::default() (loaded, no remote). Removed it and matched on the field directly. WorkingDiff had both cases (branch item vs unloaded worktree data) collapsed into one and_then chain — separated them so unloaded worktree data shows a placeholder.

Also documented the Option<U> convention on ListItem: outer Option = collected or not, inner type is whatever the data naturally is.

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 3 commits March 13, 2026 18:09
…data not loaded

These two columns returned blank for unloaded data, inconsistent with all other
columns that show ⋯ (progressive loading) or · (budget-truncated picker items).
Remove the upstream() accessor that flattened None to a default, losing the
"not loaded" signal. Document the Option<T> rendering convention on ListItem.

Co-Authored-By: Claude <[email protected]>
One rule: outer Option = collected or not. Inner type is whatever
the data naturally is (AheadBehind, Option<PrStatus>, etc.).

Co-Authored-By: Claude <[email protected]>
Remove inline re-explanations of the Option<Option<T>> convention from
render.rs and item.rs field comments — the struct docstring is the
single source of truth. Field comments now describe what the inner
Option means for that specific field.

Co-Authored-By: Claude <[email protected]>
@max-sixty
max-sixty merged commit 2d4f55c into main Mar 14, 2026
21 checks passed
@max-sixty
max-sixty deleted the stale-flag branch March 14, 2026 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants