Skip to content

feat: make render window configurable via tui.renderWindow - #858

Merged
avoidwork merged 7 commits into
mainfrom
fix/enforce-message-cap-at-data-layer
Aug 23, 2026
Merged

feat: make render window configurable via tui.renderWindow#858
avoidwork merged 7 commits into
mainfrom
fix/enforce-message-cap-at-data-layer

Conversation

@avoidwork

@avoidwork avoidwork commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Description

Makes the message render window configurable via tui.renderWindow in config.yaml (default: 100). Removes the hardcoded MAX_RENDER_MESSAGES constant from src/tui/messageList.js and threads the renderWindow prop through AppConversationPanelMessageList. The data layer stores all messages without a cap; the render window keeps the React tree bounded while the ScrollView handles full conversation history scrolling.

Type of Change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor (no functional changes)
  • Performance improvement
  • CI / build / tooling

Testing

  • Unit tests updated (tests/unit/tui.test.js, tests/unit/messageListApi.test.js)
  • Pre-commit hook passes (lint, format, tests, coverage)

Coverage

  • Line coverage maintained

Checklist

  • npm run lint passes
  • Tests pass with maintained line coverage
  • No forbidden patterns used
  • Conventional Commit style applied

Closes #856

Remove the MAX_RENDER_MESSAGES constant and data-layer message cap.
The data layer now stores all messages without restriction. The render
layer uses a local renderWindow variable (100) to keep the React tree
bounded — only the last N messages are rendered as bubbles. Pub/sub
topics for messages outside the render window are pruned to keep
memory in check.

Breaking: removed exported MAX_RENDER_MESSAGES constant from
messageList.js. The render window is now a local implementation detail.
@avoidwork avoidwork self-assigned this Aug 23, 2026
Add tui.renderWindow config option (default 100) that controls how
many messages are rendered as bubbles in the conversation panel.
The data layer stores all messages unrestricted; the render window
is a virtual view layer optimization.

Config flow: config.yaml → TuiSchema → app.js → ConversationPanel → MessageList

Users can now tune the render window size without touching code:
  tui:
    renderWindow: 200
@avoidwork avoidwork changed the title refactor: remove message cap, use virtual render window feat: make render window configurable via tui.renderWindow Aug 23, 2026
The renderWindow value flows through the full config chain:
config.yaml → TuiSchema → app.js → ConversationPanel → MessageList.
The destructuring default was redundant and misleading.
The renderWindow value flows through the full config chain:
config.yaml → TuiSchema → app.js → ConversationPanel → MessageList.
The destructuring default was redundant and misleading.
@avoidwork
avoidwork merged commit 2d7c992 into main Aug 23, 2026
2 checks passed
@avoidwork
avoidwork deleted the fix/enforce-message-cap-at-data-layer branch August 23, 2026 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: conversation panel drops new messages when list exceeds 100

1 participant