Skip to content

workspace: Add basic pane property tests and fix navigation bug#52871

Merged
probably-neb merged 3 commits intozed-industries:mainfrom
timvermeulen:pane-property-tests
Apr 23, 2026
Merged

workspace: Add basic pane property tests and fix navigation bug#52871
probably-neb merged 3 commits intozed-industries:mainfrom
timvermeulen:pane-property-tests

Conversation

@timvermeulen
Copy link
Copy Markdown
Contributor

Adds very basic property tests for navigation within a single pane, with these operations:

enum Operation {
    Open { path: Arc<RelPath>, allow_preview: bool },
    GoBack,
    GoForward,
}

It primarily tests that a single backward or forward navigation step results in the correct item being active. It doesn't currently test that going back multiple times in a row results in the correct items because the deduplication logic that Zed uses for this turned out to be hard to model in an "obviously correct" way, and I aimed to keep it really simple.

These tests surfaced a navigation bug that this PR also fixes, where replacing an inactive preview tab would sometimes corrupt the navigation history.

Before:

before.mov

After:

after.mov

Self-Review Checklist:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content is consistent with the UI/UX checklist
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Release Notes:

  • Fixed a bug where replacing a preview tab would sometimes break navigation.

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Apr 1, 2026
@zed-codeowner-coordinator zed-codeowner-coordinator Bot requested review from a team, maxbrunsfeld and probably-neb and removed request for a team April 1, 2026 02:58
@github-actions github-actions Bot added the community champion Issues filed by our amazing community champions! 🫶 label Apr 1, 2026
@probably-neb
Copy link
Copy Markdown
Collaborator

nice! this is super cool. If you wouldn't mind fixing the conflict in Cargo.lock, i'd be happy to merge this

@timvermeulen
Copy link
Copy Markdown
Contributor Author

nice! this is super cool. If you wouldn't mind fixing the conflict in Cargo.lock, i'd be happy to merge this

Awesome! I've just done so.

@probably-neb probably-neb added this pull request to the merge queue Apr 23, 2026
Merged via the queue into zed-industries:main with commit 0ae6b4c Apr 23, 2026
31 checks passed
@timvermeulen timvermeulen deleted the pane-property-tests branch April 23, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement community champion Issues filed by our amazing community champions! 🫶

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants