Skip to content

[FEATURE]: Automatically group desktop session tabs by project #44589

Open

Description

@Hans2573

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

In the new OpenCode Desktop layout, all session tabs are displayed in one flat tab bar.

When several projects and sessions are open at the same time, sessions from the same project are mixed with sessions from other projects. Session titles do not reliably indicate their project, making it difficult to identify the correct workspace and increasing the risk of working in the wrong project.

It would be helpful to group session tabs automatically by project/workspace, similar to browser tab groups:

  • Show the project name as the group label
  • Place new sessions into their project's group automatically
  • Allow project groups to be collapsed and expanded
  • Visually separate groups using color or clear dividers
  • Preserve grouping and tab order after restarting the desktop app

This is related to #37273 and #38525, but specifically requests project-based grouping within the existing horizontal tab layout.

Activity

  1. github-actions commented on Aug 24, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. Hans2573 commented on Aug 24, 2026

    @Hans2573
    Author

    This issue might be a duplicate of existing issues. Please check:

    This is related to #43842, but the requested scope is more specific: automatically grouping the existing horizontal session tabs by project/workspace, similar to browser tab groups.

    The current PR #43941 improves project visibility by showing the project name, but does not implement tab grouping.

    I am willing to implement this feature if the maintainers agree with the proposed direction.

  3. TommasoRonchin commented on Oct 8, 2026

    @TommasoRonchin

    I'd like to contribute this feature if the team agrees with the direction below.
    I've spent some time in the tab strip code (packages/app: context/tabs.tsx, components/titlebar-tab-strip.tsx, and the session/project resolution in pages/layout/helpers.ts), and project-based grouping looks very doable. Rough sketch for a first version:

    • One group per project, keyed by server + worktree, derived from the existing session/project resolution. Users can't create custom groups in v1.
    • Group header shows the project name and its avatar color; dividers separate groups; groups start ordered by first appearance, and dragging a group header reorders them.
    • Collapsible groups: collapsing hides the group's tabs. Collapse state, group order and tab order persist across restarts, in the same per-window storage the tab bar already uses.
    • Tabs keep their current order inside their group; drag & drop reorders within a group, so a session never leaves its project and groups stay contiguous.
    Edge cases I'd cover - A session whose project can't be resolved falls back to a group named after its directory; groups are derived from open tabs, so it moves into the right group automatically once the project resolves. - Draft tabs join the group of their directory. - A group header only renders while the group has at least one visible tab. - Collapsing works even for the group holding the active tab (the header gets a subtle active indicator); any navigation to a hidden tab expands its group. - Keyboard navigation (Ctrl+Tab, Cmd/Ctrl+1..9) only walks visible tabs, so collapsed groups are skipped.
    Open points I'd rather settle before writing code: 1. Group hiding: worth including, and if so how should a hidden group come back? (a menu on the tab bar, a settings list, or auto-restore when a new session opens in that project) 2. The tab strip is shared UI between desktop and web, so this would apply to both. Is that fine? 3. Always-on, or behind a setting? Happy to adjust based on your feedback. I've also been following the related threads (#51523, #51759) and the TUI folder-grouping PR #52928; if the team's direction differs from the sketch above, I'm glad to align. I'll wait for a go-ahead before opening a PR against dev, and happy to coordinate if anyone is already on this (Hans2573 also offered to help).
  4. opencodejr commented on Oct 28, 2026

    @opencodejr

    Thanks for the detailed suggestion, @Hans2573!

    To restate it: in the Desktop app, session tabs would be grouped by project or workspace, much like browser tab groups. Each group would have the project name as its label, new sessions would join their project's group automatically, groups could be collapsed and set apart by colour or dividers, and grouping and tab order would survive a restart. Today the tab bar shows all sessions in one flat list, so it's easy to lose track of which project a tab belongs to.

    This would need a change to the app itself. Plugins can't currently change how the session tab bar is grouped or shown. Maintainers will consider the request.

    Related issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions