Skip to content

feat(lab,cli): LogStream component + logs-explorer and deployment-detail templates - #3330

Merged
cixzhang merged 4 commits into
mainfrom
log-stream-templates
Jul 11, 2026
Merged

cixzhang merged 4 commits into
mainfrom
log-stream-templates

Conversation

@thedjpetersen

Copy link
Copy Markdown
Contributor

Why

Log/terminal surfaces were a top hand-rolled gap in the product-scale demo apps built on the design system: the Datadog-style clone built expandable log rows + live tail from scratch, and the Vercel-style clone built both a runtime log grid and a terminal build-log viewer. Nothing in core/lab covered streaming, log-level rows, or terminal chrome.

What

LogStream (packages/lab/src/LogStream/, experimental):

  • Mono grid rows (timestamp | level | source | message) with level accents (color-mix row washes, light-dark()-corrected warn text), expandable detail rows as real <button aria-expanded> elements
  • Follow-scroll live tail: pinned-to-bottom on append, unpins on user scroll-up (24px threshold), explicit re-pin via a "Jump to latest" affordance; controlled-when-provided isFollowing
  • variant="terminal" always-dark chrome; renderEntry escape hatch; role="log" scroller; content-visibility: auto rows (virtualization documented as a known limit); @starting-style fade-in for tailed lines, reduced-motion safe
  • 10 tests (117/117 across the whole lab suite)

Templates:

  • logs-explorer (Dashboard - Monitoring, previously empty): facet rail (LayoutPanel start slot, CheckboxList facets with counts, hides ≤768px) + PowerSearch + LogStream with live-tail Switch and pulsing StatusDot — rows, zero cards
  • deployment-detail (new Tools - Deployment Detail category): status header (mono id, env Token, StatusDot, Visit/Redeploy/Promote) + MetadataList + LogStream variant="terminal" streaming a fixed staged build script on Redeploy
  • Both with responsive contracts at the frame root and deterministic fixtures

Note: the changeset covers cli + core only — the repo's changeset gate rejects @astryxdesign/lab (canary-only), noted in the commit message.

Testing

10/10 LogStream tests, 117/117 lab suite; core + lab builds clean; typecheck:template-docs clean; sandbox sync + tsc --noEmit zero new errors; both --skeleton renders verified.

…templates

- New experimental LogStream (packages/lab): mono grid rows with token-derived
  level accents, expandable detail rows, follow-scroll live tail with a
  "Jump to latest" affordance, @starting-style fade-in for appended entries,
  and an always-dark terminal variant. content-visibility for offscreen rows;
  no virtualization (documented limit).
- New logs-explorer page template (Dashboard - Monitoring): facet rail,
  PowerSearch over level/service/message, scripted 1200ms live tail.
- New deployment-detail page template (new Tools - Deployment Detail
  category): status header, metadata grid, streaming terminal build log
  with Redeploy replay.
- Changeset covers cli + core only: @astryxdesign/lab is private/canary-only
  and check-changesets rejects it in frontmatter.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 1, 2026
@vercel

vercel Bot commented Jul 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
astryx Ready Ready Preview, Comment Jul 11, 2026 5:34pm

Request Review

…er styled

The sandbox never loaded lab's compiled StyleX CSS — existing lab chart
templates masked this because charts style via SVG attributes. LogStream
(and any class-styled lab component) rendered unstyled: stacked block
rows, no terminal chrome. Verified via Playwright render pass.
@thedjpetersen

Copy link
Copy Markdown
Contributor Author

Follow-up commit 982330c: a Playwright render pass caught LogStream rendering unstyled in the sandbox (stacked rows, no terminal chrome). Root cause was pre-existing: the sandbox's globals.css never imported @astryxdesign/lab/lab.css, so no class-styled lab component ever had its StyleX CSS loaded (lab charts masked this by styling via SVG attributes). Added the import; both templates verified rendering correctly — single-line mono grid rows with level accents, dark terminal variant with staged build sections.

@github-actions

github-actions Bot commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

No new or modified components detected.

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/core N/A 4.6KB 0B

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@cixzhang cixzhang 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.

Thanks for starting this. I'm pretty amenable to new things in lab but we should move the examples and templates for the new component out of the public packages for the time being until we have a chance to review and harden the component.

Comment thread .changeset/log-stream-templates.md Outdated
@@ -0,0 +1,8 @@
---
'@astryxdesign/cli': patch

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.

Lab right?

@@ -0,0 +1,354 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.

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.

For lab components we should put the examples in storybook for the time being since the templates get published through the CLI and docsite.

@cixzhang cixzhang added area:cli needs:code-review High-risk change (new package/component/API) — needs human code review before merge needs:design-review Affects visuals — Design should review labels Jul 8, 2026
@github-actions
github-actions Bot requested a review from cixzhang July 8, 2026 21:01
github-actions Bot added a commit that referenced this pull request Jul 8, 2026
@cixzhang
cixzhang enabled auto-merge (squash) July 11, 2026 04:55
@cixzhang
cixzhang merged commit 500d0c7 into main Jul 11, 2026
18 checks passed
github-actions Bot added a commit that referenced this pull request Jul 11, 2026
@github-actions
github-actions Bot deleted the log-stream-templates branch July 12, 2026 06:58

This branch was successfully deployed

1 active deployment
Preview — f564d25d Deployed Jul 11, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. needs:code-review High-risk change (new package/component/API) — needs human code review before merge needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants