Skip to content

Virtualize the native Qt conversation view - #75

Merged
VolkerChristian merged 39 commits into
masterfrom
codex/qt-virtualized-conversation-view
Sep 11, 2026
Merged

VolkerChristian merged 39 commits into
masterfrom
codex/qt-virtualized-conversation-view

Conversation

@VolkerChristian

Copy link
Copy Markdown
Member

Summary

  • replace the conversation-wide QWidget/layout hierarchy with a thin NodeGraph-backed QAbstractListModel and a narrowly customized QAbstractItemView
  • preserve stable NodeRef targeting and emit precise insert, remove, move, and row-local data-change notifications
  • use a logarithmic variable-height index, exact pixel anchoring, atomic structural staging, and bounded direct-tail insertion
  • delegate-paint passive rows while retaining real viewport-bounded widgets for selection, Markdown interaction, links, images, command output, folding, focus, and other rich controls
  • preserve the existing two-thread, shared-NodeGraph, typed-SPSC/eventfd, and direct CodexBridge boundaries
  • include narrow follow-up fixes for recursive outside-text mouse forwarding and first-child active-turn border growth

Performance

The production Debug benchmark runs under Xvfb/xcb in a 900 x 700 viewport with 240 scroll positions.

Rows Old reveal New reveal Old descendants New descendants Old sweep New sweep
320 733 ms 16 ms 4,209 8 329.7 ms 260.2 ms
1,280 4,040 ms 25 ms 16,809 8 325.2 ms 278.1 ms
10,000 not safely run 97 ms about 131,000 extrapolated 8 not run 355.9 ms

At 1,280 rows, initial reveal is approximately 162 times faster and peak resident memory is approximately 70 percent lower. Ten thousand passive rows create zero ConversationCard widgets. Bounded tail append takes 1.44 to 1.73 ms across 320 to 10,000 rows with zero model-index and section-range rebuilds.

A fresh post-fix spot check measured 7/16/96 ms reveal and 0.320/0.318/0.314 ms tail append at 320/1,280/10,000 rows.

Validation

  • persistent incremental Debug build succeeds
  • latest native suite passes 19/19
  • ASan/UBSan migration suite passes 19/19
  • supported NodeGraph/queue/worker TSan suite passes 5/5
  • WebUI release qualification passes 83/83 plus profile, production build, browser checks, and relocatable artifact verification
  • deterministic 10,000-row model/view, anchoring, offscreen-work, interaction, and event-loop regressions pass
  • full application exercised against an isolated persistent CodexBridge/app-server under Xvfb
  • recordings cover long selection, paging, scrolling during streaming and command completion, steering, approvals, input requests, selection/copy, folding, focus, and direct-tail arrival
  • git diff --check passes

Detailed architecture, ownership, behavior matrix, measurements, and recording inventory are in docs/qt-virtualized-conversation-view.md.

- restore and wire thread sorting with fast background reconciliation
- add quick and configurable forks with stable numbered names
- preserve thread names, activity state, prompt newlines, and turn ordering
- improve thread metadata presentation and remove redundant refresh control
- stabilize command output sizing and follow-tail behavior
- make Markdown selection and Ctrl+C reliable
- extend native and browser parity coverage and documentation
Coalesce width-dependent conversation reflow during splitter drags while updating panel and card widths immediately. Keep off-screen row heights lazy, preserve scroll anchoring and follow-tail state, and perform one exact settlement on release. Add virtualization and shell integration coverage and document the behavior.
@VolkerChristian
VolkerChristian merged commit a7c3a6d into master Sep 11, 2026
2 checks passed
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