Skip to content

feat(tui): configure loaded message window - #348

Merged
brentyates-swx merged 4 commits into
swxtchfrom
fm/opencode-msg-window-65
Oct 23, 2026
Merged

brentyates-swx merged 4 commits into
swxtchfrom
fm/opencode-msg-window-65

Conversation

@brentyates-swx

@brentyates-swx brentyates-swx commented Oct 23, 2026 •

Copy link
Copy Markdown

Summary

Expose message_window through TUI configuration and resolve omission to the existing default. Use the effective value for per-session message fetch, hydration reconciliation and part cleanup, and live-update trimming. Larger windows retain more transcript content in memory. Recall-backed prompt search remains independent of the loaded window.

Review round 1

  • Supply the resolved TUI config provider in the attached-TUI harness; both supervised-question and supervised-permission recovery cases pass.
  • Add a production-SyncProvider live-growth case from below the old cap to a total still within the configured window. It asserts that an older message and its part remain retained. Reverting only the live threshold to > 100 makes this regression fail within its bounded wait; restoring the configured threshold passes.
  • Keep the setting documentation user-facing and give the rendered-scroll test its own timeout.
  • Merge current origin/swxtch at 774d90c7fb, including the Add Vue LSP and enable eslint for .vue files. anomalyco/opencode#1952/fix(core): load env-supplied config in V2 config #347 config-loader changes.

Validation

  • TUI sync-hydration file: bun test --timeout=30000 test/cli/cmd/tui/sync-live-hydration.test.tsx (8 passed).
  • Attached TUI: focused question and permission cases in test/cli/serve/serve-questions-sync.test.tsx both passed.
  • The configured rendered-scroll case passed with its test-level timeout when run directly; recall, session-isolation, and Ctrl+E cases also pass individually.
  • bun typecheck passes from packages/tui and packages/opencode.

Closes #65

Plan:
- Add a positive TUI message_window setting, resolved to 100 when omitted and loaded from tui.json.
- Use the resolved value for per-session message fetch, hydration reconciliation and part eviction, and live-update retention.
- Test config schema/resolution and file loading; test configured fetch, hydration overlap, reload, live retention, and rendered scroll access beyond 100 messages.
- Preserve recall-backed search outside the loaded transcript, document the setting and memory trade-off, then run focused tests and package typechecks.
@brentyates-swx

Copy link
Copy Markdown
Author

Session ID: unknown
Working repo: /home/byates/fm-worktrees/fm-llmrouter/opencode-msg-window-65/swx-opencode

@brentyates-swx
brentyates-swx marked this pull request as ready for review October 23, 2026 16:23
@brentyates-swx
brentyates-swx marked this pull request as draft October 23, 2026 16:33
@brentyates-swx
brentyates-swx marked this pull request as ready for review October 23, 2026 17:28
@brentyates-swx
brentyates-swx merged commit 8fbeeb5 into swxtch Oct 23, 2026
3 checks passed
@brentyates-swx
brentyates-swx deleted the fm/opencode-msg-window-65 branch October 23, 2026 17:29
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.

tui: make the per-session message window (hard-coded 100) configurable

1 participant