Skip to content

feat(mcp,web): add manifestExcerpts and co-anchor badge sync to render_timelines - #1257

Merged
kyasbal merged 9 commits into
mainfrom
push-mvxovtwoxoyp
Nov 18, 2026
Merged

kyasbal merged 9 commits into
mainfrom
push-mvxovtwoxoyp

Conversation

@kyasbal

@kyasbal kyasbal commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Switch diffExcerpts and manifestExcerpts slicing to explicit JSONPath selectors (paths, failing with INVALID_ARGUMENT when omitted rather than falling back to implicit leading lines), and support hybrid path + query windows on logExcerpts:
    • Evaluate JSONPath selectors ($.a.b, bracket keys ['key.with.dots'], array indices/slices [0], [-1], [0:2], wildcards [*], recursive descent .., and filters [?(@.type=='Ready')]) directly on gopkg.in/yaml.v3 AST nodes with exact 1-based YAML subtree line bounds.
    • Evaluate diffExcerpts[].paths across both old and new revisions so unchanged configuration fields (spec), modified fields (-/+), added fields, and deleted fields can be combined unambiguously in a single diff card without heuristic beforeLines/afterLines guesswork.
    • Surface deepest-matched prefix child keys alongside previews on SLICE_QUERY_NOT_FOUND for immediate selector correction.
  • Add manifestExcerpts support to render_timelines (pkg/server/mcp/scene and web/) for point-in-time (time) and active-revision (revisionIndex) manifest state cards:
    • Read untruncated managedFields-stripped resource manifests via (*Workbench).GetRawResourceManifest.
    • Anchor time-selected manifest cards at the exact queried timestamp inside [viewStart, viewEnd], and verify [rev.Time, nextRevTime) viewport overlap for revisionIndex-selected manifest cards (clamping pins to viewStart when a revision started prior to the zoomed viewport and remained active).
    • Render MANIFEST kind tags, single-column YAML line numbers, match highlights, and interactive Open Manifest session jump buttons in TimelineEvidenceDeckComponent.
  • Synchronize co-anchored MarkerAnnotation and Excerpt badges and enforce chronological badge ordering:
    • Share badges automatically in both directions when a marker and an excerpt share the same anchor, and assign omitted marker 1..N badges in chronological TimeMs ascending order.
    • Sort excerpts by (TimeMs, kindPriority, itemIndex) (diff -> manifest -> log) and reject duplicate excerpt badges or out-of-order manual E<n> badges with actionable INVALID_ARGUMENT guidance while preserving custom semantic badges.

Verification

  • make pre-commit
  • make build-go && make lint-go && make test-go
  • make build-web && make lint-web && make test-web

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces point-in-time resource YAML manifest excerpts (manifestExcerpts) to the timeline rendering tool and bottom-docked evidence deck, extending the existing diff and log excerpt capabilities. The changes span backend slicing logic, badge synchronization, and frontend Angular components. The review feedback suggests improving error propagation in resolver_excerpt.go by returning non-nil errors alongside CallToolResult for duplicate or out-of-order badges, and optimizing SliceManifestBody by pre-checking query existence in the YAML body to fail fast.

Comment thread pkg/server/mcp/scene/slice_manifest.go Resolved
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Go Quality Report (origin/main) — ✅ PASS

Metric Result
Changed Scope 20 prod file(s), 18 test file(s), 197 unit(s)
Patch Coverage 98.9% (1479/1496 lines)
Mutation Score 100.0% (789/789 killed, 0 survived)
Function Similarity OK (109 new unit(s), 0 matches across 2633 corpus units)

TypeScript Quality Report (origin/main) — ✅ PASS

Metric Result
Changed Scope 5 prod file(s), 3 test file(s), 5 unit(s)
Patch Coverage 100.0% (14/14 lines)
Mutation Score 100.0% (0/0 killed, 0 survived)

Commit: 10760f25ec64 · Cloud Build Logs

@kyasbal
kyasbal added this pull request to the merge queue Nov 17, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 17, 2026
@kyasbal
kyasbal added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit 69416f2 Nov 18, 2026
22 checks passed
@kyasbal
kyasbal deleted the push-mvxovtwoxoyp branch November 18, 2026 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant