Skip to content

fix(display): scroll-bump correctness + prominent agent focus indicator#225

Merged
dennys246 merged 1 commit into
mainfrom
feat/log-display-improvements
May 7, 2026
Merged

fix(display): scroll-bump correctness + prominent agent focus indicator#225
dennys246 merged 1 commit into
mainfrom
feat/log-display-improvements

Conversation

@dennys246
Copy link
Copy Markdown
Owner

User-reported bugs surfaced during PR review:

  • Agent name was getting lost in a long status line. System messages with empty status_dict_parts would push the focus indicator mid-line where Rich truncates wrapped Text. Move "Agent: X" to the front of the status bar with bright_cyan color so flipping focus via /focus or Shift+arrow produces a visible signal.

  • Scroll position would drift instead of pinning when the user scrolled up. Two underlying bugs in MaximDisplay.log():

    1. Double-bump: when an appended entry had agent=None (every bio-system event, every system message, every slash-command emit), the iteration for key in (None, agent) became (None, None) and the ALL view's offset was incremented twice per append. ALL-view scroll-up got pushed off-screen at 2x rate.

    2. Missing bump for non-focused views: when focused on agent X and a None-agent entry arrives, X's view filter is e.agent is None or e.agent == X, so the entry IS visible — but only the None offset got bumped. X's scroll position drifted on every system message.

    Fix: compute the set of views whose filter admits the new entry
    (always None; agent if not None; otherwise every roster entry),
    and bump each of those offsets exactly once.

Regression-free for the focused-on-X-and-Y-agent-arrives case (Y entries are filtered out of X's view, so X's offset stays put).

User-reported bugs surfaced during PR review:

* Agent name was getting lost in a long status line.  System messages
  with empty `status_dict_parts` would push the focus indicator
  mid-line where Rich truncates wrapped Text.  Move "Agent: X" to the
  front of the status bar with bright_cyan color so flipping focus
  via /focus or Shift+arrow produces a visible signal.

* Scroll position would drift instead of pinning when the user
  scrolled up.  Two underlying bugs in `MaximDisplay.log()`:

  1. **Double-bump**: when an appended entry had `agent=None` (every
     bio-system event, every system message, every slash-command
     emit), the iteration `for key in (None, agent)` became
     `(None, None)` and the ALL view's offset was incremented twice
     per append.  ALL-view scroll-up got pushed off-screen at 2x rate.

  2. **Missing bump for non-focused views**: when focused on agent X
     and a None-agent entry arrives, X's view filter is
     `e.agent is None or e.agent == X`, so the entry IS visible — but
     only the None offset got bumped.  X's scroll position drifted
     on every system message.

  Fix: compute the set of views whose filter admits the new entry
  (always None; agent if not None; otherwise every roster entry),
  and bump each of those offsets exactly once.

Regression-free for the focused-on-X-and-Y-agent-arrives case (Y
entries are filtered out of X's view, so X's offset stays put).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dennys246 dennys246 merged commit 02edf7c into main May 7, 2026
5 checks passed
@dennys246 dennys246 deleted the feat/log-display-improvements branch May 7, 2026 16:26
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.

1 participant