Work with tabs rather than indices in Terminal Page #11550

Open
opened 2026-01-31 02:50:56 +00:00 by claunia · 0 comments
Owner

Originally created by @Don-Vito on GitHub (Nov 23, 2020).

Originally assigned to: @Don-Vito on GitHub.

Description of the new feature/enhancement

The current implementation of tab management in TerminalPage uses indices as a way of communication (we remove tabs by index, we update tabs by index, we drag tabs by index, even switch to tab command stored within tab points to an index).

This creates numerous theoretical races (that materialize from time to time, at least when I am testing).
In addition, I would also expect that we will work only with a single source of truth, rather than managing both _tabs and _tabView.TabItems manually

I guess there might be a reason for the current approach of working with indices rather than tabs and for managing two collections, but I wasn't able to find it in a documentation

Proposed technical implementation details (optional)

  • Bind _tabView.TabItems property to _tabs
  • Don't work with indices, if you must work with index resolve it to the tab as soon as possible
Originally created by @Don-Vito on GitHub (Nov 23, 2020). Originally assigned to: @Don-Vito on GitHub. # Description of the new feature/enhancement The current implementation of tab management in TerminalPage uses indices as a way of communication (we remove tabs by index, we update tabs by index, we drag tabs by index, even switch to tab command stored within tab points to an index). This creates numerous theoretical races (that materialize from time to time, at least when I am testing). In addition, I would also expect that we will work only with a single source of truth, rather than managing both _tabs and _tabView.TabItems manually I guess there might be a reason for the current approach of working with indices rather than tabs and for managing two collections, but I wasn't able to find it in a documentation # Proposed technical implementation details (optional) * Bind _tabView.TabItems property to _tabs * Don't work with indices, if you must work with index resolve it to the tab as soon as possible
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11550