Commit Graph

308 Commits

Author SHA1 Message Date
Levi Neely d01d7c8ad8 gui: add session connection status indicator
- Add colored dot to session rows showing tool server RPC status:
  green=connected, yellow=paused+connected, gray=paused, red=broken
- Remove vestigial agent.connected from model (was never displayed)
- Session-level connected status is the correct granularity
2026-08-05 08:35:43 +02:00
Levi Neely 9f3f962567 Remove sidebar state dot indicators 2026-08-04 16:33:21 +02:00
Levi Neely dbc1eabf55 gui: revert to working approach - activeState for selected agent only
Non-selected agents show idle (green). This matches the working
top indicator approach until we find a proper solution for tracking
all agent states reactively in QML.
2026-08-04 16:26:32 +02:00
Levi Neely 9929abc73b gui: use Connections to update agent state on revision change 2026-08-04 16:24:57 +02:00
Levi Neely 670d759769 gui: use revision inside binding expression for proper dependency tracking 2026-08-04 16:24:10 +02:00
Levi Neely 22980e376a gui: track all agent states via revision counter for proper QML binding
- Add agentStateRevision property that increments on any state change
- QML binds to revision to trigger re-evaluation of agentState() calls
- All agent dots now show correct live state, not just active agent
2026-08-04 16:23:04 +02:00
Levi Neely 1d79d0ee89 gui: agent tree dot uses ollie.activeState directly for active agent 2026-08-04 16:19:33 +02:00
Levi Neely dbd2606ed2 gui: agent tree dot uses ollie.agentState() like top indicator 2026-08-04 16:18:42 +02:00
Levi Neely 457a6a55dc gui: use explicit properties for agent state dot binding
Create agentState and isPaused properties to ensure proper binding
updates when model roles change via setProperty
2026-08-04 16:17:11 +02:00
Levi Neely 9e5352f700 gui: fix agent state dot colors and parentPaused propagation
- Update parentPaused on agents during incremental session updates
- Set parentPaused and parentExpanded when inserting new agents
- Update session paused property during updates
- Use explicit === true check for parentPaused
2026-08-04 16:15:40 +02:00
Levi Neely 3d739a9560 gui: gray indicators and 'inactive' label for paused sessions
- Agent dots in tree are gray when parent session is paused
- Top state indicator is gray when viewing agent in paused session
- Top state label shows 'inactive' instead of agent state when paused
2026-08-04 16:13:04 +02:00
Levi Neely 2b19cafc50 gui: show disconnected state visually, remove session connected/ended messages
- Session list shows '(not connected)' when daemon disconnected
- Chat area shows 'Not connected' placeholder when disconnected
- Message input disabled and shows 'Not connected' when disconnected
- Chat ListView hidden when disconnected
- Remove sessionConnected/streamingDone signals (visual feedback is sufficient)
2026-08-04 16:11:39 +02:00
Levi Neely b4ae887089 ninepconnection: emit disconnected when leaving Connected state
Previously disconnected was only emitted when entering Disconnected state,
not when transitioning Connected->RetryWait. This caused Lib9pClient to
keep a stale handle when olliesrv restarted, preventing reconnection.
2026-08-04 16:07:26 +02:00
Levi Neely 22302ce9f1 gui: session tree with Active/Paused groups, arbitrary-depth expand/collapse 2026-08-04 16:05:08 +02:00
Levi Neely 265a1fdda9 refactor: promote remote to session level, remove agent connectivity, formalize NinePConnection state machine
- Add createSession(name, remote) with New Session dialog
- Remove agent connectivity code (redundant with session connectivity)
- Refactor NinePConnection as formal state machine with explicit events
- Fix silent restart to not cycle through Connecting state
2026-08-04 15:22:08 +02:00
Levi Neely ec89eaae18 fix: always send stop on ESC regardless of cached state
Removes the activeState !== 'idle' check before sending the stop
command. The server-side Interrupt() is safe to call on an idle
agent (returns false, no-op).

This fixes an intermittent issue where pressing ESC wouldn't stop
the agent because the GUI's cached activeState was stale/out-of-sync
with the server's actual state.
2026-08-04 11:51:01 +02:00
Levi Neely 9d059943f2 cleanup: remove debug logging 2026-08-03 20:43:16 +02:00
Levi Neely 3fd13c6d38 fix: use state role directly for binding updates
model.state doesn't trigger binding re-evaluation in Qt5 delegates.
Using the implicit role 'state' directly does.
2026-08-03 20:31:17 +02:00
Levi Neely 1d0fb99501 targeted state dot updates in render path
- onAgentStateChanged: update specific agent in model instead of version bump
- State dot: use model.state directly instead of ollie.agentState() callback
- Remove ollie.isSessionPaused() call (was O(n) iteration per agent)
- Remove unused agentStateVersion property

Before: 1 state change → re-evaluate ALL agent dots → N * ollie.agentState() calls
After:  1 state change → setProperty on 1 model item → 1 binding update
2026-08-03 20:29:38 +02:00
Levi Neely 2d373b4bfb fast path for active agent state changes
- Check if event is for active agent FIRST using QStringView comparison
- Active agent: compare payload directly against m_activeState (no hash lookup)
- Non-active: use iterator find() to avoid double hash lookup

For the most common case (active agent state change), this reduces
the hot path to: QStringView compare → QString convert → direct compare
2026-08-03 20:27:45 +02:00
Levi Neely 8792539bcc optimize handleEvent() hot path
- Use QStringView to avoid string allocations during parsing
- Use QLatin1String for comparisons (faster than QString)
- Manual indexOf parsing instead of split('.') allocation
- Early return for non-session events

Reduces allocations in the agent.state hot path from ~7 QStrings
to 4 (only when state actually changes and needs to be stored).
2026-08-03 20:22:18 +02:00
Levi Neely 249a19e261 single-pass session parsing
Consolidate refreshSessions() to do everything in one iteration:
- Parse session/idx data
- Update m_agentConnected cache
- Track active session/agent existence
- Emit connection state change

Eliminates separate reconcileAgentConnections() call and second loop
to check active session/agent. O(n) instead of O(3n).
2026-08-03 20:16:07 +02:00
Levi Neely 57b3ce04e3 eliminate C++ calls in QML update loop
- computeConnectionColor() in QML instead of ollie.sessionConnectionColor()
  (avoids O(n²) iteration through sessions list)
- Use agent.state from session/idx data directly instead of ollie.agentState()
  (avoids hash lookup per agent per update)

All data now flows from session/idx through m_sessions to QML with no
callbacks into C++ during the update loop.
2026-08-03 20:13:32 +02:00
Levi Neely 8a3d52965e remove per-agent connection polling
Agent connection state is now derived from session.connected in session/idx,
updated via refreshSessions(). No longer spawns N processes for N agents.

- Remove m_agentConnections hash and per-agent NinePConnection instances
- Remove readAgentRecords() (dead code - agents come from session/idx)
- reconcileAgentConnections() now just updates m_agentConnected from m_sessions

This eliminates one ollie-9p process per agent, leaving only:
- 1 daemon eventwait stream (for all events)
- 1 chat stream (for active agent only)
- 1 state stream (for active agent only)
2026-08-03 20:10:49 +02:00
Levi Neely 0e9a7016a3 native 9P client via libollie9p
Replace subprocess spawning (run9p) with native 9P connection for hot paths:
- refreshSessions() - called on every sessionsChanged event
- loadRootBackends() - called on daemon connect
- loadRootAgents() - called on daemon connect

Lib9pClient wraps the Go shared library with a Qt-friendly C++ API.
Connection persists across operations, eliminating ~2-5ms per-call
process spawn overhead.

Requires libollie9p.so from parent repo's lib9p/ package.
2026-08-03 20:04:17 +02:00
Levi Neely 24921e7a2b incremental session tree updates
Instead of clearing and rebuilding the entire session tree model on
every sessionsChanged signal, diff old vs new and:
- Update existing session/agent properties in place
- Remove deleted sessions/agents
- Append new sessions/agents

This avoids O(n) model rebuilds that cause ListView to re-render all
delegates, improving responsiveness with many sessions.
2026-08-03 19:51:54 +02:00
Levi Neely 0c93414251 optimize QML rendering performance
- Remove console.log statements from hot paths
- Add sessionExpandedCache for O(1) expanded state lookup
- Replace O(n) parentSessionExpanded() loop with cache lookup
- Preserve expanded state across session tree rebuilds
2026-08-03 19:29:45 +02:00
Levi Neely 8e8466d4ef optimize session refresh with pubsub delta events
- Parse new session/idx format with all data in one read:
  name, id, paused, connected, cwd, backend, model, agents
- Handle delta events from eventwait instead of full refresh:
  - session.{sid}.agent.{aid}.state -> update cache, emit signal
  - Structural changes (new/kill/pause/resume) -> full refresh
- Remove per-agent statewait streams (eliminated N processes)
- Single eventwait stream handles all events via pubsub

This eliminates O(sessions * agents) synchronous reads per refresh,
replacing them with one read + incremental delta updates.
2026-08-03 19:17:40 +02:00
Levi Neely eedee30332 session pause/resume UI
- Add Pause/Resume toggle to session context menu
- Gray agent dots when parent session is paused
- Disable input field with 'Session paused' placeholder when paused
- Preserve focus on prompt input during tree rebuilds
2026-08-03 18:36:18 +02:00
Levi Neely 453cef397f live agent state indicators in session tree
- Add per-agent statewait streams to track execution state
- Agent dots show: green=idle, orange=calling, blue=thinking
- Session dots show RPC connection health (unchanged)
- Use version counter pattern to force QML binding re-evaluation
2026-08-03 18:30:14 +02:00
Levi Neely 6210fccf30 feat: session color reflects RPC connection health
- Green: connected and not paused (healthy)
- Gray: paused (intentional)
- Red: not paused but disconnected (crashed/broken)
- Yellow: paused but still connected (zombie)
2026-08-03 18:14:03 +02:00
Levi Neely 566aeddecc feat: show paused sessions as gray, add agent count to session name
- Fetch paused status from session/{id}/paused file
- Gray dot indicator for paused sessions (green otherwise)
- Session names now show agent count: 'ollie (2)'
- Fixed rename to use baseName for sessions (without count suffix)
2026-08-03 18:12:01 +02:00
Levi Neely 22a2208526 fix: show error dialog and reset name when rename fails
commitRename now checks the return value from renameSession/renameAgent.
On failure, resets displayName to the old value and shows an error dialog
explaining the rename failed (e.g., name already in use).
2026-08-03 17:53:38 +02:00
Levi Neely 0c47e1163a fix: clear active agent when killed, stop statewait loop
refreshSessions now checks if the active session/agent still exist after
updating the list. If the agent was killed, clears m_agentId and stops
streams. The statewait guard will then return false, stopping the loop.
2026-08-03 17:51:15 +02:00
Levi Neely 414143955f fix(gui): improve multi-agent-per-session handling
Session selection now auto-selects first agent:
- Clicking a session row selects its first agent (not just the session)
- Auto-select at startup now picks first agent of first session
- Fixes issue where clicking session would clear agent and show empty chat

Improved UI feedback:
- Header shows 'Session / Agent' name instead of just state
- State indicator gray when no agent selected
- Placeholder message when no agent selected: 'Select an agent to view chat'
- Chat ListView hidden when no agent (shows placeholder instead)
- Input already disabled with 'No agent' placeholder (existing behavior)

Cleanup:
- Remove dead declaration reconcileAgentConnections(const QVariantList&)
2026-08-03 17:42:05 +02:00
Levi Neely 28de16dbf1 fix(gui): rewrite chat block rendering for proper syntax highlighting
Reworked ChatBlockModel to fix syntax highlighting issues:

- Replace regex-based renderMarkdown() with line-by-line fence parsing
- Code fences detected by ```lang (open) and ``` alone (close)
- Prose wrapped in <div> with explicit palette text color
- Code blocks syntax highlighted with KSyntaxHighlighting

HtmlHighlighter improvements:
- Add defaultColor for unhighlighted text spans
- Track offset to emit gaps between highlighted tokens
- Add endLine() to flush trailing unhighlighted content

Remove TextEdit color property that was overriding inline styles in Qt5.
2026-08-03 16:16:43 +02:00
Levi Neely 7c347ff6c1 fix(gui): remove TextEdit color property for syntax highlighting
Qt5's TextEdit 'color' property can override inline styles from RichText,
breaking syntax highlighting colors. Remove the property so inline color
spans from KSyntaxHighlighting are respected.

Default text color should come from the application palette.
2026-08-03 16:07:43 +02:00
Levi Neely 21baea8691 fix(gui): add retry backoff for agent connections
Agent connections were using retryMs=0, causing a tight loop when the
/connection file read failed (e.g., toolsConn nil). The loop was:
  connection fails → disconnected signal → refreshSessions →
  reconcileAgentConnections → new connection → fails immediately → repeat

Fix by:
- Add maxRetries parameter to NinePConnection::start()
- Use 5s retry interval with max 3 retries for agent connections
- Reset retry count on successful connection
2026-08-03 16:02:59 +02:00
Levi Neely 8a0a5e6ff9 gui: fix Tread/Tclunk spam after session kill
Three fixes:
1. Disconnect signals before stopping removed connections in
   reconcileAgentConnections — prevents disconnect->refresh loop.
2. Clear m_activeSessionId/m_agentId when killing the active
   session — guard function returns false, statewait stream stops.
3. Same disconnect-before-stop in stopAgentConnections.
2026-08-03 12:28:40 +02:00
Levi Neely 0352d3a046 gui: disable retry on agent connections, let reconcile manage lifecycle
Agent connections no longer retry on their own. When an agent is
killed, the connection goes to Disconnected and stays there.
reconcileAgentConnections (triggered by refreshSessions) is the
sole authority for creating/removing connections.

For the happy path (probe returns normally), the connection
immediately re-probes without a timer delay.
2026-08-03 11:33:41 +02:00
Levi Neely 379afd81bf gui: refresh on agent disconnect instead of showing red
When an agent connection drops (killed or server restart), refresh
the session model from idx rather than immediately marking the
session as disconnected. This avoids a transient red indicator
when an agent is killed but the session is still alive.

The daemon disconnect handler (server down) still correctly marks
everything as disconnected.
2026-08-03 11:31:02 +02:00
Levi Neely c25bb2870c gui: remove dead createSession method 2026-08-03 10:43:09 +02:00
Levi Neely 3fd7907359 gui: show error and keep dialog open on agent creation failure
Change createAgent to return error string (empty=success).
Replace standardButtons with custom footer so dialog stays open
on error, showing the message and letting the user adjust values.
2026-08-03 10:41:32 +02:00
Levi Neely e4c702a691 gui: use immutable ID aliases in 9P paths
Connection monitoring and all 9P operations now use immutable
session/agent UUIDs in paths instead of mutable display names.
The server resolves these via the new Aliases mechanism in findChild.

This fixes the disconnected-indicator bug after session rename:
connections no longer go stale when names change.

Removed dead sessionNameForId/agentNameForId helpers and the
m_agentConnectionPaths tracking (unnecessary with stable paths).
Rename operations no longer restart streams.
2026-08-03 09:40:44 +02:00
Levi Neely 0f51c83f24 gui: rename 'Alias' to 'Name' in new agent dialog 2026-08-03 09:22:08 +02:00
Levi Neely 84fb53332c gui: separate session and agent creation, add agent context menu
- '+' button now creates an empty session directly (no dialog)
- Dialog becomes 'New Agent' (session name field removed)
- Session context menu: 'New Agent...' + 'Kill Session'
- Agent context menu: 'Kill' (writes kill to agent ctl)
- New C++ methods: createQuickSession(), createAgent(), killAgent()
2026-08-03 09:16:00 +02:00
Levi Neely 042f287796 gui: resolve session/agent names from IDs before building 9P paths
killSession, renameSession, readLogForSession, getAgents, and
renameAgent were using immutable IDs directly in paths like
session/{id}/ctl. The 9P namespace uses the mutable display name
as the directory key, not the ID. Use sessionNameForId() and
agentNameForId() consistently (matching agentPath()).
2026-08-03 09:09:49 +02:00
Levi Neely 34d4a97b3d gui: complete KF5 build with full feature parity
- Add chatblockmodel.cpp and thememanager.cpp to KF5 GUI target
- Link KF5::ConfigCore and KF5::SyntaxHighlighting to GUI
- Strip Qt6-only grouped palette syntax from QML at configure time
  (ThemeManager::applyPalette handles palette via QGuiApplication)
- Fix QStringList brace-init ambiguity in Qt5
- Fix QList::remove(pos,count) not available in Qt5 (use erase)
2026-08-03 09:03:12 +02:00
Levi Neely 7cb809fad2 revert all system-user-interruption changes 2026-08-03 00:41:49 +02:00
Levi Neely 64883cf9b8 Revert "render system-user-interruption as styled yellow box in prose"
This reverts commit 4e455e2dd3.
2026-08-03 00:39:34 +02:00
Levi Neely 4e455e2dd3 render system-user-interruption as styled yellow box in prose 2026-08-03 00:38:01 +02:00
Levi Neely e08b69c152 fix build: replace-with-lambda requires Qt 6.5+, use manual global-match loop 2026-08-03 00:32:26 +02:00
Levi Neely 1fdae741c3 render system-user-interruption as a styled yellow box with warning icon 2026-08-03 00:31:08 +02:00
Levi Neely cf4313165b fix fence close regex: only match backtick on its own line 2026-08-03 00:27:25 +02:00
Levi Neely b841f556d4 gui: preserve newlines in plaintext blocks 2026-08-03 00:24:52 +02:00
Levi Neely 4dabab1f71 fix connection dot indicators 2026-08-02 23:59:28 +02:00
Levi Neely 41f95e84c2 session ended as disconnect signal 2026-08-02 23:51:40 +02:00
Levi Neely b50a2e01b2 fix source block rendering 2026-08-02 23:48:00 +02:00
Levi Neely 6e7245dd99 connection statuses 2026-08-02 23:35:14 +02:00
Levi Neely c983e2bb6a simplify rendering 2026-08-02 22:43:11 +02:00
Levi Neely 220adf9b05 Fix session and agent rename handling 2026-08-02 22:34:39 +02:00
Levi Neely bd78b2b703 duplicate param 2026-08-02 22:10:31 +02:00
Levi Neely 753467db5b fix: preserve pre-fence text and post-fence content in rendered blocks
When a fence () closes inside a block, prepend any content
that came before the fence to renderedHtml so both text and the
highlighted fence show up. When content is appended after the fence,
keep renderedHtml in sync by appending the escaped text. This prevents
the fence from 'eating' surrounding content.
2026-08-02 11:13:22 +02:00
Levi Neely 67b33f95d2 refactor: StreamFsm lifecycle + chatblock model FSM fix
- Introduce StreamFsm class wrapping QProcess lifecycle with
  Oneshot/Looping/Guarded restart policies
- Replace raw QProcess management in Ollie9pClient with StreamFsm
- Fix chatblockmodel FSM to properly handle [[[end]]] and fence
  transitions with a combined State enum (Outside/InBlock/InFence)
- Add Q_INVOKABLE to setActiveSessionId for direct QML access
- Add streamfsm.cpp to CMakeLists.txt for both KF5 and KF6 builds
2026-08-02 11:11:05 +02:00
Levi Neely bfac41b2ae gui: update eventwait to use new global /eventwait with structured events
- Changed path from session/eventwait to /eventwait (global, not per-session)
- Use ollie-9p instead of plan9port 9p for the read
- Changed from parsing full session index to just calling refreshSessions()
  on any event (the event format is now structured deltas, but the GUI
  is kept simple with a full index refresh)
2026-08-02 10:25:10 +02:00
Levi Neely cd7bb9e272 gui: stop validating statewait via agent directory listing
startStateStream now trusts the explicit session/agent selection and
opens session/<sid>/agent/<aid>/statewait directly. It no longer calls
getAgents(), which was repeatedly listing session/<sid>/agent on every
statewait reopen.
2026-08-01 21:53:01 +02:00
Levi Neely 3bb75b6c20 gui: stop rebuilding session tree on selection changes
The dominant 9P spam came from buildSessionTree() re-listing
session/<sid>/agent on every activeSessionIdChanged and
activeAgentIdChanged signal. Tree rebuilds are now limited to
sessionsChanged and startup refresh; selection changes only
refresh the right pane transcript.
2026-08-01 21:48:04 +02:00
Levi Neely 50bca0a770 gui: add debug logs for session/agent selection and statewait startup 2026-08-01 21:24:38 +02:00
Levi Neely b8fc64fb18 gui: clicking a session clears explicit agent selection
- Session row click now calls setActiveSessionId(id)
- setActiveSessionId no longer returns early for same-session clicks;
  it always clears m_agentId and stops per-agent streams
- This enforces a clean 'session selected, no agent selected' state
2026-08-01 21:22:33 +02:00
Levi Neely 38cd1313ec gui: make switchAgent the only stream-start path
- setActiveSessionId remains session-only and never starts streams
- setActiveAgentId now clears any existing per-agent streams and only
  updates selection/state
- switchAgent is explicitly the only place that starts chat/statewait
- onStateFinished only reopens for the current explicit selection
2026-08-01 21:20:52 +02:00
Levi Neely 22e58b348f gui: require explicit agent selection for statewait/chat
- setActiveSessionId now selects only the session; it clears m_agentId
  and never auto-selects a lone agent.
- startStateStream no longer re-resolves or falls back to another agent;
  it only runs when the explicit active agent still exists.
- QML now handles activeAgentId changes explicitly and keeps the right
  pane blank/disabled when no session or no agent is selected.
2026-08-01 21:18:09 +02:00
Levi Neely 56b08d8f8f Revert "gui: never auto-restart statewait/chat streams on finish"
This reverts commit 608127e4ac.
2026-08-01 20:59:08 +02:00
Levi Neely 9f51a2181b Revert "gui: verify agent directory before starting statewait/chat streams"
This reverts commit dbbcc07934.
2026-08-01 20:59:08 +02:00
Levi Neely dbbcc07934 gui: verify agent directory before starting statewait/chat streams
Add a run9p stat check before opening blocking reads on
statewait and chat. If the agent directory doesn't exist,
skip starting (prevents tight restart loops when a session
is killed while streams are active). Only one statewait
reader runs at a time.
2026-08-01 20:56:40 +02:00
Levi Neely 608127e4ac gui: never auto-restart statewait/chat streams on finish
onStateFinished and onChatFinished no longer restart their
streams. Streams are only started when the user explicitly
selects an agent (setActiveSessionId for single-agent,
switchAgent for multi-agent). This prevents tight restart
loops when pointing to a nonexistent directory.
2026-08-01 20:55:41 +02:00
Levi Neely ef03cdc7f3 gui: deduplicate sessions from multi-agent index, fix field mapping
- Deduplicate session entries in refreshSessions and onEventReadyRead
  using QSet to skip duplicate session IDs from multi-agent index.
- Fix field mapping: index format is name\tstate\tcwd\tbackend\tmodel\tagent
- Added QSet include
2026-08-01 20:53:07 +02:00
Levi Neely 5fc4ebe64e gui: track agents by name, not by index
- setActiveSessionId: only auto-select agent when exactly ONE exists.
  With multiple agents, clear m_agentId and let user click on
  an agent node in the tree to activate it.
- startStateStream: verify current agent directory still exists
  instead of always re-discovering to the first agent. Only
  fall back to first agent if current agent is gone.
- Emit activeAgentIdChanged so QML reacts to agent changes.
2026-08-01 20:49:39 +02:00
Levi Neely e3fc0c49dd fix(gui): stop trimming lines before splitting by tab
The previous fix stopped trimming the whole output but still called
.trimmed() on each individual line, which stripped trailing tabs from
empty-session lines like "testsession2\t\t\t\t\t". Now we split
by tab directly without any trimming — empty fields stay as empty
strings and the parts count stays at 6.
2026-08-01 20:20:01 +02:00
Levi Neely f0a2185e2f fix(gui): trailing tabs stripped by trimmed() dropping empty sessions
refreshSessions() and onEventReadyRead() called .trimmed() on the full
session/idx output, which stripped trailing tab characters from the
last line. An empty session line ("testsession2\t\t\t\t\t")
became just "testsession2" — a single field that failed the size>=2
check and was silently dropped from the session list.
2026-08-01 20:18:26 +02:00
Levi Neely c8fb652785 debug: add qDebug output to session refresh and event handler 2026-08-01 20:16:47 +02:00
Levi Neely c85252b09a fix(gui): prevent session list from stealing keyboard focus
- ListView and its placeholder label now have activeFocusOnTab: false
  and focus: false so clicking the empty sidebar doesn't steal focus
  from the prompt text area
2026-08-01 20:14:40 +02:00
Levi Neely b68b72b31f fix(gui): use eventwait data directly, remove focus-stealing timer
- onEventReadyRead() now parses the eventwait data directly instead of
  discarding it and re-reading session/idx
- Removed the 2-second refresh timer that was stealing focus from the
  prompt text area on every tick
2026-08-01 20:13:53 +02:00
Levi Neely 87850f7f10 fix(gui): ensure sessions load on startup and via periodic refresh
- Call ollie.refreshSessions() from Component.onCompleted before
  buildSessionTree() for reliable initial load
- Add a 2-second periodic refresh timer as fallback for missed events
2026-08-01 20:10:17 +02:00
Levi Neely adb2760c91 fix(gui): load sessions on startup, show '(no sessions)' placeholder
- ensureRootDataLoaded() now calls refreshSessions() so the initial
  session list is populated immediately, not only on events
- Added '(no sessions)' placeholder label in the session tree ListView
  when no sessions exist
2026-08-01 20:05:31 +02:00
Levi Neely 6fcef9f60c feat(gui): handle empty sessions in ollie-gui
- getAgents(): filter out 'new' (agent creation file), return empty list
- setActiveSessionId(): skip agent init when no agents exist
- submit/interrupt/kill/streams: guard against empty m_agentId
- prompt input: disable when no agent, show 'No agent' placeholder
2026-08-01 19:51:07 +02:00
Levi Neely c4d6f2a1b9 gui: use rdwr (not write) for session/new and agent/new 2026-08-01 18:50:19 +02:00
Levi Neely 153b40cbc7 gui: write name= to session/new, then agent params to session/{name}/agent/new 2026-08-01 18:41:16 +02:00
Levi Neely 68a84a2404 gui: session group has Name only; all else under Agent 2026-08-01 18:35:32 +02:00
Levi Neely 1b67305ef7 gui: group session/agent params in new session dialog; add agent alias field 2026-08-01 18:33:05 +02:00
Levi Neely 374349622e gui: stop state stream when session is killed; don't restart if session gone 2026-08-01 18:27:55 +02:00
Levi Neely 363b2e95ed gui: add double-click to rename agent nodes in tree view 2026-08-01 18:17:13 +02:00
Levi Neely 74d346418d gui: re-discover agent ID on state stream start to pick up renames 2026-08-01 18:14:29 +02:00
Levi Neely 79d031ff04 remove 'Agent ' prefix from agent display name 2026-08-01 18:04:28 +02:00
Levi Neely cec358bdb9 omit response ID from assistant header 2026-08-01 17:18:27 +02:00
Levi Neely e8a3c6e1d8 ▶️ for call, 🖥️ for tool headers 2026-08-01 17:17:36 +02:00
Levi Neely 25492c889e ❌ for error headers 2026-08-01 17:16:19 +02:00
Levi Neely 37d4b995f4 emoji labels: 🧑 Human, 🤖 Ollie, ℹ️ Info 2026-08-01 17:15:45 +02:00
Levi Neely bd88328972 use emoji-style ⚠️ with variation selector 2026-08-01 17:13:36 +02:00
Levi Neely 8617aa5293 gui: render user-interrupt with yellow background and warning icon
- Add Interrupt block type to ChatBlock enum
- Detect <system-user-interruption> and </system-user-interruption>
  tags as block openers/closers in the parser
- Render interrupt blocks with bright yellow header
  (#3d2e00 dark, #fff8e1 light)
- Show ⚠ User Interrupt header label
2026-08-01 17:11:52 +02:00
Levi Neely ada6dc1feb fix context menu: kill target session, not active one
Right-click now stores the target session ID in a root-level
property (killTargetSessionId) before popping the menu, avoiding
unreliable QML parent chain traversal that could resolve to the
wrong delegate.
2026-08-01 17:08:22 +02:00