Skip to content

feat(ui): Add tool level expansion settings.#563

Merged
shantur merged 2 commits into
devfrom
appearance-settings-overhaul
Jun 19, 2026
Merged

feat(ui): Add tool level expansion settings.#563
shantur merged 2 commits into
devfrom
appearance-settings-overhaul

Conversation

@shantur

@shantur shantur commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a central tool-call registry for renderer lookup and configurable expansion defaults
  • add Appearance presets for transcript detail: Minimal, Balanced, Detailed, and Everything
  • allow per-item customization for thinking, known tool calls, and Other tools with responsive settings layout
  • persist toolCallExpansionDefaults while keeping legacy expansion preferences synchronized for command compatibility

Validation

  • npm run typecheck --workspace @codenomad/ui

Introduce a central tool-call registry that owns renderer lookup, exact tool names, preset defaults, and the special Other tools entry for unknown tools. Tool and thinking expansion defaults now resolve through the shared preference model instead of hardcoded read/skill behavior.

Rework Appearance interaction settings with Minimal, Balanced, Detailed, and Everything presets plus per-item customization rows that switch to Custom when edited. The layout adapts for narrow screens by stacking preset cards and expansion controls.

Persist the new toolCallExpansionDefaults setting under the existing UI settings bucket while keeping legacy toolOutputExpansion and thinkingBlocksExpansion synchronized for command-palette compatibility. Validation: npm run typecheck --workspace @codenomad/ui.
@shantur shantur changed the title feat(ui): add transcript expansion presets feat(ui): Add tool level expansion settings. Jun 19, 2026
@shantur

shantur commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator Author

@CodeNomadBot

I want you to perform the gatekeeper checks for latest PR state

check for regressions
check for better possible implementations
Be the PR gatekeeper
Be ruthless about code quality

@codenomadbot

codenomadbot Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Gatekeeper review for latest PR state.

Assumption: the request is for a strict review only, not code changes. I did not modify the branch.

Findings:

  1. Blocking regression: todoread no longer resolves to the todo renderer.

packages/ui/src/components/tool-call/renderers/todo.tsx:139-141 now declares todoRenderer.tools as only ["todowrite"], and the new registry only registers todowrite at packages/ui/src/components/tool-call/tool-registry.ts:108-114. Before this PR, todoread was mapped to todoRenderer; after this PR, resolveToolRenderer("todoread") falls through to defaultRenderer via getToolRegistryEntry(... ) ?? otherToolEntry at tool-registry.ts:163-168.

This is a real behavioral regression because the rest of the UI still treats todoread as a todo tool:

packages/ui/src/components/tool-call/tool-title.ts:18-32 still maps todoread to todoRenderer.

packages/ui/src/components/tool-call/utils.ts:46-72 still gives todoread the todo icon/name.

packages/ui/src/components/tool-call.tsx:518 still special-cases todoread alongside todowrite for pending-state behavior.

Impact: todoread tool calls lose the specialized todo body/search/action behavior and render as generic tool output, while titles/icons/pending behavior still suggest they are todo calls. This creates inconsistent UI and breaks an existing supported tool path.

Required fix: keep todoread mapped to the todo renderer. The minimal fix is to add aliases: ["todoread"] to the todowrite registry entry or add a separate todoread registry entry with the same renderer/presets. I would also restore todoRenderer.tools to include both names unless there is a concrete reason to narrow it, because the renderer itself is still the source of what it can handle.

Implementation-quality note:

The new tool-registry.ts is described as central, but tool-title.ts still has its own hardcoded TITLE_RENDERERS map. That duplication is exactly how the todoread regression slipped in. A better implementation is to make title lookup use the same registry entry/renderer as body rendering, or add a small test/assertion that all known renderer tools are present in the registry. Otherwise every future tool addition has to update multiple maps and can silently degrade to defaultRenderer.

Validation:

I attempted npm run typecheck --workspace @codenomad/ui, but this worktree cannot resolve workspace dependencies in the current environment. The run fails broadly with dependency-resolution errors such as missing solid-js, @opencode-ai/sdk/v2, and Node test types before PR-specific type errors are meaningful. I am not treating that as a PR-specific failure.

Gatekeeper verdict: request changes before merge. The PR should not ship while todoread regresses to the default renderer.

--
Yours,
CodeNomadBot

Move normal tool header title resolution onto the renderer that already comes from the central tool registry, eliminating the separate TITLE_RENDERERS map and its stale todoread entry.

Keep the task renderer's legacy metadata.summary fallback lightweight by using state titles and generic input details instead of renderer-specific title lookup. This preserves old task summaries without reintroducing a second tool registry.

Also remove remaining todoread branches from tool-call utilities because todoread is not an available tool. Validation: npm run typecheck --workspace @codenomad/ui.
@shantur

shantur commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed the tool-title registry duplication review in follow-up commit f78307d.

  • Removed the separate tool-title.ts / TITLE_RENDERERS map entirely.
  • Normal tool headers now use the already-resolved renderer from the central tool registry.
  • Kept the task renderer's legacy metadata.summary fallback, but it now uses state titles and generic input details instead of a second renderer map.
  • Removed the remaining todoread branches from tool-call utilities.

Clarification: todoread is not a deprecated tool here; it is not an available tool in this registry/UI, so the stale references were removed rather than kept as a deprecated alias.

Validation: npm run typecheck --workspace @codenomad/ui

@shantur

shantur commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator Author

@CodeNomadBot

Now?

@github-actions

Copy link
Copy Markdown

PR builds are available as GitHub Actions artifacts:

https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/27817555738

Artifacts expire in 7 days.
Artifacts:

  • pr-563-03ee5d22e3e8ba2ad13e5a4607d98b65341bb768-tauri-linux
  • pr-563-03ee5d22e3e8ba2ad13e5a4607d98b65341bb768-tauri-windows
  • pr-563-03ee5d22e3e8ba2ad13e5a4607d98b65341bb768-electron-macos
  • pr-563-03ee5d22e3e8ba2ad13e5a4607d98b65341bb768-tauri-macos-arm64
  • pr-563-03ee5d22e3e8ba2ad13e5a4607d98b65341bb768-electron-windows
  • pr-563-03ee5d22e3e8ba2ad13e5a4607d98b65341bb768-electron-linux

1 similar comment
@github-actions

Copy link
Copy Markdown

PR builds are available as GitHub Actions artifacts:

https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/27817555738

Artifacts expire in 7 days.
Artifacts:

  • pr-563-03ee5d22e3e8ba2ad13e5a4607d98b65341bb768-tauri-linux
  • pr-563-03ee5d22e3e8ba2ad13e5a4607d98b65341bb768-tauri-windows
  • pr-563-03ee5d22e3e8ba2ad13e5a4607d98b65341bb768-electron-macos
  • pr-563-03ee5d22e3e8ba2ad13e5a4607d98b65341bb768-tauri-macos-arm64
  • pr-563-03ee5d22e3e8ba2ad13e5a4607d98b65341bb768-electron-windows
  • pr-563-03ee5d22e3e8ba2ad13e5a4607d98b65341bb768-electron-linux

@codenomadbot

codenomadbot Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Re-review after follow-up commit f78307d5.

Assumption: “Now?” means re-check the latest PR state as gatekeeper, not make code changes.

Result: the previous blocking finding is resolved.

  • tool-title.ts and the duplicate TITLE_RENDERERS map are gone.
  • Normal tool headers now resolve titles through the already-selected renderer from the central registry.
  • No remaining todoread, tool-title, TITLE_RENDERERS, or resolveTitleForTool references remain under packages/ui/src.
  • The earlier inconsistent state where todoread was still special-cased in some paths but not registered for rendering is gone.

Remaining quality concern, not a blocker:

packages/ui/src/components/tool-call/renderers/task.tsx:141-159 now handles legacy task metadata.summary titles with a generic describeGenericToolTitle(...) path instead of renderer-specific getTitle logic. That avoids reintroducing a second renderer map, which is good, but it does lose some title fidelity for legacy fallback rows. Examples: read no longer gets the renderer’s relative path plus offset/limit formatting, bash loses timeout formatting, and todowrite no longer gets its status-derived plan/creating/completing title unless the summary entry already includes title.

I would not block merge on that because loaded child-session tool calls now render through the real ToolCall path, and this only affects the legacy summary fallback. If that fallback is still important, the better implementation is to expose a small central-registry title resolver that uses resolveToolRenderer(tool).getTitle(...) with a minimal context, rather than duplicating maps or hand-rolling generic title extraction inside task.tsx.

Validation:

I re-ran npm run typecheck --workspace @codenomad/ui, but this worktree still fails before PR-specific validation due to unresolved dependencies/types (solid-js, @opencode-ai/sdk/v2, Node test types, etc.). I cannot independently confirm the claimed typecheck result from this environment.

Gatekeeper verdict: no blocking findings in the latest diff. The previous blocker is cleared. Merge risk is acceptable if CI/typecheck is green in the proper dependency environment.

--
Yours,
CodeNomadBot

@shantur shantur merged commit c5056c3 into dev Jun 19, 2026
11 checks passed
@shantur shantur deleted the appearance-settings-overhaul branch June 19, 2026 09:52
@github-actions

Copy link
Copy Markdown

PR builds are available as GitHub Actions artifacts:

https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/27818237675

Artifacts expire in 7 days.
Artifacts:

  • pr-563-f78307d56647c75096bac686a0fcb6e2b65714b2-tauri-macos
  • pr-563-f78307d56647c75096bac686a0fcb6e2b65714b2-tauri-linux
  • pr-563-f78307d56647c75096bac686a0fcb6e2b65714b2-electron-macos
  • pr-563-f78307d56647c75096bac686a0fcb6e2b65714b2-tauri-macos-arm64
  • pr-563-f78307d56647c75096bac686a0fcb6e2b65714b2-tauri-windows
  • pr-563-f78307d56647c75096bac686a0fcb6e2b65714b2-electron-windows
  • pr-563-f78307d56647c75096bac686a0fcb6e2b65714b2-electron-linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant