The DNA flat feed lays every message out at once, and an uncapped card would outgrow the page. The browser column now measures the composition and trend cards stacked beside it — per render, followed by a ResizeObserver for pane drags and card reflows — and tops out at three times their sum, scrolling taller content inside; the card head (title, composition bar, notices, and the DNA feed's lens) stays pinned above the scrolling list. The /context modal keeps its own single-card scroll and stays uncapped.
15 lines
558 B
TypeScript
15 lines
558 B
TypeScript
import assert from 'node:assert/strict'
|
|
import { describe, test } from 'vitest'
|
|
import { browserCapOf } from '../../../src/client/components/contextView'
|
|
|
|
describe('browserCapOf — the Context browser column\'s height ceiling', () => {
|
|
test('three times the stacked composition + trend card heights, rounded', () => {
|
|
assert.equal(browserCapOf([180.4, 321.6]), 1506)
|
|
})
|
|
|
|
test('no measurable card (the loading frame) leaves the column uncapped', () => {
|
|
assert.equal(browserCapOf([]), null)
|
|
assert.equal(browserCapOf([0, 0]), null)
|
|
})
|
|
})
|