You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Let a plugin add a date and a second line to the tab switcher
#6742
On a phone, open Switch tab and tell sessions apart when the titles are long and similar. I want the title to wrap onto a second line, and a date under it (last activity, or created). The same list should look that way on every client that shows this sheet, without forking the app.
How do you do it today?
The sheet is MobileWorkspaceTabSwitcher (packages/app/src/screens/workspace/compact-workspace-header/tab-switcher.tsx). Each row is WorkspaceTabOptionRow (packages/app/src/screens/workspace/workspace-tab-presentation.tsx). The row draws presentation.label with numberOfLines={1} and does not draw presentation.subtitle, even though WorkspaceTabPresentation already has a subtitle.
For an agent tab, useAgentPanelDescriptor in packages/app/src/panels/agent-panel.tsx sets that subtitle to `${formatProviderLabel(provider)} agent`. It reads title and status, not createdAt, updatedAt, or lastActivityAt. Those timestamps are on the agent snapshot. The desktop tab tooltip already formats lastActivityAt. The switcher row does not.
The desktop tab strip (packages/app/src/screens/workspace/workspace-desktop-tabs-row.tsx) also clamps its label to one line. That strip measures the label and sits in a fixed-height bar. This draft leaves it alone.
Where does Paseo get in the way?
PluginClientContext can register screens, sidebar items, workspace panels, Command Center items, slash commands, header buttons, composer pills, attachment sources, themes, and timeline transformers and renderers. Nothing in that list receives a tab or returns how a switcher row should look.
addWorkspacePanel({ title }) sets the label of a plugin's own panel. That label still goes through WorkspaceTabOptionRow, so it stays one line and has no date. Agent tabs, which are what this sheet is mostly full of, are not plugin panels. A plugin can rename an agent, and the new title is still one truncated line. A plugin screen can list agents with useAgent and format the dates itself. That is a second list, not this sheet.
What would a better workflow look like?
The sheet, the icon, the check, and the trailing menu stay Paseo's. A plugin supplies two display fields for a row: how many lines the title may use, and an optional subtitle such as a date. With no plugin registered, the sheet looks as it does today, including leaving the built-in subtitle ("Codex agent", a file path) undrawn.
Draft
One client registration, same lifecycle as addTimelineTransformer: synchronous, deterministic, and skipped if it throws.
present returns undefined to keep the host row. A return value may set:
Field
Meaning
labelLines
1 or 2. Default 1, which is today's numberOfLines={1}.
subtitle
One muted line under the title. null or omitting it draws no subtitle.
It does not replace the label, the icon, the status, or the menu. The title text stays presentation.label.
agent is the cached snapshot when tab.kind === "agent", including createdAt, updatedAt, and lastActivityAt. It is null for terminals, files, and other tabs. The callback does not fetch.
WorkspaceTabOptionRow is the only consumer. When labelLines is 2, the title uses numberOfLines={2}. When subtitle is a non-empty string, the row renders it once, numberOfLines={1}, in the muted foreground, and aligns the icon to the top of the row. minHeight stays 36 when both are absent.
The first plugin in stable catalog order that returns a value wins, the same rule as slash commands. A later plugin does not add another line on top. A plugin that is not running leaves the row untouched.
Out of scope
The desktop tab strip. It stays one line.
Drawing the built-in subtitle ("${provider} agent", a file path) when no plugin returns one.
Sorting, filtering, or hiding rows.
A plugin-rendered row, a custom icon, or a custom trailing menu.
Why a plugin
Which timestamp to show, how to format it, and whether a long title wraps are presentation choices. The host already has the timestamps and an unused subtitle field. A small presentation hook lets one plugin do this on the phone without a settings matrix in core, and without a second list beside Switch tab.
plugin-apiPaseo plugin API capabilities for plugin authors
1 participant
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
What are you trying to do?
On a phone, open Switch tab and tell sessions apart when the titles are long and similar. I want the title to wrap onto a second line, and a date under it (last activity, or created). The same list should look that way on every client that shows this sheet, without forking the app.
How do you do it today?
The sheet is
MobileWorkspaceTabSwitcher(packages/app/src/screens/workspace/compact-workspace-header/tab-switcher.tsx). Each row isWorkspaceTabOptionRow(packages/app/src/screens/workspace/workspace-tab-presentation.tsx). The row drawspresentation.labelwithnumberOfLines={1}and does not drawpresentation.subtitle, even thoughWorkspaceTabPresentationalready has asubtitle.For an agent tab,
useAgentPanelDescriptorinpackages/app/src/panels/agent-panel.tsxsets that subtitle to`${formatProviderLabel(provider)} agent`. It readstitleand status, notcreatedAt,updatedAt, orlastActivityAt. Those timestamps are on the agent snapshot. The desktop tab tooltip already formatslastActivityAt. The switcher row does not.The desktop tab strip (
packages/app/src/screens/workspace/workspace-desktop-tabs-row.tsx) also clamps its label to one line. That strip measures the label and sits in a fixed-height bar. This draft leaves it alone.Where does Paseo get in the way?
PluginClientContextcan register screens, sidebar items, workspace panels, Command Center items, slash commands, header buttons, composer pills, attachment sources, themes, and timeline transformers and renderers. Nothing in that list receives a tab or returns how a switcher row should look.addWorkspacePanel({ title })sets the label of a plugin's own panel. That label still goes throughWorkspaceTabOptionRow, so it stays one line and has no date. Agent tabs, which are what this sheet is mostly full of, are not plugin panels. A plugin can rename an agent, and the new title is still one truncated line. A plugin screen can list agents withuseAgentand format the dates itself. That is a second list, not this sheet.What would a better workflow look like?
The sheet, the icon, the check, and the trailing menu stay Paseo's. A plugin supplies two display fields for a row: how many lines the title may use, and an optional subtitle such as a date. With no plugin registered, the sheet looks as it does today, including leaving the built-in subtitle (
"Codex agent", a file path) undrawn.Draft
One client registration, same lifecycle as
addTimelineTransformer: synchronous, deterministic, and skipped if it throws.presentreturnsundefinedto keep the host row. A return value may set:labelLines1or2. Default1, which is today'snumberOfLines={1}.subtitlenullor omitting it draws no subtitle.It does not replace the label, the icon, the status, or the menu. The title text stays
presentation.label.agentis the cached snapshot whentab.kind === "agent", includingcreatedAt,updatedAt, andlastActivityAt. It isnullfor terminals, files, and other tabs. The callback does not fetch.WorkspaceTabOptionRowis the only consumer. WhenlabelLinesis2, the title usesnumberOfLines={2}. Whensubtitleis a non-empty string, the row renders it once,numberOfLines={1}, in the muted foreground, and aligns the icon to the top of the row.minHeightstays 36 when both are absent.The first plugin in stable catalog order that returns a value wins, the same rule as slash commands. A later plugin does not add another line on top. A plugin that is not running leaves the row untouched.
Out of scope
"${provider} agent", a file path) when no plugin returns one.Why a plugin
Which timestamp to show, how to format it, and whether a long title wraps are presentation choices. The host already has the timestamps and an unused
subtitlefield. A small presentation hook lets one plugin do this on the phone without a settings matrix in core, and without a second list beside Switch tab.All reactions