Commit Graph

4 Commits

Author SHA1 Message Date
Levi Neely ed74d421c3 gui: fix tool block rendering — use blockRenderedHtml directly
The Repeater-over-segments approach was failing to display tool output.
When a complete block arrives in one streaming chunk, QML's Repeater
with a var-typed model doesn't reliably re-render delegates on property
changes.

Fix: use a single TextEdit bound to blockRenderedHtml for all non-diagram
blocks. The Repeater path is retained only for blocks containing diagrams
(which need the Loader/component switching). This is simpler, more
reliable, and avoids the Repeater delegate lifecycle issues.
2026-08-09 12:09:42 +02:00
Levi Neely 022980bc40 gui: fix infinite layout loop in chat ListView
The delegate used a ColumnLayout root with parent-dependent width
fallbacks (: 0, : 100) causing two-pass layouts. Combined with
onContentHeightChanged -> positionViewAtEnd(), this created a
feedback loop: height change -> scroll -> refill -> new delegates ->
height change -> ... burning 100% CPU on the main thread.

Fixes:
- Replace onContentHeightChanged with onCountChanged + Qt.callLater
- Replace ColumnLayout root with plain Column
- Bind all child widths to root.width (top-down, no fallbacks)
- Create context Menu lazily on first right-click
- Add reuseItems: true to the ListView
- Standardize bin path to ~/.local/bin
2026-08-09 00:03:37 +02:00
Levi Neely 073cc2158b qml: fix binding loop in ChatBlockDelegate
Rename 'chatView' property to 'parentListView' to avoid name collision
with the ListView id, which caused QML binding loop warnings.
2026-08-07 17:49:26 +02:00
Levi Neely 2d6e0ed787 gui: extract dialogs and chat delegate into components
Phase 1 of GUI cleanup - component extraction:
- SettingsDialog.qml: theme and font settings (118 lines)
- NewSessionDialog.qml: session creation form (79 lines)
- NewAgentDialog.qml: agent creation form (174 lines)
- ChatBlockDelegate.qml: chat block with text/diagram segments (322 lines)

main.qml reduced from 1685 to 1030 lines (39% reduction).
Updated CMakeLists.txt for both Qt6 and KF5 builds.
2026-08-07 17:40:09 +02:00