Skip to content

feat(ui): WebUI modernization PR3 — faithful session history rendering - #111

Closed
jkyberneees wants to merge 1 commit into
feat/webui-modernization-2from
feat/webui-modernization-3
Closed

feat(ui): WebUI modernization PR3 — faithful session history rendering#111
jkyberneees wants to merge 1 commit into
feat/webui-modernization-2from
feat/webui-modernization-3

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

feat(ui): WebUI modernization PR3 — faithful session history rendering

Third PR of the WebUI modernization roadmap (Phase 2a: session reload
fidelity). Stacked on #110 (feat/webui-modernization-2).

Previously, loading a session from the sidebar re-rendered only user and
assistant text messages - tool calls, thinking blocks, sub-agent groups,
and their results silently disappeared, so the reloaded transcript lied
about what the agent actually did.

The persisted transcript already carries everything needed (assistant
messages with tool_calls + reasoning_content, tool messages with results
keyed by tool_call_id), so this is a client-only change with no API
modification:

  • renderSessionHistory walks the full message list: user messages (with
    attachment-body stripping as before), reasoning_content as collapsed
    thinking blocks, assistant text, and tool_calls matched to their tool
    results by tool_call_id. Assistant messages carrying both text and
    tool_calls render both, matching the live turn layout.
  • delegate_tasks calls render as completed sub-agent groups with per-task
    final state (done/error, summary, files, tokens) parsed from the tool
    result.
  • Tool-result truncation (600 chars + "show all") is shared with the live
    path via the extracted appendToolResultContent helper.
  • Sub-agent result parsing and card finalization are extracted
    (parseSubagentResults / finalizeSubagentCard) and shared between the
    live completeSubagents path and historical rendering - no duplicated
    logic.

Verified: node --check, go vet, full cmd/odek test suite.

Third PR of the WebUI modernization roadmap (Phase 2a: session reload
fidelity). Stacked on #110 (feat/webui-modernization-2).

Previously, loading a session from the sidebar re-rendered only user and
assistant text messages - tool calls, thinking blocks, sub-agent groups,
and their results silently disappeared, so the reloaded transcript lied
about what the agent actually did.

The persisted transcript already carries everything needed (assistant
messages with tool_calls + reasoning_content, tool messages with results
keyed by tool_call_id), so this is a client-only change with no API
modification:

- renderSessionHistory walks the full message list: user messages (with
  attachment-body stripping as before), reasoning_content as collapsed
  thinking blocks, assistant text, and tool_calls matched to their tool
  results by tool_call_id. Assistant messages carrying both text and
  tool_calls render both, matching the live turn layout.
- delegate_tasks calls render as completed sub-agent groups with per-task
  final state (done/error, summary, files, tokens) parsed from the tool
  result.
- Tool-result truncation (600 chars + "show all") is shared with the live
  path via the extracted appendToolResultContent helper.
- Sub-agent result parsing and card finalization are extracted
  (parseSubagentResults / finalizeSubagentCard) and shared between the
  live completeSubagents path and historical rendering - no duplicated
  logic.

Verified: node --check, go vet, full cmd/odek test suite.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 26, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
odek 556b8de Commit Preview URL

Branch Preview URL
Jul 26 2026, 12:38 PM

@jkyberneees

Copy link
Copy Markdown
Contributor Author

Superseded: this stacked chain was merged directly into main (merge commit 9ae5e46), together with #109. All changes from this PR are on main.

@jkyberneees
jkyberneees deleted the feat/webui-modernization-3 branch July 26, 2026 16:52
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