Skip to content

fix(app): session tabs to open the previous opened#11914

Merged
adamdotdevin merged 2 commits intoanomalyco:devfrom
ProdigyRahul:fix/tabs
Feb 3, 2026
Merged

fix(app): session tabs to open the previous opened#11914
adamdotdevin merged 2 commits intoanomalyco:devfrom
ProdigyRahul:fix/tabs

Conversation

@ProdigyRahul
Copy link
Contributor

fixed session file-tab selection so closing the active (especially last-opened) tab now focuses the adjacent previous tab instead of incorrectly jumping to the first tab.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@alexyaroshuk
Copy link
Contributor

I checked it, and gotta say this does not address the issue, unfortunately.

Before:
closing the last tab, if it is active, would jump to first tab. Bad experience
closing the first tab, if it is active, would go to near tab. OK experience

Now: closing the last tab, if it is active, would go to near tab. OK experience
closing the first tab, if it is active, would go to last tab. Bad experience

I made a fix to solve this. See this comment. Basically, calculate first and then run batch. this seems to work: we go to left tab now, unless the active tab is first tab, in this case we go to the right tab.

Check it and see if it works

@ProdigyRahul
Copy link
Contributor Author

@alexyaroshuk Can you pull this pr again ? and now test it please?

@alexyaroshuk
Copy link
Contributor

@alexyaroshuk Can you pull this pr again ? and now test it please?

Tested. The issue is solved

@alexyaroshuk
Copy link
Contributor

I checked it, and gotta say this does not address the issue, unfortunately.

Before: closing the last tab, if it is active, would jump to first tab. Bad experience closing the first tab, if it is active, would go to near tab. OK experience

Now: closing the last tab, if it is active, would go to near tab. OK experience closing the first tab, if it is active, would go to last tab. Bad experience

I made a fix to solve this. See this comment. Basically, calculate first and then run batch. this seems to work: we go to left tab now, unless the active tab is first tab, in this case we go to the right tab.

Check it and see if it works

i just realized i messed up with this review and didn't actually submit it, so it is not visible - my bad, will remember to submit next time

@ProdigyRahul
Copy link
Contributor Author

nehh man. you were right. i have fixed after your feedback. Thank you for testing <3

@adamdotdevin adamdotdevin merged commit 08671e3 into anomalyco:dev Feb 3, 2026
4 checks passed
ishaksebsib pushed a commit to ishaksebsib/opencode that referenced this pull request Feb 4, 2026
ishaksebsib pushed a commit to ishaksebsib/opencode that referenced this pull request Feb 4, 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.

3 participants