Polish native main thread and session UI - #70
Merged
Merged
Conversation
Main thread view - Pin the input bar: the chat is the only scrolling region, and it follows the latest message. - Drop the inline session list and thread replies from the native view; child sessions stay in the side panel. - Compact header (state, model, pending) with a details toggle. - Show a rejected send (409) inline, keep the text, and disable input while the thread is working or rotating. - Label child reports, hide the pre-cut protocol turn, and render message text as safe markdown (raw HTML shown as text). - Backend: /main-thread and conversation polling no longer queue behind a rotation. Connection handling - Add a connection store (/health probe plus request failures) and a banner when the backend is unreachable; disable input and mark the header stale. - Retry the initial load and reload sessions, inbox and notifications when the backend returns. - Show a real error in the session panel instead of "No sessions yet". - Keep a message that the backend accepted if the reply poll later fails, so it isn't sent twice. Dev - Proxy /api through Vite (VITE_API_URL=/api, MAINLOOP_API_PROXY) so a remote dev box needs one forwarded port.
…e Logs tab
Session page
- Reload when only [id] changes; the page loaded once on mount, so
clicking another session updated the URL but not the view
- Keep status live from the sessions store; show "can't reach the
backend" (and retry on recovery) instead of "Session not found"
- Fix the "WAITING ON_USER" label; share status labels with the list
- Collapse the identity strip to one summary line with a details toggle
- Remove the Logs tab and its dead code: LogViewer, createTaskLogClient
and the stub GET /sessions/{id}/logs endpoint
Mobile and layout
- Add the Sessions tab to the mobile tab bar (docs/specs/layout.md
already called for it)
- Size the desktop inbox and projects panels to their content
- Highlight the open session in the list
Chat
- Wrap long unbroken text and scroll wide tables inside bubbles
- Show the date on messages that are not from today
- Input: refocus after a send, ignore Enter during IME composition,
grow for multi-line text
- SessionChat: inline, self-clearing errors; restore the draft when a
send fails; disable input while the backend is unreachable
Other
- Project page read `tasks`, which the API does not return, and crashed
on load; list the project's sessions instead and reload on id change
- Use theme colors on the error page
- Update docs/specs/layout.md and sessions.md; update the two specs
that asserted on the Logs tab
Not run: the Playwright fast/mobile projects, because their global
setup resets the target database.
Cancelled sessions came back as "needs input": cancel set status failed,
and the agent sync recomputed status every few seconds and overwrote it.
Cancel also never stopped the agent.
Status
- cancelled is its own final status; cancelled and failed ignore later
agent activity (next_status)
- cancel stops the agent through Herdr and closes open deliveries; an
unconfirmed stop is reported, not retried
- a child that has reported is completed (report becomes its summary);
messaging it reopens it until the reply
- a cancelled or failed session refuses new messages (409)
- startup data fixes (idempotent): old "Cancelled by user" rows become
cancelled; already-reported children become completed
Clearing
- sessions.archived_at; finished sessions (completed, failed,
cancelled) can be cleared from the list, kept for audit. Never the main
thread; a live session must be cancelled first
- POST /sessions/{id}/archive and /sessions/archive-finished
- session view: Clear on finished sessions, cancel/clear errors shown;
list header: "clear N"
- main thread: `mainloop cancel <id>` and `mainloop clear [<id>]`
(agent API + CLI + standing prompt), main role only, own children only
Needs a rebuilt workspace image for the CLI verbs; the backend needs a
rollout for everything else.
Tests: unit tests with fakes for the status rules and the cleanup verbs
(runtime suite: 119 pass). Not run against a live cluster.
- dev-ui.sh runs a worktree's Vite against the shared Kind backend: per-worktree port, one shared backend port-forward, explicit kubeconfig and context, up/status/logs/down [--all] - AGENTS.md: document it; remove the Playwright commands and paragraph
…ents - New-agent page: show the backend's reason when a start is refused, Ctrl+Enter to start, disable Start while the backend is unreachable, placeholder for the default title - Apply the saved theme before first paint (no flash of the default) - Theme button exposes aria-expanded - Delete unused ProjectFilter and SessionExpandedView
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification
uv run -m unittest discover -s tests/runtime -p 'test_*.py').make lint: passed on 48 changed files.Limits