Repository navigation
feat(tools): pick individual tools inside a picker group - #264
Merged
Merged
Conversation
The tool pickers offered a tag group as a single atom: one entry that attached every member, with the members never listed. A session that needed two of the six board tools could not say so. Each group is now a collapsible section — the header attaches or clears the whole family in one click, and the tools under it are attachable one by one. The value stays a flat list of tool ids, so a half-selected group survives a round trip: the old picker read any selected member as the whole group and silently expanded it back to every id. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Signed-off-by: Artem Petrov <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The three tool pickers (workflow Base Resources, step session editor, New Session) offered a
tag group as a single atom: one entry that attached every member, with the members never
listed individually. A session that needed two of the twelve board tools could not say so.
There was a bug underneath, too.
toolPickerValuemarked a group as selected when any memberwas selected, and
toolIdsFromPickerValueexpanded that group token back into every member id— so a partial selection silently inflated to the whole group on the next edit. This was live in
dev data: a step with 2 of 12 board tools rendered as the full group and would have been saved
back as all 12.
What changed
A tag group is now a collapsible section, not an atom:
mixedcheckbox +2/12counter);Ungroupedsection — and when a projectoffers no groups at all, the picker is a plain flat list, exactly as before;
is the only honest rendering of a partial selection.
No schema change. The value was always a flat list of tool ids (
baseToolIds,step.toolIds, sessiontoolIds) — the group token existed only inside the picker. The Rubydiff in this PR is comments only.
Files
app/frontend/shared/lib/toolPicker.ts— rewritten:toolPickerSections/sectionState/toggleSection/toggleTool/toolPickerPills/filterSections. No group token, so ahalf-selected group survives a round trip.
app/frontend/shared/components/ToolPicker.tsx— new shared component on MantineCombobox.BaseResourcesTab,SessionEditorPanel,SessionNewForm.TagCatalog/PickerGroups/ controller comments updated — they still described groups asone-click atoms whose members are "never offered one by one".
Validation
Driven in a real browser against the dev stack, on all three screens, including the full
click → PATCH → Postgrespath (verifiedworkflow.config['base_tool_ids']andstep.tool_ids).Four defects were found and fixed that way:
None addedplaceholder stayed next to the chipsrightSection={<Combobox.Chevron />}6/6— i.e. "group fully attached"6/6 matchedTests
SessionNewForm.test.tsxandBuilderPage.test.tsxwere updatedto the section model, each gaining a case that a subset reaches the API as that subset —
the regression the old token model could not express.
make fe_check_allgreen (eslint / typescript / fsd / vitest, coverage 81.01%),make rubocopandmake brakemanclean.The backend suite was left to CI: the Ruby diff is comment-only, and a parallel
rails testfrom a worktree does not share the main checkout's flock.
🤖 Generated with Claude Code