feat(reporter): use label config from cfg for status labels and ANSI colors #99

Closed
opened 2026-05-30 15:02:15 +02:00 by michael · 1 comment
Owner

Goal

Read status labels and ANSI color codes from cfg instead of
hardcoded STATUS_LABEL table in core/reporter.lua.

Current state

local STATUS_LABEL = {
  warn  = "[WARN]",
  error = "[ERROR]",
  ...
}

Target state

Labels defined in fragjan.conf under [label ""] sections.
reporter builds label as "[" .. cfg["label."].text .. "]"
and applies ANSI color if cfg["label."].color > 0.

Dependencies

  • DAW/fragjan#90 (output via adapters/ui) -- color rendering
    may move to berhtjan-cli renderer eventually

Acceptance criteria

  • STATUS_LABEL table removed from reporter.lua
  • Labels read from cfg
  • Color codes applied when > 0
  • Fallback to [?] if label not found in cfg
## Goal Read status labels and ANSI color codes from cfg instead of hardcoded STATUS_LABEL table in core/reporter.lua. ## Current state ```lua local STATUS_LABEL = { warn = "[WARN]", error = "[ERROR]", ... } ``` ## Target state Labels defined in fragjan.conf under [label "<status>"] sections. reporter builds label as "[" .. cfg["label.<status>"].text .. "]" and applies ANSI color if cfg["label.<status>"].color > 0. ## Dependencies - DAW/fragjan#90 (output via adapters/ui) -- color rendering may move to berhtjan-cli renderer eventually ## Acceptance criteria - [ ] STATUS_LABEL table removed from reporter.lua - [ ] Labels read from cfg - [ ] Color codes applied when > 0 - [ ] Fallback to [?] if label not found in cfg
michael added this to the Basic Version milestone 2026-05-30 16:08:42 +02:00
Author
Owner

Implemented in core/reporter.lua.

STATUS_LABEL table removed. Labels and ANSI colors now read from cfg
via label. sections in fragjan.conf. Fallback to [?] if label
not found in cfg.

Color rendering will move to berhtjan-cli renderer (DAW/fragjan#90).

Implemented in core/reporter.lua. STATUS_LABEL table removed. Labels and ANSI colors now read from cfg via label.<status> sections in fragjan.conf. Fallback to [?] if label not found in cfg. Color rendering will move to berhtjan-cli renderer (DAW/fragjan#90).
Sign in to join this conversation.
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
DAW/fragjan#99
No description provided.