Skip to content

fix(desktop): scroll activity panel to bottom on open#848

Merged
wesbillman merged 1 commit into
mainfrom
brain/activity-scroll-bottom
Jun 4, 2026
Merged

fix(desktop): scroll activity panel to bottom on open#848
wesbillman merged 1 commit into
mainfrom
brain/activity-scroll-bottom

Conversation

@wesbillman

Copy link
Copy Markdown
Collaborator

What

When the View activity sidebar opens, it now scrolls to the latest message instead of sitting at the top.

Why

The panel (AgentSessionThreadPanel) uses the useStickToBottom hook, whose MutationObserver only reacts to subsequent DOM changes. Content already present when the container mounts — e.g. opening the panel onto an existing thread — stayed scrolled at the top.

Change

One-line fix in useStickToBottom: on mount, do an instant el.scrollTop = el.scrollHeight jump so the newest content is in view. Instant (not smooth) because it's an initial position, not an animated update. The existing observer continues to handle content that streams in later (isNearBottom starts true).

Testing

  • Typecheck ✅
  • Desktop e2e smoke ✅ (the activity-panel test passes; the one unrelated failure is a pre-existing keyboard-focus flake in smoke.spec.ts:269, passes in isolation)
  • Full pre-push suite (rust, desktop, mobile, tauri) ✅

@wesbillman wesbillman requested a review from a team as a code owner June 4, 2026 15:30
The "View activity" sidebar (AgentSessionThreadPanel) uses
useStickToBottom, whose MutationObserver only reacts to subsequent DOM
changes. Content already present when the container mounts stayed
scrolled at the top instead of showing the latest messages. Add a
one-time instant jump to the bottom on mount so the panel opens onto the
newest content.

Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co>
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
@wesbillman wesbillman force-pushed the brain/activity-scroll-bottom branch from f29d674 to bf1d7f9 Compare June 4, 2026 15:38
@wesbillman wesbillman merged commit b3aefae into main Jun 4, 2026
15 checks passed
@wesbillman wesbillman deleted the brain/activity-scroll-bottom branch June 4, 2026 15:49
michaelneale added a commit that referenced this pull request Jun 5, 2026
* origin/main:
  chore(release): release version 0.3.11 (#865)
  fix(mobile+desktop): cross-device read state sync + diagnostic logging (#843)
  feat(mobile): star channels (Slack-style favorites) (#863)
  feat: desktop-screenshot skill to stop agents uploading relay media to PRs (#862)
  feat(desktop): star channels (Slack-style favorites) (#860)
  fix(desktop): handle symlinked persona pack directories (#859)
  feat: channel muting for desktop and mobile (#838)
  feat(acp): default SPROUT_ACP_MEMORY to on (#854)
  fix(desktop): eliminate image-hover layout jump in messages (#813)
  chore(release): release version 0.3.10 (#849)
  fix(desktop): harden relay mesh connect p-tag (#834)
  fix(desktop): scroll activity panel to bottom on open (#848)
  Polish desktop profile menu interactions (#836)
  fix(desktop): outline thread hover targets (#845)
  fix(desktop): keep message actions hover-only (#844)
  fix(desktop): let inbox composer fill available width (#841)

# Conflicts:
#	desktop/src/app/AppShell.tsx
#	desktop/src/features/workspaces/useWorkspaceInit.ts
tlongwell-block pushed a commit that referenced this pull request Jun 5, 2026
* origin/main: (39 commits)
  docs: add VISION_MESH.md — the compute-commons vision (#867)
  fix(desktop): simplify profile popover header (#853)
  fix(desktop): remove thread comment hover outline (#861)
  feat(desktop): always show channel section search/add buttons (#856)
  chore(release): release version 0.3.11 (#865)
  fix(mobile+desktop): cross-device read state sync + diagnostic logging (#843)
  feat(mobile): star channels (Slack-style favorites) (#863)
  feat: desktop-screenshot skill to stop agents uploading relay media to PRs (#862)
  feat(desktop): star channels (Slack-style favorites) (#860)
  fix(desktop): handle symlinked persona pack directories (#859)
  feat: channel muting for desktop and mobile (#838)
  feat(acp): default SPROUT_ACP_MEMORY to on (#854)
  fix(desktop): eliminate image-hover layout jump in messages (#813)
  chore(release): release version 0.3.10 (#849)
  fix(desktop): harden relay mesh connect p-tag (#834)
  fix(desktop): scroll activity panel to bottom on open (#848)
  Polish desktop profile menu interactions (#836)
  fix(desktop): outline thread hover targets (#845)
  fix(desktop): keep message actions hover-only (#844)
  fix(desktop): let inbox composer fill available width (#841)
  ...
tlongwell-block pushed a commit that referenced this pull request Jun 5, 2026
* origin/main: (39 commits)
  docs: add VISION_MESH.md — the compute-commons vision (#867)
  fix(desktop): simplify profile popover header (#853)
  fix(desktop): remove thread comment hover outline (#861)
  feat(desktop): always show channel section search/add buttons (#856)
  chore(release): release version 0.3.11 (#865)
  fix(mobile+desktop): cross-device read state sync + diagnostic logging (#843)
  feat(mobile): star channels (Slack-style favorites) (#863)
  feat: desktop-screenshot skill to stop agents uploading relay media to PRs (#862)
  feat(desktop): star channels (Slack-style favorites) (#860)
  fix(desktop): handle symlinked persona pack directories (#859)
  feat: channel muting for desktop and mobile (#838)
  feat(acp): default SPROUT_ACP_MEMORY to on (#854)
  fix(desktop): eliminate image-hover layout jump in messages (#813)
  chore(release): release version 0.3.10 (#849)
  fix(desktop): harden relay mesh connect p-tag (#834)
  fix(desktop): scroll activity panel to bottom on open (#848)
  Polish desktop profile menu interactions (#836)
  fix(desktop): outline thread hover targets (#845)
  fix(desktop): keep message actions hover-only (#844)
  fix(desktop): let inbox composer fill available width (#841)
  ...

Signed-off-by: npub1mprnacetjua2xx3p5eddmhxyk6wv929ymm5py8kd2xfxurxahspqqlgyta <d8473ee32b973aa31a21a65adddcc4b69cc2a8a4dee8121ecd51926e0cddbc02@sprout-oss.stage.blox.sqprod.co>
tellaho pushed a commit that referenced this pull request Jun 8, 2026
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
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