feat: add ServiceLogcat console component#320
Merged
Conversation
Contributor
|
Storybook Preview: https://mirrorstack-ai.github.io/web-ui-kit/pr/320/ |
Promote the dev Logcat from web-applications into the kit as an idiomatic ui/dev component. Purely presentational: caller supplies logs: LogEntry[] (chronological, oldest first); the co-located useLogcat hook owns text/severity filters, the live-tail toggle, and the single-open accordion, and reverses entries to newest-first. Pins to the top while tailing, anchors the reading position on prepend, and expands an access-log line's request/response body (pretty-printed JSON) on click. Sibling-primitive imports use the kit-internal @/ alias (Badge, IconButton, SegmentedButton, FloatingLabelInput, SectionLabel, Surface, cn); LogEntry/ LogLevel + ServiceLogcatProps are exported from the public barrel. Ships a Storybook story (UI/Dev/ServiceLogcat) with a sample line carrying method/path/status/req_body/res_body so the expand is demoable. Bumps to 0.5.16 (pre-1.0 patch-only) with a CHANGELOG entry. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
daa98e4 to
f59fb6f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Promotes the dev module-service Logcat into the kit as a shared, data-agnostic console — so both the dev-module page and the per-app debug page can use the same component (web-applications adoption follows in a separate PR).
Adds
ServiceLogcat(UI/Dev/ServiceLogcat) — presentational log console: severity-floor + text filter, live-tail toggle, copy, compact single-line timestamps, and click-to-expand rows showing pretty-printed request/response bodies + a duration badge. Newest-at-top with top-anchored follow that anchors the reading position on prepend (no auto-pause); single-open accordion keyed by content.useLogcathook (filter/floor/tail state) and theLogEntry/LogLeveltypes.meta.Conventions
{ logs: LogEntry[] }— no data fetching (the dispatch-backeduseModuleLogsstays in the consuming app).@/-alias internal imports, exported from the public barrel,metapresent (components validate✓).releaselabel per the kit release flow.Verify
pnpm typecheck✓ ·pnpm components validate✓ (65/65) ·review-like-meAPPROVE.🤖 Generated with Claude Code