Skip to content

fix(web): show truthful session details#67

Merged
marquesds merged 1 commit into
mainfrom
marquesds/web-session-truth
Jun 19, 2026
Merged

fix(web): show truthful session details#67
marquesds merged 1 commit into
mainfrom
marquesds/web-session-truth

Conversation

@marquesds

Copy link
Copy Markdown
Owner

Summary

Kaizen's local web view was difficult to trust: Codex sessions appeared as Claude, shell activity hid the actual commands, prompts were absent, and stale sessions used the unexplained internal label Orphaned.

This PR makes the Observe screen data-first and truthful while preserving bounded reads and low idle CPU.

Changes

  • Remove the visual hero and put project data at the top of the localhost UI.
  • Infer Codex identity, model, and transcript path from captured evidence, then repair historical rows once on writable store open.
  • Capture UserPromptSubmit through global Cursor and Claude hook configuration without modifying target repositories.
  • Show bounded command summaries in session events and rank the top three recent shell executables in Tool Pattern.
  • Replace Orphaned with No completion and explain that no final event arrived for 30 minutes.
  • Show the selected session prompt, with a trusted-home, 8 MiB-bounded transcript fallback and rollover-safe cache.
  • Update setup and Web documentation for prompt capture, command visibility, privacy, and incomplete sessions.

Testing

  • cargo fmt --all -- --check
  • cargo clippy --all-targets -- -D warnings
  • cargo test
  • JavaScript syntax checks plus direct command-ranking cases for chained commands, quoted node -e scripts, and non-shell tools.
  • Browser smoke against installed daemon: no visual hero; mixed Codex/Claude identities; known models restored; command details and Tool Pattern visible; prompt visible; No completion explained; zero console warnings/errors.
  • Idle daemon sample: 0.16% average CPU, 1.5% maximum across 10 seconds.
  • Docs updated.

Risk + rollback

Risk is limited to local session metadata, global user hook configuration, and read-only Web rendering. Historical repair changes only agent, model, and transcript-path metadata when captured evidence exists. Revert this commit to roll back code; no target repository files or schema migrations are introduced.

Related

No linked issue.

Notes for reviewer

Root cause: Codex compatibility hooks entered the Claude adapter and persisted adapter source as agent identity. Web compaction also discarded every event payload, while setup omitted prompt hooks.

An unfiltered local Nextest run executed perf_projector_phase2 under parallel contention and hit its wall-clock budget once. CI already excludes that binary from the parallel job and reruns it with --test-threads=1; serialized local runs passed 4/4.

AI Assistance

  • Implementation and regression tests were AI-assisted, then manually reviewed and exercised against the installed daemon.
  • No authentication, cryptography, or remote data-transfer logic changed.

Users could not trust the local dashboard because Codex sessions appeared as Claude, shell calls hid their commands, prompts were absent, and incomplete sessions used unexplained internal terminology.

Infer identity and model from captured evidence, backfill historical rows, capture prompts through global hooks, and render bounded prompt and command summaries in the data-first Web UI.
@marquesds marquesds self-assigned this Jun 19, 2026
@marquesds marquesds marked this pull request as ready for review June 19, 2026 18:16
@marquesds marquesds merged commit 32a1e60 into main Jun 19, 2026
9 checks passed
@marquesds marquesds deleted the marquesds/web-session-truth branch June 19, 2026 18:16
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