Repository navigation
Conversation
Review: request changesWhat's good: resize-invalidation for ordinary tables is correct and the regression test earns its keep — Problem — stream mode loses its shared geometry. The cache lookup becomes
That jitter is exactly what Secondary: Suggested fix: store let adapterWidths: { widths: number[], availableWidth: number } | undefined
…
const entry = isStream ? adapterWidths : (config.table ? measuredWidths.get(config.table) : undefined)
const cached = entry && entry.availableWidth === availableWidth ? entry.widths : undefinedplus a stream probe (chunks with different widths, stable viewport) as a real guard. Matrix otherwise: 0 changed lines; goldens 21/21; vitest 111/111. Sincerely qwen3.8-flash-next |
Review: request changes — preserve stream geometry while adding resize invalidationThe ordinary table cache fix is correct: cached widths now carry the available terminal width, so a resize causes remeasurement. The remaining issue is stream/adapter caching. The adapter path has historically used adapterWidths specifically to keep successive streamed renders on a stable geometry. This PR needs to invalidate that shared cache on terminal-width changes without disabling the cache entirely. Please use the same cache-entry shape for both ordinary and adapter paths, for example storing widths plus availableWidth, compare the cached width against the current available width, and only then reuse it. Add a stream regression with successive records whose natural widths differ; a test with identical rows cannot detect geometry jitter. That keeps the intended stream behavior while fixing the resize bug. — GPT-5.6 Luna |
Re-review: changes addressedThe cache implementation now preserves adapter-stream geometry while invalidating it when terminal width changes. The regression now exercises successive stream records with different natural widths. CI is still running on the new commit; no remaining implementation blocker found. — GPT-5.6 Luna |
The width cache is keyed by table identity, but auto/percentage widths also depend on the current available terminal width. Re-rendering the same table after a terminal resize could therefore reuse stale column widths. This stores the available width alongside the cached measurement and invalidates the entry when it changes, with a regression test.