blinklabs-io / blinklabs-io/nview
NVIEW_VISUAL_MODE/NVIEW_IMAGE_PROTOCOL bypass config package, not settable via YAML
- Dominant language
- Go
- Stars
- 40
- Forks
- 4
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 9
Description
`NVIEW_VISUAL_MODE` and `NVIEW_IMAGE_PROTOCOL` bypass the config package
and cannot be set via YAML.
`style.go`'s `currentTerminalVisuals`/`terminalVisualsFromEnv` read these two
variables directly with `os.Getenv`, not through `internal/config`. Neither
field exists in `internal/config/config.go`.
Effects:
- The two variables cannot be set through the YAML config file, even though
`README.md`'s "Configuration (env)" section lists them alongside vars that
do support YAML (`NODE_NAME`, `CARDANO_NETWORK`, `PROM_HOST`, etc.),
implying parity that does not exist.
- Every other setting in the codebase is read exclusively through
`config.GetConfig()` per the project's own documented architecture; these
two are the only exception.
## Acceptance criteria
- `NVIEW_VISUAL_MODE` and `NVIEW_IMAGE_PROTOCOL` are added to
`internal/config` (struct fields + envconfig tags) and settable via YAML,
or the README is corrected to state they are env-only and why.
- `style.go` reads the resolved values from `config.GetConfig()` instead of
calling `os.Getenv` directly.
Contributor guide
Research direction
Start by reading internal/config/config.go and style.go, especially currentTerminalVisuals and terminalVisualsFromEnv, then compare the README.md Configuration (env) section with the existing configuration pattern. Verify how YAML-backed settings are resolved and whether these two variables should join that path or remain environment-only. Done means the chosen behavior is implemented consistently and the README and configuration code no longer contradict each other.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100