Repository navigation
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a static export mode to suppress interactive elements and clamp ruler labels for headless PNG capture, implements an LRU cache for inspection data to optimize switching between inspections, and enhances layout algorithms to prevent visual collisions (such as staggering co-located pins and routing tethers through gutters). Additionally, it optimizes log histogram rendering by reusing the full-archive histogram when filters match all logs. The review feedback correctly identifies a potential runtime error in resolveSessionId() where window is accessed directly without a defensive check, which could fail in SSR or server-side test environments.
| private resolveSessionId(): string { | ||
| const sessionMatch = window.location.pathname.match(/\/session\/([^/]+)/); | ||
| return sessionMatch ? sessionMatch[1] : '0'; | ||
| } |
There was a problem hiding this comment.
Directly referencing window without checking if it is defined can cause runtime errors (such as ReferenceError: window is not defined) during Server-Side Rendering (SSR), prerendering, or in server-side test environments. We should restore the defensive check typeof window !== 'undefined' that was present in the previous implementation.
private resolveSessionId(): string {
const sessionMatch =
typeof window !== 'undefined'
? window.location.pathname.match(/\/session\/([^/]+)/)
: null;
return sessionMatch ? sessionMatch[1] : '0';
}
Code Quality Report — ✅ Cloud Build
|
3dc116f to
faa7cb2
Compare
…d inspection caching
faa7cb2 to
ed9618e
Compare
Summary
Part 4/5 of the
render_timelinesvisual clarity, evidence manifest, andkhi-investigationskill stack./render/mcp-timelinevisual legibility: refines callout/connector leader routing, single-row 4-column evidence deck layout, ruler tick readability, role badge width reservation, bottom frame clearance, and index pane truncation/sizing.capacity = 4) for parsedInspectionDatainstances and cached log slices inMcpTimelineRenderSmartComponentso interleaved renders across multiple loaded inspections avoid cold reloads.pages/timeline-render/*andtimeline/components/*.Stack
fix(workbench): exempt KHI synthetic IDs, globs, and K8s refs in validate_report(main<-push-qylzxxkzxpry)feat(mcp): unify annotation string IDs, fix subtree highlights, and emit resolved evidence manifest(push-qylzxxkzxpry<-push-zxtpyqnnnxrr)fix(mcp): harden Chrome timeline renderer timeouts, pixel cap, and warm session reuse(push-zxtpyqnnnxrr<-push-yyqtuxrlvmvt)feat(web): improve static timeline export clarity, leader routing, and inspection caching(push-yyqtuxrlvmvt<-push-yowxrnppozmk)feat(skills): guide visual-first two-layer reporting in khi-investigation skill(push-yowxrnppozmk<-push-nywmlvytopkk)Verification
make qa-fast-must QA_LANG=ts— PASS (0 mustfix, 0 advisory, 0 skipped)make lint-web(ng lint,lint:style,lint:unused) — PASSmake check-format-web— PASSmake build-web& Angular Karma unit tests (1676/1676) — PASS