@opengeni/react 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeni/react",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "React hooks and styled components for OpenGeni: live session streaming, chat composer, message timeline, session status, and fleet views — token-themed (CSS variables), dark-first, built on Tailwind v4 + Radix + Motion.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -280,6 +280,14 @@ export function buildTimeline(events: SessionEvent[]): TimelineItem[] {
280
280
  if (!isSessionStatus(status)) {
281
281
  break;
282
282
  }
283
+ // Only attention-worthy statuses earn a timeline divider. queued /
284
+ // running / idle are machinery telemetry: the header pill carries the
285
+ // live status, the shimmer says "running", and the turn chip's duration
286
+ // facet says how long — a stale "idle · 27s" row is pure noise,
287
+ // especially in historical traces.
288
+ if (!ATTENTION_STATUSES.has(status)) {
289
+ break;
290
+ }
283
291
  const previous = [...items].reverse().find((item): item is SessionStatusItem => item.kind === "session-status");
284
292
  if (previous?.status === status) {
285
293
  break;
@@ -577,6 +585,9 @@ function asRecord(value: unknown): Record<string, unknown> {
577
585
 
578
586
  const SESSION_STATUSES: readonly SessionStatus[] = ["queued", "running", "idle", "requires_action", "failed", "cancelled"];
579
587
 
588
+ /** Statuses that demand the reader's attention and so earn a timeline divider. */
589
+ const ATTENTION_STATUSES: ReadonlySet<SessionStatus> = new Set(["requires_action", "failed", "cancelled"]);
590
+
580
591
  /** Keep only entries that match the wire shapes; user payloads are untyped. */
581
592
  function resourceRefs(value: unknown): import("@opengeni/sdk").ResourceRef[] {
582
593
  if (!Array.isArray(value)) {