ui(admin): logs-viewer reads hero_proc LogLine schema (fw#10) #11

Merged
mik-tf merged 1 commit from development_mik into development 2026-05-23 18:33:04 +00:00
Owner

The <hero-logs-viewer> component was reading l.content and l.ts but hero_proc returns {line, src, stream, timestamp_ms} so the message body and timestamp columns rendered empty under live tail. Surfaced by the hero_assistance v1.0 walkthrough today.

Fix

  • Read l.line for body (with l.content as legacy fallback)
  • Read l.timestamp_ms for timestamp (with l.ts as legacy fallback)
  • Synthesize loglevel from [LEVEL] prefix in the line (Rust tracing convention: TRACE / DEBUG / INFO / WARN / WARNING / ERROR / CRITICAL / FATAL)
  • Fall back to 1 (info) when nothing matches; stderr stream rows bumped to 2 (warn) as a conservative default
  • Doc-comment refreshed to match the actual schema

Verify

Direct curl against hero_proc's logs.filter returns the new schema; the fixed component renders body + timestamp + level correctly. The legacy fallback paths preserve back-compat for any other consumer still emitting {content, ts, loglevel}.

Closes #10. No Rust changes; static JS only.

The `<hero-logs-viewer>` component was reading `l.content` and `l.ts` but hero_proc returns `{line, src, stream, timestamp_ms}` so the message body and timestamp columns rendered empty under live tail. Surfaced by the hero_assistance v1.0 walkthrough today. ## Fix - Read `l.line` for body (with `l.content` as legacy fallback) - Read `l.timestamp_ms` for timestamp (with `l.ts` as legacy fallback) - Synthesize loglevel from `[LEVEL]` prefix in the line (Rust tracing convention: TRACE / DEBUG / INFO / WARN / WARNING / ERROR / CRITICAL / FATAL) - Fall back to 1 (info) when nothing matches; `stderr` stream rows bumped to 2 (warn) as a conservative default - Doc-comment refreshed to match the actual schema ## Verify Direct curl against hero_proc's `logs.filter` returns the new schema; the fixed component renders body + timestamp + level correctly. The legacy fallback paths preserve back-compat for any other consumer still emitting `{content, ts, loglevel}`. Closes #10. No Rust changes; static JS only.
The `<hero-logs-viewer>` component was reading `l.content` and `l.ts` but
hero_proc returns `{line, src, stream, timestamp_ms}` so the message body
and timestamp columns rendered empty under live tail.

Fix: read `l.line` (with `l.content` as legacy fallback) and
`l.timestamp_ms` (with `l.ts` as legacy fallback). Loglevel is now
synthesized from the row's `[LEVEL]` prefix (the common Rust tracing
shape) with a small switch on `TRACE/DEBUG/INFO/WARN/WARNING/ERROR/CRITICAL/FATAL`;
falls back to 1 (info) when nothing matches, with `stderr` stream rows
bumped to 2 (warn) as a conservative default. Doc-comment refreshed to
match the actual schema.

Surfaced by the s2-028 hero_assistance v1.0 walkthrough.

Closes #10

Signed-by: mik-tf <mik-tf@noreply.invalid>
mik-tf merged commit 89f0418976 into development 2026-05-23 18:33:04 +00:00
mik-tf deleted branch development_mik 2026-05-23 18:33:04 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_website_framework!11
No description provided.