-
Notifications
You must be signed in to change notification settings - Fork 1
Codex/atomic 8 terminal log line #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,124 @@ | ||||||
| 'use client' | ||||||
|
|
||||||
| import { ReactNode } from 'react' | ||||||
|
|
||||||
| export interface TerminalLogLineProps { | ||||||
| /** Primary log message content. */ | ||||||
| message: ReactNode | ||||||
| /** Severity level β controls the label color (default: 'info'). */ | ||||||
| level?: 'debug' | 'info' | 'warn' | 'error' | 'success' | ||||||
| /** Optional timestamp string (e.g. "10:23:45" or ISO). */ | ||||||
| timestamp?: string | ||||||
| /** Optional source / subsystem label (e.g. "server", "db"). */ | ||||||
| source?: string | ||||||
| /** Additional classes for layout overrides. */ | ||||||
| className?: string | ||||||
| } | ||||||
|
|
||||||
| /** | ||||||
| * Per-level color tokens β border, background tint, and text colors. | ||||||
| * | ||||||
| * `badge` β the [LEVEL] indicator pill (border + bg tint, consistent with TerminalBadge) | ||||||
| * `message` β foreground for the message body (dimmed for debug, red for error) | ||||||
| */ | ||||||
| const levelClasses: Record< | ||||||
| NonNullable<TerminalLogLineProps['level']>, | ||||||
| { badge: string; message: string } | ||||||
| > = { | ||||||
| debug: { | ||||||
| badge: 'border-(--glass-border) text-(--term-fg-dim) bg-[rgba(255,255,255,0.03)]', | ||||||
| message: 'text-(--term-fg-dim)', | ||||||
| }, | ||||||
| info: { | ||||||
| badge: | ||||||
| 'border-[var(--term-blue)]/40 text-(--term-blue) bg-[color-mix(in_oklab,var(--term-blue)_10%,transparent)]', | ||||||
| message: 'text-(--term-fg)', | ||||||
| }, | ||||||
| warn: { | ||||||
| badge: | ||||||
| 'border-[var(--term-yellow)]/40 text-(--term-yellow) bg-[color-mix(in_oklab,var(--term-yellow)_10%,transparent)]', | ||||||
| message: 'text-(--term-fg)', | ||||||
| }, | ||||||
| error: { | ||||||
| badge: | ||||||
| 'border-[var(--term-red)]/40 text-(--term-red) bg-[color-mix(in_oklab,var(--term-red)_10%,transparent)]', | ||||||
| message: 'text-(--term-red)', | ||||||
| }, | ||||||
| success: { | ||||||
| badge: | ||||||
| 'border-[var(--term-green)]/40 text-(--term-green) bg-[color-mix(in_oklab,var(--term-green)_10%,transparent)]', | ||||||
| message: 'text-(--term-fg)', | ||||||
| }, | ||||||
| } | ||||||
|
|
||||||
| /** | ||||||
| * 3-character uppercase level labels. | ||||||
| * All entries are exactly 3 chars so the badge pill stays a consistent width | ||||||
| * across levels in a monospace font. | ||||||
| */ | ||||||
| const levelLabel: Record<NonNullable<TerminalLogLineProps['level']>, string> = { | ||||||
| debug: 'DBG', | ||||||
| info: 'INF', | ||||||
| warn: 'WRN', | ||||||
| error: 'ERR', | ||||||
| success: 'OK', | ||||||
|
||||||
| success: 'OK', | |
| success: 'SUC', |
Copilot
AI
Mar 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrap-break-word isnβt a standard Tailwind utility and doesnβt appear to be defined anywhere in the repo, so long messages may not wrap and can overflow. Consider using Tailwindβs break-words (and/or break-all depending on desired behavior) to ensure the message column wraps correctly.
| <span className={`min-w-0 wrap-break-word ${cls.message}`}>{message}</span> | |
| <span className={`min-w-0 break-words ${cls.message}`}>{message}</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TerminalLogLineuses Tailwind class syntax liketext-(--term-fg-dim)/border-(--glass-border), but the rest of this codebase uses arbitrary values (e.g.text-[var(--term-fg-dim)],border-[var(--glass-border)]). Unless the project is intentionally relying on a Tailwind feature/plugin for the parentheses form, these classes likely won't generate styles and the badge/text colors will be wrong. Please switch these to the bracket form for consistency and to ensure Tailwind picks them up.