Skip to content

Expose coherent conversation situations in UI and telemetry - #328

Merged
witbrock merged 1 commit into
mainfrom
codex/conversation-situation-ui
Jul 29, 2026
Merged

witbrock merged 1 commit into
mainfrom
codex/conversation-situation-ui

Conversation

@witbrock

Copy link
Copy Markdown
Member

What changed

  • adds a visible Situation inspector to each conversation, with the provisional text, revision provenance, bounded exact observations, omission state, refresh, close/Escape, and JSON export
  • keeps the inspector session-scoped, safe-rendered, responsive, and accessible through a concise status live region
  • treats situation text, observations, and retention metadata as one coherent carrier snapshot: canonical history reads may clear or lower state, late pre-reset responses cannot repopulate it, and generate responses use one post-persistence canonical read-back
  • exposes the full authority-bound carrier through chat_history_get_segments while keeping conversation_telemetry_get_locator compact with availability/revision/count metadata and a descriptor for the full read
  • makes delegated telemetry paging deterministic for persisted datetimes, stable-hash reconstructable, authority-preserving on every page, and measured against the actual outer stdio response guard
  • adds a deterministic authenticated browser fixture and updates the conversation-situation design guidance

Why

JVNAUTOSCI-2613 established conversations as distinguished carriers of a provisional shared situation. The remaining product and diagnostic seams did not make that carrier inspectable to users or available to telemetry consumers, and independent field merges could combine state from different carrier revisions. This completes those end-to-end seams without adding a new orchestration stage or promoting the situation to canonical domain knowledge.

Validation

  • 100 consolidated backend tests passed across carrier persistence/reset, history projection, locator/MCP access, real stdio delegation/paging, browser fixture, and generate read-back
  • 7 focused situation UI tests and 4 telemetry-access export tests passed
  • Ruff, static frontend lint, JavaScript syntax, MCP JSON parse, Python compilation, and git diff --check passed
  • live authenticated AgentTest replay passed at desktop and 390 px mobile width: populated text/provenance, retained observation disclosure, bounded refresh, successful JSON copy feedback, focus/close behaviour, and no browser console warnings/errors
  • full chatTab suite is 229/231; the two failures reproduce unchanged on origin/main (a stale Prompt-label assertion and an unrelated queued-composer assertion)

Copilot AI review requested due to automatic review settings July 29, 2026 19:26
@witbrock
witbrock marked this pull request as ready for review July 29, 2026 19:26
if (typeof value === 'boolean') {
return value ? 'Yes' : 'No';
}
if (value === null || value === undefined || value === '') {
if (typeof value === 'boolean') {
return value ? 'Yes' : 'No';
}
if (value === null || value === undefined || value === '') {
normalised = normalised.replace(tzinfo=timezone.utc)
return normalised.isoformat()
if isinstance(value, (set, frozenset)):
return sorted(value, key=lambda item: str(item))
@witbrock
witbrock merged commit eca6cac into main Jul 29, 2026
5 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR completes an end-to-end “conversation situation” carrier surface: it adds a UI inspector for the shared situation and retained exact observations, and updates backend/telemetry tooling so consumers can fetch a coherent, authority-bound carrier snapshot while keeping compact locators small.

Changes:

  • Adds a session-scoped “Situation” inspector UI (refresh/close/Escape, live-region status, JSON export) with safe rendering and retention/omission disclosure.
  • Extends chat-history and telemetry read paths so chat_history_get_segments carries situation + observations (paged under stdio guard), while conversation_telemetry_get_locator stays compact and exposes only freshness/availability metadata plus a descriptor for the full carrier read.
  • Updates backend generate/read-back behaviour, deterministic browser fixtures, and test coverage to treat situation/observations/omission state as one coherent snapshot at read boundaries.

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/frontend/chatTabConversationLlmTelemetryCopy.test.js Asserts telemetry copy payload includes updated agent instructions referencing carrier-bearing chat_history_get_segments.
tests/backend/test_von_generate_conversation_session_override.py Expands generate tests to verify canonical carrier read-back and conflict/failure behaviour for situation + observations.
tests/backend/test_telemetry_read_delegation_stdio.py Adds end-to-end stdio paging tests for carrier reads and verifies compact locator behaviour.
tests/backend/test_internal_mcp_locator_tools.py Validates internal MCP chat_history_get_segments returns provenanced carrier state.
tests/backend/test_conversation_telemetry_locator_service.py Ensures locator exposes freshness metadata (without embedding carrier content) and keeps carrier descriptors.
tests/backend/test_chat_history_service_segments.py Adds coverage for returning carrier state in a single DB read and for compact locator projection fields.
tests/backend/test_browser_test_auth_service.py Updates fixture tests to seed situation/observations and avoid duplicating durable records.
src/frontend/web/von_interface/templates/chat_tab.html Adds “Situation” toggle button and the situation panel markup to the chat tab.
src/frontend/web/von_interface/static/styles.css Introduces styling for the situation toggle/panel and responsive layout behaviour.
src/frontend/web/von_interface/static/js/test/chatTab.test.js Adds focused UI tests for carrier merging/reset behaviour, safe rendering, refresh, and export payload.
src/frontend/web/von_interface/static/js/chatTab.js Implements situation state caching/merging, panel wiring, refresh flow, and JSON export.
src/backend/services/conversation_telemetry_locator_service.py Adds situation/observation freshness metadata to the compact conversation telemetry locator and updates descriptor purpose text.
src/backend/services/chat_history_service.py Refactors bounded carrier-state extraction and adds optional inclusion of carrier state in get_chat_history_segments and locator projection.
src/backend/services/browser_test_auth_service.py Seeds fixture sessions with situation + observations and records update counts in fixture creation results.
src/backend/server/routes/von_routes.py Adds fail-soft post-persistence carrier read-back to return one coherent canonical snapshot in generate responses.
src/backend/server/routes/generate_route_support.py Extends generate success payload to include situation, observations, and observation state.
src/backend/mcp_server/vontology_mcp.json Updates MCP tool descriptions and schemas to document carrier-bearing reads and paging parameters.
src/backend/integrations/internal_mcp/catalogue.py Adds deterministic delegated telemetry paging (stdio-guard-aware) and returns carrier state via chat_history_get_segments.
docs/engineering/contextual_knowledge_evolution.md Updates design guidance to treat situation/observations/omission state as one coherent snapshot at read boundaries.

Comment on lines +16178 to +16182
dict(payload),
indent=2,
ensure_ascii=True,
default=_delegated_telemetry_json_default,
)
@witbrock
witbrock deleted the codex/conversation-situation-ui branch August 3, 2026 11:58
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