Skip to content

Wip/session tabs - #490

Merged
sudo-tee merged 12 commits into
mainfrom
wip/session-tabs
Sep 15, 2026
Merged

sudo-tee merged 12 commits into
mainfrom
wip/session-tabs

Conversation

@sudo-tee

@sudo-tee sudo-tee commented Sep 10, 2026 •

Copy link
Copy Markdown
Owner

Adds logical session tabs inside the Opencode panel without creating Neovim tabpages.

  • Each tab preserves its own session, input, output, context, model, and renderer state.
  • Adds tab-strip navigation, index selection, overflow handling, pending prompt markers, and background notifications.
  • Keeps tab output synchronized while sessions run in the background.
  • Supports opening child-session and fork actions in new panel tabs.
  • Hides tab strip when only one session tab exists.

Configuration

Inline child-session and fork actions remain default behavior. To open them in new panel tabs:

require('opencode').setup({
  ui = {
    output = {
      actions = {
        open_in_new_tab = true,
      },
    },
  },
})
image image

@sudo-tee
sudo-tee marked this pull request as draft September 10, 2026 12:41
@sudo-tee
sudo-tee force-pushed the wip/session-tabs branch 2 times, most recently from 87d3fe7 to 39f8266 Compare September 10, 2026 13:09
@sudo-tee

Copy link
Copy Markdown
Owner Author

This is an experimental feature that I am working on since a couple of weeks and whant to gather feedback, I really like the workflow on my part, especially for navigating between sessions

@jensenojs

@phanen I know you wanted a similar feature in #476

Let me know if you like it or not :)

@jensenojs

Copy link
Copy Markdown
Collaborator

I'll try it tomorrow morning (。・ω・。)ノ♡

@jensenojs

jensenojs commented Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator

I'm not entirely sure if <leader>o</> is a good idea (though <leader>o h/l is fine). On my local machine, CSI-u seems to be escaping it into something strange.

ignore, my stupid mistakes

@sudo-tee

Copy link
Copy Markdown
Owner Author

But I still like your idea of o h/l and even adding o left/right might work. I will have a look

@jensenojs

Copy link
Copy Markdown
Collaborator

But I still like your idea of o h/l and even adding o left/right might work. I will have a look

or o, / o. (I was being stupid today because I was clicking this one lol, but it doesn't matter)

@jensenojs

jensenojs commented Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator

I just wanted to remind you that we might need to distinguish between wanting to split different sessions within a single session-window (which is obviously different from splitting different session-windows). I currently have this bound to <keymap_prefix>h/l, though I will likely bind this lovely shortcut to your feature instead. We just might need to avoid confusing newcomers in the documentation, but it's only a minor issue.

Well, maybe not entirely, because when I switch between different sessions within a session window, the original title disappears—though, of course, that might be the expected behavior

图片

@sudo-tee

Copy link
Copy Markdown
Owner Author

Yes this is an intended behavior, since the "session" is being replaced in the current buffer, so it makes sense that the title changes accordingly.

But I can keep the current keymaps, since users can change them anyway if they want.

@jensenojs

Copy link
Copy Markdown
Collaborator
图片

opencode-v2 now has a similar feature as well, and its architecture appears to natively support two-way synchronization between TUI and Nvim.

The only thing that's kind of annoying is that the APIs seem to be all messed up. I've been trying to find time to look into this over the past few days so we can make some adjustments ahead of time (though it's not that far in advance—it should be released soon).

@sudo-tee

Copy link
Copy Markdown
Owner Author

I also started to look a bit into opencodev2, but it looks like a massive change.

I will need to come up with plan, as soon a lot of users will ask for compatibility.

There is already an issue opened about it there -> #487

@jensenojs

Copy link
Copy Markdown
Collaborator

I created a branch for local emergency use. I can also participate in the design and review later; it just so happens that I've only upgraded opencode2 on one machine, so I can test the compatibility.

Although you uploaded your spec file by mistake, I still think this design document could exist in a draft branch, as it might be more helpful for future design communication

@sudo-tee
sudo-tee marked this pull request as ready for review September 14, 2026 14:08
@sudo-tee

Copy link
Copy Markdown
Owner Author

I will merge this, ans start looking into opencode2 this week

@sudo-tee
sudo-tee merged commit 6071fe7 into main Sep 15, 2026
10 checks passed
@jensenojs

Copy link
Copy Markdown
Collaborator

I have also locally set a goal to create a "simple enough" goal for codex (which has undergone considerable end-to-end testing), but I haven't used it very deeply in opencode2 and opencode1 yet. I will try my best to bring it up this week for your reference

@sudo-tee

Copy link
Copy Markdown
Owner Author

@jensenojs Yes publish what you have , it might serves as a base.

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.

2 participants