Skip to content

feat: implement session grouping using prefixes - #194

Open
ariane-emory wants to merge 42 commits into
devfrom
feat/session-grouping
Open

ariane-emory wants to merge 42 commits into
devfrom
feat/session-grouping

Conversation

@ariane-emory

@ariane-emory ariane-emory commented Feb 18, 2026 •

Copy link
Copy Markdown
Owner

What does this PR do?

Sessions with titles containing a pipe character (e.g., 'features | Some description') are now grouped by their prefix. Grouped sessions appear above regular date-grouped sessions, with each group sorted by last update time.

  • Add shortDateTime() utility for abbreviated date/time display
  • Parse session titles to extract group prefix and display title
  • Separate sessions into grouped and ungrouped categories
  • Grouped sessions show full date/time, ungrouped show just time

In the session_list dialuge, grouped session titles are displayed beneath a group header created by splitting the part before the pipe character from the part after, trimming the whitespace from both parts, capitalizing the part before the pipe character, and suffixing it with a colon. For example, a session whose title is foo | bar will appear under a group header Foo: with the title bar in the session_list dialogue.

In the sidebar (and any header, if visible), grouped session titles are rendered by splitting the part before the pipe character from the part after, trimming the whitespace from both parts, capitalizing the part before the pipe, and suffixing it with a colon. For example, a session whose title is foo | bar will in the sidebar as if its title were Foo: bar.

In the session_list, the name of the group in the individual group headers is capitalized and suffixed with a colon (foo|bar is displayed under a "Foo:" group header) and the portion of the session title before the colon is never displayed (the title of foo|bar is displayed in the session_list as bar).

Resolves anomalyco#9688
Resolves #187

ariane-emory and others added 8 commits February 17, 2026 12:01
Sessions with titles containing a pipe character (e.g., 'Features | Some description')
are now grouped by their prefix. Grouped sessions appear above regular date-grouped
sessions, with each group sorted by last update time.

- Add shortDateTime() utility for abbreviated date/time display
- Parse session titles to extract group prefix and display title
- Separate sessions into grouped and ungrouped categories
- Grouped sessions show full date/time, ungrouped show just time

Resolves #187
@ariane-emory ariane-emory changed the title feat(cli): implement session grouping using prefixes feat: implement session grouping using prefixes Feb 22, 2026
ariane-emory and others added 13 commits April 17, 2026 00:07
Restores the session title formatting that was accidentally removed during
cleanup of the feat/session-grouping branch. Grouped session titles (e.g.
'foo|bar') are now displayed with the group capitalized and a colon:
'Foo: bar'.

- Creates packages/opencode/src/cli/cmd/tui/util/session-title.ts with
  formatSessionTitle() and parseSessionTitleParts() helpers
- Updates sidebar.tsx to render group in bold with colon
- Updates index.tsx to use formatted title in terminal title bar
Sessions with titles like 'integrations|foo' and 'Integrations|bar' were
being sorted into separate groups due to case differences in the first
character. This change normalizes group names by capitalizing only the
first character, so 'integrations' and 'Integrations' both map to the
'Integrations' group. Case differences in other characters are preserved.
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.

[FEATURE]: Session grouping using prefixes [FEATURE]: TUI - Session Picker - Organize into Virtual Folders

1 participant