Skip to content

perf(app): navigation between sessions + fix terminal test regressions#16923

Closed
neriousy wants to merge 5 commits intoanomalyco:devfrom
neriousy:perf/session-nav
Closed

perf(app): navigation between sessions + fix terminal test regressions#16923
neriousy wants to merge 5 commits intoanomalyco:devfrom
neriousy:perf/session-nav

Conversation

@neriousy
Copy link
Contributor

@neriousy neriousy commented Mar 10, 2026

Issue for this PR

Closes #16924

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Navigation between sessions is really slow.
The major bottleneck is rendering the parts

Also fixes terminal tests regressions

If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!

How did you verify your code works?

Switch between sessions

Screenshots / recordings

2026-03-10.20-11-27.mp4

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.

Copilot AI review requested due to automatic review settings March 10, 2026 18:53
@github-actions
Copy link
Contributor

Hey! Your PR title perf(app): navigation between sessions doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@neriousy neriousy changed the title perf(app): navigation between sessions perf(app): navigation between sessions - dont merge yet, but test plz Mar 10, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves session navigation performance by deferring and reducing expensive message-part rendering work in the UI.

Changes:

  • Incrementally renders grouped assistant parts using a capped “visible” slice advanced via requestAnimationFrame.
  • Lazily mounts Part content using IntersectionObserver with a timeout fallback and placeholders.
  • Reduces repeated Array.includes checks by memoizing a Set for expanded file paths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@neriousy neriousy marked this pull request as draft March 10, 2026 19:00
@neriousy neriousy marked this pull request as ready for review March 10, 2026 19:12
@neriousy neriousy requested a review from adamdotdevin as a code owner March 10, 2026 19:12
@neriousy neriousy changed the title perf(app): navigation between sessions - dont merge yet, but test plz perf(app): navigation between sessions Mar 10, 2026
@neriousy neriousy changed the title perf(app): navigation between sessions perf(app): navigation between sessions + fix terminal test regressions Mar 10, 2026
@neriousy neriousy closed this Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

navigating between sessions is laggy

2 participants