nanocoder
nanocoder copied to clipboard
[Bug] Display Settings: inverted label + compactToolDisplay preference never applied
Description
Two bugs in the /settings Display panel for tool results:
- Inverted label. The "Expand Tool Results by default" toggle shows ON when results are actually compact. getCompactToolDisplay() returns true = compact, but the panel renders isOn(currentCompactToolDisplay) — so the default state (compact on) shows "Expand … ON". The Ctrl+O hint uses the correct polarity.
- Preference never read. useAppState.tsx hardcodes useState(true) instead of reading preferences.compactToolDisplay. The /settings toggle only writes disk (updateCompactToolDisplay); nothing reads it, so the setting does nothing — not even after restart.
Environment
- OS: (e.g., macOS 14.0, Ubuntu 22.04, Windows 11) all
- Node version: (run
node --version) 24 - Nanocoder version: (run
nanocoder --version) 1.29.0 - Provider: (e.g., Ollama, OpenRouter, OpenAI-compatible API)
- Model: (e.g., llama3.2, claude-3.5-sonnet)
Steps to Reproduce
- start nanocoder
- see tool still show as compact
- have to click ctrl+o manually
Expected Behavior
if set to not compact it should auto show as expand
Actual Behavior
show as compact by default despite set to expand
Logs/Screenshots
If applicable, add logs or screenshots to help explain the problem
Additional Context
- [ ] I have searched existing issues to ensure this is not a duplicate
- [ ] I can reproduce this issue consistently
- [ ] This issue occurs with the latest version of nanocoder
Open PR:
- https://github.com/Nano-Collective/nanocoder/pull/941