Skip to content

fix(agent): keep tool configuration collapsed by default - #7678

Open
BillLeoutsakosvl346 wants to merge 1 commit into
stagingfrom
investigate/agent-tools-collapse
Open

fix(agent): keep tool configuration collapsed by default#7678
BillLeoutsakosvl346 wants to merge 1 commit into
stagingfrom
investigate/agent-tools-collapse

Conversation

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor

Summary

Keep Agent tool configuration rows collapsed when opening the editor. Expansion is local UI state instead of persisted workflow data; existing isExpanded values remain compatible but no longer control the editor.

New configurable tools open for setup without closing other rows. Local choices follow duplicate rows through removal and reordering, while external tool-list replacements reset expansion safely. Search can still reveal the matching parameter. Row disclosure uses a native button, separate from its actions, and preview/locked fields remain read-only.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: ___________

Testing

  • 159 focused and adjacent tests passed, including 8 new component cases covering local expansion, immediate parameter edit/collapse/reopen through the real parameter bridge, duplicates, reorder/removal, external replacement, search, read-only inspection, and addition.
  • Browser-checked the actual ToolInput, ToolSubBlockRenderer, and EMCN components in an isolated production-built harness: keyboard disclosure, edit/collapse/reopen, duplicate removal, new-tool expansion, locked/preview behavior, search expansion, and long titles with visible warning badges at narrow width. Remote hooks and the leaf text field were controlled fixtures; this was not full-app end-to-end testing.
  • App type-check, full lint and lint:check, all 46 shared audits, block registry check, docs-manifest check, and git diff --check passed. Standard artifact generators produced no changes.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Screenshots/Videos

Browser verification used synthetic fixture tools in an isolated component harness; no full-app screenshots are attached.

@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 9, 2026 8:33pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR moves Agent tool-row expansion from persisted workflow data into local editor state.

  • Tool rows remain collapsed when the editor opens, regardless of legacy isExpanded values.
  • Expansion follows rows through additions, removal, and reordering, while external replacements reset it.
  • Search can temporarily reveal matching parameters without changing local or persisted state.
  • Preview and locked configurations remain read-only.
  • Focused component tests cover expansion, parameter edits, duplicates, reordering, replacement, search, preview, and tool addition.

Confidence Score: 5/5

The PR appears safe to merge, with no outstanding correctness, security, or repository-rule issues.

No changes were made after the previous review. The earlier import-order thread was resolved, and the author’s explanation is correct: the active Biome configuration groups @sim/* and es-toolkit as packages and produces the current order, so that finding is not outstanding.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/tool-input.tsx Moves disclosure state out of stored tool data, preserves row-local state across list mutations, and strengthens read-only rendering and accessibility.
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/tool-input-expansion.test.tsx Adds focused component coverage for local expansion, persistence boundaries, list identity changes, search, preview, and locked behavior.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    Stored[Stored tool configuration] --> Editor[ToolInput editor]
    Editor -->|initial render| Collapsed[Rows collapsed]
    User[User disclosure action] --> Local[Local expansion state]
    Search[Active parameter search] --> Display[Temporary displayed expansion]
    Local --> Display
    Editor -->|tool parameter edit| Persisted[Persisted workflow data]
    Local -. no persistence .-> Persisted
    External[External tool-list replacement] --> Reset[Reset local expansion]
Loading

Reviews (2): Last reviewed commit: "fix(agent): keep tool configuration expa..." | Re-trigger Greptile

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile Please re-evaluate the import-order finding against the active biome.json package-group ordering and the explanation in the resolved thread. The implementation is unchanged.

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

Screenshots — synthetic component preview

Actual ToolInput component in an isolated browser harness, not full-app end-to-end screenshots. Existing tools start collapsed; opening one leaves the other collapsed. The unavailable badges are disconnected test fixtures, not a regression.

Both tools collapsed:

Both tool configurations collapsed

One tool expanded independently:

First tool expanded while second remains collapsed

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