Skip to content

zidane-ui/chat/sidebar

import { … } from 'zidane-ui/chat/sidebar'ui/src/chat/sidebar/index.ts

Components#

EnvironmentChipComponent#

Where a non-local session runs: the kind's glyph and a short name (the branch for a worktree, else the kind or machine). A spinner while provisioning, a red warning when setup failed; the tooltip has the details.

IconPickerComponent#

The emoji / image picker body — directory icons here, space icons in Settings › General › Spaces. Hosts own the popover and the persistence.

MainSessionRowComponent#

The pinned row of the orchestration main session, above every group.

NewSessionButtonComponent#

The New session row: the same grid as a session row (an 18px glyph column, text-sm), raised while no session is open, its ⌘N hint fading in on hover or focus.

ProjectChipComponent#

A session's project as a chip: its icon (picked, else git or folder) and its name.

ProjectIconButtonComponent#

The 18×18 icon slot on a project group header. Rendered as a SIBLING of the collapse button (never nested — button-in-button is invalid), so clicking it opens the picker without toggling the group; the stopPropagation is belt-and-braces against ancestor click handlers.

ProjectIconGlyphComponent#

A project's icon, display only: the same picked icon or default glyph its sidebar header shows.

SessionSidebarComponent#

Renders the session sidebar.

SidebarChipComponent#

One chip of a decoration or an item: its icon and text in its tone.

SidebarCompactingIndicatorComponent#

"compacting…" with the Throbber's ellipsis, then a live ~12k summary estimate and the elapsed time past one second, so a long compaction reads as progress rather than a hang.

SidebarDecorationComponent#

The decorations' icon and chips on a session row; a component one of them names in place of that decoration's own icon and chips, which are its fallback.

SidebarFilterMenuComponent#

The sidebar's filter axes in the kit's filter menu: view, status, project, activity, agent, origin, sort, and what extensions contribute (filters, sorts, groupings), with Save view as space.

SidebarFooterComponent#

Renders the sidebar's footer strip.

SidebarFrameComponent#

Renders the sidebar's aside, sheet, drag strip and resize handle. Render it only while frame.mounted.

SidebarGroupHeaderComponent#

Renders a group header of the sidebar list.

SidebarHostProviderComponent#

Provides a SidebarHost to the sidebar and the session menus below.

SidebarRowViewComponent#

Renders an extension item of the sidebar list. Memoized: keep every prop stable.

SidebarSearchRowComponent#

The search well above the session list, with the filter menu beside it.

SidebarSessionRowComponent#

Renders one session of the sidebar list. Memoized: keep every prop stable.

SidebarSignInPromptComponent#

The "sign in" prompt, for while no provider credentials exist. The signed-in state has no footer presence.

SidebarToggleButtonComponent#

Renders the sidebar toggle.

SidebarUsageIndicatorComponent#

▰ 5h 43%: the open session's provider's most constrained subscription window, on the TUI footer's helpers so both read the same number in the same color. Nothing when the provider reports no usage.

SpaceGlyphComponent#

A space's glyph: its emoji or image, else the first letter of its name.

SpacesSectionComponent#

Renders the Spaces sections: the switch, then the list while it is on. Nothing until the settings are read.

SpaceSwitcherComponent#

The row of space icons: one raised chip slides to the shown space; arrows, Home and End move between them.

Functions#

archiveProjectPromptFunction#

Confirms archiving every conversation of a project that is not archived yet.

createSidebarCollapsedFunction#

Makes the store for one window's sidebar.

createSidebarLiveFunction#

Builds the sidebar rows' live parts over the app's signals. Call it once, at module scope: the returned components keep their identity, so the rows' memo holds.

deleteProjectPromptFunction#

Confirms deleting every conversation of a project, archived ones included.

sessionMenuItemsFunction#

The conversation's menu rows.

spaceRowsFunction#

One row per space to move to; the one it is in is checked and can't be picked.

useArrivalFunction#

True while at (an arrival stamp, Date.now(); 0 for none) is under ARRIVAL_MS old. Read from the clock at render, so it is already true on the render that brings the arrival; a timer re-renders once it is over.

useCompactionProgressFunction#

The session's compaction in progress (what SidebarCompactingIndicator shows), null when none or no session.

useConfirmDeleteSessionFunction#

Delete a conversation once confirmed; the prompt says what goes with it (its environment).

useEnvironmentActionsFunction#

The environment's own commands (push, open PR), asked for while enabled (the menu is open on a ready environment): they depend on its live state.

useEnvironmentCommandsFunction#

Running an environment command (open what it returns, else say what happened) and setting a failed environment up again, worded through the labels and told with the provider's notify. Stable identities.

useMainSessionFunction#

Creates the Main when orchestration turns on and returns its opener.

usePinnedProjectsFunction#

The space's pinned project folders and a setter that persists them.

useProjectIconsFunction#

Icon map + setter, shared by every caller on the page.

useProjectSessionActionsFunction#

A project header's archive and delete: list the project's conversations in its space (archived ones too), confirm with the count, then act on them all.

useSaveViewAsSpaceFunction#

The filter menu's onSaveView over a directory's saveViewAsSpace: saves the shown view under the next free saved-view name; a failure (an invalid query, a settings write that failed) shows labels.saveViewFailed. undefined when save is.

useSessionActivityFunction#

What the session's run is doing, null when nothing of a run was seen (or it ended). An entry can outlive a run whose end was missed: show it only while the session is running.

useSessionBadgesFunction#

The session's badges, null until first read (asked for on first use).

useSessionDirectoryViewFunction#

Subscribe to a session directory.

useSessionMenuItemsFunction#

A conversation's menu rows for a surface that shows one session (the session header): the environment's commands are asked for while the menu is open, and the platform rows follow the SidebarHost.

useSessionSearchFunction#

The sidebar's search: the query, its title matches and its content matches.

useSidebarFrameFunction#

The frame's presence, width and drag.

useSidebarHostFunction#

The nearest SidebarHost; an empty host (every capability left out) outside a provider.

useSidebarKeyboardNavFunction#

Binds the sidebar's keyboard navigation.

useSidebarLabelsFunction#

The session sidebar: the list with its groups, rows, filters, search and spaces, and the pieces around it.

useSidebarNoticeFunction#

How the nearest SidebarHostProvider tells the user something.

Constants#

ARRIVAL_MSConstant#

How long a new commit or pull request reads as new (the badge pop, the row sweep).

ICON_PICKER_WIDTHConstant#

Width of the picker's popover — shared with other hosts of IconPicker (space icons).

Interfaces#

EnvironmentChipPropsInterface#

Props of EnvironmentChip.

IconPickerPropsInterface#

Props of IconPicker.

MainSessionRowPropsInterface#

Props of MainSessionRow.

NewSessionButtonPropsInterface#

Props of NewSessionButton.

ProjectChipPropsInterface#

Props of ProjectChip.

ProjectIconButtonPropsInterface#

Props of ProjectIconButton.

ProjectIconGlyphPropsInterface#

Props of ProjectIconGlyph.

RowProjectInterface#

A session's project, first on its badge line: a favorite has left its project group.

SessionDirectoryViewInterface#

The directory as the sidebar reads it: its state plus the shown space's filtered list and view.

SessionMenuActionsInterface#

What the rows do.

SessionMenuContextInterface#

What the menu knows beyond the conversation.

SessionMenuTargetInterface#

What the menu reads off the conversation.

SessionSidebarPropsInterface#

Props of SessionSidebar.

SidebarBadgeFocusInterface#

Where a badge's panel opens: the badge's kind and, for one row of its card, that artifact.

SidebarChipPropsInterface#

Props of SidebarChip.

SidebarChromeInsetInterface#

The space a window's native controls (macOS traffic lights) take at the sheet's top-left, as CSS lengths.

SidebarCollapsedStoreInterface#

A sidebar's collapsed state (createSidebarCollapsed).

SidebarCompactingIndicatorPropsInterface#

SidebarDecorationPropsInterface#

Props of SidebarDecoration.

SidebarFilterMenuPropsInterface#

Props of SidebarFilterMenu.

SidebarFooterPropsInterface#

Props of SidebarFooter.

SidebarFrameOptionsInterface#

What useSidebarFrame reads.

SidebarFramePropsInterface#

Props of SidebarFrame.

SidebarFrameStateInterface#

The frame's state, for SidebarFrame.

SidebarGroupHeaderPropsInterface#

Props of SidebarGroupHeader.

SidebarHostProviderPropsInterface#

Props of SidebarHostProvider.

SidebarKeyboardNavOptionsInterface#

What useSidebarKeyboardNav reads.

SidebarLiveInterface#

The live row parts createSidebarLive returns.

SidebarLiveOptionsInterface#

The app's live signals the rows read. Each use… member is a hook, called once per row that needs it.

SidebarProjectInterface#

A project's place: its folder and the space it is listed in.

SidebarProjectRefInterface#

A project folder as the sidebar names it: its path, and the server it is on (absent: this computer).

SidebarRowArtifactsPropsInterface#

Props of the badge line (SidebarLive.RowArtifacts).

SidebarRowHandlersInterface#

What a row does; one stable bag for every row of a list, so the rows' memo holds.

SidebarRowMetaPropsInterface#

Props of the trailing slot (SidebarLive.RowMeta).

SidebarRowSessionInterface#

A session as the sidebar's rows read it: the list's session plus where it runs when not here.

SidebarRowViewPropsInterface#

Props of SidebarRowView.

SidebarSearchRowPropsInterface#

Props of SidebarSearchRow.

SidebarSessionRowPropsInterface#

Props of SidebarSessionRow.

SidebarSettingsNoteInterface#

Something waiting in Settings: the gear's dot and its name.

SidebarSignInPromptPropsInterface#

Props of SidebarSignInPrompt.

SidebarSpaceSlideInterface#

The space switch that showed the list's space: the list slides that way.

SidebarToggleButtonPropsInterface#

Props of SidebarToggleButton.

SidebarUsageIndicatorPropsInterface#

Props of SidebarUsageIndicator.

SpaceGlyphPropsInterface#

Props of SpaceGlyph.

SpacesSectionPropsInterface#

Props of SpacesSection.

SpaceSwitcherPropsInterface#

Props of SpaceSwitcher.

Types#

BadgeCardPlacementType#

Where a row badge's card opens (SidebarRowArtifactsProps.cards).

SessionContentSearchType#

The host's content search; absent, only titles match.

SessionMenuSurfaceActionsType#

Which actions useSessionMenuItems needs from its surface; the environment rows come from the host.

SidebarHeaderRowType#

A group header row.