GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(app): order side tabs by recent activity by juanfradb · Pull Request #60270 · anomalyco/opencode

Conversation

@juanfradb

@juanfradb juanfradb commented Oct 29, 2026 •
edited by opencodejr Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Issue for this PR

Related: #58136 (earlier attempt, auto-closed for template compliance), #55797, #50086

Type of change

  • New feature

What does this PR do?

The vertical rail is the app's persistent conversation list, but it followed the order tabs were opened in: a session started today landed at the bottom, below the fold once the rail overflows, while the chat you were in last sat furthest from the top. The rail now orders tabs by their last activity.

  • appearance.tabOrder (recent or opened) makes this configurable, with a row in Settings → General next to the interface mode. Unset follows the layout: recent for side tabs, opened for the top strip. opened keeps today's behavior, drag reordering included; recent has no manual order for a drag to change, so the drag sensors are off there.
  • The sort key is time.idle (end of the last finished run), falling back to time.updated for sessions that never finished one, so a chat you are in does not jump to the top mid-turn. Drafts stay first, tabs whose session has not loaded yet sort last, and ties keep the stored order.
  • Navigation reads the same list: alt+arrow, mod+1..9, tab cycle and unread jump follow what is on screen.

How did you verify your code works?

  • bun test src/settings/model.test.ts src/shell/titlebar/tab-order.test.ts in packages/app: 27 pass.
  • tsc -b in packages/app: clean.
  • bunx playwright test e2e/regression/tabs.spec.ts: 36 pass. The two mobile-drawer legs fail the same way on dev with these changes stashed. Two tests that drag vertical tabs now seed tabOrder: "opened", since the drag belongs to the manual order, and a new test covers the default: side tabs render newest-first from seeded time.idle values, and the top strip keeps the opened order.

Screenshots / recordings

Not attached. The new regression test asserts the rendered row order in both layouts.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Added by the opencode bot (AI-generated).

Related: #50086

Public API: adds the optional appearance.tabOrder app setting ("recent" | "opened"), backwards compatible

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@juanfradb
feat(app): order side tabs by recent activity
dafdf61
The vertical rail is the app's persistent conversation list, but it followed
the order tabs were opened in: a session started today landed at the bottom,
below the fold once the rail overflows, while the chat you were in last sat
furthest from the top. It now orders tabs by the last meaningful activity.

`appearance.tabOrder` (`recent` or `opened`) makes that order configurable and
follows the layout until picked: `recent` for the side tabs, `opened` for the
top strip. `opened` keeps the browser convention, drag reordering included.

The sort key is the last finished run (`time.idle`), falling back to the last
update for sessions that never finished one, so a chat you are in does not
jump to the top mid-turn. Drafts stay first, tabs whose session has not loaded
yet sort last, and ties keep the stored order. Navigation (alt+arrows,
mod+1..9, tab cycle, unread jump) reads the same order the strip shows.
@juanfradb
juanfradb requested review from Brendonovich and Hona as code owners October 29, 2026 15:36
@juanfradb juanfradb mentioned this pull request Oct 29, 2026
feat(app): order vertical tabs by recent activity #58136
Closed
opencodejr[bot]
opencodejr Bot reviewed Oct 29, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as described. I ran the tab end-to-end tests in headless Chromium against both branches. With three seeded sessions, the base branch shows the side rail as A, B, C and this PR shows C, B, A. The new test fails on the base branch and passes here. tabs.spec.ts gives 36 passes and 2 failures, and the 2 (mobile drawer) also fail on dev. Unit tests (28) and tsc -b pass.

Public API: the only change is a new optional client setting, appearance.tabOrder ("recent" | "opened"). It's backwards compatible: older saved settings still load, and unknown values fall back to the layout's default.

Two things worth addressing (inline):

  • Closing the active tab in recent mode still picks the next tab from the saved order, so focus can jump far away in the rail.
  • Leaving tabOrder unset means existing side-tab users switch to recent on upgrade, which re-sorts their dragged order and turns off dragging.

Smaller point: the settings row shows in every layout and also changes the top strip, though its description only mentions the side tab list.

Related: #50086

Before

After

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/app/src/shell/titlebar/tab-strip.tsx
return session.time.idle ?? session.time.updated
}

const orderedTabs = createMemo(() => (recentOrder() ? orderTabsByRecency(props.tabs, activity) : props.tabs))

@opencodejr opencodejr Bot Oct 29, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keyboard navigation now follows orderedTabs(), but closing the active tab doesn't. removeTab in shell/tabs/tabs.tsx uses nextTabAfterClose(store, index, …), which picks the neighbour in the saved order. In recent mode that can be a tab anywhere in the rail rather than the row next to the one you closed. The close path probably needs the displayed order (or a sorted neighbour lookup) when tabOrder is recent.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/app/src/settings/model.tsx
export type TabOrder = "recent" | "opened"

/** An explicit order wins; otherwise the side tabs follow activity while the top strip keeps the opened order. */
export function resolveTabOrder(tabLayout: TabLayout, tabOrder: TabOrder | undefined): TabOrder {

@opencodejr opencodejr Bot Oct 29, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When tabOrder is unset, it follows the layout. So every existing side-tab user switches to recent on upgrade: tabs they arranged by dragging get re-sorted, and dragging stops working until they find the new setting in General. That's a behaviour change for current users, not only new ones. Maintainers should confirm this default is intended. If it isn't, one option is to keep opened for people who already have a saved vertical layout.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
This was referenced Nov 4, 2026
[FEATURE]: TUI session tabs: automatic groups, nested subagent sessions, and automatic order #61573
Open
侧边栏的会话记录 可否提供倒序排列 最新的在上方 历史的在下方 ? #62703
Closed
@Hona Hona mentioned this pull request Nov 20, 2026
feat(browser): open a link's new tab beside the tab it came from #65126
Merged

This branch has not been deployed

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

Reviewers

@opencodejr opencodejr[bot] opencodejr[bot] left review comments
@Hona Hona Awaiting requested review from Hona
@Brendonovich Brendonovich Awaiting requested review from Brendonovich

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@juanfradb
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.