nanocoder icon indicating copy to clipboard operation
nanocoder copied to clipboard

[Bug] Display Settings: inverted label + compactToolDisplay preference never applied

Open coralsundy opened this issue 3 months ago • 1 comments

Description

Two bugs in the /settings Display panel for tool results:

  1. 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.
  2. 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

  1. start nanocoder
  2. see tool still show as compact
  3. 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

coralsundy avatar Aug 24 '26 21:08 coralsundy

Open PR:

  • https://github.com/Nano-Collective/nanocoder/pull/941

coralsundy avatar Aug 24 '26 21:08 coralsundy