Skip to content

fix(timeline): the row above a divider holds the room over its words (opencode#66014) - #1178

Merged
Hona merged 1 commit into
devfrom
row-shift/up-223-dividers
Nov 25, 2026
Merged

Hona merged 1 commit into
devfrom
row-shift/up-223-dividers

Conversation

@Hona

@Hona Hona commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

The remainder of official anomalyco/opencode#66014, after #1160: dividers.

Fault: a divider (a switched agent or model, a moved session, a compaction, Interrupted) took the room over its line from the row before it: 16 under a reply, 6 under another divider, none under a prompt. A divider that was the first loaded row therefore changed when an older page landed above it, and the rows under it moved.

Official: a divider is a row like any other. rowBlock gives it a block (packages/session-ui/src/timeline-next/spacing.ts:103-107), and timelineGaps gives the gap over it to the row before (spacing.ts:46-47: gaps.set(TimelineRow.key(rows[index - 1]!), …)).

Change: the row above a divider holds the room over the divider's words, with the room it already holds for the row below.

/// Who holds the room over a divider's words.
pub enum Over {
    /// The divider: it starts the session, and nothing loads above it.
    Own,
    /// The row above it, under what that row shows.
    Above,
    /// Nobody yet: older messages are still to load above it, and the row that lands there will.
    Waiting,
}
  • dividers::stack / stack_at tell each divider who holds that room and tell the row above what the divider stands beside (RowSpec::divider); the row's wrapper adds it to its bottom room.
  • The first row with history still to load above is Waiting: no room over its words until the row above arrives with it.
  • The sizes are the same as before (16, 6 with the default divider gap, 0), so the picture at rest does not change.
  • An open compaction summary's header still covers the room over its words when it is stuck to the top: it reaches up into the row above's room.

Run (headless, 1280x800, scale 1): a session whose first loaded row is a divider (the agent switched back) with another divider (the agent switched) right above it in the older page; the reader is at the top of the loaded history; the older page is held 3 s, then lands.

dev: page held dev: page landed this PR: page held this PR: page landed
the first loaded row (a divider) y 101, h 48 y 101, h 38 y 101, h 32 y 101, h 32
the four rows under it y 149, 244, 295, 390 y 139, 234, 285, 380 y 133, 228, 279, 374 y 133, 228, 279, 374
  • On dev every row under the divider moves up 10 px when the page lands. Here no row moves.
  • At rest the picture is the same: 14 fixture sessions drawn by the base build and by this PR's build differ in 0 pixels.
    Not from official: the open compaction summary's stuck header is this app's own; official's does not stick.

…(opencode#66014)

A divider (a switched agent or model, a move, a compaction, Interrupted) took the room over its line from the row before it, so a divider that was the first loaded row changed when an older page landed above it and moved the rows under it. The row above now holds that room, as it holds every other room between two rows.
@Hona
Hona marked this pull request as ready for review November 25, 2026 09:49
@Hona
Hona merged commit 312f8b1 into dev Nov 25, 2026
7 checks passed
@Hona
Hona deleted the row-shift/up-223-dividers branch November 25, 2026 09:50
Hona added a commit that referenced this pull request Nov 25, 2026
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.

1 participant