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): group Home sessions by project by liambreen · Pull Request #57895 · anomalyco/opencode

Conversation

@liambreen

@liambreen liambreen commented Oct 21, 2026 •
edited by opencode-agent Bot
Loading

Uh oh!

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

Copy link
Copy Markdown

Issue for this PR

Closes #55446

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds an opt-in toggle in the Home search row that switches the sessions list between the existing date groups and per-project groups. Default stays date grouping.

Grouped view: one collapsible header per project (chevron + avatar + name), groups ordered by most recent session, sessions resolved through the project inventory so worktree and sandbox sessions join their parent project instead of splitting it. Grouped rows indent under the header's chevron column and drop the per-row project suffix (the header already names the project); search results keep the suffix since that list spans projects. The grouping mode and collapsed groups persist per user under a home.sessions storage key.

The partition logic lives in a new leaf module, home/sessions/grouping.ts, so it is unit-testable without the component graph.

How did you verify your code works?

  • bun typecheck in packages/app and bun run check at the repo root, both green.
  • Unit: new grouping.test.ts cases (first-occurrence group order, within-group recency, sandbox sessions under their parent project, per-directory identity); existing records.test.ts cases still green.
  • E2E: new keeper case in home.spec.ts covers the toggle, group order, suffix suppression, collapse, cycle-skip and reload persistence, and the compact header height. Full home.spec.ts suite is 12/12 locally.

Screenshots / recordings

Home sessions grouped by project (toggle lives at the right of the search row):

Home sessions grouped by project

Checklist

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

Added by the opencode bot (AI-generated).

Related: #51759, #54115

Sorry, something went wrong.

Uh oh!

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

All reactions
@liambreen
feat(app): group Home sessions by project
daca537
An opt-in toggle in the Home search row switches the sessions list
between date groups and per-project groups: collapsible compact
headers, groups ordered by most recent session, worktree and sandbox
sessions resolved to their parent project, and grouped rows indented
under their header's chevron column without the per-row project
suffix. The mode and collapsed groups persist per user.
@liambreen
liambreen requested review from Brendonovich and Hona as code owners October 21, 2026 19:57
This was referenced Oct 21, 2026
feat(app): group session tabs by project #57896
Closed
feat(app): group sessions and tabs by project #57888
Closed
opencode-agent[bot]
opencode-agent Bot reviewed Oct 21, 2026
View reviewed changes

@opencode-agent opencode-agent 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.

The project grouping works as described. I ran the full home.spec.ts e2e suite in headless Chromium (12/12, including the new case), the src/home/sessions unit tests (27/27) and bun run typecheck in packages/app (clean). The screenshots below are both from this branch: the default date view, then the grouped view.

Public API: unchanged. The only addition is an app-local persisted key, home.sessions.

One thing to fix before merge: the spacing change on the group body also applies to the default date view, so it changes the existing Home layout for everyone, not just the opt-in mode (inline). A smaller point: collapsed state is stored globally and keyed by folder path (inline). Also, the description mentions a test for skipping collapsed groups and a per-directory identity unit test, but neither is in the diff. Please update the description or add them.

Related: #51759, #54115

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/home/sessions/view.tsx
</Show>
<div
class={`flex min-w-0 flex-col gap-px pt-2 md:pt-4 ${index === props.groups.length - 1 ? "" : "mb-6"}`}
class={`flex min-w-0 flex-col gap-px pt-1 ${index === props.groups.length - 1 ? "" : "mb-2"}`}

@opencode-agent opencode-agent Bot Oct 21, 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.

This wrapper is shared by both modes, so going from pt-2 md:pt-4 / mb-6 to pt-1 / mb-2 also tightens the existing Today/Yesterday/Older layout, which stays the default. Could the compact spacing apply only when props.groupedByProject is true, so the date view keeps its current spacing?

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread packages/app/src/home/sessions/controller.tsx
const queryClient = useQueryClient()

const [storedView, setStoredView] = persisted(
Persist.global("home.sessions"),

@opencode-agent opencode-agent Bot Oct 21, 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.

collapsed is keyed by pathKey(worktree), but it's stored under Persist.global. So the same path on two servers (e.g. /home/me/app locally and on a remote) shares one collapsed state, and entries are never pruned. If Home can show other servers, Persist.serverGlobal(...) (used elsewhere for per-server state) might fit better, at least for collapsed.

Sorry, something went wrong.

Uh oh!

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

All reactions
@liambreen liambreen closed this Oct 21, 2026
@liambreen

liambreen commented Oct 21, 2026

Copy link
Copy Markdown
Author

Sorry - this was not supposed to have been submitted.

All reactions

Sorry, something went wrong.

Uh oh!

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

@liambreen
liambreen deleted the home-session-groups branch October 21, 2026 20:24
@Dante-dan Dante-dan mentioned this pull request Oct 24, 2026
desktop/web: group sidebar sessions by project like Codex Projects view #55446
Open
This was referenced Oct 31, 2026
feat(app): add an independent Side bar mode #60867
Closed
[FEATURE]: V2 Side bar: project history and running sessions alongside existing modes #60241
Open
This was referenced Nov 6, 2026
[desktop] Group the Home session list by project instead of by date #62436
Closed
[FEATURE]:申请一下就是界面再增加一种布局 #62506
Closed
desktop: group sessions by project in the sidebar #63231
Closed
@BurgessTG BurgessTG mentioned this pull request Nov 19, 2026
Group Android sessions by project anomalyco/opencode-android#198
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@opencode-agent opencode-agent[bot] opencode-agent[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.

desktop/web: group sidebar sessions by project like Codex Projects view

Uh oh!

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

1 participant

@liambreen
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.