Skip to content

feat(core,server): session timeline in the viewer (#1470 c) - #1654

Merged
ajianaz merged 1 commit into
developfrom
feat/session-timeline-1470
Nov 3, 2026
Merged

ajianaz merged 1 commit into
developfrom
feat/session-timeline-1470

Conversation

@ajianaz

@ajianaz ajianaz commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

What

Session timeline for #1470 (c), as a page in the uteke view viewer (#1653).

  • New Sessions tab: the captured sessions (schema v24 observations), most recently active first. A session shows its turns in seq order (role, captured_at, status) and the memories that point back at it.
  • Link back: a memory whose source is capture:<session>:<batch> (what extraction writes today) or observation:<session> (the form the plan names) gets a "session timeline" link in the Memories tab.
  • Core, read-only: Uteke::capture_sessions, session_timeline, session_memories, plus session_of_source.
  • Two viewer-only paths, /viewer/sessions and /viewer/session?id=. They are not API routes and not in the registry, so CORE/LAB and docs/api-reference.md are unchanged. They sit behind the same token (401), Host (403) and GET-only (405) rules.
  • Fix found while testing: a stale uteke_viewer cookie from an earlier launch (cookies ignore ports) shadowed the fresh token on the launch URL and gave 401; the query token is now read first on /.
  • All stored text is rendered with textContent.

Why

Finishes #1470 (c). Done turns are deleted after the retention period, so an old session can show memories and no turns; the page says so. Plan: docs/plans/2026-10-29-dx-bundle-1470.md section 4.

Testing

  • cargo test -p uteke-core session_view: 4 tests (seq order and session scoping, the session list, both source forms and a s10 vs s1 prefix case, deprecated memories skipped, source parsing incl. session ids with :).
  • cargo test -p uteke-server viewer: 16 tests, new ones cover token/Host/method rules on the session paths, a missing id (400), percent-encoded ids, stored <script> returned verbatim as a JSON string, memories linked back, and the stale-cookie case.
  • cargo test -p uteke-core -p uteke-server, cargo clippy --workspace --all-targets, cargo fmt --check: clean.
  • Manual: real binaries with a seeded session; the page lists it, opens it, and <b>deploy</b> shows as literal text.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit ddf7d3f into develop Nov 3, 2026
15 checks passed
@ajianaz
ajianaz deleted the feat/session-timeline-1470 branch November 4, 2026 06:46
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