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
Theme hooks for sidebar rows: data-section and stable row parts (compact pinned "assistant" threads)
#37449
How I use pinned threads: each pinned thread is a long-lived assistant for one project, a bit like a bot I keep asking things about that project. That's why they're pinned. I already know what each one is, so the project icon, the title and the status are enough; the full three-line card is more than I need.
In a way this is the boring sidebar in reverse. The boring sidebar makes the threads inside project folders compact and leaves pinned threads as cards. I want compact pinned "assistant" rows on top and normal rows for everything else.
What I did: I asked an agent to restyle the sidebar with the theme tools (t3_theme_set). It took a few minutes: pinned threads are now two lines (icon, title, pin and time, then branch/PR/agent), and a thin divider sits under the pinned stack. Unpinned rows are unchanged. Restyling T3 by asking an agent feels like a much nicer way to customise it than waiting for a setting. But the CSS depends on internals:
Pinned rows are found with :has(button[aria-label="Unpin thread"], [aria-label="Pinned"]). Nothing on [data-thread-item] says which section a row is in.
The card's lines are reached by position ([data-testid="sidebar-row-card"] > div > :first-child, :nth-child(2)), and the project name by the Tailwind class span.flex-1.
The divider is drawn on [data-testid="sidebar-pinned-divider"], which the app only labels while dragging.
The theme guide warns that test ids and class names change between releases, so this will break.
Idea: a few stable attributes, with no visual change for anyone without a theme:
data-section="pinned|active|working|snoozed|settled|folder" and data-variant="card|slim|folder" on [data-thread-item]
data-row-part="header|title|meta" on the card's three lines
the pinned/active boundary listed in the theme guide as a stable selector
With these, the whole customisation is about 15 lines of CSS against documented selectors, and requests like "compact pinned rows" or "a pinned separator" can be done with a theme instead of a new setting.
Related:#17319 (compact rows; raiscan's pinned-only comment is my case), #33372 (pinned separator), #36964 (asked for data-section="pinned", closed and redirected to Discussions), #37216 (data-age on rows).
Before (stock Ocean cards) and after (theme). Thread and project names are anonymised.
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.
Version: 0.1.10-nightly.20261115.4749, macOS
How I use pinned threads: each pinned thread is a long-lived assistant for one project, a bit like a bot I keep asking things about that project. That's why they're pinned. I already know what each one is, so the project icon, the title and the status are enough; the full three-line card is more than I need.
In a way this is the boring sidebar in reverse. The boring sidebar makes the threads inside project folders compact and leaves pinned threads as cards. I want compact pinned "assistant" rows on top and normal rows for everything else.
What I did: I asked an agent to restyle the sidebar with the theme tools (
t3_theme_set). It took a few minutes: pinned threads are now two lines (icon, title, pin and time, then branch/PR/agent), and a thin divider sits under the pinned stack. Unpinned rows are unchanged. Restyling T3 by asking an agent feels like a much nicer way to customise it than waiting for a setting. But the CSS depends on internals::has(button[aria-label="Unpin thread"], [aria-label="Pinned"]). Nothing on[data-thread-item]says which section a row is in.[data-testid="sidebar-row-card"] > div > :first-child,:nth-child(2)), and the project name by the Tailwind classspan.flex-1.[data-testid="sidebar-pinned-divider"], which the app only labels while dragging.The theme guide warns that test ids and class names change between releases, so this will break.
Idea: a few stable attributes, with no visual change for anyone without a theme:
data-section="pinned|active|working|snoozed|settled|folder"anddata-variant="card|slim|folder"on[data-thread-item]data-row-part="header|title|meta"on the card's three linesWith these, the whole customisation is about 15 lines of CSS against documented selectors, and requests like "compact pinned rows" or "a pinned separator" can be done with a theme instead of a new setting.
Related: #17319 (compact rows; raiscan's pinned-only comment is my case), #33372 (pinned separator), #36964 (asked for
data-section="pinned", closed and redirected to Discussions), #37216 (data-ageon rows).Before (stock Ocean cards) and after (theme). Thread and project names are anonymised.
All reactions