Skip to content

fix(chat): add WebUI surface context to agent turns#2523

Closed
AJV20 wants to merge 1 commit into
nesquena:masterfrom
AJV20:fix/webui-surface-context
Closed

fix(chat): add WebUI surface context to agent turns#2523
AJV20 wants to merge 1 commit into
nesquena:masterfrom
AJV20:fix/webui-surface-context

Conversation

@AJV20
Copy link
Copy Markdown
Contributor

@AJV20 AJV20 commented May 18, 2026

Thinking Path

  • Hermes WebUI runs browser-originated turns separately from Telegram and other messaging gateways.
  • Messaging gateways can carry platform/channel context that browser sessions do not naturally expose.
  • A small ephemeral WebUI surface note gives the agent the right execution context without persisting internal metadata into the visible transcript.
  • This narrows the “WebUI feels like it has less context” gap while preserving current session/history storage behavior.

What Changed

  • Adds a WebUI surface-context block to the agent ephemeral system prompt.
  • Includes non-secret fields: source, session id, active profile, and workspace.
  • Explicitly tells the agent that the browser chat is not the same live transcript as Telegram/Discord/Slack, and to use durable memory/sessions/tools for cross-surface recall.
  • Adds regression coverage for the prompt content and empty-field handling.
  • Updates CHANGELOG.md.

Why It Matters

WebUI chat turns now get the same kind of surface awareness that users expect from messaging-backed Hermes sessions, without assuming that Telegram transcript state is present in the browser session.

Verification

  • python -m pytest tests/test_webui_surface_context.py -q -o 'addopts='
  • python -m py_compile api/streaming.py
  • git diff --check

Risks / Follow-ups

  • This is intentionally metadata-only and ephemeral; it does not import messaging transcripts into WebUI.
  • A larger follow-up could expose an explicit “search prior messaging sessions” affordance if maintainers want cross-surface recall to be user-visible.

Model Used

OpenAI gpt-5.5 via Hermes Agent, with repository tools and targeted pytest/py_compile verification.

@nesquena-hermes
Copy link
Copy Markdown
Collaborator

Phase 0 quick note — agent review queued, holding for cron tick

Thanks @AJV20 for the diagnostics/surface-context/dashboard-link burst. These three (#2523 + #2524 + #2533) are well-scoped and CI-eligible, but they're <6 hours old from a first-time contributor with several other in-flight PRs (#2527 + #2526 are getting maintainer-review treatment separately).

For this sweep I'm holding all three out of the batch and letting the agent-review cron pick them up on its next tick — that's a structured per-PR diff/test/integration read with a recap comment, after which the parallel reviewer typically follows. Once both have landed, they'll be eligible for the next batch.

Nothing wrong with the PRs themselves at a glance — the burst pattern just means "scrutiny stays per-PR, not 'batch everything because they're all small'". Will revisit on the next sweep.

@AJV20
Copy link
Copy Markdown
Contributor Author

AJV20 commented May 18, 2026

Superseded by #2547, which includes the WebUI surface-context fix on a fresh branch from current master along with related context-parity changes.

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.

2 participants