Repository navigation
Chrome SessionRail
github-actions[bot] edited this page Nov 1, 2026
·
1 revision
The session list: the workspace header, the chats grouped under labelled headings, and a footer. This sheet also covers SessionRow (one chat in the list) and SessionGroup (the labelled run of chats in rail_model.dart).
import 'package:agent_kit/agent_kit.dart';
Column: the rail at 240 px wide, with grouped rows, a selected row, status marks and the footer.
Compact, 390 px: the same rail as a sliding screen. It is opened by the header's Sessions button and closes when a session is picked.
| Parameter | Type | Notes |
|---|---|---|
workspaceName |
String |
Required. The name in the header, and in the Switch project label. |
groups |
List<SessionGroup> |
Required. The chats, in groups. |
selectedId |
String? |
The selected chat's id. The row is drawn selected. |
detailFor |
String? Function(ChatSummary chat)? |
Returns the detail line for a chat's row. |
now |
DateTime? |
The clock for row ages. |
initials |
String |
Default ''. Initials for the avatar. |
onSelect |
ValueChanged<ChatSummary>? |
Called when a row is tapped. The compact screen closes after it. |
onNewChat |
VoidCallback? |
The New session button. |
onSearch |
VoidCallback? |
The Search button. |
onSwitchWorkspace |
VoidCallback? |
The workspace button. |
onSettings |
VoidCallback? |
The Settings button. |
onHide |
VoidCallback? |
The Hide sidebar button. |
hasMore |
bool |
Default false. Shows the load-more row at the end of the list. |
loadingMore |
bool |
Default false. The load-more row shows its loading label and ignores presses. |
loadMoreFailed |
bool |
Default false. The load-more row shows its failure label and offers another try. |
onLoadMore |
VoidCallback? |
Called by the load-more row. |
| Parameter | Type | Notes |
|---|---|---|
label |
String |
A heading such as "Today" or "Earlier". |
chats |
List<ChatSummary> |
The chats in the group. |
| Parameter | Type | Notes |
|---|---|---|
chat |
ChatSummary |
Required. The chat: its title and status. |
detail |
String? |
The meta line. |
selected |
bool |
Default false. Draws the selected background and the edge bar. |
onTap |
VoidCallback? |
Tap callback. |
BbTheme roles read in session_rail.dart:
-
rail,railHover,railSelected,railInk,railMuted,railLine -
accent(the avatar background when no moss space colour is found) -
colors.bgPrimary,colors.textPrimary(the avatar text) -
dangerInk(the failed load-more label) -
radii.ctl,typeScale.ui,brightness,formFactor - The row's status mark uses
status(BbStatusStyleperChatStatus) throughStatusMark.
- Compact (
scope.sizeClass.isCompact, below 600 px): the rail is the sliding screen opened from the header's Sessions button.select()setsscope.controller.open = false, so the screen closes after a pick (session_rail.dart:96). - Medium and expanded: the rail is the 240 px column (
Layout.sidebarWidth, see RailLayout). - The Search button's shortcut hint is shown when
formFactor != FormFactor.mobile(session_rail.dart:431), and the Search button's hint isCtrl KthroughcommandKeyHint.
- Button labels (tooltips and semantics):
New session(rail-new-chat),Hide sidebarwith shortcut Ctrl+B (rail-hide),Switch project, <name>(rail-workspace),Searchwith hint Ctrl K (rail-search),Settings(rail-settings). - Load-more row (
rail-load-more):Loading older sessions…while loading,Could not load older sessions. Try againafter a failure,Show older sessionsotherwise. Presses are ignored while loading. - A selected row has a 3 px
railInkedge bar and a title in weight 700 (unselected 500) (SessionRow). - Row keys:
rail-row-<chat id>.
- Gallery scene: the Components scene (
apps/gallery/lib/src/components_scene.dart). Specimens:ChromeSpecimensinapps/gallery/lib/components/chrome.dart(the 240 px column is the first frame; the 390 px sliding screen is_SlidingRail). - Golden shots:
apps/gallery/test/component_shots_test.dartwritessession_rail_column(SessionRail 0) andsession_rail_compact(SessionRail 1) toapps/gallery/test/goldens/shots/.scenes_golden_test.dartcovers the sheet ascomponents_1000_light.pngandcomponents_1000_dark.png. -
packages/agent_kit/test/chrome/chrome_test.dart, groupSessionRail: groups, rows with status meta and the footer; the load-more row; "says it is loading and ignores presses meanwhile"; "after a failure the row offers another try"; and the compact sliding screen. -
packages/agent_kit/test/chrome/chrome_golden_test.dart:chrome_rail_<brightness>.png,chrome_rail_more_<brightness>.pngandchrome_rail_compact_390_<brightness>.pnginpackages/agent_kit/test/goldens/. -
packages/agent_kit/test/chrome/chrome_test.dart(groupcommand key hints) covers the hint text.
Generated from docs/components/chrome/SessionRail.md. Edit the file there; changes made on the wiki are overwritten.
Guides
- Package layout and pinning
- agent_kit_core
- Backend mapping
- agent_kit and the gallery
- Icon and README assets
Component sheets
theme
status
transcript
- ActivityGroupView
- AssistantProse
- ChildQuestionRow
- CodeBlock
- DiffView
- ExecOutput
- FileEditRow
- PlanChecklist
- ReturnLine
- SystemLineView
- TranscriptList
- UserBubble
composer
chrome
context
history
outline
workspace
compositions
providers