Skip to content

Commit 0db6841

Browse files
Kasper JungeRalphify
authored andcommitted
workspace: record _FullscreenPeek.scroll_down alias drop
Co-authored-by: Ralphify <noreply@ralphify.co>
1 parent b19625e commit 0db6841

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

workspace/ralphs/improve-codebase/backlog.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ only when they land in a commit.
5252
- (01f2f1c — dropped `_FullscreenPeek._reset_view` which had the same body
5353
as `scroll_to_bottom`.) No other near-duplicate scroll helpers spotted
5454
in that class; `scroll_up` / `scroll_down` / `scroll_to_top` each touch
55-
`_auto_scroll` under different conditions.
55+
`_auto_scroll` under different conditions. (b19625e — dropped the
56+
`new_offset` alias in `scroll_down`; `scroll_up` keeps its local
57+
because it compares old vs new before the assignment.)
5658

5759
## Phase 3 — magic values
5860

workspace/ralphs/improve-codebase/coverage/_console_emitter.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
# `_console_emitter.py` coverage
22

3-
Valid at: 497c028
3+
Valid at: b19625e
44

55
## Recent changes
66

7+
- b19625e — dropped the `new_offset` alias in `_FullscreenPeek.scroll_down`.
8+
The local was assigned directly to `self._offset`, then the
9+
follow-mode check re-read it as `new_offset == 0` — identical to
10+
`self._offset == 0` after the assignment. Sibling `scroll_up` keeps
11+
its local because it compares old vs new *before* assigning (needed
12+
to conditionally disable auto-scroll on a real move); `scroll_down`
13+
has no such comparison, so the alias was dead. Same Phase 4 shape
14+
as ef176bf (`line_count`) and 134078d (`name_col`).
715
- 497c028 — inlined the `agent = data["agent"]` local in `_on_run_started`.
816
The alias was read exactly once, immediately below, as the arg to
917
`_is_claude_command(agent)`. Reading `data["agent"]` directly matches

workspace/ralphs/improve-codebase/iterations.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
One line per iteration: `<sha> <summary>`.
44

5+
b19625e refactor: drop `new_offset` alias in `_FullscreenPeek.scroll_down` — the local was assigned to `self._offset` and then re-read only as `new_offset == 0`, which is identical to `self._offset == 0` after the assignment. Sibling `scroll_up` needs its local because it compares old vs new before the assignment; `scroll_down` has no such comparison, so the alias was dead. Same shape as ef176bf and 134078d.
6+
57
497c028 refactor: inline `agent` alias in `_on_run_started` — the local served a single use as the arg to `_is_claude_command(...)`. Reading `data["agent"]` directly matches the sibling style from fc5e1cb (`total_in` inline). Preserved `ralph_name` — it's used inside an f-string on line 1247 where the alias still helps readability.
68

79
ef176bf refactor: drop `line_count` alias in `_IterationSpinner._build_footer` — local was computed unconditionally but only used on the truthy branch (both as predicate `> 0` and as `_plural` arg). Inlined the truthy check on `self._scroll_lines` and moved the `len()` call inside the branch that uses it. Matches the style of sibling `_IterationPanel._build_footer` which uses `if self._tool_count > 0:` with no local alias. Same Phase 4 shape as 134078d's `name_col` narrowing.

0 commit comments

Comments
 (0)