Skip to content

fix(tui): scroll to bottom when returning from subagent#1496

Open
netsky-prod wants to merge 1 commit into
XiaomiMiMo:mainfrom
netsky-prod:fix/1433-subagent-return-scroll
Open

fix(tui): scroll to bottom when returning from subagent#1496
netsky-prod wants to merge 1 commit into
XiaomiMiMo:mainfrom
netsky-prod:fix/1433-subagent-return-scroll

Conversation

@netsky-prod

Copy link
Copy Markdown

Summary

  • key the TUI conversation scroll effect by both sessionID and active agentID
  • make main/subagent switches within the same session call toBottom() when returning to the rendered conversation
  • add a regression helper test for the scroll key behavior

Fixes #1433

Verification

  • RED: bun test test/cli/tui/session-scroll.test.ts --timeout 30000 failed before the helper existed
  • cd packages/opencode && bun test test/cli/tui/session-scroll.test.ts test/cli/tui/route-agent-id.test.ts test/cli/tui/sync-bucket.test.ts --timeout 30000 (8 pass)
  • cd packages/opencode && bun typecheck
  • bunx oxlint packages/opencode/src/cli/cmd/tui/routes/session/index.tsx packages/opencode/src/cli/cmd/tui/routes/session/scroll.ts packages/opencode/test/cli/tui/session-scroll.test.ts (0 errors; existing warnings in index.tsx)
  • git diff --check
  • pre-push: bun turbo typecheck (12/12 successful)

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.

[Bug] 从子代理返回主界面后,滚动条跳回顶部

1 participant